UNPKG

geostyler-openlayers-parser

Version:

GeoStyler Style Parser implementation for OpenLayers styles

25 lines (24 loc) 23.7 kB
import { NOFILL_WELLKNOWNNAMES as g } from "./OlSvgUtil.js"; import { getPointSvg as o } from "./OlSvgPoints.js"; const r = { horline: '<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8" viewBox="0 0 8 8"><rect x="0" y="3" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="1" y="3" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="2" y="3" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="3" y="3" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="4" y="3" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="5" y="3" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="6" y="3" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="7" y="3" width="1" height="1" style="fill:black; fill-opacity:1" /></svg>', line: '<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8" viewBox="0 0 8 8"><rect x="3" y="0" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="3" y="1" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="3" y="2" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="3" y="3" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="3" y="4" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="3" y="5" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="3" y="6" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="3" y="7" width="1" height="1" style="fill:black; fill-opacity:1" /></svg>', cross: '<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8" viewBox="0 0 8 8"><rect x="3" y="0" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="3" y="1" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="3" y="2" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="0" y="3" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="1" y="3" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="2" y="3" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="3" y="3" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="4" y="3" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="5" y="3" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="6" y="3" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="7" y="3" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="3" y="4" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="3" y="5" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="3" y="6" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="3" y="7" width="1" height="1" style="fill:black; fill-opacity:1" /></svg>', slash: '<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8" viewBox="0 0 8 8"><rect x="7" y="0" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="6" y="1" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="5" y="2" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="4" y="3" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="3" y="4" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="2" y="5" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="1" y="6" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="0" y="7" width="1" height="1" style="fill:black; fill-opacity:1" /></svg>', backslash: '<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8" viewBox="0 0 8 8"><rect x="0" y="0" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="1" y="1" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="2" y="2" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="3" y="3" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="4" y="4" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="5" y="5" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="6" y="6" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="7" y="7" width="1" height="1" style="fill:black; fill-opacity:1" /></svg>', x: '<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8" viewBox="0 0 8 8"><rect x="0" y="0" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="7" y="0" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="1" y="1" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="6" y="1" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="2" y="2" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="5" y="2" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="3" y="3" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="4" y="3" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="3" y="4" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="4" y="4" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="2" y="5" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="5" y="5" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="1" y="6" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="6" y="6" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="0" y="7" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="7" y="7" width="1" height="1" style="fill:black; fill-opacity:1" /></svg>', dense1: '<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8" viewBox="0 0 8 8"><rect x="0" y="0" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="1" y="0" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="2" y="0" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="3" y="0" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="4" y="0" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="5" y="0" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="6" y="0" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="7" y="0" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="0" y="1" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="2" y="1" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="3" y="1" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="4" y="1" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="6" y="1" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="7" y="1" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="0" y="2" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="1" y="2" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="2" y="2" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="3" y="2" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="4" y="2" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="5" y="2" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="6" y="2" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="7" y="2" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="0" y="3" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="1" y="3" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="2" y="3" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="3" y="3" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="4" y="3" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="5" y="3" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="6" y="3" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="7" y="3" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="0" y="4" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="1" y="4" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="2" y="4" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="3" y="4" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="4" y="4" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="5" y="4" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="6" y="4" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="7" y="4" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="0" y="5" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="2" y="5" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="3" y="5" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="4" y="5" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="6" y="5" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="7" y="5" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="0" y="6" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="1" y="6" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="2" y="6" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="3" y="6" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="4" y="6" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="5" y="6" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="6" y="6" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="7" y="6" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="0" y="7" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="1" y="7" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="2" y="7" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="3" y="7" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="4" y="7" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="5" y="7" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="6" y="7" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="7" y="7" width="1" height="1" style="fill:black; fill-opacity:1" /></svg>', dense2: '<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8" viewBox="0 0 8 8"><rect x="1" y="0" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="2" y="0" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="3" y="0" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="5" y="0" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="6" y="0" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="7" y="0" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="0" y="1" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="1" y="1" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="2" y="1" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="3" y="1" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="4" y="1" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="5" y="1" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="6" y="1" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="7" y="1" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="0" y="2" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="1" y="2" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="3" y="2" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="4" y="2" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="5" y="2" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="7" y="2" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="0" y="3" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="1" y="3" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="2" y="3" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="3" y="3" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="4" y="3" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="5" y="3" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="6" y="3" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="7" y="3" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="1" y="4" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="2" y="4" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="3" y="4" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="5" y="4" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="6" y="4" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="7" y="4" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="0" y="5" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="1" y="5" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="2" y="5" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="3" y="5" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="4" y="5" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="5" y="5" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="6" y="5" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="7" y="5" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="0" y="6" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="1" y="6" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="3" y="6" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="4" y="6" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="5" y="6" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="7" y="6" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="0" y="7" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="1" y="7" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="2" y="7" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="3" y="7" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="4" y="7" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="5" y="7" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="6" y="7" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="7" y="7" width="1" height="1" style="fill:black; fill-opacity:1" /></svg>', dense3: '<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8" viewBox="0 0 8 8"><rect x="1" y="0" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="3" y="0" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="5" y="0" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="7" y="0" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="0" y="1" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="2" y="1" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="3" y="1" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="4" y="1" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="6" y="1" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="7" y="1" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="1" y="2" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="3" y="2" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="5" y="2" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="7" y="2" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="0" y="3" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="1" y="3" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="2" y="3" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="4" y="3" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="5" y="3" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="6" y="3" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="1" y="4" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="3" y="4" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="5" y="4" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="7" y="4" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="0" y="5" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="2" y="5" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="3" y="5" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="4" y="5" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="6" y="5" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="7" y="5" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="1" y="6" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="3" y="6" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="5" y="6" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="7" y="6" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="0" y="7" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="1" y="7" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="2" y="7" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="4" y="7" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="5" y="7" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="6" y="7" width="1" height="1" style="fill:black; fill-opacity:1" /></svg>', dense4: '<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8" viewBox="0 0 8 8"><rect x="0" y="0" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="2" y="0" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="4" y="0" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="6" y="0" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="1" y="1" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="3" y="1" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="5" y="1" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="7" y="1" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="0" y="2" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="2" y="2" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="4" y="2" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="6" y="2" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="1" y="3" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="3" y="3" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="5" y="3" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="7" y="3" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="0" y="4" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="2" y="4" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="4" y="4" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="6" y="4" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="1" y="5" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="3" y="5" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="5" y="5" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="7" y="5" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="0" y="6" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="2" y="6" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="4" y="6" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="6" y="6" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="1" y="7" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="3" y="7" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="5" y="7" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="7" y="7" width="1" height="1" style="fill:black; fill-opacity:1" /></svg>', dense5: '<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8" viewBox="0 0 8 8"><rect x="0" y="0" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="2" y="0" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="4" y="0" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="6" y="0" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="1" y="1" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="5" y="1" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="0" y="2" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="2" y="2" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="4" y="2" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="6" y="2" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="3" y="3" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="7" y="3" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="0" y="4" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="2" y="4" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="4" y="4" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="6" y="4" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="1" y="5" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="5" y="5" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="0" y="6" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="2" y="6" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="4" y="6" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="6" y="6" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="3" y="7" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="7" y="7" width="1" height="1" style="fill:black; fill-opacity:1" /></svg>', dense6: '<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8" viewBox="0 0 8 8"><rect x="0" y="0" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="4" y="0" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="2" y="2" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="6" y="2" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="0" y="4" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="4" y="4" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="2" y="6" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="6" y="6" width="1" height="1" style="fill:black; fill-opacity:1" /></svg>', dense7: '<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8" viewBox="0 0 8 8"><rect x="1" y="1" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="5" y="1" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="1" y="5" width="1" height="1" style="fill:black; fill-opacity:1" /><rect x="5" y="5" width="1" height="1" style="fill:black; fill-opacity:1" /></svg>' }, d = (i) => { const { wellKnownName: h, color: c, fillOpacity: y, strokeColor: a, strokeOpacity: f, strokeWidth: s } = i, t = h.replace("brush://", ""), w = !s && g.includes(String(t)), e = t.startsWith("dense"); let l; return e || w ? (l = r[t], e ? (l = l.replace(/fill:black/g, `fill:${c}`), l = l.replace(/fill-opacity:1/g, `fill-opacity:${y ?? 1}`)) : (l = l.replace(/fill:black/g, `fill:${a}`), l = l.replace(/fill-opacity:1/g, `fill-opacity:${f ?? 1}`))) : l = o(i), l; }; export { d as fillPatternSvg };