domma-js 0.53.3 → 0.54.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/types/config.d.ts +2 -2
- package/assets/types/index.d.ts +48 -25
- package/assets/types/theme.d.ts +2 -1
- package/package.json +31 -6
- package/public/dist/bundles/domma-complete.css +14 -14
- package/public/dist/bundles/domma-data-focused.css +14 -14
- package/public/dist/bundles/domma-essentials.css +14 -14
- package/public/dist/bundles/domma-full.css +14 -14
- package/public/dist/bundles/domma-minimal.css +8 -8
- package/public/dist/domma-flags.esm.js +4 -3
- package/public/dist/domma-flags.esm.js.map +1 -0
- package/public/dist/domma-flags.min.js +4 -3
- package/public/dist/domma-flags.min.js.map +1 -0
- package/public/dist/domma-syntax.min.js +4 -3
- package/public/dist/domma-syntax.min.js.map +1 -0
- package/public/dist/domma.css +3 -3
- package/public/dist/domma.esm.js +6 -5
- package/public/dist/domma.esm.js.map +1 -0
- package/public/dist/domma.min.js +6 -5
- package/public/dist/domma.min.js.map +1 -0
- package/public/dist/elements.css +3 -3
- package/public/dist/grid.css +3 -3
- package/public/dist/syntax.css +3 -3
- package/public/dist/themes/domma-themes.css +3 -3
- package/bin/postinstall.js +0 -212
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"domma-flags.esm.js","sources":["../assets/flags/europe.js","../assets/flags/americas.js","../assets/flags/africa.js","../assets/flags/asia.js","../assets/flags/oceania.js","../assets/flags/index.js","../../src/flags.js","../../src/flags-bundle.js"],"sourcesContent":["/**\n * Domma Flags - Europe\n *\n * Compact flag descriptors expanded to SVG at render time. Canvas is 60×40 (3:2).\n * Complex emblems (coats of arms, etc.) are simplified for icon-scale clarity;\n * override any flag with FL.register(code, def) for a precise rendering.\n */\n\nexport const europe = {\n gb: {\n name: 'United Kingdom',\n svg:\n '<rect width=\"60\" height=\"40\" fill=\"#012169\"/>' +\n '<path d=\"M0,0 60,40 M60,0 0,40\" stroke=\"#fff\" stroke-width=\"8\"/>' +\n '<path d=\"M0,0 60,40 M60,0 0,40\" stroke=\"#C8102E\" stroke-width=\"4\"/>' +\n '<path d=\"M30,0 V40 M0,20 H60\" stroke=\"#fff\" stroke-width=\"13\"/>' +\n '<path d=\"M30,0 V40 M0,20 H60\" stroke=\"#C8102E\" stroke-width=\"8\"/>'\n },\n fr: {name: 'France', stripes: {dir: 'v', colors: ['#0055A4', '#FFFFFF', '#EF4135']}},\n de: {name: 'Germany', stripes: {dir: 'h', colors: ['#000000', '#DD0000', '#FFCE00']}},\n it: {name: 'Italy', stripes: {dir: 'v', colors: ['#009246', '#FFFFFF', '#CE2B37']}},\n es: {\n name: 'Spain',\n stripes: {dir: 'h', colors: ['#AA151B', '#F1BF00', '#AA151B'], weights: [1, 2, 1]}\n },\n pt: {\n name: 'Portugal',\n stripes: {dir: 'v', colors: ['#006600', '#FF0000'], weights: [2, 3]},\n overlays: [\n {type: 'circle', cx: 24, cy: 20, r: 5, fill: '#FFE936', stroke: '#006600', strokeWidth: 1},\n {type: 'circle', cx: 24, cy: 20, r: 2.4, fill: '#FF0000'}\n ]\n },\n nl: {name: 'Netherlands', stripes: {dir: 'h', colors: ['#AE1C28', '#FFFFFF', '#21468B']}},\n be: {name: 'Belgium', stripes: {dir: 'v', colors: ['#000000', '#FAE042', '#ED2939']}},\n ie: {name: 'Ireland', stripes: {dir: 'v', colors: ['#169B62', '#FFFFFF', '#FF883E']}},\n ch: {\n name: 'Switzerland',\n bg: '#FF0000',\n overlays: [\n {type: 'rect', x: 27, y: 11, w: 6, h: 18, fill: '#fff'},\n {type: 'rect', x: 21, y: 17, w: 18, h: 6, fill: '#fff'}\n ]\n },\n at: {name: 'Austria', stripes: {dir: 'h', colors: ['#ED2939', '#FFFFFF', '#ED2939']}},\n se: {name: 'Sweden', cross: {bg: '#006AA7', colour: '#FECC00'}},\n no: {name: 'Norway', cross: {bg: '#BA0C2F', border: '#FFFFFF', colour: '#00205B'}},\n dk: {name: 'Denmark', cross: {bg: '#C60C30', colour: '#FFFFFF'}},\n fi: {name: 'Finland', cross: {bg: '#FFFFFF', colour: '#003580'}},\n is: {name: 'Iceland', cross: {bg: '#02529C', border: '#FFFFFF', colour: '#DC1E35'}},\n pl: {name: 'Poland', stripes: {dir: 'h', colors: ['#FFFFFF', '#DC143C']}},\n ua: {name: 'Ukraine', stripes: {dir: 'h', colors: ['#0057B7', '#FFD700']}},\n gr: {\n name: 'Greece',\n stripes: {\n dir: 'h',\n colors: ['#0D5EAF', '#fff', '#0D5EAF', '#fff', '#0D5EAF', '#fff', '#0D5EAF', '#fff', '#0D5EAF']\n },\n overlays: [\n {type: 'rect', x: 0, y: 0, w: 22.22, h: 22.22, fill: '#0D5EAF'},\n {type: 'rect', x: 8.9, y: 0, w: 4.44, h: 22.22, fill: '#fff'},\n {type: 'rect', x: 0, y: 8.9, w: 22.22, h: 4.44, fill: '#fff'}\n ]\n },\n hr: {name: 'Croatia', stripes: {dir: 'h', colors: ['#FF0000', '#FFFFFF', '#171796']}},\n ru: {name: 'Russia', stripes: {dir: 'h', colors: ['#FFFFFF', '#0039A6', '#D52B1E']}},\n cz: {\n name: 'Czechia',\n stripes: {dir: 'h', colors: ['#FFFFFF', '#D7141A']},\n overlays: [{type: 'path', d: 'M0,0 L30,20 L0,40 Z', fill: '#11457E'}]\n }\n};\n","/**\n * Domma Flags - Americas\n * Canvas 60×40 (3:2). Complex emblems simplified for icon-scale clarity.\n */\n\nexport const americas = {\n us: {\n name: 'United States',\n svg:\n '<rect width=\"60\" height=\"40\" fill=\"#fff\"/>' +\n '<g fill=\"#B22234\">' +\n '<rect y=\"0\" width=\"60\" height=\"3.08\"/><rect y=\"6.15\" width=\"60\" height=\"3.08\"/>' +\n '<rect y=\"12.31\" width=\"60\" height=\"3.08\"/><rect y=\"18.46\" width=\"60\" height=\"3.08\"/>' +\n '<rect y=\"24.62\" width=\"60\" height=\"3.08\"/><rect y=\"30.77\" width=\"60\" height=\"3.08\"/>' +\n '<rect y=\"36.92\" width=\"60\" height=\"3.08\"/></g>' +\n '<rect width=\"24\" height=\"21.54\" fill=\"#3C3B6E\"/>' +\n '<g fill=\"#fff\">' +\n '<circle cx=\"3\" cy=\"3\" r=\"0.9\"/><circle cx=\"7\" cy=\"3\" r=\"0.9\"/><circle cx=\"11\" cy=\"3\" r=\"0.9\"/>' +\n '<circle cx=\"15\" cy=\"3\" r=\"0.9\"/><circle cx=\"19\" cy=\"3\" r=\"0.9\"/>' +\n '<circle cx=\"5\" cy=\"6\" r=\"0.9\"/><circle cx=\"9\" cy=\"6\" r=\"0.9\"/><circle cx=\"13\" cy=\"6\" r=\"0.9\"/>' +\n '<circle cx=\"17\" cy=\"6\" r=\"0.9\"/><circle cx=\"21\" cy=\"6\" r=\"0.9\"/>' +\n '<circle cx=\"3\" cy=\"9\" r=\"0.9\"/><circle cx=\"7\" cy=\"9\" r=\"0.9\"/><circle cx=\"11\" cy=\"9\" r=\"0.9\"/>' +\n '<circle cx=\"15\" cy=\"9\" r=\"0.9\"/><circle cx=\"19\" cy=\"9\" r=\"0.9\"/>' +\n '<circle cx=\"5\" cy=\"12\" r=\"0.9\"/><circle cx=\"9\" cy=\"12\" r=\"0.9\"/><circle cx=\"13\" cy=\"12\" r=\"0.9\"/>' +\n '<circle cx=\"17\" cy=\"12\" r=\"0.9\"/><circle cx=\"21\" cy=\"12\" r=\"0.9\"/>' +\n '<circle cx=\"3\" cy=\"15\" r=\"0.9\"/><circle cx=\"7\" cy=\"15\" r=\"0.9\"/><circle cx=\"11\" cy=\"15\" r=\"0.9\"/>' +\n '<circle cx=\"15\" cy=\"15\" r=\"0.9\"/><circle cx=\"19\" cy=\"15\" r=\"0.9\"/>' +\n '<circle cx=\"5\" cy=\"18\" r=\"0.9\"/><circle cx=\"9\" cy=\"18\" r=\"0.9\"/><circle cx=\"13\" cy=\"18\" r=\"0.9\"/>' +\n '<circle cx=\"17\" cy=\"18\" r=\"0.9\"/><circle cx=\"21\" cy=\"18\" r=\"0.9\"/></g>'\n },\n ca: {\n name: 'Canada',\n stripes: {dir: 'v', colors: ['#FF0000', '#FFFFFF', '#FF0000'], weights: [1, 2, 1]},\n overlays: [\n {\n type: 'path',\n fill: '#FF0000',\n d: 'M30 8 l1.6 3.4 3.6-0.8-1.2 2.6 2.4 1-2 1.8 3.4 1-3.4 1 0.5 1.2-3.1-0.4 0.4 4-1.6-2.4-1.6 2.4 0.4-4-3.1 0.4 0.5-1.2-3.4-1 3.4-1-2-1.8 2.4-1-1.2-2.6 3.6 0.8z'\n }\n ]\n },\n br: {\n name: 'Brazil',\n bg: '#009C3B',\n overlays: [\n {type: 'path', d: 'M30,5 L53,20 L30,35 L7,20 Z', fill: '#FFDF00'},\n {type: 'circle', cx: 30, cy: 20, r: 9, fill: '#002776'},\n {type: 'path', d: 'M21.5,17.5 A12,12 0 0 1 38.5,21', fill: 'none', stroke: '#fff', strokeWidth: 1.6},\n {type: 'star', cx: 27, cy: 18, r: 1.1, fill: '#fff'},\n {type: 'star', cx: 33, cy: 17, r: 1.1, fill: '#fff'},\n {type: 'star', cx: 30, cy: 23, r: 1.1, fill: '#fff'},\n {type: 'star', cx: 35, cy: 22, r: 1.1, fill: '#fff'},\n {type: 'star', cx: 25, cy: 22, r: 1.1, fill: '#fff'}\n ]\n },\n ar: {\n name: 'Argentina',\n stripes: {dir: 'h', colors: ['#74ACDF', '#FFFFFF', '#74ACDF']},\n overlays: [{type: 'circle', cx: 30, cy: 20, r: 3.4, fill: '#F6B40E', stroke: '#85340A', strokeWidth: 0.4}]\n },\n mx: {\n name: 'Mexico',\n stripes: {dir: 'v', colors: ['#006847', '#FFFFFF', '#CE1126']},\n overlays: [{type: 'circle', cx: 30, cy: 20, r: 3.2, fill: '#8C9A5B'}]\n },\n cl: {\n name: 'Chile',\n overlays: [\n {type: 'rect', x: 0, y: 0, w: 60, h: 20, fill: '#fff'},\n {type: 'rect', x: 0, y: 20, w: 60, h: 20, fill: '#D52B1E'},\n {type: 'rect', x: 0, y: 0, w: 20, h: 20, fill: '#0039A6'},\n {type: 'star', cx: 10, cy: 10, r: 6, fill: '#fff'}\n ]\n },\n co: {\n name: 'Colombia',\n stripes: {dir: 'h', colors: ['#FCD116', '#003893', '#CE1126'], weights: [2, 1, 1]}\n },\n pe: {name: 'Peru', stripes: {dir: 'v', colors: ['#D91023', '#FFFFFF', '#D91023']}},\n uy: {\n name: 'Uruguay',\n stripes: {\n dir: 'h',\n colors: ['#fff', '#0038A8', '#fff', '#0038A8', '#fff', '#0038A8', '#fff', '#0038A8', '#fff']\n },\n overlays: [\n {type: 'rect', x: 0, y: 0, w: 20, h: 17.78, fill: '#fff'},\n {type: 'circle', cx: 10, cy: 8.9, r: 4.5, fill: '#FCD116', stroke: '#7B3F00', strokeWidth: 0.5}\n ]\n }\n};\n","/**\n * Domma Flags - Africa\n * Canvas 60×40 (3:2). Complex emblems simplified for icon-scale clarity.\n */\n\nexport const africa = {\n za: {\n name: 'South Africa',\n svg:\n '<rect width=\"60\" height=\"40\" fill=\"#fff\"/>' +\n '<path d=\"M0,0 H22 L40,20 L22,40 H0 Z\" fill=\"#002395\"/>' +\n '<path d=\"M0,0 L26,20 L0,40 Z\" fill=\"#000\"/>' +\n '<rect x=\"0\" y=\"0\" width=\"60\" height=\"13.3\" fill=\"#DE3831\"/>' +\n '<rect x=\"0\" y=\"26.7\" width=\"60\" height=\"13.3\" fill=\"#002395\"/>' +\n '<path d=\"M0,0 L26,20 L0,40\" fill=\"none\" stroke=\"#FFB915\" stroke-width=\"3\"/>' +\n '<path d=\"M0,3 L21,20 L0,37\" fill=\"none\" stroke=\"#007749\" stroke-width=\"6\"/>' +\n '<path d=\"M-1,13.3 H60 M-1,26.7 H60\" stroke=\"#fff\" stroke-width=\"0\"/>' +\n '<rect x=\"26\" y=\"14.8\" width=\"34\" height=\"10.4\" fill=\"#007749\"/>' +\n '<path d=\"M0,6 L18,20 L0,34\" fill=\"none\" stroke=\"#fff\" stroke-width=\"1.5\"/>'\n },\n ng: {name: 'Nigeria', stripes: {dir: 'v', colors: ['#008751', '#FFFFFF', '#008751']}},\n gh: {\n name: 'Ghana',\n stripes: {dir: 'h', colors: ['#CE1126', '#FCD116', '#006B3F']},\n overlays: [{type: 'star', cx: 30, cy: 20, r: 5, fill: '#000'}]\n },\n eg: {\n name: 'Egypt',\n stripes: {dir: 'h', colors: ['#CE1126', '#FFFFFF', '#000000']},\n overlays: [{type: 'path', d: 'M30,17 l1.2,2.6 2.8-0.4-2,2 0.7,2.8-2.7-1.4-2.7,1.4 0.7-2.8-2-2 2.8,0.4z', fill: '#C09300'}]\n },\n ma: {\n name: 'Morocco',\n bg: '#C1272D',\n overlays: [{type: 'star', cx: 30, cy: 20, r: 8, fill: 'none', stroke: '#006233', strokeWidth: 1.6}]\n },\n sn: {\n name: 'Senegal',\n stripes: {dir: 'v', colors: ['#00853F', '#FDEF42', '#E31B23']},\n overlays: [{type: 'star', cx: 30, cy: 20, r: 4.5, fill: '#00853F'}]\n },\n ci: {name: 'Ivory Coast', stripes: {dir: 'v', colors: ['#F77F00', '#FFFFFF', '#009E60']}},\n cm: {\n name: 'Cameroon',\n stripes: {dir: 'v', colors: ['#007A5E', '#CE1126', '#FCD116']},\n overlays: [{type: 'star', cx: 30, cy: 20, r: 4, fill: '#FCD116'}]\n },\n dz: {\n name: 'Algeria',\n overlays: [\n {type: 'rect', x: 0, y: 0, w: 30, h: 40, fill: '#006233'},\n {type: 'rect', x: 30, y: 0, w: 30, h: 40, fill: '#fff'},\n {type: 'crescent', cx: 28, cy: 20, r: 7, off: 3, fill: '#D21034'},\n {type: 'star', cx: 36, cy: 20, r: 4, fill: '#D21034'}\n ]\n },\n tn: {\n name: 'Tunisia',\n bg: '#E70013',\n overlays: [\n {type: 'circle', cx: 30, cy: 20, r: 9, fill: '#fff'},\n {type: 'crescent', cx: 31, cy: 20, r: 5.5, off: 2.6, fill: '#E70013'},\n {type: 'star', cx: 33, cy: 20, r: 3, fill: '#E70013'}\n ]\n },\n ke: {\n name: 'Kenya',\n stripes: {\n dir: 'h',\n colors: ['#000000', '#fff', '#BB0000', '#fff', '#006600'],\n weights: [12, 1, 12, 1, 12]\n },\n overlays: [\n {type: 'line', x1: 24, y1: 8, x2: 36, y2: 32, stroke: '#000', strokeWidth: 1},\n {type: 'line', x1: 36, y1: 8, x2: 24, y2: 32, stroke: '#000', strokeWidth: 1},\n {type: 'ellipse', cx: 30, cy: 20, rx: 4, ry: 8, fill: '#fff'},\n {type: 'ellipse', cx: 30, cy: 20, rx: 2.6, ry: 6.4, fill: '#BB0000'}\n ]\n }\n};\n","/**\n * Domma Flags - Asia & Middle East\n * Canvas 60×40 (3:2). Complex emblems simplified for icon-scale clarity.\n */\n\nexport const asia = {\n jp: {\n name: 'Japan',\n bg: '#FFFFFF',\n overlays: [{type: 'circle', cx: 30, cy: 20, r: 10, fill: '#BC002D'}]\n },\n cn: {\n name: 'China',\n bg: '#DE2910',\n overlays: [\n {type: 'star', cx: 12, cy: 11, r: 6, fill: '#FFDE00'},\n {type: 'star', cx: 22, cy: 5, r: 2, fill: '#FFDE00'},\n {type: 'star', cx: 26, cy: 9, r: 2, fill: '#FFDE00'},\n {type: 'star', cx: 26, cy: 15, r: 2, fill: '#FFDE00'},\n {type: 'star', cx: 22, cy: 19, r: 2, fill: '#FFDE00'}\n ]\n },\n kr: {\n name: 'South Korea',\n bg: '#FFFFFF',\n overlays: [\n {type: 'path', d: 'M30,13 a7,7 0 0 1 0,14 a3.5,3.5 0 0 1 0,-7 a3.5,3.5 0 0 0 0,-7 Z', fill: '#CD2E3A'},\n {type: 'path', d: 'M30,13 a7,7 0 0 0 0,14 a3.5,3.5 0 0 0 0,-7 a3.5,3.5 0 0 1 0,-7 Z', fill: '#0047A0'},\n {type: 'circle', cx: 30, cy: 16.5, r: 3.5, fill: '#CD2E3A'},\n {type: 'circle', cx: 30, cy: 23.5, r: 3.5, fill: '#0047A0'},\n {type: 'group', children: [\n {type: 'rect', x: 9, y: 8, w: 7, h: 1.3, fill: '#000'},\n {type: 'rect', x: 9, y: 10.4, w: 7, h: 1.3, fill: '#000'},\n {type: 'rect', x: 9, y: 12.8, w: 7, h: 1.3, fill: '#000'}\n ]},\n {type: 'group', children: [\n {type: 'rect', x: 44, y: 8, w: 7, h: 1.3, fill: '#000'},\n {type: 'rect', x: 44, y: 10.4, w: 7, h: 1.3, fill: '#000'},\n {type: 'rect', x: 44, y: 12.8, w: 7, h: 1.3, fill: '#000'}\n ]}\n ]\n },\n in: {\n name: 'India',\n stripes: {dir: 'h', colors: ['#FF9933', '#FFFFFF', '#138808']},\n overlays: [\n {type: 'circle', cx: 30, cy: 20, r: 5, fill: 'none', stroke: '#000080', strokeWidth: 0.8},\n {type: 'circle', cx: 30, cy: 20, r: 1, fill: '#000080'},\n {type: 'path', d: 'M30,15 V25 M25,20 H35 M26.5,16.5 L33.5,23.5 M33.5,16.5 L26.5,23.5', stroke: '#000080', strokeWidth: 0.5}\n ]\n },\n sa: {\n name: 'Saudi Arabia',\n bg: '#006C35',\n overlays: [\n {type: 'rect', x: 10, y: 26, w: 40, h: 1.6, fill: '#fff'},\n {type: 'path', d: 'M10,26.8 l4,-2 v4 z', fill: '#fff'},\n {type: 'rect', x: 14, y: 14, w: 32, h: 5, fill: 'none'}\n ]\n },\n ae: {\n name: 'United Arab Emirates',\n overlays: [\n {type: 'rect', x: 0, y: 0, w: 60, h: 13.33, fill: '#00732F'},\n {type: 'rect', x: 0, y: 13.33, w: 60, h: 13.33, fill: '#fff'},\n {type: 'rect', x: 0, y: 26.66, w: 60, h: 13.34, fill: '#000'},\n {type: 'rect', x: 0, y: 0, w: 15, h: 40, fill: '#FF0000'}\n ]\n },\n qa: {\n name: 'Qatar',\n bg: '#FFFFFF',\n overlays: [\n {type: 'path', d: 'M22,0 H60 V40 H22 L27,36 L22,32 L27,28 L22,24 L27,20 L22,16 L27,12 L22,8 L27,4 Z', fill: '#8A1538'}\n ]\n },\n id: {name: 'Indonesia', stripes: {dir: 'h', colors: ['#FF0000', '#FFFFFF']}},\n th: {\n name: 'Thailand',\n stripes: {\n dir: 'h',\n colors: ['#A51931', '#F4F5F8', '#2D2A4A', '#F4F5F8', '#A51931'],\n weights: [1, 1, 2, 1, 1]\n }\n },\n vn: {\n name: 'Vietnam',\n bg: '#DA251D',\n overlays: [{type: 'star', cx: 30, cy: 20, r: 9, fill: '#FFFF00'}]\n },\n tr: {\n name: 'Turkey',\n bg: '#E30A17',\n overlays: [\n {type: 'crescent', cx: 24, cy: 20, r: 8, off: 3.2, fill: '#fff'},\n {type: 'star', cx: 35, cy: 20, r: 4, rotation: -54, fill: '#fff'}\n ]\n },\n il: {\n name: 'Israel',\n bg: '#FFFFFF',\n overlays: [\n {type: 'rect', x: 0, y: 4, w: 60, h: 4, fill: '#0038B8'},\n {type: 'rect', x: 0, y: 32, w: 60, h: 4, fill: '#0038B8'},\n {type: 'path', d: 'M30,13 L33.5,19 H26.5 Z', fill: 'none', stroke: '#0038B8', strokeWidth: 1},\n {type: 'path', d: 'M30,27 L33.5,21 H26.5 Z', fill: 'none', stroke: '#0038B8', strokeWidth: 1}\n ]\n }\n};\n","/**\n * Domma Flags - Oceania\n * Canvas 60×40 (3:2). The Union canton reuses a scaled Union Jack group.\n */\n\nconst UNION_CANTON =\n '<g transform=\"scale(0.5)\">' +\n '<rect width=\"60\" height=\"40\" fill=\"#012169\"/>' +\n '<path d=\"M0,0 60,40 M60,0 0,40\" stroke=\"#fff\" stroke-width=\"8\"/>' +\n '<path d=\"M0,0 60,40 M60,0 0,40\" stroke=\"#C8102E\" stroke-width=\"4\"/>' +\n '<path d=\"M30,0 V40 M0,20 H60\" stroke=\"#fff\" stroke-width=\"13\"/>' +\n '<path d=\"M30,0 V40 M0,20 H60\" stroke=\"#C8102E\" stroke-width=\"8\"/>' +\n '</g>';\n\nexport const oceania = {\n au: {\n name: 'Australia',\n svg:\n '<rect width=\"60\" height=\"40\" fill=\"#012169\"/>' +\n UNION_CANTON +\n '<path fill=\"#fff\" d=\"M15,25 l1.3,3.9 4.1,0 -3.3,2.4 1.3,3.9 -3.4,-2.4 -3.4,2.4 1.3,-3.9 -3.3,-2.4 4.1,0 Z\"/>' +\n '<g fill=\"#fff\">' +\n '<path d=\"M47,7 l0.9,2.7 2.8,0 -2.3,1.7 0.9,2.7 -2.3,-1.7 -2.3,1.7 0.9,-2.7 -2.3,-1.7 2.8,0 Z\"/>' +\n '<path d=\"M40,19 l0.9,2.7 2.8,0 -2.3,1.7 0.9,2.7 -2.3,-1.7 -2.3,1.7 0.9,-2.7 -2.3,-1.7 2.8,0 Z\"/>' +\n '<path d=\"M47,31 l0.9,2.7 2.8,0 -2.3,1.7 0.9,2.7 -2.3,-1.7 -2.3,1.7 0.9,-2.7 -2.3,-1.7 2.8,0 Z\"/>' +\n '<path d=\"M54,18 l0.9,2.7 2.8,0 -2.3,1.7 0.9,2.7 -2.3,-1.7 -2.3,1.7 0.9,-2.7 -2.3,-1.7 2.8,0 Z\"/>' +\n '<circle cx=\"49\" cy=\"24\" r=\"1.2\"/></g>'\n },\n nz: {\n name: 'New Zealand',\n svg:\n '<rect width=\"60\" height=\"40\" fill=\"#00247D\"/>' +\n UNION_CANTON +\n '<g>' +\n '<path fill=\"#fff\" d=\"M47,7 l1,2.9 3,0 -2.5,1.9 1,2.9 -2.5,-1.8 -2.5,1.8 1,-2.9 -2.5,-1.9 3,0 Z\"/>' +\n '<path fill=\"#CC142B\" d=\"M47,8.5 l0.6,1.9 2,0 -1.6,1.2 0.6,1.9 -1.6,-1.2 -1.6,1.2 0.6,-1.9 -1.6,-1.2 2,0 Z\"/>' +\n '<path fill=\"#fff\" d=\"M41,20 l1,2.9 3,0 -2.5,1.9 1,2.9 -2.5,-1.8 -2.5,1.8 1,-2.9 -2.5,-1.9 3,0 Z\"/>' +\n '<path fill=\"#CC142B\" d=\"M41,21.5 l0.6,1.9 2,0 -1.6,1.2 0.6,1.9 -1.6,-1.2 -1.6,1.2 0.6,-1.9 -1.6,-1.2 2,0 Z\"/>' +\n '<path fill=\"#fff\" d=\"M53,18 l1,2.9 3,0 -2.5,1.9 1,2.9 -2.5,-1.8 -2.5,1.8 1,-2.9 -2.5,-1.9 3,0 Z\"/>' +\n '<path fill=\"#CC142B\" d=\"M53,19.5 l0.6,1.9 2,0 -1.6,1.2 0.6,1.9 -1.6,-1.2 -1.6,1.2 0.6,-1.9 -1.6,-1.2 2,0 Z\"/>' +\n '<path fill=\"#fff\" d=\"M47,32 l1,2.9 3,0 -2.5,1.9 1,2.9 -2.5,-1.8 -2.5,1.8 1,-2.9 -2.5,-1.9 3,0 Z\"/>' +\n '<path fill=\"#CC142B\" d=\"M47,33.5 l0.6,1.9 2,0 -1.6,1.2 0.6,1.9 -1.6,-1.2 -1.6,1.2 0.6,-1.9 -1.6,-1.2 2,0 Z\"/>' +\n '</g>'\n }\n};\n","/**\n * Domma Flags\n * Aggregates nation-flag descriptors into a single registry, keyed by\n * ISO 3166-1 alpha-2 code, grouped by region.\n *\n * This is a curated starter set covering the major footballing and world\n * nations. It is easily extended at runtime with FL.register(code, def).\n */\n\nimport {europe} from './europe.js';\nimport {americas} from './americas.js';\nimport {africa} from './africa.js';\nimport {asia} from './asia.js';\nimport {oceania} from './oceania.js';\n\n// Merge all regions into a single registry\nexport const flags = {\n ...europe,\n ...americas,\n ...africa,\n ...asia,\n ...oceania\n};\n\n// Export region groups for selective imports\nexport {europe, americas, africa, asia, oceania};\n\n// Region metadata for the flag gallery\nexport const regions = {\n europe: {name: 'Europe', description: 'European nations', codes: Object.keys(europe)},\n americas: {name: 'Americas', description: 'North, Central & South America', codes: Object.keys(americas)},\n africa: {name: 'Africa', description: 'African nations', codes: Object.keys(africa)},\n asia: {name: 'Asia & Middle East', description: 'Asian and Middle Eastern nations', codes: Object.keys(asia)},\n oceania: {name: 'Oceania', description: 'Australia, New Zealand & the Pacific', codes: Object.keys(oceania)}\n};\n\nexport default flags;\n","/**\n * Domma Flags Registry\n *\n * Renders nation flags as inline SVG. Flags are stored as compact descriptors\n * (stripe/cross/overlay specs or raw SVG) and expanded to SVG markup lazily on\n * first render, then memoised - nothing touches the DOM until a flag is actually\n * requested. Keyed by ISO 3166-1 alpha-2 code (e.g. 'gb', 'us', 'fr').\n *\n * Opt-in module: ships as a separate bundle (domma-flags) and is NOT part of the\n * core domma bundle. Attaches to Domma.flags / window.FL when loaded.\n */\n\nimport {flags as defaultFlags, regions} from '../public/assets/flags/index.js';\n\nconst NAMESPACE = 'http://www.w3.org/2000/svg';\nconst VIEWBOX = '0 0 60 40'; // canonical 3:2 flag canvas\nconst SQUARE_VIEWBOX = '10 0 40 40'; // centre-cropped 1:1 slice\n\nlet _clipSeq = 0;\n\n/* -------------------------------------------------------------------------- */\n/* Geometry helpers (shared by descriptor expansion) */\n/* -------------------------------------------------------------------------- */\n\n/**\n * Generate an n-pointed star path.\n * @param {number} cx - Centre x\n * @param {number} cy - Centre y\n * @param {number} outerR - Outer radius\n * @param {number} [points=5] - Number of points\n * @param {number} [innerRatio=0.382] - Inner radius as a fraction of outer\n * @param {number} [rotation=-90] - Rotation in degrees (-90 points up)\n * @returns {string} SVG path data\n */\nexport function starPath(cx, cy, outerR, points = 5, innerRatio = 0.382, rotation = -90) {\n const innerR = outerR * innerRatio;\n const step = Math.PI / points;\n const start = (rotation * Math.PI) / 180;\n let d = '';\n for (let i = 0; i < points * 2; i++) {\n const r = i % 2 === 0 ? outerR : innerR;\n const a = start + i * step;\n const x = (cx + r * Math.cos(a)).toFixed(2);\n const y = (cy + r * Math.sin(a)).toFixed(2);\n d += (i === 0 ? 'M' : 'L') + x + ',' + y;\n }\n return d + 'Z';\n}\n\n/**\n * Generate a crescent path (a lune) opening towards the fly (right).\n * The inner arc passes through the top and bottom of the outer circle.\n * @param {number} cx - Outer circle centre x\n * @param {number} cy - Outer circle centre y\n * @param {number} r - Outer radius\n * @param {number} [off=r*0.45] - Horizontal offset of the carving circle\n * @returns {string} SVG path data\n */\nexport function crescentPath(cx, cy, r, off = r * 0.45) {\n const ri = Math.sqrt(off * off + r * r);\n const top = (cy - r).toFixed(2);\n const bot = (cy + r).toFixed(2);\n const x = cx.toFixed(2);\n return `M${x},${top} A${r},${r} 0 1 0 ${x},${bot} A${ri.toFixed(2)},${ri.toFixed(2)} 0 0 1 ${x},${top}Z`;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Descriptor → SVG markup expansion */\n/* -------------------------------------------------------------------------- */\n\nfunction esc(v) {\n return String(v).replace(/\"/g, '"');\n}\n\nfunction buildStripes({dir = 'h', colors = [], weights = null}) {\n const total = weights ? weights.reduce((a, b) => a + b, 0) : colors.length;\n let offset = 0;\n let out = '';\n colors.forEach((colour, i) => {\n const w = weights ? weights[i] : 1;\n if (dir === 'v') {\n const x = (60 * offset) / total;\n const width = (60 * w) / total;\n out += `<rect x=\"${x.toFixed(3)}\" y=\"0\" width=\"${width.toFixed(3)}\" height=\"40\" fill=\"${esc(colour)}\"/>`;\n } else {\n const y = (40 * offset) / total;\n const height = (40 * w) / total;\n out += `<rect x=\"0\" y=\"${y.toFixed(3)}\" width=\"60\" height=\"${height.toFixed(3)}\" fill=\"${esc(colour)}\"/>`;\n }\n offset += w;\n });\n return out;\n}\n\n/**\n * Nordic (offset) cross - vertical bar sits towards the hoist.\n */\nfunction buildCross({bg, colour, border = null, thickness = 8}) {\n const t = thickness;\n const vx = 16; // vertical bar left edge (hoist-offset)\n const hy = 20 - t / 2; // horizontal bar top edge (centred)\n let out = `<rect x=\"0\" y=\"0\" width=\"60\" height=\"40\" fill=\"${esc(bg)}\"/>`;\n if (border) {\n const b = 2;\n out += `<rect x=\"${vx - b}\" y=\"0\" width=\"${t + b * 2}\" height=\"40\" fill=\"${esc(border)}\"/>`;\n out += `<rect x=\"0\" y=\"${hy - b}\" width=\"60\" height=\"${t + b * 2}\" fill=\"${esc(border)}\"/>`;\n }\n out += `<rect x=\"${vx}\" y=\"0\" width=\"${t}\" height=\"40\" fill=\"${esc(colour)}\"/>`;\n out += `<rect x=\"0\" y=\"${hy}\" width=\"60\" height=\"${t}\" fill=\"${esc(colour)}\"/>`;\n return out;\n}\n\nfunction buildOverlay(o) {\n const fill = o.fill !== undefined ? ` fill=\"${esc(o.fill)}\"` : '';\n const stroke = o.stroke ? ` stroke=\"${esc(o.stroke)}\"` : '';\n const sw = o.strokeWidth !== undefined ? ` stroke-width=\"${o.strokeWidth}\"` : '';\n const extra = stroke + sw + (stroke && !o.fill ? ' fill=\"none\"' : '');\n switch (o.type) {\n case 'rect':\n return `<rect x=\"${o.x}\" y=\"${o.y}\" width=\"${o.w}\" height=\"${o.h}\"${o.rx ? ` rx=\"${o.rx}\"` : ''}${fill}${extra}/>`;\n case 'circle':\n return `<circle cx=\"${o.cx}\" cy=\"${o.cy}\" r=\"${o.r}\"${fill}${extra}/>`;\n case 'ellipse':\n return `<ellipse cx=\"${o.cx}\" cy=\"${o.cy}\" rx=\"${o.rx}\" ry=\"${o.ry}\"${fill}${extra}/>`;\n case 'line':\n return `<line x1=\"${o.x1}\" y1=\"${o.y1}\" x2=\"${o.x2}\" y2=\"${o.y2}\"${stroke}${sw}/>`;\n case 'path':\n return `<path d=\"${o.d}\"${fill}${extra}/>`;\n case 'star':\n return `<path d=\"${starPath(o.cx, o.cy, o.r, o.points || 5, o.innerRatio || 0.382, o.rotation === undefined ? -90 : o.rotation)}\"${fill || ' fill=\"#fff\"'}${extra}/>`;\n case 'crescent':\n return `<path d=\"${crescentPath(o.cx, o.cy, o.r, o.off)}\"${fill || ' fill=\"#fff\"'}${extra}/>`;\n case 'group':\n return `<g${o.transform ? ` transform=\"${esc(o.transform)}\"` : ''}>${(o.children || []).map(buildOverlay).join('')}</g>`;\n default:\n return '';\n }\n}\n\nfunction expandFlag(def) {\n if (def.svg) {\n return def.svg;\n }\n let out = '';\n if (def.stripes) {\n out += buildStripes(def.stripes);\n }\n if (def.cross) {\n out += buildCross(def.cross);\n }\n if (def.bg && !def.stripes && !def.cross) {\n out = `<rect x=\"0\" y=\"0\" width=\"60\" height=\"40\" fill=\"${esc(def.bg)}\"/>` + out;\n }\n if (def.overlays) {\n out += def.overlays.map(buildOverlay).join('');\n }\n return out;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Registry */\n/* -------------------------------------------------------------------------- */\n\nclass FlagRegistry {\n constructor() {\n this._flags = {...defaultFlags};\n this._regions = {...regions};\n this._cache = {};\n }\n\n _markup(code) {\n if (this._cache[code] !== undefined) {\n return this._cache[code];\n }\n const def = this._flags[code];\n const markup = def ? expandFlag(def) : null;\n this._cache[code] = markup;\n return markup;\n }\n\n /**\n * Render a flag as an SVG element.\n * @param {string} code - ISO 3166-1 alpha-2 code (case-insensitive)\n * @param {Object} [options]\n * @param {number} [options.size=24] - Height in px (width follows aspect)\n * @param {number} [options.width] - Explicit width override\n * @param {number} [options.height] - Explicit height override\n * @param {string} [options.shape='rect'] - 'rect' | 'square' | 'circle' | 'rounded'\n * @param {boolean|string} [options.border=false] - Add a hairline border (or colour)\n * @param {string} [options.class] - Extra CSS classes\n * @param {string} [options.title] - Accessible title (defaults to country name)\n * @param {Object} [options.attrs] - Additional attributes\n * @returns {SVGElement|null}\n */\n render(code, options = {}) {\n code = String(code || '').toLowerCase();\n const def = this._flags[code];\n if (!def) {\n console.warn(`Flag \"${code}\" not found`);\n return null;\n }\n\n const {\n size = 24,\n width = null,\n height = null,\n shape = 'rect',\n border = false,\n class: className = '',\n title = null,\n attrs = {}\n } = options;\n\n const isSquareShape = shape === 'square' || shape === 'circle';\n const h = height || size;\n const w = width || (isSquareShape ? h : h * 1.5);\n\n const svg = document.createElementNS(NAMESPACE, 'svg');\n svg.setAttribute('viewBox', isSquareShape ? SQUARE_VIEWBOX : VIEWBOX);\n svg.setAttribute('width', w);\n svg.setAttribute('height', h);\n svg.setAttribute('role', 'img');\n\n const label = title || def.name || code.toUpperCase();\n svg.setAttribute('aria-label', label);\n\n const classes = ['dm-flag', `dm-flag-${shape}`];\n if (className) {\n classes.push(className);\n }\n svg.setAttribute('class', classes.join(' '));\n\n Object.entries(attrs).forEach(([k, v]) => svg.setAttribute(k, v));\n\n const clipId = `dm-flag-clip-${++_clipSeq}`;\n let inner = `<title>${esc(label)}</title>`;\n const body = this._markup(code) || '';\n\n if (shape === 'circle') {\n inner += `<defs><clipPath id=\"${clipId}\"><circle cx=\"30\" cy=\"20\" r=\"20\"/></clipPath></defs>`;\n inner += `<g clip-path=\"url(#${clipId})\">${body}</g>`;\n if (border) {\n const bc = typeof border === 'string' ? border : 'rgba(0,0,0,0.15)';\n inner += `<circle cx=\"30\" cy=\"20\" r=\"19.25\" fill=\"none\" stroke=\"${esc(bc)}\" stroke-width=\"1.5\"/>`;\n }\n } else if (shape === 'rounded') {\n inner += `<defs><clipPath id=\"${clipId}\"><rect x=\"0\" y=\"0\" width=\"60\" height=\"40\" rx=\"6\"/></clipPath></defs>`;\n inner += `<g clip-path=\"url(#${clipId})\">${body}</g>`;\n if (border) {\n const bc = typeof border === 'string' ? border : 'rgba(0,0,0,0.15)';\n inner += `<rect x=\"0.75\" y=\"0.75\" width=\"58.5\" height=\"38.5\" rx=\"5.25\" fill=\"none\" stroke=\"${esc(bc)}\" stroke-width=\"1.5\"/>`;\n }\n } else {\n inner += body;\n if (border) {\n const bc = typeof border === 'string' ? border : 'rgba(0,0,0,0.15)';\n const vb = isSquareShape ? {x: 10.5, y: 0.5, w: 39, h: 39} : {x: 0.5, y: 0.5, w: 59, h: 39};\n inner += `<rect x=\"${vb.x}\" y=\"${vb.y}\" width=\"${vb.w}\" height=\"${vb.h}\" fill=\"none\" stroke=\"${esc(bc)}\" stroke-width=\"1\"/>`;\n }\n }\n\n svg.innerHTML = inner;\n return svg;\n }\n\n /**\n * Get a flag as an HTML string.\n * @param {string} code\n * @param {Object} [options] - Same as render()\n * @returns {string}\n */\n html(code, options = {}) {\n const svg = this.render(code, options);\n if (!svg) {\n return '';\n }\n const container = document.createElement('div');\n container.appendChild(svg);\n return container.innerHTML;\n }\n\n /**\n * Inject a flag into an element.\n * @param {string|HTMLElement} target\n * @param {string} code\n * @param {Object} [options] - Same as render(), plus position\n * @param {string} [options.position='prepend'] - 'prepend' | 'append' | 'replace'\n * @returns {SVGElement|null}\n */\n inject(target, code, options = {}) {\n const {position = 'prepend', ...renderOptions} = options;\n const element = typeof target === 'string' ? document.querySelector(target) : target;\n if (!element) {\n console.warn(`Target element not found: ${target}`);\n return null;\n }\n const svg = this.render(code, renderOptions);\n if (!svg) {\n return null;\n }\n if (position === 'append') {\n element.appendChild(svg);\n } else if (position === 'replace') {\n element.innerHTML = '';\n element.appendChild(svg);\n } else {\n element.insertBefore(svg, element.firstChild);\n }\n return svg;\n }\n\n /**\n * Scan a container for [data-flag] elements and replace them with SVGs.\n * Supported attributes: data-flag, data-flag-size, data-flag-shape,\n * data-flag-class, data-flag-border, data-flag-title.\n * @param {HTMLElement|string} [container=document]\n * @returns {number} Number of flags replaced\n */\n scan(container = document) {\n const root = typeof container === 'string' ? document.querySelector(container) : container;\n if (!root) {\n return 0;\n }\n const elements = root.querySelectorAll('[data-flag]:not([data-flag-processed])');\n let count = 0;\n elements.forEach(el => {\n if (el.tagName.toLowerCase() === 'svg' || el.querySelector('svg')) {\n return;\n }\n const code = el.dataset.flag;\n const size = parseInt(el.dataset.flagSize, 10) || 24;\n const shape = el.dataset.flagShape || 'rect';\n const className = el.dataset.flagClass || '';\n const border = el.dataset.flagBorder !== undefined\n ? (el.dataset.flagBorder === '' || el.dataset.flagBorder === 'true' ? true : el.dataset.flagBorder)\n : false;\n const title = el.dataset.flagTitle || null;\n\n const svg = this.render(code, {size, shape, class: className, border, title});\n if (svg) {\n if (el.className) {\n svg.classList.add(...el.className.split(' ').filter(Boolean));\n }\n svg.setAttribute('data-flag', code);\n svg.setAttribute('data-flag-processed', 'true');\n el.replaceWith(svg);\n count++;\n } else {\n el.setAttribute('data-flag-processed', 'true');\n }\n });\n return count;\n }\n\n /**\n * Register a custom flag (or override an existing one).\n * @param {string} code - ISO alpha-2 code\n * @param {Object} definition - { name, region?, svg? | stripes?/cross?/bg?/overlays? }\n * @returns {FlagRegistry}\n */\n register(code, definition) {\n if (!code || !definition) {\n console.warn('Invalid flag registration: code and definition required');\n return this;\n }\n code = String(code).toLowerCase();\n this._flags[code] = definition;\n delete this._cache[code];\n\n const region = definition.region || 'custom';\n if (!this._regions[region]) {\n this._regions[region] = {name: region.charAt(0).toUpperCase() + region.slice(1), codes: []};\n }\n if (!this._regions[region].codes.includes(code)) {\n this._regions[region].codes.push(code);\n }\n return this;\n }\n\n /**\n * Remove a registered flag.\n * @param {string} code\n * @returns {boolean}\n */\n unregister(code) {\n code = String(code || '').toLowerCase();\n if (this._flags[code]) {\n delete this._flags[code];\n delete this._cache[code];\n Object.values(this._regions).forEach(r => {\n const i = r.codes.indexOf(code);\n if (i > -1) {\n r.codes.splice(i, 1);\n }\n });\n return true;\n }\n return false;\n }\n\n /**\n * Check whether a flag exists.\n * @param {string} code\n * @returns {boolean}\n */\n has(code) {\n return !!this._flags[String(code || '').toLowerCase()];\n }\n\n /**\n * Get a flag definition.\n * @param {string} code\n * @returns {Object|null}\n */\n get(code) {\n return this._flags[String(code || '').toLowerCase()] || null;\n }\n\n /**\n * Get the country name for a code.\n * @param {string} code\n * @returns {string|null}\n */\n name(code) {\n const def = this.get(code);\n return def ? def.name : null;\n }\n\n /**\n * List flag codes, optionally filtered by region.\n * @param {string} [region]\n * @returns {string[]}\n */\n list(region = null) {\n if (region && this._regions[region]) {\n return [...this._regions[region].codes];\n }\n return Object.keys(this._flags);\n }\n\n /**\n * List all regions with metadata.\n * @returns {Object}\n */\n listRegions() {\n return {...this._regions};\n }\n\n /**\n * Total number of flags.\n * @returns {number}\n */\n count() {\n return Object.keys(this._flags).length;\n }\n\n /**\n * Search flags by code or country name.\n * @param {string} query\n * @returns {string[]} Matching codes\n */\n search(query) {\n const q = String(query || '').toLowerCase().trim();\n if (!q) {\n return [];\n }\n return Object.keys(this._flags).filter(code =>\n code.includes(q) || (this._flags[code].name || '').toLowerCase().includes(q)\n );\n }\n}\n\nconst flags = new FlagRegistry();\n\nexport {flags, FlagRegistry};\nexport default flags;\n","/**\n * Domma Flags Bundle\n * Nation flags as inline SVG - an opt-in module, separate from the core bundle.\n *\n * Load after domma.min.js:\n * <script src=\"domma.min.js\"></script>\n * <script src=\"domma-flags.min.js\"></script>\n *\n * Exposes window.FL and Domma.flags / Domma.FL.\n */\n\nimport {flags, FlagRegistry} from './flags.js';\n\n// Attach to Domma when present\nif (typeof window !== 'undefined' && window.Domma) {\n window.Domma.flags = flags;\n window.Domma.FL = flags;\n}\n\n// Expose the FL alias globally\nif (typeof window !== 'undefined') {\n window.FL = flags;\n}\n\nexport {flags, FlagRegistry};\nexport default flags;\n"],"names":["europe","gb","name","svg","fr","stripes","dir","colors","de","it","es","weights","pt","overlays","type","cx","cy","r","fill","stroke","strokeWidth","nl","be","ie","ch","bg","x","y","w","h","at","se","cross","colour","no","border","dk","fi","is","pl","ua","gr","hr","ru","cz","d","americas","us","ca","br","ar","mx","cl","co","pe","uy","africa","za","ng","gh","eg","ma","sn","ci","cm","dz","off","tn","ke","x1","y1","x2","y2","rx","ry","asia","jp","cn","kr","children","in","sa","ae","qa","id","th","vn","tr","rotation","il","UNION_CANTON","oceania","au","nz","flags","regions","description","codes","Object","keys","_clipSeq","esc","v","String","replace","buildOverlay","o","undefined","sw","extra","outerR","points","innerRatio","innerR","step","Math","PI","start","i","a","cos","toFixed","sin","starPath","ri","sqrt","top","bot","crescentPath","transform","map","join","expandFlag","def","out","total","reduce","b","length","offset","forEach","width","height","buildStripes","thickness","t","hy","buildCross","FlagRegistry","constructor","this","_flags","defaultFlags","_regions","_cache","_markup","code","markup","render","options","toLowerCase","console","warn","size","shape","class","className","title","attrs","isSquareShape","document","createElementNS","setAttribute","label","toUpperCase","classes","push","entries","k","clipId","inner","body","bc","vb","innerHTML","html","container","createElement","appendChild","inject","target","position","renderOptions","element","querySelector","insertBefore","firstChild","scan","root","elements","querySelectorAll","count","el","tagName","dataset","flag","parseInt","flagSize","flagShape","flagClass","flagBorder","flagTitle","classList","add","split","filter","Boolean","replaceWith","register","definition","region","charAt","slice","includes","unregister","values","indexOf","splice","has","get","list","listRegions","search","query","q","trim","window","Domma","FL"],"mappings":";;;;;;;;;AAQO,MAAMA,EAAS,CAClBC,GAAI,CACAC,KAAM,iBACNC,IACI,oTAMRC,GAAI,CAACF,KAAM,SAAUG,QAAS,CAACC,IAAK,IAAKC,OAAQ,CAAC,UAAW,UAAW,aACxEC,GAAI,CAACN,KAAM,UAAWG,QAAS,CAACC,IAAK,IAAKC,OAAQ,CAAC,UAAW,UAAW,aACzEE,GAAI,CAACP,KAAM,QAASG,QAAS,CAACC,IAAK,IAAKC,OAAQ,CAAC,UAAW,UAAW,aACvEG,GAAI,CACAR,KAAM,QACNG,QAAS,CAACC,IAAK,IAAKC,OAAQ,CAAC,UAAW,UAAW,WAAYI,QAAS,CAAC,EAAG,EAAG,KAEnFC,GAAI,CACAV,KAAM,WACNG,QAAS,CAACC,IAAK,IAAKC,OAAQ,CAAC,UAAW,WAAYI,QAAS,CAAC,EAAG,IACjEE,SAAU,CACN,CAACC,KAAM,SAAUC,GAAI,GAAIC,GAAI,GAAIC,EAAG,EAAGC,KAAM,UAAWC,OAAQ,UAAWC,YAAa,GACxF,CAACN,KAAM,SAAUC,GAAI,GAAIC,GAAI,GAAIC,EAAG,IAAKC,KAAM,aAGvDG,GAAI,CAACnB,KAAM,cAAeG,QAAS,CAACC,IAAK,IAAKC,OAAQ,CAAC,UAAW,UAAW,aAC7Ee,GAAI,CAACpB,KAAM,UAAWG,QAAS,CAACC,IAAK,IAAKC,OAAQ,CAAC,UAAW,UAAW,aACzEgB,GAAI,CAACrB,KAAM,UAAWG,QAAS,CAACC,IAAK,IAAKC,OAAQ,CAAC,UAAW,UAAW,aACzEiB,GAAI,CACAtB,KAAM,cACNuB,GAAI,UACJZ,SAAU,CACN,CAACC,KAAM,OAAQY,EAAG,GAAIC,EAAG,GAAIC,EAAG,EAAGC,EAAG,GAAIX,KAAM,QAChD,CAACJ,KAAM,OAAQY,EAAG,GAAIC,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OAAOK,GAAM1J,MAAQ,IAAI8J,cAAc+D,SAASW,IAHnE,EAKf,EAGC,MAAC5I,EAAQ,IAAIsD,EC1cI,oBAAXwF,QAA0BA,OAAOC,QACxCD,OAAOC,MAAM/I,MAAQA,EACrB8I,OAAOC,MAAMC,GAAKhJ,GAIA,oBAAX8I,SACPA,OAAOE,GAAKhJ"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Domma Flags v0.
|
|
2
|
+
* Domma Flags v0.54.0
|
|
3
3
|
* Nation flags as inline SVG (opt-in module)
|
|
4
4
|
* (c) 2026 Darryl Waterhouse & DCBW-IT
|
|
5
|
-
* Built: 2026-10-
|
|
6
|
-
* Commit:
|
|
5
|
+
* Built: 2026-10-24T13:16:17.257Z
|
|
6
|
+
* Commit: 8d2b9ea
|
|
7
7
|
*
|
|
8
8
|
* Requires: domma.min.js
|
|
9
9
|
*/
|
|
10
10
|
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).DommaFlags={})}(this,function(e){"use strict";const t={gb:{name:"United Kingdom",svg:'<rect width="60" height="40" fill="#012169"/><path d="M0,0 60,40 M60,0 0,40" stroke="#fff" stroke-width="8"/><path d="M0,0 60,40 M60,0 0,40" stroke="#C8102E" stroke-width="4"/><path d="M30,0 V40 M0,20 H60" stroke="#fff" stroke-width="13"/><path d="M30,0 V40 M0,20 H60" stroke="#C8102E" stroke-width="8"/>'},fr:{name:"France",stripes:{dir:"v",colors:["#0055A4","#FFFFFF","#EF4135"]}},de:{name:"Germany",stripes:{dir:"h",colors:["#000000","#DD0000","#FFCE00"]}},it:{name:"Italy",stripes:{dir:"v",colors:["#009246","#FFFFFF","#CE2B37"]}},es:{name:"Spain",stripes:{dir:"h",colors:["#AA151B","#F1BF00","#AA151B"],weights:[1,2,1]}},pt:{name:"Portugal",stripes:{dir:"v",colors:["#006600","#FF0000"],weights:[2,3]},overlays:[{type:"circle",cx:24,cy:20,r:5,fill:"#FFE936",stroke:"#006600",strokeWidth:1},{type:"circle",cx:24,cy:20,r:2.4,fill:"#FF0000"}]},nl:{name:"Netherlands",stripes:{dir:"h",colors:["#AE1C28","#FFFFFF","#21468B"]}},be:{name:"Belgium",stripes:{dir:"v",colors:["#000000","#FAE042","#ED2939"]}},ie:{name:"Ireland",stripes:{dir:"v",colors:["#169B62","#FFFFFF","#FF883E"]}},ch:{name:"Switzerland",bg:"#FF0000",overlays:[{type:"rect",x:27,y:11,w:6,h:18,fill:"#fff"},{type:"rect",x:21,y:17,w:18,h:6,fill:"#fff"}]},at:{name:"Austria",stripes:{dir:"h",colors:["#ED2939","#FFFFFF","#ED2939"]}},se:{name:"Sweden",cross:{bg:"#006AA7",colour:"#FECC00"}},no:{name:"Norway",cross:{bg:"#BA0C2F",border:"#FFFFFF",colour:"#00205B"}},dk:{name:"Denmark",cross:{bg:"#C60C30",colour:"#FFFFFF"}},fi:{name:"Finland",cross:{bg:"#FFFFFF",colour:"#003580"}},is:{name:"Iceland",cross:{bg:"#02529C",border:"#FFFFFF",colour:"#DC1E35"}},pl:{name:"Poland",stripes:{dir:"h",colors:["#FFFFFF","#DC143C"]}},ua:{name:"Ukraine",stripes:{dir:"h",colors:["#0057B7","#FFD700"]}},gr:{name:"Greece",stripes:{dir:"h",colors:["#0D5EAF","#fff","#0D5EAF","#fff","#0D5EAF","#fff","#0D5EAF","#fff","#0D5EAF"]},overlays:[{type:"rect",x:0,y:0,w:22.22,h:22.22,fill:"#0D5EAF"},{type:"rect",x:8.9,y:0,w:4.44,h:22.22,fill:"#fff"},{type:"rect",x:0,y:8.9,w:22.22,h:4.44,fill:"#fff"}]},hr:{name:"Croatia",stripes:{dir:"h",colors:["#FF0000","#FFFFFF","#171796"]}},ru:{name:"Russia",stripes:{dir:"h",colors:["#FFFFFF","#0039A6","#D52B1E"]}},cz:{name:"Czechia",stripes:{dir:"h",colors:["#FFFFFF","#D7141A"]},overlays:[{type:"path",d:"M0,0 L30,20 L0,40 Z",fill:"#11457E"}]}},r={us:{name:"United States",svg:'<rect width="60" height="40" fill="#fff"/><g fill="#B22234"><rect y="0" width="60" height="3.08"/><rect y="6.15" width="60" height="3.08"/><rect y="12.31" width="60" height="3.08"/><rect y="18.46" width="60" height="3.08"/><rect y="24.62" width="60" height="3.08"/><rect y="30.77" width="60" height="3.08"/><rect y="36.92" width="60" height="3.08"/></g><rect width="24" height="21.54" fill="#3C3B6E"/><g fill="#fff"><circle cx="3" cy="3" r="0.9"/><circle cx="7" cy="3" r="0.9"/><circle cx="11" cy="3" r="0.9"/><circle cx="15" cy="3" r="0.9"/><circle cx="19" cy="3" r="0.9"/><circle cx="5" cy="6" r="0.9"/><circle cx="9" cy="6" r="0.9"/><circle cx="13" cy="6" r="0.9"/><circle cx="17" cy="6" r="0.9"/><circle cx="21" cy="6" r="0.9"/><circle cx="3" cy="9" r="0.9"/><circle cx="7" cy="9" r="0.9"/><circle cx="11" cy="9" r="0.9"/><circle cx="15" cy="9" r="0.9"/><circle cx="19" cy="9" r="0.9"/><circle cx="5" cy="12" r="0.9"/><circle cx="9" cy="12" r="0.9"/><circle cx="13" cy="12" r="0.9"/><circle cx="17" cy="12" r="0.9"/><circle cx="21" cy="12" r="0.9"/><circle cx="3" cy="15" r="0.9"/><circle cx="7" cy="15" r="0.9"/><circle cx="11" cy="15" r="0.9"/><circle cx="15" cy="15" r="0.9"/><circle cx="19" cy="15" r="0.9"/><circle cx="5" cy="18" r="0.9"/><circle cx="9" cy="18" r="0.9"/><circle cx="13" cy="18" r="0.9"/><circle cx="17" cy="18" r="0.9"/><circle cx="21" cy="18" r="0.9"/></g>'},ca:{name:"Canada",stripes:{dir:"v",colors:["#FF0000","#FFFFFF","#FF0000"],weights:[1,2,1]},overlays:[{type:"path",fill:"#FF0000",d:"M30 8 l1.6 3.4 3.6-0.8-1.2 2.6 2.4 1-2 1.8 3.4 1-3.4 1 0.5 1.2-3.1-0.4 0.4 4-1.6-2.4-1.6 2.4 0.4-4-3.1 0.4 0.5-1.2-3.4-1 3.4-1-2-1.8 2.4-1-1.2-2.6 3.6 0.8z"}]},br:{name:"Brazil",bg:"#009C3B",overlays:[{type:"path",d:"M30,5 L53,20 L30,35 L7,20 Z",fill:"#FFDF00"},{type:"circle",cx:30,cy:20,r:9,fill:"#002776"},{type:"path",d:"M21.5,17.5 A12,12 0 0 1 38.5,21",fill:"none",stroke:"#fff",strokeWidth:1.6},{type:"star",cx:27,cy:18,r:1.1,fill:"#fff"},{type:"star",cx:33,cy:17,r:1.1,fill:"#fff"},{type:"star",cx:30,cy:23,r:1.1,fill:"#fff"},{type:"star",cx:35,cy:22,r:1.1,fill:"#fff"},{type:"star",cx:25,cy:22,r:1.1,fill:"#fff"}]},ar:{name:"Argentina",stripes:{dir:"h",colors:["#74ACDF","#FFFFFF","#74ACDF"]},overlays:[{type:"circle",cx:30,cy:20,r:3.4,fill:"#F6B40E",stroke:"#85340A",strokeWidth:.4}]},mx:{name:"Mexico",stripes:{dir:"v",colors:["#006847","#FFFFFF","#CE1126"]},overlays:[{type:"circle",cx:30,cy:20,r:3.2,fill:"#8C9A5B"}]},cl:{name:"Chile",overlays:[{type:"rect",x:0,y:0,w:60,h:20,fill:"#fff"},{type:"rect",x:0,y:20,w:60,h:20,fill:"#D52B1E"},{type:"rect",x:0,y:0,w:20,h:20,fill:"#0039A6"},{type:"star",cx:10,cy:10,r:6,fill:"#fff"}]},co:{name:"Colombia",stripes:{dir:"h",colors:["#FCD116","#003893","#CE1126"],weights:[2,1,1]}},pe:{name:"Peru",stripes:{dir:"v",colors:["#D91023","#FFFFFF","#D91023"]}},uy:{name:"Uruguay",stripes:{dir:"h",colors:["#fff","#0038A8","#fff","#0038A8","#fff","#0038A8","#fff","#0038A8","#fff"]},overlays:[{type:"rect",x:0,y:0,w:20,h:17.78,fill:"#fff"},{type:"circle",cx:10,cy:8.9,r:4.5,fill:"#FCD116",stroke:"#7B3F00",strokeWidth:.5}]}},i={za:{name:"South Africa",svg:'<rect width="60" height="40" fill="#fff"/><path d="M0,0 H22 L40,20 L22,40 H0 Z" fill="#002395"/><path d="M0,0 L26,20 L0,40 Z" fill="#000"/><rect x="0" y="0" width="60" height="13.3" fill="#DE3831"/><rect x="0" y="26.7" width="60" height="13.3" fill="#002395"/><path d="M0,0 L26,20 L0,40" fill="none" stroke="#FFB915" stroke-width="3"/><path d="M0,3 L21,20 L0,37" fill="none" stroke="#007749" stroke-width="6"/><path d="M-1,13.3 H60 M-1,26.7 H60" stroke="#fff" stroke-width="0"/><rect x="26" y="14.8" width="34" height="10.4" fill="#007749"/><path d="M0,6 L18,20 L0,34" fill="none" stroke="#fff" stroke-width="1.5"/>'},ng:{name:"Nigeria",stripes:{dir:"v",colors:["#008751","#FFFFFF","#008751"]}},gh:{name:"Ghana",stripes:{dir:"h",colors:["#CE1126","#FCD116","#006B3F"]},overlays:[{type:"star",cx:30,cy:20,r:5,fill:"#000"}]},eg:{name:"Egypt",stripes:{dir:"h",colors:["#CE1126","#FFFFFF","#000000"]},overlays:[{type:"path",d:"M30,17 l1.2,2.6 2.8-0.4-2,2 0.7,2.8-2.7-1.4-2.7,1.4 0.7-2.8-2-2 2.8,0.4z",fill:"#C09300"}]},ma:{name:"Morocco",bg:"#C1272D",overlays:[{type:"star",cx:30,cy:20,r:8,fill:"none",stroke:"#006233",strokeWidth:1.6}]},sn:{name:"Senegal",stripes:{dir:"v",colors:["#00853F","#FDEF42","#E31B23"]},overlays:[{type:"star",cx:30,cy:20,r:4.5,fill:"#00853F"}]},ci:{name:"Ivory Coast",stripes:{dir:"v",colors:["#F77F00","#FFFFFF","#009E60"]}},cm:{name:"Cameroon",stripes:{dir:"v",colors:["#007A5E","#CE1126","#FCD116"]},overlays:[{type:"star",cx:30,cy:20,r:4,fill:"#FCD116"}]},dz:{name:"Algeria",overlays:[{type:"rect",x:0,y:0,w:30,h:40,fill:"#006233"},{type:"rect",x:30,y:0,w:30,h:40,fill:"#fff"},{type:"crescent",cx:28,cy:20,r:7,off:3,fill:"#D21034"},{type:"star",cx:36,cy:20,r:4,fill:"#D21034"}]},tn:{name:"Tunisia",bg:"#E70013",overlays:[{type:"circle",cx:30,cy:20,r:9,fill:"#fff"},{type:"crescent",cx:31,cy:20,r:5.5,off:2.6,fill:"#E70013"},{type:"star",cx:33,cy:20,r:3,fill:"#E70013"}]},ke:{name:"Kenya",stripes:{dir:"h",colors:["#000000","#fff","#BB0000","#fff","#006600"],weights:[12,1,12,1,12]},overlays:[{type:"line",x1:24,y1:8,x2:36,y2:32,stroke:"#000",strokeWidth:1},{type:"line",x1:36,y1:8,x2:24,y2:32,stroke:"#000",strokeWidth:1},{type:"ellipse",cx:30,cy:20,rx:4,ry:8,fill:"#fff"},{type:"ellipse",cx:30,cy:20,rx:2.6,ry:6.4,fill:"#BB0000"}]}},l={jp:{name:"Japan",bg:"#FFFFFF",overlays:[{type:"circle",cx:30,cy:20,r:10,fill:"#BC002D"}]},cn:{name:"China",bg:"#DE2910",overlays:[{type:"star",cx:12,cy:11,r:6,fill:"#FFDE00"},{type:"star",cx:22,cy:5,r:2,fill:"#FFDE00"},{type:"star",cx:26,cy:9,r:2,fill:"#FFDE00"},{type:"star",cx:26,cy:15,r:2,fill:"#FFDE00"},{type:"star",cx:22,cy:19,r:2,fill:"#FFDE00"}]},kr:{name:"South Korea",bg:"#FFFFFF",overlays:[{type:"path",d:"M30,13 a7,7 0 0 1 0,14 a3.5,3.5 0 0 1 0,-7 a3.5,3.5 0 0 0 0,-7 Z",fill:"#CD2E3A"},{type:"path",d:"M30,13 a7,7 0 0 0 0,14 a3.5,3.5 0 0 0 0,-7 a3.5,3.5 0 0 1 0,-7 Z",fill:"#0047A0"},{type:"circle",cx:30,cy:16.5,r:3.5,fill:"#CD2E3A"},{type:"circle",cx:30,cy:23.5,r:3.5,fill:"#0047A0"},{type:"group",children:[{type:"rect",x:9,y:8,w:7,h:1.3,fill:"#000"},{type:"rect",x:9,y:10.4,w:7,h:1.3,fill:"#000"},{type:"rect",x:9,y:12.8,w:7,h:1.3,fill:"#000"}]},{type:"group",children:[{type:"rect",x:44,y:8,w:7,h:1.3,fill:"#000"},{type:"rect",x:44,y:10.4,w:7,h:1.3,fill:"#000"},{type:"rect",x:44,y:12.8,w:7,h:1.3,fill:"#000"}]}]},in:{name:"India",stripes:{dir:"h",colors:["#FF9933","#FFFFFF","#138808"]},overlays:[{type:"circle",cx:30,cy:20,r:5,fill:"none",stroke:"#000080",strokeWidth:.8},{type:"circle",cx:30,cy:20,r:1,fill:"#000080"},{type:"path",d:"M30,15 V25 M25,20 H35 M26.5,16.5 L33.5,23.5 M33.5,16.5 L26.5,23.5",stroke:"#000080",strokeWidth:.5}]},sa:{name:"Saudi Arabia",bg:"#006C35",overlays:[{type:"rect",x:10,y:26,w:40,h:1.6,fill:"#fff"},{type:"path",d:"M10,26.8 l4,-2 v4 z",fill:"#fff"},{type:"rect",x:14,y:14,w:32,h:5,fill:"none"}]},ae:{name:"United Arab Emirates",overlays:[{type:"rect",x:0,y:0,w:60,h:13.33,fill:"#00732F"},{type:"rect",x:0,y:13.33,w:60,h:13.33,fill:"#fff"},{type:"rect",x:0,y:26.66,w:60,h:13.34,fill:"#000"},{type:"rect",x:0,y:0,w:15,h:40,fill:"#FF0000"}]},qa:{name:"Qatar",bg:"#FFFFFF",overlays:[{type:"path",d:"M22,0 H60 V40 H22 L27,36 L22,32 L27,28 L22,24 L27,20 L22,16 L27,12 L22,8 L27,4 Z",fill:"#8A1538"}]},id:{name:"Indonesia",stripes:{dir:"h",colors:["#FF0000","#FFFFFF"]}},th:{name:"Thailand",stripes:{dir:"h",colors:["#A51931","#F4F5F8","#2D2A4A","#F4F5F8","#A51931"],weights:[1,1,2,1,1]}},vn:{name:"Vietnam",bg:"#DA251D",overlays:[{type:"star",cx:30,cy:20,r:9,fill:"#FFFF00"}]},tr:{name:"Turkey",bg:"#E30A17",overlays:[{type:"crescent",cx:24,cy:20,r:8,off:3.2,fill:"#fff"},{type:"star",cx:35,cy:20,r:4,rotation:-54,fill:"#fff"}]},il:{name:"Israel",bg:"#FFFFFF",overlays:[{type:"rect",x:0,y:4,w:60,h:4,fill:"#0038B8"},{type:"rect",x:0,y:32,w:60,h:4,fill:"#0038B8"},{type:"path",d:"M30,13 L33.5,19 H26.5 Z",fill:"none",stroke:"#0038B8",strokeWidth:1},{type:"path",d:"M30,27 L33.5,21 H26.5 Z",fill:"none",stroke:"#0038B8",strokeWidth:1}]}},c='<g transform="scale(0.5)"><rect width="60" height="40" fill="#012169"/><path d="M0,0 60,40 M60,0 0,40" stroke="#fff" stroke-width="8"/><path d="M0,0 60,40 M60,0 0,40" stroke="#C8102E" stroke-width="4"/><path d="M30,0 V40 M0,20 H60" stroke="#fff" stroke-width="13"/><path d="M30,0 V40 M0,20 H60" stroke="#C8102E" stroke-width="8"/></g>',s={au:{name:"Australia",svg:'<rect width="60" height="40" fill="#012169"/>'+c+'<path fill="#fff" d="M15,25 l1.3,3.9 4.1,0 -3.3,2.4 1.3,3.9 -3.4,-2.4 -3.4,2.4 1.3,-3.9 -3.3,-2.4 4.1,0 Z"/><g fill="#fff"><path d="M47,7 l0.9,2.7 2.8,0 -2.3,1.7 0.9,2.7 -2.3,-1.7 -2.3,1.7 0.9,-2.7 -2.3,-1.7 2.8,0 Z"/><path d="M40,19 l0.9,2.7 2.8,0 -2.3,1.7 0.9,2.7 -2.3,-1.7 -2.3,1.7 0.9,-2.7 -2.3,-1.7 2.8,0 Z"/><path d="M47,31 l0.9,2.7 2.8,0 -2.3,1.7 0.9,2.7 -2.3,-1.7 -2.3,1.7 0.9,-2.7 -2.3,-1.7 2.8,0 Z"/><path d="M54,18 l0.9,2.7 2.8,0 -2.3,1.7 0.9,2.7 -2.3,-1.7 -2.3,1.7 0.9,-2.7 -2.3,-1.7 2.8,0 Z"/><circle cx="49" cy="24" r="1.2"/></g>'},nz:{name:"New Zealand",svg:'<rect width="60" height="40" fill="#00247D"/>'+c+'<g><path fill="#fff" d="M47,7 l1,2.9 3,0 -2.5,1.9 1,2.9 -2.5,-1.8 -2.5,1.8 1,-2.9 -2.5,-1.9 3,0 Z"/><path fill="#CC142B" d="M47,8.5 l0.6,1.9 2,0 -1.6,1.2 0.6,1.9 -1.6,-1.2 -1.6,1.2 0.6,-1.9 -1.6,-1.2 2,0 Z"/><path fill="#fff" d="M41,20 l1,2.9 3,0 -2.5,1.9 1,2.9 -2.5,-1.8 -2.5,1.8 1,-2.9 -2.5,-1.9 3,0 Z"/><path fill="#CC142B" d="M41,21.5 l0.6,1.9 2,0 -1.6,1.2 0.6,1.9 -1.6,-1.2 -1.6,1.2 0.6,-1.9 -1.6,-1.2 2,0 Z"/><path fill="#fff" d="M53,18 l1,2.9 3,0 -2.5,1.9 1,2.9 -2.5,-1.8 -2.5,1.8 1,-2.9 -2.5,-1.9 3,0 Z"/><path fill="#CC142B" d="M53,19.5 l0.6,1.9 2,0 -1.6,1.2 0.6,1.9 -1.6,-1.2 -1.6,1.2 0.6,-1.9 -1.6,-1.2 2,0 Z"/><path fill="#fff" d="M47,32 l1,2.9 3,0 -2.5,1.9 1,2.9 -2.5,-1.8 -2.5,1.8 1,-2.9 -2.5,-1.9 3,0 Z"/><path fill="#CC142B" d="M47,33.5 l0.6,1.9 2,0 -1.6,1.2 0.6,1.9 -1.6,-1.2 -1.6,1.2 0.6,-1.9 -1.6,-1.2 2,0 Z"/></g>'}},a={...t,...r,...i,...l,...s},o={europe:{name:"Europe",description:"European nations",codes:Object.keys(t)},americas:{name:"Americas",description:"North, Central & South America",codes:Object.keys(r)},africa:{name:"Africa",description:"African nations",codes:Object.keys(i)},asia:{name:"Asia & Middle East",description:"Asian and Middle Eastern nations",codes:Object.keys(l)},oceania:{name:"Oceania",description:"Australia, New Zealand & the Pacific",codes:Object.keys(s)}};let f=0;function n(e){return String(e).replace(/"/g,""")}function h(e){const t=void 0!==e.fill?` fill="${n(e.fill)}"`:"",r=e.stroke?` stroke="${n(e.stroke)}"`:"",i=void 0!==e.strokeWidth?` stroke-width="${e.strokeWidth}"`:"",l=r+i+(r&&!e.fill?' fill="none"':"");switch(e.type){case"rect":return`<rect x="${e.x}" y="${e.y}" width="${e.w}" height="${e.h}"${e.rx?` rx="${e.rx}"`:""}${t}${l}/>`;case"circle":return`<circle cx="${e.cx}" cy="${e.cy}" r="${e.r}"${t}${l}/>`;case"ellipse":return`<ellipse cx="${e.cx}" cy="${e.cy}" rx="${e.rx}" ry="${e.ry}"${t}${l}/>`;case"line":return`<line x1="${e.x1}" y1="${e.y1}" x2="${e.x2}" y2="${e.y2}"${r}${i}/>`;case"path":return`<path d="${e.d}"${t}${l}/>`;case"star":return`<path d="${function(e,t,r,i=5,l=.382,c=-90){const s=r*l,a=Math.PI/i,o=c*Math.PI/180;let f="";for(let l=0;l<2*i;l++){const i=l%2==0?r:s,c=o+l*a;f+=(0===l?"M":"L")+(e+i*Math.cos(c)).toFixed(2)+","+(t+i*Math.sin(c)).toFixed(2)}return f+"Z"}(e.cx,e.cy,e.r,e.points||5,e.innerRatio||.382,void 0===e.rotation?-90:e.rotation)}"${t||' fill="#fff"'}${l}/>`;case"crescent":return`<path d="${function(e,t,r,i=.45*r){const l=Math.sqrt(i*i+r*r),c=(t-r).toFixed(2),s=(t+r).toFixed(2),a=e.toFixed(2);return`M${a},${c} A${r},${r} 0 1 0 ${a},${s} A${l.toFixed(2)},${l.toFixed(2)} 0 0 1 ${a},${c}Z`}(e.cx,e.cy,e.r,e.off)}"${t||' fill="#fff"'}${l}/>`;case"group":return`<g${e.transform?` transform="${n(e.transform)}"`:""}>${(e.children||[]).map(h).join("")}</g>`;default:return""}}function d(e){if(e.svg)return e.svg;let t="";return e.stripes&&(t+=function({dir:e="h",colors:t=[],weights:r=null}){const i=r?r.reduce((e,t)=>e+t,0):t.length;let l=0,c="";return t.forEach((t,s)=>{const a=r?r[s]:1;if("v"===e){const e=60*a/i;c+=`<rect x="${(60*l/i).toFixed(3)}" y="0" width="${e.toFixed(3)}" height="40" fill="${n(t)}"/>`}else{const e=40*a/i;c+=`<rect x="0" y="${(40*l/i).toFixed(3)}" width="60" height="${e.toFixed(3)}" fill="${n(t)}"/>`}l+=a}),c}(e.stripes)),e.cross&&(t+=function({bg:e,colour:t,border:r=null,thickness:i=8}){const l=i,c=20-l/2;let s=`<rect x="0" y="0" width="60" height="40" fill="${n(e)}"/>`;if(r){const e=2;s+=`<rect x="${16-e}" y="0" width="${l+2*e}" height="40" fill="${n(r)}"/>`,s+=`<rect x="0" y="${c-e}" width="60" height="${l+2*e}" fill="${n(r)}"/>`}return s+=`<rect x="16" y="0" width="${l}" height="40" fill="${n(t)}"/>`,s+=`<rect x="0" y="${c}" width="60" height="${l}" fill="${n(t)}"/>`,s}(e.cross)),!e.bg||e.stripes||e.cross||(t=`<rect x="0" y="0" width="60" height="40" fill="${n(e.bg)}"/>`+t),e.overlays&&(t+=e.overlays.map(h).join("")),t}class y{constructor(){this._flags={...a},this._regions={...o},this._cache={}}_markup(e){if(void 0!==this._cache[e])return this._cache[e];const t=this._flags[e],r=t?d(t):null;return this._cache[e]=r,r}render(e,t={}){e=String(e||"").toLowerCase();const r=this._flags[e];if(!r)return console.warn(`Flag "${e}" not found`),null;const{size:i=24,width:l=null,height:c=null,shape:s="rect",border:a=!1,class:o="",title:h=null,attrs:d={}}=t,y="square"===s||"circle"===s,F=c||i,p=l||(y?F:1.5*F),g=document.createElementNS("http://www.w3.org/2000/svg","svg");g.setAttribute("viewBox",y?"10 0 40 40":"0 0 60 40"),g.setAttribute("width",p),g.setAttribute("height",F),g.setAttribute("role","img");const x=h||r.name||e.toUpperCase();g.setAttribute("aria-label",x);const u=["dm-flag",`dm-flag-${s}`];o&&u.push(o),g.setAttribute("class",u.join(" ")),Object.entries(d).forEach(([e,t])=>g.setAttribute(e,t));const w="dm-flag-clip-"+ ++f;let m=`<title>${n(x)}</title>`;const $=this._markup(e)||"";if("circle"===s){if(m+=`<defs><clipPath id="${w}"><circle cx="30" cy="20" r="20"/></clipPath></defs>`,m+=`<g clip-path="url(#${w})">${$}</g>`,a){m+=`<circle cx="30" cy="20" r="19.25" fill="none" stroke="${n("string"==typeof a?a:"rgba(0,0,0,0.15)")}" stroke-width="1.5"/>`}}else if("rounded"===s){if(m+=`<defs><clipPath id="${w}"><rect x="0" y="0" width="60" height="40" rx="6"/></clipPath></defs>`,m+=`<g clip-path="url(#${w})">${$}</g>`,a){m+=`<rect x="0.75" y="0.75" width="58.5" height="38.5" rx="5.25" fill="none" stroke="${n("string"==typeof a?a:"rgba(0,0,0,0.15)")}" stroke-width="1.5"/>`}}else if(m+=$,a){const e="string"==typeof a?a:"rgba(0,0,0,0.15)",t=y?{x:10.5,y:.5,w:39,h:39}:{x:.5,y:.5,w:59,h:39};m+=`<rect x="${t.x}" y="${t.y}" width="${t.w}" height="${t.h}" fill="none" stroke="${n(e)}" stroke-width="1"/>`}return g.innerHTML=m,g}html(e,t={}){const r=this.render(e,t);if(!r)return"";const i=document.createElement("div");return i.appendChild(r),i.innerHTML}inject(e,t,r={}){const{position:i="prepend",...l}=r,c="string"==typeof e?document.querySelector(e):e;if(!c)return console.warn(`Target element not found: ${e}`),null;const s=this.render(t,l);return s?("append"===i?c.appendChild(s):"replace"===i?(c.innerHTML="",c.appendChild(s)):c.insertBefore(s,c.firstChild),s):null}scan(e=document){const t="string"==typeof e?document.querySelector(e):e;if(!t)return 0;const r=t.querySelectorAll("[data-flag]:not([data-flag-processed])");let i=0;return r.forEach(e=>{if("svg"===e.tagName.toLowerCase()||e.querySelector("svg"))return;const t=e.dataset.flag,r=parseInt(e.dataset.flagSize,10)||24,l=e.dataset.flagShape||"rect",c=e.dataset.flagClass||"",s=void 0!==e.dataset.flagBorder&&(""===e.dataset.flagBorder||"true"===e.dataset.flagBorder||e.dataset.flagBorder),a=e.dataset.flagTitle||null,o=this.render(t,{size:r,shape:l,class:c,border:s,title:a});o?(e.className&&o.classList.add(...e.className.split(" ").filter(Boolean)),o.setAttribute("data-flag",t),o.setAttribute("data-flag-processed","true"),e.replaceWith(o),i++):e.setAttribute("data-flag-processed","true")}),i}register(e,t){if(!e||!t)return console.warn("Invalid flag registration: code and definition required"),this;e=String(e).toLowerCase(),this._flags[e]=t,delete this._cache[e];const r=t.region||"custom";return this._regions[r]||(this._regions[r]={name:r.charAt(0).toUpperCase()+r.slice(1),codes:[]}),this._regions[r].codes.includes(e)||this._regions[r].codes.push(e),this}unregister(e){return e=String(e||"").toLowerCase(),!!this._flags[e]&&(delete this._flags[e],delete this._cache[e],Object.values(this._regions).forEach(t=>{const r=t.codes.indexOf(e);r>-1&&t.codes.splice(r,1)}),!0)}has(e){return!!this._flags[String(e||"").toLowerCase()]}get(e){return this._flags[String(e||"").toLowerCase()]||null}name(e){const t=this.get(e);return t?t.name:null}list(e=null){return e&&this._regions[e]?[...this._regions[e].codes]:Object.keys(this._flags)}listRegions(){return{...this._regions}}count(){return Object.keys(this._flags).length}search(e){const t=String(e||"").toLowerCase().trim();return t?Object.keys(this._flags).filter(e=>e.includes(t)||(this._flags[e].name||"").toLowerCase().includes(t)):[]}}const F=new y;"undefined"!=typeof window&&window.Domma&&(window.Domma.flags=F,window.Domma.FL=F),"undefined"!=typeof window&&(window.FL=F),e.FlagRegistry=y,e.default=F,e.flags=F,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
11
|
+
//# sourceMappingURL=domma-flags.min.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"domma-flags.min.js","sources":["../assets/flags/europe.js","../assets/flags/americas.js","../assets/flags/africa.js","../assets/flags/asia.js","../assets/flags/oceania.js","../assets/flags/index.js","../../src/flags.js","../../src/flags-bundle.js"],"sourcesContent":["/**\n * Domma Flags - Europe\n *\n * Compact flag descriptors expanded to SVG at render time. Canvas is 60×40 (3:2).\n * Complex emblems (coats of arms, etc.) are simplified for icon-scale clarity;\n * override any flag with FL.register(code, def) for a precise rendering.\n */\n\nexport const europe = {\n gb: {\n name: 'United Kingdom',\n svg:\n '<rect width=\"60\" height=\"40\" fill=\"#012169\"/>' +\n '<path d=\"M0,0 60,40 M60,0 0,40\" stroke=\"#fff\" stroke-width=\"8\"/>' +\n '<path d=\"M0,0 60,40 M60,0 0,40\" stroke=\"#C8102E\" stroke-width=\"4\"/>' +\n '<path d=\"M30,0 V40 M0,20 H60\" stroke=\"#fff\" stroke-width=\"13\"/>' +\n '<path d=\"M30,0 V40 M0,20 H60\" stroke=\"#C8102E\" stroke-width=\"8\"/>'\n },\n fr: {name: 'France', stripes: {dir: 'v', colors: ['#0055A4', '#FFFFFF', '#EF4135']}},\n de: {name: 'Germany', stripes: {dir: 'h', colors: ['#000000', '#DD0000', '#FFCE00']}},\n it: {name: 'Italy', stripes: {dir: 'v', colors: ['#009246', '#FFFFFF', '#CE2B37']}},\n es: {\n name: 'Spain',\n stripes: {dir: 'h', colors: ['#AA151B', '#F1BF00', '#AA151B'], weights: [1, 2, 1]}\n },\n pt: {\n name: 'Portugal',\n stripes: {dir: 'v', colors: ['#006600', '#FF0000'], weights: [2, 3]},\n overlays: [\n {type: 'circle', cx: 24, cy: 20, r: 5, fill: '#FFE936', stroke: '#006600', strokeWidth: 1},\n {type: 'circle', cx: 24, cy: 20, r: 2.4, fill: '#FF0000'}\n ]\n },\n nl: {name: 'Netherlands', stripes: {dir: 'h', colors: ['#AE1C28', '#FFFFFF', '#21468B']}},\n be: {name: 'Belgium', stripes: {dir: 'v', colors: ['#000000', '#FAE042', '#ED2939']}},\n ie: {name: 'Ireland', stripes: {dir: 'v', colors: ['#169B62', '#FFFFFF', '#FF883E']}},\n ch: {\n name: 'Switzerland',\n bg: '#FF0000',\n overlays: [\n {type: 'rect', x: 27, y: 11, w: 6, h: 18, fill: '#fff'},\n {type: 'rect', x: 21, y: 17, w: 18, h: 6, fill: '#fff'}\n ]\n },\n at: {name: 'Austria', stripes: {dir: 'h', colors: ['#ED2939', '#FFFFFF', '#ED2939']}},\n se: {name: 'Sweden', cross: {bg: '#006AA7', colour: '#FECC00'}},\n no: {name: 'Norway', cross: {bg: '#BA0C2F', border: '#FFFFFF', colour: '#00205B'}},\n dk: {name: 'Denmark', cross: {bg: '#C60C30', colour: '#FFFFFF'}},\n fi: {name: 'Finland', cross: {bg: '#FFFFFF', colour: '#003580'}},\n is: {name: 'Iceland', cross: {bg: '#02529C', border: '#FFFFFF', colour: '#DC1E35'}},\n pl: {name: 'Poland', stripes: {dir: 'h', colors: ['#FFFFFF', '#DC143C']}},\n ua: {name: 'Ukraine', stripes: {dir: 'h', colors: ['#0057B7', '#FFD700']}},\n gr: {\n name: 'Greece',\n stripes: {\n dir: 'h',\n colors: ['#0D5EAF', '#fff', '#0D5EAF', '#fff', '#0D5EAF', '#fff', '#0D5EAF', '#fff', '#0D5EAF']\n },\n overlays: [\n {type: 'rect', x: 0, y: 0, w: 22.22, h: 22.22, fill: '#0D5EAF'},\n {type: 'rect', x: 8.9, y: 0, w: 4.44, h: 22.22, fill: '#fff'},\n {type: 'rect', x: 0, y: 8.9, w: 22.22, h: 4.44, fill: '#fff'}\n ]\n },\n hr: {name: 'Croatia', stripes: {dir: 'h', colors: ['#FF0000', '#FFFFFF', '#171796']}},\n ru: {name: 'Russia', stripes: {dir: 'h', colors: ['#FFFFFF', '#0039A6', '#D52B1E']}},\n cz: {\n name: 'Czechia',\n stripes: {dir: 'h', colors: ['#FFFFFF', '#D7141A']},\n overlays: [{type: 'path', d: 'M0,0 L30,20 L0,40 Z', fill: '#11457E'}]\n }\n};\n","/**\n * Domma Flags - Americas\n * Canvas 60×40 (3:2). Complex emblems simplified for icon-scale clarity.\n */\n\nexport const americas = {\n us: {\n name: 'United States',\n svg:\n '<rect width=\"60\" height=\"40\" fill=\"#fff\"/>' +\n '<g fill=\"#B22234\">' +\n '<rect y=\"0\" width=\"60\" height=\"3.08\"/><rect y=\"6.15\" width=\"60\" height=\"3.08\"/>' +\n '<rect y=\"12.31\" width=\"60\" height=\"3.08\"/><rect y=\"18.46\" width=\"60\" height=\"3.08\"/>' +\n '<rect y=\"24.62\" width=\"60\" height=\"3.08\"/><rect y=\"30.77\" width=\"60\" height=\"3.08\"/>' +\n '<rect y=\"36.92\" width=\"60\" height=\"3.08\"/></g>' +\n '<rect width=\"24\" height=\"21.54\" fill=\"#3C3B6E\"/>' +\n '<g fill=\"#fff\">' +\n '<circle cx=\"3\" cy=\"3\" r=\"0.9\"/><circle cx=\"7\" cy=\"3\" r=\"0.9\"/><circle cx=\"11\" cy=\"3\" r=\"0.9\"/>' +\n '<circle cx=\"15\" cy=\"3\" r=\"0.9\"/><circle cx=\"19\" cy=\"3\" r=\"0.9\"/>' +\n '<circle cx=\"5\" cy=\"6\" r=\"0.9\"/><circle cx=\"9\" cy=\"6\" r=\"0.9\"/><circle cx=\"13\" cy=\"6\" r=\"0.9\"/>' +\n '<circle cx=\"17\" cy=\"6\" r=\"0.9\"/><circle cx=\"21\" cy=\"6\" r=\"0.9\"/>' +\n '<circle cx=\"3\" cy=\"9\" r=\"0.9\"/><circle cx=\"7\" cy=\"9\" r=\"0.9\"/><circle cx=\"11\" cy=\"9\" r=\"0.9\"/>' +\n '<circle cx=\"15\" cy=\"9\" r=\"0.9\"/><circle cx=\"19\" cy=\"9\" r=\"0.9\"/>' +\n '<circle cx=\"5\" cy=\"12\" r=\"0.9\"/><circle cx=\"9\" cy=\"12\" r=\"0.9\"/><circle cx=\"13\" cy=\"12\" r=\"0.9\"/>' +\n '<circle cx=\"17\" cy=\"12\" r=\"0.9\"/><circle cx=\"21\" cy=\"12\" r=\"0.9\"/>' +\n '<circle cx=\"3\" cy=\"15\" r=\"0.9\"/><circle cx=\"7\" cy=\"15\" r=\"0.9\"/><circle cx=\"11\" cy=\"15\" r=\"0.9\"/>' +\n '<circle cx=\"15\" cy=\"15\" r=\"0.9\"/><circle cx=\"19\" cy=\"15\" r=\"0.9\"/>' +\n '<circle cx=\"5\" cy=\"18\" r=\"0.9\"/><circle cx=\"9\" cy=\"18\" r=\"0.9\"/><circle cx=\"13\" cy=\"18\" r=\"0.9\"/>' +\n '<circle cx=\"17\" cy=\"18\" r=\"0.9\"/><circle cx=\"21\" cy=\"18\" r=\"0.9\"/></g>'\n },\n ca: {\n name: 'Canada',\n stripes: {dir: 'v', colors: ['#FF0000', '#FFFFFF', '#FF0000'], weights: [1, 2, 1]},\n overlays: [\n {\n type: 'path',\n fill: '#FF0000',\n d: 'M30 8 l1.6 3.4 3.6-0.8-1.2 2.6 2.4 1-2 1.8 3.4 1-3.4 1 0.5 1.2-3.1-0.4 0.4 4-1.6-2.4-1.6 2.4 0.4-4-3.1 0.4 0.5-1.2-3.4-1 3.4-1-2-1.8 2.4-1-1.2-2.6 3.6 0.8z'\n }\n ]\n },\n br: {\n name: 'Brazil',\n bg: '#009C3B',\n overlays: [\n {type: 'path', d: 'M30,5 L53,20 L30,35 L7,20 Z', fill: '#FFDF00'},\n {type: 'circle', cx: 30, cy: 20, r: 9, fill: '#002776'},\n {type: 'path', d: 'M21.5,17.5 A12,12 0 0 1 38.5,21', fill: 'none', stroke: '#fff', strokeWidth: 1.6},\n {type: 'star', cx: 27, cy: 18, r: 1.1, fill: '#fff'},\n {type: 'star', cx: 33, cy: 17, r: 1.1, fill: '#fff'},\n {type: 'star', cx: 30, cy: 23, r: 1.1, fill: '#fff'},\n {type: 'star', cx: 35, cy: 22, r: 1.1, fill: '#fff'},\n {type: 'star', cx: 25, cy: 22, r: 1.1, fill: '#fff'}\n ]\n },\n ar: {\n name: 'Argentina',\n stripes: {dir: 'h', colors: ['#74ACDF', '#FFFFFF', '#74ACDF']},\n overlays: [{type: 'circle', cx: 30, cy: 20, r: 3.4, fill: '#F6B40E', stroke: '#85340A', strokeWidth: 0.4}]\n },\n mx: {\n name: 'Mexico',\n stripes: {dir: 'v', colors: ['#006847', '#FFFFFF', '#CE1126']},\n overlays: [{type: 'circle', cx: 30, cy: 20, r: 3.2, fill: '#8C9A5B'}]\n },\n cl: {\n name: 'Chile',\n overlays: [\n {type: 'rect', x: 0, y: 0, w: 60, h: 20, fill: '#fff'},\n {type: 'rect', x: 0, y: 20, w: 60, h: 20, fill: '#D52B1E'},\n {type: 'rect', x: 0, y: 0, w: 20, h: 20, fill: '#0039A6'},\n {type: 'star', cx: 10, cy: 10, r: 6, fill: '#fff'}\n ]\n },\n co: {\n name: 'Colombia',\n stripes: {dir: 'h', colors: ['#FCD116', '#003893', '#CE1126'], weights: [2, 1, 1]}\n },\n pe: {name: 'Peru', stripes: {dir: 'v', colors: ['#D91023', '#FFFFFF', '#D91023']}},\n uy: {\n name: 'Uruguay',\n stripes: {\n dir: 'h',\n colors: ['#fff', '#0038A8', '#fff', '#0038A8', '#fff', '#0038A8', '#fff', '#0038A8', '#fff']\n },\n overlays: [\n {type: 'rect', x: 0, y: 0, w: 20, h: 17.78, fill: '#fff'},\n {type: 'circle', cx: 10, cy: 8.9, r: 4.5, fill: '#FCD116', stroke: '#7B3F00', strokeWidth: 0.5}\n ]\n }\n};\n","/**\n * Domma Flags - Africa\n * Canvas 60×40 (3:2). Complex emblems simplified for icon-scale clarity.\n */\n\nexport const africa = {\n za: {\n name: 'South Africa',\n svg:\n '<rect width=\"60\" height=\"40\" fill=\"#fff\"/>' +\n '<path d=\"M0,0 H22 L40,20 L22,40 H0 Z\" fill=\"#002395\"/>' +\n '<path d=\"M0,0 L26,20 L0,40 Z\" fill=\"#000\"/>' +\n '<rect x=\"0\" y=\"0\" width=\"60\" height=\"13.3\" fill=\"#DE3831\"/>' +\n '<rect x=\"0\" y=\"26.7\" width=\"60\" height=\"13.3\" fill=\"#002395\"/>' +\n '<path d=\"M0,0 L26,20 L0,40\" fill=\"none\" stroke=\"#FFB915\" stroke-width=\"3\"/>' +\n '<path d=\"M0,3 L21,20 L0,37\" fill=\"none\" stroke=\"#007749\" stroke-width=\"6\"/>' +\n '<path d=\"M-1,13.3 H60 M-1,26.7 H60\" stroke=\"#fff\" stroke-width=\"0\"/>' +\n '<rect x=\"26\" y=\"14.8\" width=\"34\" height=\"10.4\" fill=\"#007749\"/>' +\n '<path d=\"M0,6 L18,20 L0,34\" fill=\"none\" stroke=\"#fff\" stroke-width=\"1.5\"/>'\n },\n ng: {name: 'Nigeria', stripes: {dir: 'v', colors: ['#008751', '#FFFFFF', '#008751']}},\n gh: {\n name: 'Ghana',\n stripes: {dir: 'h', colors: ['#CE1126', '#FCD116', '#006B3F']},\n overlays: [{type: 'star', cx: 30, cy: 20, r: 5, fill: '#000'}]\n },\n eg: {\n name: 'Egypt',\n stripes: {dir: 'h', colors: ['#CE1126', '#FFFFFF', '#000000']},\n overlays: [{type: 'path', d: 'M30,17 l1.2,2.6 2.8-0.4-2,2 0.7,2.8-2.7-1.4-2.7,1.4 0.7-2.8-2-2 2.8,0.4z', fill: '#C09300'}]\n },\n ma: {\n name: 'Morocco',\n bg: '#C1272D',\n overlays: [{type: 'star', cx: 30, cy: 20, r: 8, fill: 'none', stroke: '#006233', strokeWidth: 1.6}]\n },\n sn: {\n name: 'Senegal',\n stripes: {dir: 'v', colors: ['#00853F', '#FDEF42', '#E31B23']},\n overlays: [{type: 'star', cx: 30, cy: 20, r: 4.5, fill: '#00853F'}]\n },\n ci: {name: 'Ivory Coast', stripes: {dir: 'v', colors: ['#F77F00', '#FFFFFF', '#009E60']}},\n cm: {\n name: 'Cameroon',\n stripes: {dir: 'v', colors: ['#007A5E', '#CE1126', '#FCD116']},\n overlays: [{type: 'star', cx: 30, cy: 20, r: 4, fill: '#FCD116'}]\n },\n dz: {\n name: 'Algeria',\n overlays: [\n {type: 'rect', x: 0, y: 0, w: 30, h: 40, fill: '#006233'},\n {type: 'rect', x: 30, y: 0, w: 30, h: 40, fill: '#fff'},\n {type: 'crescent', cx: 28, cy: 20, r: 7, off: 3, fill: '#D21034'},\n {type: 'star', cx: 36, cy: 20, r: 4, fill: '#D21034'}\n ]\n },\n tn: {\n name: 'Tunisia',\n bg: '#E70013',\n overlays: [\n {type: 'circle', cx: 30, cy: 20, r: 9, fill: '#fff'},\n {type: 'crescent', cx: 31, cy: 20, r: 5.5, off: 2.6, fill: '#E70013'},\n {type: 'star', cx: 33, cy: 20, r: 3, fill: '#E70013'}\n ]\n },\n ke: {\n name: 'Kenya',\n stripes: {\n dir: 'h',\n colors: ['#000000', '#fff', '#BB0000', '#fff', '#006600'],\n weights: [12, 1, 12, 1, 12]\n },\n overlays: [\n {type: 'line', x1: 24, y1: 8, x2: 36, y2: 32, stroke: '#000', strokeWidth: 1},\n {type: 'line', x1: 36, y1: 8, x2: 24, y2: 32, stroke: '#000', strokeWidth: 1},\n {type: 'ellipse', cx: 30, cy: 20, rx: 4, ry: 8, fill: '#fff'},\n {type: 'ellipse', cx: 30, cy: 20, rx: 2.6, ry: 6.4, fill: '#BB0000'}\n ]\n }\n};\n","/**\n * Domma Flags - Asia & Middle East\n * Canvas 60×40 (3:2). Complex emblems simplified for icon-scale clarity.\n */\n\nexport const asia = {\n jp: {\n name: 'Japan',\n bg: '#FFFFFF',\n overlays: [{type: 'circle', cx: 30, cy: 20, r: 10, fill: '#BC002D'}]\n },\n cn: {\n name: 'China',\n bg: '#DE2910',\n overlays: [\n {type: 'star', cx: 12, cy: 11, r: 6, fill: '#FFDE00'},\n {type: 'star', cx: 22, cy: 5, r: 2, fill: '#FFDE00'},\n {type: 'star', cx: 26, cy: 9, r: 2, fill: '#FFDE00'},\n {type: 'star', cx: 26, cy: 15, r: 2, fill: '#FFDE00'},\n {type: 'star', cx: 22, cy: 19, r: 2, fill: '#FFDE00'}\n ]\n },\n kr: {\n name: 'South Korea',\n bg: '#FFFFFF',\n overlays: [\n {type: 'path', d: 'M30,13 a7,7 0 0 1 0,14 a3.5,3.5 0 0 1 0,-7 a3.5,3.5 0 0 0 0,-7 Z', fill: '#CD2E3A'},\n {type: 'path', d: 'M30,13 a7,7 0 0 0 0,14 a3.5,3.5 0 0 0 0,-7 a3.5,3.5 0 0 1 0,-7 Z', fill: '#0047A0'},\n {type: 'circle', cx: 30, cy: 16.5, r: 3.5, fill: '#CD2E3A'},\n {type: 'circle', cx: 30, cy: 23.5, r: 3.5, fill: '#0047A0'},\n {type: 'group', children: [\n {type: 'rect', x: 9, y: 8, w: 7, h: 1.3, fill: '#000'},\n {type: 'rect', x: 9, y: 10.4, w: 7, h: 1.3, fill: '#000'},\n {type: 'rect', x: 9, y: 12.8, w: 7, h: 1.3, fill: '#000'}\n ]},\n {type: 'group', children: [\n {type: 'rect', x: 44, y: 8, w: 7, h: 1.3, fill: '#000'},\n {type: 'rect', x: 44, y: 10.4, w: 7, h: 1.3, fill: '#000'},\n {type: 'rect', x: 44, y: 12.8, w: 7, h: 1.3, fill: '#000'}\n ]}\n ]\n },\n in: {\n name: 'India',\n stripes: {dir: 'h', colors: ['#FF9933', '#FFFFFF', '#138808']},\n overlays: [\n {type: 'circle', cx: 30, cy: 20, r: 5, fill: 'none', stroke: '#000080', strokeWidth: 0.8},\n {type: 'circle', cx: 30, cy: 20, r: 1, fill: '#000080'},\n {type: 'path', d: 'M30,15 V25 M25,20 H35 M26.5,16.5 L33.5,23.5 M33.5,16.5 L26.5,23.5', stroke: '#000080', strokeWidth: 0.5}\n ]\n },\n sa: {\n name: 'Saudi Arabia',\n bg: '#006C35',\n overlays: [\n {type: 'rect', x: 10, y: 26, w: 40, h: 1.6, fill: '#fff'},\n {type: 'path', d: 'M10,26.8 l4,-2 v4 z', fill: '#fff'},\n {type: 'rect', x: 14, y: 14, w: 32, h: 5, fill: 'none'}\n ]\n },\n ae: {\n name: 'United Arab Emirates',\n overlays: [\n {type: 'rect', x: 0, y: 0, w: 60, h: 13.33, fill: '#00732F'},\n {type: 'rect', x: 0, y: 13.33, w: 60, h: 13.33, fill: '#fff'},\n {type: 'rect', x: 0, y: 26.66, w: 60, h: 13.34, fill: '#000'},\n {type: 'rect', x: 0, y: 0, w: 15, h: 40, fill: '#FF0000'}\n ]\n },\n qa: {\n name: 'Qatar',\n bg: '#FFFFFF',\n overlays: [\n {type: 'path', d: 'M22,0 H60 V40 H22 L27,36 L22,32 L27,28 L22,24 L27,20 L22,16 L27,12 L22,8 L27,4 Z', fill: '#8A1538'}\n ]\n },\n id: {name: 'Indonesia', stripes: {dir: 'h', colors: ['#FF0000', '#FFFFFF']}},\n th: {\n name: 'Thailand',\n stripes: {\n dir: 'h',\n colors: ['#A51931', '#F4F5F8', '#2D2A4A', '#F4F5F8', '#A51931'],\n weights: [1, 1, 2, 1, 1]\n }\n },\n vn: {\n name: 'Vietnam',\n bg: '#DA251D',\n overlays: [{type: 'star', cx: 30, cy: 20, r: 9, fill: '#FFFF00'}]\n },\n tr: {\n name: 'Turkey',\n bg: '#E30A17',\n overlays: [\n {type: 'crescent', cx: 24, cy: 20, r: 8, off: 3.2, fill: '#fff'},\n {type: 'star', cx: 35, cy: 20, r: 4, rotation: -54, fill: '#fff'}\n ]\n },\n il: {\n name: 'Israel',\n bg: '#FFFFFF',\n overlays: [\n {type: 'rect', x: 0, y: 4, w: 60, h: 4, fill: '#0038B8'},\n {type: 'rect', x: 0, y: 32, w: 60, h: 4, fill: '#0038B8'},\n {type: 'path', d: 'M30,13 L33.5,19 H26.5 Z', fill: 'none', stroke: '#0038B8', strokeWidth: 1},\n {type: 'path', d: 'M30,27 L33.5,21 H26.5 Z', fill: 'none', stroke: '#0038B8', strokeWidth: 1}\n ]\n }\n};\n","/**\n * Domma Flags - Oceania\n * Canvas 60×40 (3:2). The Union canton reuses a scaled Union Jack group.\n */\n\nconst UNION_CANTON =\n '<g transform=\"scale(0.5)\">' +\n '<rect width=\"60\" height=\"40\" fill=\"#012169\"/>' +\n '<path d=\"M0,0 60,40 M60,0 0,40\" stroke=\"#fff\" stroke-width=\"8\"/>' +\n '<path d=\"M0,0 60,40 M60,0 0,40\" stroke=\"#C8102E\" stroke-width=\"4\"/>' +\n '<path d=\"M30,0 V40 M0,20 H60\" stroke=\"#fff\" stroke-width=\"13\"/>' +\n '<path d=\"M30,0 V40 M0,20 H60\" stroke=\"#C8102E\" stroke-width=\"8\"/>' +\n '</g>';\n\nexport const oceania = {\n au: {\n name: 'Australia',\n svg:\n '<rect width=\"60\" height=\"40\" fill=\"#012169\"/>' +\n UNION_CANTON +\n '<path fill=\"#fff\" d=\"M15,25 l1.3,3.9 4.1,0 -3.3,2.4 1.3,3.9 -3.4,-2.4 -3.4,2.4 1.3,-3.9 -3.3,-2.4 4.1,0 Z\"/>' +\n '<g fill=\"#fff\">' +\n '<path d=\"M47,7 l0.9,2.7 2.8,0 -2.3,1.7 0.9,2.7 -2.3,-1.7 -2.3,1.7 0.9,-2.7 -2.3,-1.7 2.8,0 Z\"/>' +\n '<path d=\"M40,19 l0.9,2.7 2.8,0 -2.3,1.7 0.9,2.7 -2.3,-1.7 -2.3,1.7 0.9,-2.7 -2.3,-1.7 2.8,0 Z\"/>' +\n '<path d=\"M47,31 l0.9,2.7 2.8,0 -2.3,1.7 0.9,2.7 -2.3,-1.7 -2.3,1.7 0.9,-2.7 -2.3,-1.7 2.8,0 Z\"/>' +\n '<path d=\"M54,18 l0.9,2.7 2.8,0 -2.3,1.7 0.9,2.7 -2.3,-1.7 -2.3,1.7 0.9,-2.7 -2.3,-1.7 2.8,0 Z\"/>' +\n '<circle cx=\"49\" cy=\"24\" r=\"1.2\"/></g>'\n },\n nz: {\n name: 'New Zealand',\n svg:\n '<rect width=\"60\" height=\"40\" fill=\"#00247D\"/>' +\n UNION_CANTON +\n '<g>' +\n '<path fill=\"#fff\" d=\"M47,7 l1,2.9 3,0 -2.5,1.9 1,2.9 -2.5,-1.8 -2.5,1.8 1,-2.9 -2.5,-1.9 3,0 Z\"/>' +\n '<path fill=\"#CC142B\" d=\"M47,8.5 l0.6,1.9 2,0 -1.6,1.2 0.6,1.9 -1.6,-1.2 -1.6,1.2 0.6,-1.9 -1.6,-1.2 2,0 Z\"/>' +\n '<path fill=\"#fff\" d=\"M41,20 l1,2.9 3,0 -2.5,1.9 1,2.9 -2.5,-1.8 -2.5,1.8 1,-2.9 -2.5,-1.9 3,0 Z\"/>' +\n '<path fill=\"#CC142B\" d=\"M41,21.5 l0.6,1.9 2,0 -1.6,1.2 0.6,1.9 -1.6,-1.2 -1.6,1.2 0.6,-1.9 -1.6,-1.2 2,0 Z\"/>' +\n '<path fill=\"#fff\" d=\"M53,18 l1,2.9 3,0 -2.5,1.9 1,2.9 -2.5,-1.8 -2.5,1.8 1,-2.9 -2.5,-1.9 3,0 Z\"/>' +\n '<path fill=\"#CC142B\" d=\"M53,19.5 l0.6,1.9 2,0 -1.6,1.2 0.6,1.9 -1.6,-1.2 -1.6,1.2 0.6,-1.9 -1.6,-1.2 2,0 Z\"/>' +\n '<path fill=\"#fff\" d=\"M47,32 l1,2.9 3,0 -2.5,1.9 1,2.9 -2.5,-1.8 -2.5,1.8 1,-2.9 -2.5,-1.9 3,0 Z\"/>' +\n '<path fill=\"#CC142B\" d=\"M47,33.5 l0.6,1.9 2,0 -1.6,1.2 0.6,1.9 -1.6,-1.2 -1.6,1.2 0.6,-1.9 -1.6,-1.2 2,0 Z\"/>' +\n '</g>'\n }\n};\n","/**\n * Domma Flags\n * Aggregates nation-flag descriptors into a single registry, keyed by\n * ISO 3166-1 alpha-2 code, grouped by region.\n *\n * This is a curated starter set covering the major footballing and world\n * nations. It is easily extended at runtime with FL.register(code, def).\n */\n\nimport {europe} from './europe.js';\nimport {americas} from './americas.js';\nimport {africa} from './africa.js';\nimport {asia} from './asia.js';\nimport {oceania} from './oceania.js';\n\n// Merge all regions into a single registry\nexport const flags = {\n ...europe,\n ...americas,\n ...africa,\n ...asia,\n ...oceania\n};\n\n// Export region groups for selective imports\nexport {europe, americas, africa, asia, oceania};\n\n// Region metadata for the flag gallery\nexport const regions = {\n europe: {name: 'Europe', description: 'European nations', codes: Object.keys(europe)},\n americas: {name: 'Americas', description: 'North, Central & South America', codes: Object.keys(americas)},\n africa: {name: 'Africa', description: 'African nations', codes: Object.keys(africa)},\n asia: {name: 'Asia & Middle East', description: 'Asian and Middle Eastern nations', codes: Object.keys(asia)},\n oceania: {name: 'Oceania', description: 'Australia, New Zealand & the Pacific', codes: Object.keys(oceania)}\n};\n\nexport default flags;\n","/**\n * Domma Flags Registry\n *\n * Renders nation flags as inline SVG. Flags are stored as compact descriptors\n * (stripe/cross/overlay specs or raw SVG) and expanded to SVG markup lazily on\n * first render, then memoised - nothing touches the DOM until a flag is actually\n * requested. Keyed by ISO 3166-1 alpha-2 code (e.g. 'gb', 'us', 'fr').\n *\n * Opt-in module: ships as a separate bundle (domma-flags) and is NOT part of the\n * core domma bundle. Attaches to Domma.flags / window.FL when loaded.\n */\n\nimport {flags as defaultFlags, regions} from '../public/assets/flags/index.js';\n\nconst NAMESPACE = 'http://www.w3.org/2000/svg';\nconst VIEWBOX = '0 0 60 40'; // canonical 3:2 flag canvas\nconst SQUARE_VIEWBOX = '10 0 40 40'; // centre-cropped 1:1 slice\n\nlet _clipSeq = 0;\n\n/* -------------------------------------------------------------------------- */\n/* Geometry helpers (shared by descriptor expansion) */\n/* -------------------------------------------------------------------------- */\n\n/**\n * Generate an n-pointed star path.\n * @param {number} cx - Centre x\n * @param {number} cy - Centre y\n * @param {number} outerR - Outer radius\n * @param {number} [points=5] - Number of points\n * @param {number} [innerRatio=0.382] - Inner radius as a fraction of outer\n * @param {number} [rotation=-90] - Rotation in degrees (-90 points up)\n * @returns {string} SVG path data\n */\nexport function starPath(cx, cy, outerR, points = 5, innerRatio = 0.382, rotation = -90) {\n const innerR = outerR * innerRatio;\n const step = Math.PI / points;\n const start = (rotation * Math.PI) / 180;\n let d = '';\n for (let i = 0; i < points * 2; i++) {\n const r = i % 2 === 0 ? outerR : innerR;\n const a = start + i * step;\n const x = (cx + r * Math.cos(a)).toFixed(2);\n const y = (cy + r * Math.sin(a)).toFixed(2);\n d += (i === 0 ? 'M' : 'L') + x + ',' + y;\n }\n return d + 'Z';\n}\n\n/**\n * Generate a crescent path (a lune) opening towards the fly (right).\n * The inner arc passes through the top and bottom of the outer circle.\n * @param {number} cx - Outer circle centre x\n * @param {number} cy - Outer circle centre y\n * @param {number} r - Outer radius\n * @param {number} [off=r*0.45] - Horizontal offset of the carving circle\n * @returns {string} SVG path data\n */\nexport function crescentPath(cx, cy, r, off = r * 0.45) {\n const ri = Math.sqrt(off * off + r * r);\n const top = (cy - r).toFixed(2);\n const bot = (cy + r).toFixed(2);\n const x = cx.toFixed(2);\n return `M${x},${top} A${r},${r} 0 1 0 ${x},${bot} A${ri.toFixed(2)},${ri.toFixed(2)} 0 0 1 ${x},${top}Z`;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Descriptor → SVG markup expansion */\n/* -------------------------------------------------------------------------- */\n\nfunction esc(v) {\n return String(v).replace(/\"/g, '"');\n}\n\nfunction buildStripes({dir = 'h', colors = [], weights = null}) {\n const total = weights ? weights.reduce((a, b) => a + b, 0) : colors.length;\n let offset = 0;\n let out = '';\n colors.forEach((colour, i) => {\n const w = weights ? weights[i] : 1;\n if (dir === 'v') {\n const x = (60 * offset) / total;\n const width = (60 * w) / total;\n out += `<rect x=\"${x.toFixed(3)}\" y=\"0\" width=\"${width.toFixed(3)}\" height=\"40\" fill=\"${esc(colour)}\"/>`;\n } else {\n const y = (40 * offset) / total;\n const height = (40 * w) / total;\n out += `<rect x=\"0\" y=\"${y.toFixed(3)}\" width=\"60\" height=\"${height.toFixed(3)}\" fill=\"${esc(colour)}\"/>`;\n }\n offset += w;\n });\n return out;\n}\n\n/**\n * Nordic (offset) cross - vertical bar sits towards the hoist.\n */\nfunction buildCross({bg, colour, border = null, thickness = 8}) {\n const t = thickness;\n const vx = 16; // vertical bar left edge (hoist-offset)\n const hy = 20 - t / 2; // horizontal bar top edge (centred)\n let out = `<rect x=\"0\" y=\"0\" width=\"60\" height=\"40\" fill=\"${esc(bg)}\"/>`;\n if (border) {\n const b = 2;\n out += `<rect x=\"${vx - b}\" y=\"0\" width=\"${t + b * 2}\" height=\"40\" fill=\"${esc(border)}\"/>`;\n out += `<rect x=\"0\" y=\"${hy - b}\" width=\"60\" height=\"${t + b * 2}\" fill=\"${esc(border)}\"/>`;\n }\n out += `<rect x=\"${vx}\" y=\"0\" width=\"${t}\" height=\"40\" fill=\"${esc(colour)}\"/>`;\n out += `<rect x=\"0\" y=\"${hy}\" width=\"60\" height=\"${t}\" fill=\"${esc(colour)}\"/>`;\n return out;\n}\n\nfunction buildOverlay(o) {\n const fill = o.fill !== undefined ? ` fill=\"${esc(o.fill)}\"` : '';\n const stroke = o.stroke ? ` stroke=\"${esc(o.stroke)}\"` : '';\n const sw = o.strokeWidth !== undefined ? ` stroke-width=\"${o.strokeWidth}\"` : '';\n const extra = stroke + sw + (stroke && !o.fill ? ' fill=\"none\"' : '');\n switch (o.type) {\n case 'rect':\n return `<rect x=\"${o.x}\" y=\"${o.y}\" width=\"${o.w}\" height=\"${o.h}\"${o.rx ? ` rx=\"${o.rx}\"` : ''}${fill}${extra}/>`;\n case 'circle':\n return `<circle cx=\"${o.cx}\" cy=\"${o.cy}\" r=\"${o.r}\"${fill}${extra}/>`;\n case 'ellipse':\n return `<ellipse cx=\"${o.cx}\" cy=\"${o.cy}\" rx=\"${o.rx}\" ry=\"${o.ry}\"${fill}${extra}/>`;\n case 'line':\n return `<line x1=\"${o.x1}\" y1=\"${o.y1}\" x2=\"${o.x2}\" y2=\"${o.y2}\"${stroke}${sw}/>`;\n case 'path':\n return `<path d=\"${o.d}\"${fill}${extra}/>`;\n case 'star':\n return `<path d=\"${starPath(o.cx, o.cy, o.r, o.points || 5, o.innerRatio || 0.382, o.rotation === undefined ? -90 : o.rotation)}\"${fill || ' fill=\"#fff\"'}${extra}/>`;\n case 'crescent':\n return `<path d=\"${crescentPath(o.cx, o.cy, o.r, o.off)}\"${fill || ' fill=\"#fff\"'}${extra}/>`;\n case 'group':\n return `<g${o.transform ? ` transform=\"${esc(o.transform)}\"` : ''}>${(o.children || []).map(buildOverlay).join('')}</g>`;\n default:\n return '';\n }\n}\n\nfunction expandFlag(def) {\n if (def.svg) {\n return def.svg;\n }\n let out = '';\n if (def.stripes) {\n out += buildStripes(def.stripes);\n }\n if (def.cross) {\n out += buildCross(def.cross);\n }\n if (def.bg && !def.stripes && !def.cross) {\n out = `<rect x=\"0\" y=\"0\" width=\"60\" height=\"40\" fill=\"${esc(def.bg)}\"/>` + out;\n }\n if (def.overlays) {\n out += def.overlays.map(buildOverlay).join('');\n }\n return out;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Registry */\n/* -------------------------------------------------------------------------- */\n\nclass FlagRegistry {\n constructor() {\n this._flags = {...defaultFlags};\n this._regions = {...regions};\n this._cache = {};\n }\n\n _markup(code) {\n if (this._cache[code] !== undefined) {\n return this._cache[code];\n }\n const def = this._flags[code];\n const markup = def ? expandFlag(def) : null;\n this._cache[code] = markup;\n return markup;\n }\n\n /**\n * Render a flag as an SVG element.\n * @param {string} code - ISO 3166-1 alpha-2 code (case-insensitive)\n * @param {Object} [options]\n * @param {number} [options.size=24] - Height in px (width follows aspect)\n * @param {number} [options.width] - Explicit width override\n * @param {number} [options.height] - Explicit height override\n * @param {string} [options.shape='rect'] - 'rect' | 'square' | 'circle' | 'rounded'\n * @param {boolean|string} [options.border=false] - Add a hairline border (or colour)\n * @param {string} [options.class] - Extra CSS classes\n * @param {string} [options.title] - Accessible title (defaults to country name)\n * @param {Object} [options.attrs] - Additional attributes\n * @returns {SVGElement|null}\n */\n render(code, options = {}) {\n code = String(code || '').toLowerCase();\n const def = this._flags[code];\n if (!def) {\n console.warn(`Flag \"${code}\" not found`);\n return null;\n }\n\n const {\n size = 24,\n width = null,\n height = null,\n shape = 'rect',\n border = false,\n class: className = '',\n title = null,\n attrs = {}\n } = options;\n\n const isSquareShape = shape === 'square' || shape === 'circle';\n const h = height || size;\n const w = width || (isSquareShape ? h : h * 1.5);\n\n const svg = document.createElementNS(NAMESPACE, 'svg');\n svg.setAttribute('viewBox', isSquareShape ? SQUARE_VIEWBOX : VIEWBOX);\n svg.setAttribute('width', w);\n svg.setAttribute('height', h);\n svg.setAttribute('role', 'img');\n\n const label = title || def.name || code.toUpperCase();\n svg.setAttribute('aria-label', label);\n\n const classes = ['dm-flag', `dm-flag-${shape}`];\n if (className) {\n classes.push(className);\n }\n svg.setAttribute('class', classes.join(' '));\n\n Object.entries(attrs).forEach(([k, v]) => svg.setAttribute(k, v));\n\n const clipId = `dm-flag-clip-${++_clipSeq}`;\n let inner = `<title>${esc(label)}</title>`;\n const body = this._markup(code) || '';\n\n if (shape === 'circle') {\n inner += `<defs><clipPath id=\"${clipId}\"><circle cx=\"30\" cy=\"20\" r=\"20\"/></clipPath></defs>`;\n inner += `<g clip-path=\"url(#${clipId})\">${body}</g>`;\n if (border) {\n const bc = typeof border === 'string' ? border : 'rgba(0,0,0,0.15)';\n inner += `<circle cx=\"30\" cy=\"20\" r=\"19.25\" fill=\"none\" stroke=\"${esc(bc)}\" stroke-width=\"1.5\"/>`;\n }\n } else if (shape === 'rounded') {\n inner += `<defs><clipPath id=\"${clipId}\"><rect x=\"0\" y=\"0\" width=\"60\" height=\"40\" rx=\"6\"/></clipPath></defs>`;\n inner += `<g clip-path=\"url(#${clipId})\">${body}</g>`;\n if (border) {\n const bc = typeof border === 'string' ? border : 'rgba(0,0,0,0.15)';\n inner += `<rect x=\"0.75\" y=\"0.75\" width=\"58.5\" height=\"38.5\" rx=\"5.25\" fill=\"none\" stroke=\"${esc(bc)}\" stroke-width=\"1.5\"/>`;\n }\n } else {\n inner += body;\n if (border) {\n const bc = typeof border === 'string' ? border : 'rgba(0,0,0,0.15)';\n const vb = isSquareShape ? {x: 10.5, y: 0.5, w: 39, h: 39} : {x: 0.5, y: 0.5, w: 59, h: 39};\n inner += `<rect x=\"${vb.x}\" y=\"${vb.y}\" width=\"${vb.w}\" height=\"${vb.h}\" fill=\"none\" stroke=\"${esc(bc)}\" stroke-width=\"1\"/>`;\n }\n }\n\n svg.innerHTML = inner;\n return svg;\n }\n\n /**\n * Get a flag as an HTML string.\n * @param {string} code\n * @param {Object} [options] - Same as render()\n * @returns {string}\n */\n html(code, options = {}) {\n const svg = this.render(code, options);\n if (!svg) {\n return '';\n }\n const container = document.createElement('div');\n container.appendChild(svg);\n return container.innerHTML;\n }\n\n /**\n * Inject a flag into an element.\n * @param {string|HTMLElement} target\n * @param {string} code\n * @param {Object} [options] - Same as render(), plus position\n * @param {string} [options.position='prepend'] - 'prepend' | 'append' | 'replace'\n * @returns {SVGElement|null}\n */\n inject(target, code, options = {}) {\n const {position = 'prepend', ...renderOptions} = options;\n const element = typeof target === 'string' ? document.querySelector(target) : target;\n if (!element) {\n console.warn(`Target element not found: ${target}`);\n return null;\n }\n const svg = this.render(code, renderOptions);\n if (!svg) {\n return null;\n }\n if (position === 'append') {\n element.appendChild(svg);\n } else if (position === 'replace') {\n element.innerHTML = '';\n element.appendChild(svg);\n } else {\n element.insertBefore(svg, element.firstChild);\n }\n return svg;\n }\n\n /**\n * Scan a container for [data-flag] elements and replace them with SVGs.\n * Supported attributes: data-flag, data-flag-size, data-flag-shape,\n * data-flag-class, data-flag-border, data-flag-title.\n * @param {HTMLElement|string} [container=document]\n * @returns {number} Number of flags replaced\n */\n scan(container = document) {\n const root = typeof container === 'string' ? document.querySelector(container) : container;\n if (!root) {\n return 0;\n }\n const elements = root.querySelectorAll('[data-flag]:not([data-flag-processed])');\n let count = 0;\n elements.forEach(el => {\n if (el.tagName.toLowerCase() === 'svg' || el.querySelector('svg')) {\n return;\n }\n const code = el.dataset.flag;\n const size = parseInt(el.dataset.flagSize, 10) || 24;\n const shape = el.dataset.flagShape || 'rect';\n const className = el.dataset.flagClass || '';\n const border = el.dataset.flagBorder !== undefined\n ? (el.dataset.flagBorder === '' || el.dataset.flagBorder === 'true' ? true : el.dataset.flagBorder)\n : false;\n const title = el.dataset.flagTitle || null;\n\n const svg = this.render(code, {size, shape, class: className, border, title});\n if (svg) {\n if (el.className) {\n svg.classList.add(...el.className.split(' ').filter(Boolean));\n }\n svg.setAttribute('data-flag', code);\n svg.setAttribute('data-flag-processed', 'true');\n el.replaceWith(svg);\n count++;\n } else {\n el.setAttribute('data-flag-processed', 'true');\n }\n });\n return count;\n }\n\n /**\n * Register a custom flag (or override an existing one).\n * @param {string} code - ISO alpha-2 code\n * @param {Object} definition - { name, region?, svg? | stripes?/cross?/bg?/overlays? }\n * @returns {FlagRegistry}\n */\n register(code, definition) {\n if (!code || !definition) {\n console.warn('Invalid flag registration: code and definition required');\n return this;\n }\n code = String(code).toLowerCase();\n this._flags[code] = definition;\n delete this._cache[code];\n\n const region = definition.region || 'custom';\n if (!this._regions[region]) {\n this._regions[region] = {name: region.charAt(0).toUpperCase() + region.slice(1), codes: []};\n }\n if (!this._regions[region].codes.includes(code)) {\n this._regions[region].codes.push(code);\n }\n return this;\n }\n\n /**\n * Remove a registered flag.\n * @param {string} code\n * @returns {boolean}\n */\n unregister(code) {\n code = String(code || '').toLowerCase();\n if (this._flags[code]) {\n delete this._flags[code];\n delete this._cache[code];\n Object.values(this._regions).forEach(r => {\n const i = r.codes.indexOf(code);\n if (i > -1) {\n r.codes.splice(i, 1);\n }\n });\n return true;\n }\n return false;\n }\n\n /**\n * Check whether a flag exists.\n * @param {string} code\n * @returns {boolean}\n */\n has(code) {\n return !!this._flags[String(code || '').toLowerCase()];\n }\n\n /**\n * Get a flag definition.\n * @param {string} code\n * @returns {Object|null}\n */\n get(code) {\n return this._flags[String(code || '').toLowerCase()] || null;\n }\n\n /**\n * Get the country name for a code.\n * @param {string} code\n * @returns {string|null}\n */\n name(code) {\n const def = this.get(code);\n return def ? def.name : null;\n }\n\n /**\n * List flag codes, optionally filtered by region.\n * @param {string} [region]\n * @returns {string[]}\n */\n list(region = null) {\n if (region && this._regions[region]) {\n return [...this._regions[region].codes];\n }\n return Object.keys(this._flags);\n }\n\n /**\n * List all regions with metadata.\n * @returns {Object}\n */\n listRegions() {\n return {...this._regions};\n }\n\n /**\n * Total number of flags.\n * @returns {number}\n */\n count() {\n return Object.keys(this._flags).length;\n }\n\n /**\n * Search flags by code or country name.\n * @param {string} query\n * @returns {string[]} Matching codes\n */\n search(query) {\n const q = String(query || '').toLowerCase().trim();\n if (!q) {\n return [];\n }\n return Object.keys(this._flags).filter(code =>\n code.includes(q) || (this._flags[code].name || '').toLowerCase().includes(q)\n );\n }\n}\n\nconst flags = new FlagRegistry();\n\nexport {flags, FlagRegistry};\nexport default flags;\n","/**\n * Domma Flags Bundle\n * Nation flags as inline SVG - an opt-in module, separate from the core bundle.\n *\n * Load after domma.min.js:\n * <script src=\"domma.min.js\"></script>\n * <script src=\"domma-flags.min.js\"></script>\n *\n * Exposes window.FL and Domma.flags / Domma.FL.\n */\n\nimport {flags, FlagRegistry} from './flags.js';\n\n// Attach to Domma when present\nif (typeof window !== 'undefined' && window.Domma) {\n window.Domma.flags = flags;\n window.Domma.FL = flags;\n}\n\n// Expose the FL alias globally\nif (typeof window !== 'undefined') {\n window.FL = flags;\n}\n\nexport {flags, FlagRegistry};\nexport default flags;\n"],"names":["europe","gb","name","svg","fr","stripes","dir","colors","de","it","es","weights","pt","overlays","type","cx","cy","r","fill","stroke","strokeWidth","nl","be","ie","ch","bg","x","y","w","h","at","se","cross","colour","no","border","dk","fi","is","pl","ua","gr","hr","ru","cz","d","americas","us","ca","br","ar","mx","cl","co","pe","uy","africa","za","ng","gh","eg","ma","sn","ci","cm","dz","off","tn","ke","x1","y1","x2","y2","rx","ry","asia","jp","cn","kr","children","in","sa","ae","qa","id","th","vn","tr","rotation","il","UNION_CANTON","oceania","au","nz","flags","regions","description","codes","Object","keys","_clipSeq","esc","v","String","replace","buildOverlay","o","undefined","sw","extra","outerR","points","innerRatio","innerR","step","Math","PI","start","i","a","cos","toFixed","sin","starPath","ri","sqrt","top","bot","crescentPath","transform","map","join","expandFlag","def","out","total","reduce","b","length","offset","forEach","width","height","buildStripes","thickness","t","hy","buildCross","FlagRegistry","constructor","this","_flags","defaultFlags","_regions","_cache","_markup","code","markup","render","options","toLowerCase","console","warn","size","shape","class","className","title","attrs","isSquareShape","document","createElementNS","setAttribute","label","toUpperCase","classes","push","entries","k","clipId","inner","body","bc","vb","innerHTML","html","container","createElement","appendChild","inject","target","position","renderOptions","element","querySelector","insertBefore","firstChild","scan","root","elements","querySelectorAll","count","el","tagName","dataset","flag","parseInt","flagSize","flagShape","flagClass","flagBorder","flagTitle","classList","add","split","filter","Boolean","replaceWith","register","definition","region","charAt","slice","includes","unregister","values","indexOf","splice","has","get","list","listRegions","search","query","q","trim","window","Domma","FL"],"mappings":";;;;;;;;;iPAQO,MAAMA,EAAS,CAClBC,GAAI,CACAC,KAAM,iBACNC,IACI,oTAMRC,GAAI,CAACF,KAAM,SAAUG,QAAS,CAACC,IAAK,IAAKC,OAAQ,CAAC,UAAW,UAAW,aACxEC,GAAI,CAACN,KAAM,UAAWG,QAAS,CAACC,IAAK,IAAKC,OAAQ,CAAC,UAAW,UAAW,aACzEE,GAAI,CAACP,KAAM,QAASG,QAAS,CAACC,IAAK,IAAKC,OAAQ,CAAC,UAAW,UAAW,aACvEG,GAAI,CACAR,KAAM,QACNG,QAAS,CAACC,IAAK,IAAKC,OAAQ,CAAC,UAAW,UAAW,WAAYI,QAAS,CAAC,EAAG,EAAG,KAEnFC,GAAI,CACAV,KAAM,WACNG,QAAS,CAACC,IAAK,IAAKC,OAAQ,CAAC,UAAW,WAAYI,QAAS,CAAC,EAAG,IACjEE,SAAU,CACN,CAACC,KAAM,SAAUC,GAAI,GAAIC,GAAI,GAAIC,EAAG,EAAGC,KAAM,UAAWC,OAAQ,UAAWC,YAAa,GACxF,CAACN,KAAM,SAAUC,GAAI,GAAIC,GAAI,GAAIC,EAAG,IAAKC,KAAM,aAGvDG,GAAI,CAACnB,KAAM,cAAeG,QAAS,CAACC,IAAK,IAAKC,OAAQ,CAAC,UAAW,UAAW,aAC7Ee,GAAI,CAACpB,KAAM,UAAWG,QAAS,CAACC,IAAK,IAAKC,OAAQ,CAAC,UAAW,UAAW,aACzEgB,GAAI,CAACrB,KAAM,UAAWG,QAAS,CAACC,IAAK,IAAKC,OAAQ,CAAC,UAAW,UAAW,aACzEiB,GAAI,CACAtB,KAAM,cACNuB,GAAI,UACJZ,SAAU,CACN,CAACC,KAAM,OAAQY,EAAG,GAAIC,EAAG,G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,OAAOC,KAAKmD,KAAKC,QAAQgE,OAAO3D,GACnCA,EAAKmE,SAASW,KAAOpF,KAAKC,OAAOK,GAAM1J,MAAQ,IAAI8J,cAAc+D,SAASW,IAHnE,EAKf,EAGC,MAAC5I,EAAQ,IAAIsD,EC1cI,oBAAXwF,QAA0BA,OAAOC,QACxCD,OAAOC,MAAM/I,MAAQA,EACrB8I,OAAOC,MAAMC,GAAKhJ,GAIA,oBAAX8I,SACPA,OAAOE,GAAKhJ"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Domma Syntax Highlighter v0.
|
|
2
|
+
* Domma Syntax Highlighter v0.54.0
|
|
3
3
|
* Lightweight code syntax highlighting for JavaScript, HTML, and CSS
|
|
4
4
|
* (c) 2026 Darryl Waterhouse & DCBW-IT
|
|
5
|
-
* Built: 2026-10-
|
|
6
|
-
* Commit:
|
|
5
|
+
* Built: 2026-10-24T13:16:17.254Z
|
|
6
|
+
* Commit: 8d2b9ea
|
|
7
7
|
*/
|
|
8
8
|
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).DommaSyntax={})}(this,function(t){"use strict";const e={javascript:[{type:"comment",pattern:/\/\*[\s\S]*?\*\//g},{type:"comment",pattern:/\/\/.*/g},{type:"template-string",pattern:/`(?:\\.|[^`\\])*`/g},{type:"string",pattern:/"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'/g},{type:"keyword",pattern:/\b(const|let|var|function|return|if|else|for|while|do|break|continue|switch|case|default|try|catch|finally|throw|async|await|class|extends|static|new|this|super|import|export|from|as|default|yield|typeof|instanceof|in|of|delete|void)\b/g},{type:"boolean",pattern:/\b(true|false|null|undefined|NaN|Infinity)\b/g},{type:"number",pattern:/\b\d+\.?\d*([eE][+-]?\d+)?\b/g},{type:"function",pattern:/\b([a-zA-Z_$][\w$]*)\s*(?=\()/g},{type:"class-name",pattern:/\b[A-Z][\w$]*\b/g},{type:"operator",pattern:/[+\-*/%=<>!&|^~?:]+|===|!==|==|!=|<=|>=|&&|\|\||<<|>>|>>>/g},{type:"punctuation",pattern:/[{}[\]();,.]/g}],html:[{type:"comment",pattern:/<!--[\s\S]*?-->/g},{type:"doctype",pattern:/<!DOCTYPE[^>]*>/gi},{type:"tag-open",pattern:/<\/?[a-zA-Z][\w-]*/g},{type:"tag-close",pattern:/\/?>/g},{type:"attr-name",pattern:/\s+[a-zA-Z:@][\w:.-]*(?=\s*=)/g},{type:"attr-value",pattern:/=\s*"[^"]*"|=\s*'[^']*'/g},{type:"entity",pattern:/&[#\w]+;/g}],css:[{type:"comment",pattern:/\/\*[\s\S]*?\*\//g},{type:"at-rule",pattern:/@[\w-]+/g},{type:"selector",pattern:/[.#]?[a-zA-Z][\w-]*(?=\s*[{,])/g},{type:"property",pattern:/\b[\w-]+(?=\s*:)/g},{type:"string",pattern:/"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'/g},{type:"function",pattern:/\b[\w-]+(?=\()/g},{type:"important",pattern:/!important\b/g},{type:"number",pattern:/\b\d+\.?\d*(px|em|rem|%|vh|vw|pt|cm|mm|in|pc|ex|ch|vmin|vmax|fr)?\b/g},{type:"color",pattern:/#[\da-fA-F]{3,8}\b/g},{type:"punctuation",pattern:/[{}:;,()]/g}]};function n(t){const e={"&":"&","<":"<",">":">",'"':""","'":"'"};return t.replace(/[&<>"']/g,t=>e[t])}class a{constructor(){this.config={autoDetect:!0,preserveOriginal:!0,selector:".code-block",showLanguageBadge:!1,languagePrefix:"language-"}}highlight(t,a=null){const r="string"==typeof t?document.querySelector(t):t;if(!r||r.hasAttribute("data-syntax-highlighted"))return!1;if(!a&&this.config.autoDetect){const t=Array.from(r.classList).find(t=>t.startsWith(this.config.languagePrefix));t&&(a=t.substring(this.config.languagePrefix.length))}if(!a||!e[a])return!1;const o=r.textContent||"";this.config.preserveOriginal&&r.setAttribute("data-original-code",o);const i=function(t,a){const r=e[a];if(!r)return n(t);const o=[];for(const{type:e,pattern:n}of r){if("html"===a&&"entity"===e)continue;let r;for(n.lastIndex=0;null!==(r=n.exec(t));)o.push({start:r.index,end:r.index+r[0].length,text:r[0],type:e})}o.sort((t,e)=>t.start-e.start);const i=[];let s=0;for(const t of o)t.start>=s&&(i.push(t),s=t.end);let c="",p=0;for(const e of i)e.start>p&&(c+=n(t.substring(p,e.start))),c+=`<span class="syntax-${e.type}">${n(e.text)}</span>`,p=e.end;return p<t.length&&(c+=n(t.substring(p))),c}(o,a);return r.innerHTML=i,r.setAttribute("data-syntax-highlighted","true"),r.setAttribute("data-language",a),this.config.showLanguageBadge&&this.addLanguageBadge(r,a),!0}scan(t={}){const e=t.selector||this.config.selector,n=document.querySelectorAll(e);let a=0;return n.forEach(e=>{this.highlight(e,t.language||null)&&(this.addCopyButton(e),a++)}),a}register(t,n){t&&Array.isArray(n)?e[t]=n:console.error("SyntaxHighlighter: Invalid language registration")}configure(t){return t?(Object.assign(this.config,t),this.config):{...this.config}}addLanguageBadge(t,e){if(t.querySelector(".syntax-language-badge"))return;const n=document.createElement("div");n.className="syntax-language-badge",n.textContent=e.toUpperCase(),t.style.position="relative",t.insertBefore(n,t.firstChild)}getLanguages(){return Object.keys(e)}isLanguageSupported(t){return t in e}addCopyButton(t){if(t.parentElement&&t.parentElement.classList.contains("code-block-wrapper"))return;const e=document.createElement("div");e.className="code-block-wrapper";const n=document.createElement("button");n.className="code-block-copy",n.setAttribute("aria-label","Copy code to clipboard"),n.innerHTML='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg>',n.addEventListener("click",async()=>{const e=t.getAttribute("data-original-code")||t.textContent;try{if(navigator.clipboard&&navigator.clipboard.writeText)await navigator.clipboard.writeText(e);else{const t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}n.classList.add("copied"),n.innerHTML='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="20 6 9 17 4 12"></polyline></svg>',setTimeout(()=>{n.classList.remove("copied"),n.innerHTML='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg>'},2e3)}catch(t){console.error("Failed to copy code:",t)}}),t.parentNode.insertBefore(e,t),e.appendChild(t),e.appendChild(n)}}const r=new a;"undefined"!=typeof document&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{r.scan()}):setTimeout(()=>r.scan(),0)),"undefined"!=typeof window&&(window.Domma&&(window.Domma.syntax=r),window.DommaSyntax=r),t.LANGUAGES=e,t.SyntaxHighlighter=a,t.default=r,t.syntax=r,Object.defineProperty(t,"__esModule",{value:!0})});
|
|
9
|
+
//# sourceMappingURL=domma-syntax.min.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"domma-syntax.min.js","sources":["../../src/syntax.js"],"sourcesContent":["/**\n * Domma Syntax Highlighter\n * Lightweight code syntax highlighting for JavaScript, HTML, and CSS\n * Zero dependencies, regex-based tokenization\n */\n\n// Token definitions for supported languages\nconst LANGUAGES = {\n javascript: [\n {type: 'comment', pattern: /\\/\\*[\\s\\S]*?\\*\\//g},\n {type: 'comment', pattern: /\\/\\/.*/g},\n {type: 'template-string', pattern: /`(?:\\\\.|[^`\\\\])*`/g},\n {type: 'string', pattern: /\"(?:\\\\.|[^\"\\\\])*\"|'(?:\\\\.|[^'\\\\])*'/g},\n {\n type: 'keyword',\n pattern: /\\b(const|let|var|function|return|if|else|for|while|do|break|continue|switch|case|default|try|catch|finally|throw|async|await|class|extends|static|new|this|super|import|export|from|as|default|yield|typeof|instanceof|in|of|delete|void)\\b/g\n },\n {type: 'boolean', pattern: /\\b(true|false|null|undefined|NaN|Infinity)\\b/g},\n {type: 'number', pattern: /\\b\\d+\\.?\\d*([eE][+-]?\\d+)?\\b/g},\n {type: 'function', pattern: /\\b([a-zA-Z_$][\\w$]*)\\s*(?=\\()/g},\n {type: 'class-name', pattern: /\\b[A-Z][\\w$]*\\b/g},\n {type: 'operator', pattern: /[+\\-*/%=<>!&|^~?:]+|===|!==|==|!=|<=|>=|&&|\\|\\||<<|>>|>>>/g},\n {type: 'punctuation', pattern: /[{}[\\]();,.]/g}\n ],\n html: [\n {type: 'comment', pattern: /<!--[\\s\\S]*?-->/g},\n {type: 'doctype', pattern: /<!DOCTYPE[^>]*>/gi},\n {type: 'tag-open', pattern: /<\\/?[a-zA-Z][\\w-]*/g},\n {type: 'tag-close', pattern: /\\/?>/g},\n {type: 'attr-name', pattern: /\\s+[a-zA-Z:@][\\w:.-]*(?=\\s*=)/g},\n {type: 'attr-value', pattern: /=\\s*\"[^\"]*\"|=\\s*'[^']*'/g},\n {type: 'entity', pattern: /&[#\\w]+;/g}\n ],\n css: [\n {type: 'comment', pattern: /\\/\\*[\\s\\S]*?\\*\\//g},\n {type: 'at-rule', pattern: /@[\\w-]+/g},\n {type: 'selector', pattern: /[.#]?[a-zA-Z][\\w-]*(?=\\s*[{,])/g},\n {type: 'property', pattern: /\\b[\\w-]+(?=\\s*:)/g},\n {type: 'string', pattern: /\"(?:\\\\.|[^\"\\\\])*\"|'(?:\\\\.|[^'\\\\])*'/g},\n {type: 'function', pattern: /\\b[\\w-]+(?=\\()/g},\n {type: 'important', pattern: /!important\\b/g},\n {type: 'number', pattern: /\\b\\d+\\.?\\d*(px|em|rem|%|vh|vw|pt|cm|mm|in|pc|ex|ch|vmin|vmax|fr)?\\b/g},\n {type: 'color', pattern: /#[\\da-fA-F]{3,8}\\b/g},\n {type: 'punctuation', pattern: /[{}:;,()]/g}\n ]\n};\n\n/**\n * Escape HTML special characters\n * @param {string} str - String to escape\n * @returns {string} Escaped string\n */\nfunction escapeHtml(str) {\n const htmlEscapes = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": '''\n };\n return str.replace(/[&<>\"']/g, char => htmlEscapes[char]);\n}\n\n/**\n * Escape special regex characters\n * @param {string} str - String to escape\n * @returns {string} Escaped string for use in regex\n */\nfunction escapeRegExp(str) {\n return str.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n\n/**\n * Tokenize code by collecting matches and building HTML with escaped gaps\n * @param {string} code - Code to tokenize\n * @param {string} language - Language identifier\n * @returns {string} HTML with highlighted tokens\n */\nfunction tokenize(code, language) {\n const tokens = LANGUAGES[language];\n if (!tokens) {\n return escapeHtml(code);\n }\n\n // Collect all token matches with positions\n const matches = [];\n\n for (const {type, pattern} of tokens) {\n // Skip entity highlighting for HTML (entities come from escaping, not source)\n if (language === 'html' && type === 'entity') {\n continue;\n }\n\n // Reset regex lastIndex for global patterns\n pattern.lastIndex = 0;\n\n let match;\n // Using RegExp.prototype.exec() for pattern matching (not child_process)\n while ((match = pattern.exec(code)) !== null) {\n matches.push({\n start: match.index,\n end: match.index + match[0].length,\n text: match[0],\n type: type\n });\n }\n }\n\n // Sort matches by start position\n matches.sort((a, b) => a.start - b.start);\n\n // Remove overlapping matches (keep first match at each position)\n const filteredMatches = [];\n let lastEnd = 0;\n for (const match of matches) {\n if (match.start >= lastEnd) {\n filteredMatches.push(match);\n lastEnd = match.end;\n }\n }\n\n // Build HTML output\n let html = '';\n let pos = 0;\n\n for (const match of filteredMatches) {\n // Escape and add gap before this match\n if (match.start > pos) {\n html += escapeHtml(code.substring(pos, match.start));\n }\n\n // Add highlighted token (escaped)\n html += `<span class=\"syntax-${match.type}\">${escapeHtml(match.text)}</span>`;\n pos = match.end;\n }\n\n // Escape and add remaining content after last match\n if (pos < code.length) {\n html += escapeHtml(code.substring(pos));\n }\n\n return html;\n}\n\n/**\n * Syntax Highlighter Class\n */\nclass SyntaxHighlighter {\n constructor() {\n this.config = {\n autoDetect: true,\n preserveOriginal: true,\n selector: '.code-block',\n showLanguageBadge: false,\n languagePrefix: 'language-'\n };\n }\n\n /**\n * Highlight a single element\n * @param {HTMLElement|string} element - Element or selector to highlight\n * @param {string|null} language - Language to use (null = auto-detect)\n * @returns {boolean} Success status\n */\n highlight(element, language = null) {\n // Get element\n const el = typeof element === 'string' ? document.querySelector(element) : element;\n if (!el || el.hasAttribute('data-syntax-highlighted')) {\n return false;\n }\n\n // Detect language\n if (!language && this.config.autoDetect) {\n const classList = Array.from(el.classList);\n const langClass = classList.find(cls => cls.startsWith(this.config.languagePrefix));\n if (langClass) {\n language = langClass.substring(this.config.languagePrefix.length);\n }\n }\n\n // Validate language\n if (!language || !LANGUAGES[language]) {\n return false;\n }\n\n // Get original code\n const code = el.textContent || '';\n\n // Store original if configured\n if (this.config.preserveOriginal) {\n el.setAttribute('data-original-code', code);\n }\n\n // Tokenize and highlight\n const highlighted = tokenize(code, language);\n el.innerHTML = highlighted;\n\n // Mark as highlighted\n el.setAttribute('data-syntax-highlighted', 'true');\n el.setAttribute('data-language', language);\n\n // Add language badge if configured\n if (this.config.showLanguageBadge) {\n this.addLanguageBadge(el, language);\n }\n\n return true;\n }\n\n /**\n * Scan and highlight all code blocks\n * @param {Object} options - Scan options\n * @returns {number} Number of elements highlighted\n */\n scan(options = {}) {\n const selector = options.selector || this.config.selector;\n const elements = document.querySelectorAll(selector);\n let count = 0;\n\n elements.forEach(el => {\n if (this.highlight(el, options.language || null)) {\n // Add copy button after highlighting\n this.addCopyButton(el);\n count++;\n }\n });\n\n return count;\n }\n\n /**\n * Register a custom language\n * @param {string} name - Language name\n * @param {Array} tokens - Token definitions\n */\n register(name, tokens) {\n if (!name || !Array.isArray(tokens)) {\n console.error('SyntaxHighlighter: Invalid language registration');\n return;\n }\n LANGUAGES[name] = tokens;\n }\n\n /**\n * Configure highlighter\n * @param {Object} options - Configuration options\n * @returns {Object} Current configuration (if no options provided)\n */\n configure(options) {\n if (!options) {\n return {...this.config};\n }\n Object.assign(this.config, options);\n return this.config;\n }\n\n /**\n * Add language badge to element\n * @param {HTMLElement} element - Target element\n * @param {string} language - Language name\n */\n addLanguageBadge(element, language) {\n // Check if badge already exists\n if (element.querySelector('.syntax-language-badge')) {\n return;\n }\n\n const badge = document.createElement('div');\n badge.className = 'syntax-language-badge';\n badge.textContent = language.toUpperCase();\n element.style.position = 'relative';\n element.insertBefore(badge, element.firstChild);\n }\n\n /**\n * Get list of supported languages\n * @returns {string[]} Array of language names\n */\n getLanguages() {\n return Object.keys(LANGUAGES);\n }\n\n /**\n * Check if language is supported\n * @param {string} language - Language name\n * @returns {boolean} Whether language is supported\n */\n isLanguageSupported(language) {\n return language in LANGUAGES;\n }\n\n /**\n * Add copy button to code block\n * @param {HTMLElement} element - Code block element\n */\n addCopyButton(element) {\n // Check if already wrapped\n if (element.parentElement && element.parentElement.classList.contains('code-block-wrapper')) {\n return;\n }\n\n // Create wrapper\n const wrapper = document.createElement('div');\n wrapper.className = 'code-block-wrapper';\n\n // Create copy button\n const button = document.createElement('button');\n button.className = 'code-block-copy';\n button.setAttribute('aria-label', 'Copy code to clipboard');\n button.innerHTML = '<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"><rect x=\"9\" y=\"9\" width=\"13\" height=\"13\" rx=\"2\" ry=\"2\"></rect><path d=\"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1\"></path></svg>';\n\n // Copy handler\n button.addEventListener('click', async () => {\n const code = element.getAttribute('data-original-code') || element.textContent;\n\n try {\n // Try modern clipboard API\n if (navigator.clipboard && navigator.clipboard.writeText) {\n await navigator.clipboard.writeText(code);\n } else {\n // Fallback for older browsers\n const textarea = document.createElement('textarea');\n textarea.value = code;\n textarea.style.position = 'fixed';\n textarea.style.opacity = '0';\n document.body.appendChild(textarea);\n textarea.select();\n document.execCommand('copy');\n document.body.removeChild(textarea);\n }\n\n // Visual feedback\n button.classList.add('copied');\n button.innerHTML = '<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"><polyline points=\"20 6 9 17 4 12\"></polyline></svg>';\n\n setTimeout(() => {\n button.classList.remove('copied');\n button.innerHTML = '<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"><rect x=\"9\" y=\"9\" width=\"13\" height=\"13\" rx=\"2\" ry=\"2\"></rect><path d=\"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1\"></path></svg>';\n }, 2000);\n } catch (err) {\n console.error('Failed to copy code:', err);\n }\n });\n\n // Wrap element and add button\n element.parentNode.insertBefore(wrapper, element);\n wrapper.appendChild(element);\n wrapper.appendChild(button);\n }\n}\n\n// Create singleton instance\nconst syntax = new SyntaxHighlighter();\n\n// Auto-initialize on DOMContentLoaded\nif (typeof document !== 'undefined') {\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', () => {\n syntax.scan();\n });\n } else {\n // DOM already loaded\n setTimeout(() => syntax.scan(), 0);\n }\n}\n\n// Export to Domma namespace if available\nif (typeof window !== 'undefined') {\n if (window.Domma) {\n window.Domma.syntax = syntax;\n }\n window.DommaSyntax = syntax;\n}\n\n// ES6 export\nexport default syntax;\nexport {syntax, SyntaxHighlighter, LANGUAGES};\n"],"names":["LANGUAGES","javascript","type","pattern","html","css","escapeHtml","str","htmlEscapes","replace","char","SyntaxHighlighter","constructor","this","config","autoDetect","preserveOriginal","selector","showLanguageBadge","languagePrefix","highlight","element","language","el","document","querySelector","hasAttribute","langClass","Array","from","classList","find","cls","startsWith","substring","length","code","textContent","setAttribute","highlighted","tokens","matches","match","lastIndex","exec","push","start","index","end","text","sort","a","b","filteredMatches","lastEnd","pos","tokenize","innerHTML","addLanguageBadge","scan","options","elements","querySelectorAll","count","forEach","addCopyButton","register","name","isArray","console","error","configure","Object","assign","badge","createElement","className","toUpperCase","style","position","insertBefore","firstChild","getLanguages","keys","isLanguageSupported","parentElement","contains","wrapper","button","addEventListener","async","getAttribute","navigator","clipboard","writeText","textarea","value","opacity","body","appendChild","select","execCommand","removeChild","add","setTimeout","remove","err","parentNode","syntax","readyState","window","Domma","DommaSyntax"],"mappings":";;;;;;;kPAOK,MAACA,EAAY,CACdC,WAAY,CACR,CAACC,KAAM,UAAWC,QAAS,qBAC3B,CAACD,KAAM,UAAWC,QAAS,WAC3B,CAACD,KAAM,kBAAmBC,QAAS,sBACnC,CAACD,KAAM,SAAUC,QAAS,wCAC1B,CACID,KAAM,UACNC,QAAS,gPAEb,CAACD,KAAM,UAAWC,QAAS,iDAC3B,CAACD,KAAM,SAAUC,QAAS,iCAC1B,CAACD,KAAM,WAAYC,QAAS,kCAC5B,CAACD,KAAM,aAAcC,QAAS,oBAC9B,CAACD,KAAM,WAAYC,QAAS,8DAC5B,CAACD,KAAM,cAAeC,QAAS,kBAEnCC,KAAM,CACF,CAACF,KAAM,UAAWC,QAAS,oBAC3B,CAACD,KAAM,UAAWC,QAAS,qBAC3B,CAACD,KAAM,WAAYC,QAAS,uBAC5B,CAACD,KAAM,YAAaC,QAAS,SAC7B,CAACD,KAAM,YAAaC,QAAS,kCAC7B,CAACD,KAAM,aAAcC,QAAS,4BAC9B,CAACD,KAAM,SAAUC,QAAS,cAE9BE,IAAK,CACD,CAACH,KAAM,UAAWC,QAAS,qBAC3B,CAACD,KAAM,UAAWC,QAAS,YAC3B,CAACD,KAAM,WAAYC,QAAS,mCAC5B,CAACD,KAAM,WAAYC,QAAS,qBAC5B,CAACD,KAAM,SAAUC,QAAS,wCAC1B,CAACD,KAAM,WAAYC,QAAS,mBAC5B,CAACD,KAAM,YAAaC,QAAS,iBAC7B,CAACD,KAAM,SAAUC,QAAS,wEAC1B,CAACD,KAAM,QAASC,QAAS,uBACzB,CAACD,KAAM,cAAeC,QAAS,gBAS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iB,mBAAoB,KAC1CmB,EAAOjD,SAIX6C,WAAW,IAAMI,EAAOjD,OAAQ,IAKlB,oBAAXmD,SACHA,OAAOC,QACPD,OAAOC,MAAMH,OAASA,GAE1BE,OAAOE,YAAcJ"}
|
package/public/dist/domma.css
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Domma Core CSS v0.
|
|
2
|
+
* Domma Core CSS v0.54.0
|
|
3
3
|
* Dynamic Object Manipulation & Modeling API
|
|
4
4
|
* (c) 2026 Darryl Waterhouse & DCBW-IT
|
|
5
|
-
* Built: 2026-10-
|
|
6
|
-
* Commit:
|
|
5
|
+
* Built: 2026-10-24T13:16:34.331Z
|
|
6
|
+
* Commit: 8d2b9ea
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
/**
|