diff --git a/package-lock.json b/package-lock.json
index a099f2f..83e1836 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -30,6 +30,50 @@
"js-tokens": "^4.0.0"
}
},
+ "@formatjs/ecma402-abstract": {
+ "version": "1.10.0",
+ "resolved": "https://registry.npmjs.org/@formatjs/ecma402-abstract/-/ecma402-abstract-1.10.0.tgz",
+ "integrity": "sha512-WNkcUHC6xw12rWY87TUw6KXzb1LnOooYBLLqtyn1kW2j197rcwpqmUOJMBED56YcLzaJPfVw1L2ShiDhL5pVnQ==",
+ "requires": {
+ "@formatjs/intl-localematcher": "0.2.21",
+ "tslib": "^2.1.0"
+ }
+ },
+ "@formatjs/fast-memoize": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/@formatjs/fast-memoize/-/fast-memoize-1.2.0.tgz",
+ "integrity": "sha512-fObitP9Tlc31SKrPHgkPgQpGo4+4yXfQQITTCNH8AZdEqB7Mq4nPrjpUL/tNGN3lEeJcFxDbi0haX8HM7QvQ8w==",
+ "requires": {
+ "tslib": "^2.1.0"
+ }
+ },
+ "@formatjs/icu-messageformat-parser": {
+ "version": "2.0.14",
+ "resolved": "https://registry.npmjs.org/@formatjs/icu-messageformat-parser/-/icu-messageformat-parser-2.0.14.tgz",
+ "integrity": "sha512-M79MdUMLnfLK8eMrznUwke6afH9G/eOQeYvMUJ7uElXIL+//PyyjOzb42hAYfDAGYsAcKA2TsUo33Yuy2lE4AQ==",
+ "requires": {
+ "@formatjs/ecma402-abstract": "1.10.0",
+ "@formatjs/icu-skeleton-parser": "1.3.1",
+ "tslib": "^2.1.0"
+ }
+ },
+ "@formatjs/icu-skeleton-parser": {
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/@formatjs/icu-skeleton-parser/-/icu-skeleton-parser-1.3.1.tgz",
+ "integrity": "sha512-WdPNjhv9e7EfyrIVYk6hN6/mC9YF+PcfFViDI2kATwoi1uKHr+AkQCMoNrWyCDdUQ+Dn50mQOlrEkCBXoLrkPQ==",
+ "requires": {
+ "@formatjs/ecma402-abstract": "1.10.0",
+ "tslib": "^2.1.0"
+ }
+ },
+ "@formatjs/intl-localematcher": {
+ "version": "0.2.21",
+ "resolved": "https://registry.npmjs.org/@formatjs/intl-localematcher/-/intl-localematcher-0.2.21.tgz",
+ "integrity": "sha512-JTJeLiNwexN4Gy0cMxoUPvJbKhXdnSuo5jPrDafEZpnDWlJ5VDYta8zUVVozO/pwzEmFVHEUpgiEDj+39L4oMg==",
+ "requires": {
+ "tslib": "^2.1.0"
+ }
+ },
"@mapbox/geojson-rewind": {
"version": "0.5.1",
"resolved": "https://registry.npmjs.org/@mapbox/geojson-rewind/-/geojson-rewind-0.5.1.tgz",
@@ -133,6 +177,15 @@
"resolve": "^1.17.0"
}
},
+ "@rollup/plugin-json": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/@rollup/plugin-json/-/plugin-json-4.1.0.tgz",
+ "integrity": "sha512-yfLbTdNS6amI/2OpmbiBoW12vngr5NW2jCJVZSBEz+H5KfUJZ2M7sDjk0U6GOOdCWFVScShte29o9NezJ53TPw==",
+ "dev": true,
+ "requires": {
+ "@rollup/pluginutils": "^3.0.8"
+ }
+ },
"@rollup/plugin-node-resolve": {
"version": "11.2.1",
"resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-11.2.1.tgz",
@@ -430,8 +483,7 @@
"deepmerge": {
"version": "4.2.2",
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz",
- "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==",
- "dev": true
+ "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg=="
},
"detect-indent": {
"version": "6.1.0",
@@ -468,8 +520,7 @@
"estree-walker": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz",
- "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==",
- "dev": true
+ "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w=="
},
"fast-glob": {
"version": "3.2.7",
@@ -580,6 +631,11 @@
"is-glob": "^4.0.1"
}
},
+ "globalyzer": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/globalyzer/-/globalyzer-0.1.0.tgz",
+ "integrity": "sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q=="
+ },
"globby": {
"version": "10.0.1",
"resolved": "https://registry.npmjs.org/globby/-/globby-10.0.1.tgz",
@@ -596,6 +652,11 @@
"slash": "^3.0.0"
}
},
+ "globrex": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/globrex/-/globrex-0.1.2.tgz",
+ "integrity": "sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg=="
+ },
"graceful-fs": {
"version": "4.2.8",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz",
@@ -659,6 +720,16 @@
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
"dev": true
},
+ "intl-messageformat": {
+ "version": "9.9.4",
+ "resolved": "https://registry.npmjs.org/intl-messageformat/-/intl-messageformat-9.9.4.tgz",
+ "integrity": "sha512-+Mz5LMTV+JCybFBym69z+XnE47wnIjHC31Jz7We6SE0yKyjf/neaWAFz8teuT6OUw/AW3Orr5LO4SHVNXl5keg==",
+ "requires": {
+ "@formatjs/fast-memoize": "1.2.0",
+ "@formatjs/icu-messageformat-parser": "2.0.14",
+ "tslib": "^2.1.0"
+ }
+ },
"is-binary-path": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
@@ -1424,6 +1495,18 @@
}
}
},
+ "svelte-i18n": {
+ "version": "3.3.13",
+ "resolved": "https://registry.npmjs.org/svelte-i18n/-/svelte-i18n-3.3.13.tgz",
+ "integrity": "sha512-RQM+ys4+Y9ztH//tX22H1UL2cniLNmIR+N4xmYygV6QpQ6EyQvloZiENRew8XrVzfvJ8HaE8NU6/yurLkl7z3g==",
+ "requires": {
+ "deepmerge": "^4.2.2",
+ "estree-walker": "^2.0.1",
+ "intl-messageformat": "^9.3.15",
+ "sade": "^1.7.4",
+ "tiny-glob": "^0.2.6"
+ }
+ },
"svelte-navigator": {
"version": "3.1.5",
"resolved": "https://registry.npmjs.org/svelte-navigator/-/svelte-navigator-3.1.5.tgz",
@@ -1474,6 +1557,15 @@
"source-map-support": "~0.5.20"
}
},
+ "tiny-glob": {
+ "version": "0.2.9",
+ "resolved": "https://registry.npmjs.org/tiny-glob/-/tiny-glob-0.2.9.tgz",
+ "integrity": "sha512-g/55ssRPUjShh+xkfx9UPDXqhckHEsHr4Vd9zX55oSdGZc/MD0m3sferOkwWtp98bv+kcVfEHtRJgBVJzelrzg==",
+ "requires": {
+ "globalyzer": "0.1.0",
+ "globrex": "^0.1.2"
+ }
+ },
"tinydate": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/tinydate/-/tinydate-1.3.0.tgz",
diff --git a/package.json b/package.json
index 364f776..f53cafe 100644
--- a/package.json
+++ b/package.json
@@ -10,6 +10,7 @@
},
"devDependencies": {
"@rollup/plugin-commonjs": "^17.0.0",
+ "@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^11.0.0",
"@rollup/plugin-typescript": "^8.0.0",
"@tsconfig/svelte": "^2.0.0",
@@ -33,6 +34,7 @@
"mapbox-gl": "^1.13.1",
"query-string": "^7.0.1",
"sirv-cli": "^1.0.0",
+ "svelte-i18n": "^3.3.13",
"svelte-navigator": "^3.1.5",
"sveltestrap": "^5.6.3"
}
diff --git a/public/build/bundle.css b/public/build/bundle.css
index b4204b9..b3d3b79 100644
--- a/public/build/bundle.css
+++ b/public/build/bundle.css
@@ -1 +1 @@
-img.svelte-vxfk2x.svelte-vxfk2x{max-width:100%}a.svelte-vxfk2x.svelte-vxfk2x{color:#fff;text-decoration:none}p.svelte-vxfk2x.svelte-vxfk2x{margin-bottom:0px}.socials.svelte-vxfk2x a.svelte-vxfk2x{margin-right:1rem}.subfooter.svelte-vxfk2x.svelte-vxfk2x{background-color:white;color:#ef4823}.subfooter.svelte-vxfk2x a.svelte-vxfk2x{color:#ef4823;font-weight:700}.counter-number.svelte-jdhn9y{font-size:3.5rem;font-weight:700;line-height:4.1rem}.counter.svelte-jdhn9y{display:flex;align-items:center;flex-direction:column;grid-column:span 4}.counter-number.svelte-jdhn9y{color:#36469d}.explore.svelte-jdhn9y{display:flex;flex-direction:column;align-items:center;margin-top:5.5rem}section.svelte-368w88{margin-top:200px}h3.svelte-368w88{margin-top:2rem;margin-bottom:2rem}section.svelte-jmhmt{margin-top:200px}.my-5.svelte-umtqww{margin-bottom:10rem !important}label.svelte-umtqww{text-transform:uppercase;font-weight:700;font-size:1.4rem}input.svelte-umtqww{background:transparent;border:none;border-bottom:0.1rem solid #ef4823;padding:1.5rem;outline:none;color:#000;width:100%}button.svelte-umtqww{background:transparent;border:none;margin-left:-5rem}.partner-card.svelte-q1dc45.svelte-q1dc45{background:#fff;box-shadow:0 2px 10px #e5e5e5;border-radius:7px;height:7.5rem;display:flex;align-items:center;justify-content:center;padding:1rem}.partner-card.svelte-q1dc45 h3.svelte-q1dc45{color:#36469d;text-decoration:none;width:60%;text-align:center;padding-top:1rem;font-size:1.25rem;font-weight:700}img.svelte-q1dc45.svelte-q1dc45{max-height:100%;max-width:100%}.illustration.svelte-oppfdo{position:absolute;right:0;transform:translateY(-35rem);width:30%}.jumbotron.svelte-frwzlg{background-image:url(/img/header.jpg);background-repeat:no-repeat;background-size:cover;background-position:100%;height:90vh}.slogan.svelte-frwzlg{padding-top:25vh;font-size:4.5rem;font-weight:700;color:#fff;font-family:"Muli", sans-serif;line-height:1.1;width:88%}.container.svelte-frwzlg{max-width:85vw;width:85vw;padding:0 100px}.subtitle.svelte-frwzlg{background-color:#36469d;color:#fff;line-height:1.8;width:60vw;padding:2rem 8vw 2rem 5rem;position:absolute;right:0;bottom:0;display:grid;grid-template-columns:2fr 1fr;grid-gap:3rem;font-size:medium}.counter-number.svelte-frwzlg{font-size:3.5rem;font-weight:700;line-height:4.1rem}.text-box.svelte-1f0jxfc{background-color:#ebedf5;color:#36469d;padding:5rem 4rem 5rem 5rem;margin-left:-10rem}.illustration.svelte-1f0jxfc{margin-left:-100px;z-index:-1;position:relative;margin-top:130px}section.svelte-1f0jxfc{margin-bottom:200px}h4.svelte-1lcp26q{height:100px}.modal-open{overflow:hidden;padding-right:0}.overflow-noscroll{overflow:hidden;padding-right:0px}.first.svelte-uc2yr5.svelte-uc2yr5{margin-top:200px}iframe.svelte-uc2yr5.svelte-uc2yr5{width:100%;height:700px;max-height:50vh}.open-source-container.svelte-uc2yr5.svelte-uc2yr5{display:grid;grid-template-columns:repeat(12, 1fr);grid-gap:3rem}.open-source.svelte-uc2yr5.svelte-uc2yr5{margin-top:10vh;grid-column:3 / span 7;text-align:center;display:flex;flex-direction:column;align-items:center}.btn-share.svelte-uc2yr5 svg.svelte-uc2yr5{margin-right:1rem;height:1.5rem}.btn-share.svelte-uc2yr5 svg path.svelte-uc2yr5{fill:#36469d}.btn-share.svelte-uc2yr5:hover svg path.svelte-uc2yr5{fill:white}
\ No newline at end of file
+img.svelte-vxfk2x.svelte-vxfk2x{max-width:100%}a.svelte-vxfk2x.svelte-vxfk2x{color:#fff;text-decoration:none}p.svelte-vxfk2x.svelte-vxfk2x{margin-bottom:0px}.socials.svelte-vxfk2x a.svelte-vxfk2x{margin-right:1rem}.subfooter.svelte-vxfk2x.svelte-vxfk2x{background-color:white;color:#ef4823}.subfooter.svelte-vxfk2x a.svelte-vxfk2x{color:#ef4823;font-weight:700}.first.svelte-uc2yr5.svelte-uc2yr5{margin-top:200px}iframe.svelte-uc2yr5.svelte-uc2yr5{width:100%;height:700px;max-height:50vh}.open-source-container.svelte-uc2yr5.svelte-uc2yr5{display:grid;grid-template-columns:repeat(12, 1fr);grid-gap:3rem}.open-source.svelte-uc2yr5.svelte-uc2yr5{margin-top:10vh;grid-column:3 / span 7;text-align:center;display:flex;flex-direction:column;align-items:center}.btn-share.svelte-uc2yr5 svg.svelte-uc2yr5{margin-right:1rem;height:1.5rem}.btn-share.svelte-uc2yr5 svg path.svelte-uc2yr5{fill:#36469d}.btn-share.svelte-uc2yr5:hover svg path.svelte-uc2yr5{fill:white}section.svelte-jmhmt{margin-top:200px}section.svelte-368w88{margin-top:200px}h3.svelte-368w88{margin-top:2rem;margin-bottom:2rem}.text-box.svelte-1f0jxfc{background-color:#ebedf5;color:#36469d;padding:5rem 4rem 5rem 5rem;margin-left:-10rem}.illustration.svelte-1f0jxfc{margin-left:-100px;z-index:-1;position:relative;margin-top:130px}section.svelte-1f0jxfc{margin-bottom:200px}.jumbotron.svelte-1y6g8ok{background-image:url(/img/header.jpg);background-repeat:no-repeat;background-size:cover;background-position:100%;height:90vh}.slogan.svelte-1y6g8ok{padding-top:25vh;font-size:4.5rem;font-weight:700;color:#fff;font-family:"Muli", sans-serif;line-height:1.1;width:88%}.container.svelte-1y6g8ok{max-width:85vw;width:85vw;padding:0 100px}.subtitle.svelte-1y6g8ok{background-color:#36469d;color:#fff;line-height:1.8;width:60vw;padding:2rem 8vw 2rem 5rem;position:absolute;right:0;bottom:0;display:grid;grid-template-columns:2fr 1fr;grid-gap:3rem;font-size:medium}.counter-number.svelte-1y6g8ok{font-size:3.5rem;font-weight:700;line-height:4.1rem}.counter-number.svelte-jdhn9y{font-size:3.5rem;font-weight:700;line-height:4.1rem}.counter.svelte-jdhn9y{display:flex;align-items:center;flex-direction:column;grid-column:span 4}.counter-number.svelte-jdhn9y{color:#36469d}.explore.svelte-jdhn9y{display:flex;flex-direction:column;align-items:center;margin-top:5.5rem}.illustration.svelte-oppfdo{position:absolute;right:0;transform:translateY(-35rem);width:30%}.partner-card.svelte-q1dc45.svelte-q1dc45{background:#fff;box-shadow:0 2px 10px #e5e5e5;border-radius:7px;height:7.5rem;display:flex;align-items:center;justify-content:center;padding:1rem}.partner-card.svelte-q1dc45 h3.svelte-q1dc45{color:#36469d;text-decoration:none;width:60%;text-align:center;padding-top:1rem;font-size:1.25rem;font-weight:700}img.svelte-q1dc45.svelte-q1dc45{max-height:100%;max-width:100%}h4.svelte-1lcp26q{height:100px}.my-5.svelte-umtqww{margin-bottom:10rem !important}label.svelte-umtqww{text-transform:uppercase;font-weight:700;font-size:1.4rem}input.svelte-umtqww{background:transparent;border:none;border-bottom:0.1rem solid #ef4823;padding:1.5rem;outline:none;color:#000;width:100%}button.svelte-umtqww{background:transparent;border:none;margin-left:-5rem}.overflow-noscroll{overflow:hidden;padding-right:0px}.modal-open{overflow:hidden;padding-right:0}
\ No newline at end of file
diff --git a/public/build/bundle.js b/public/build/bundle.js
index fd29301..1a6326c 100644
--- a/public/build/bundle.js
+++ b/public/build/bundle.js
@@ -917,6 +917,10 @@ var app = (function () {
else
dispatch_dev('SvelteDOMSetAttribute', { node, attribute, value });
}
+ function prop_dev(node, property, value) {
+ node[property] = value;
+ dispatch_dev('SvelteDOMSetProperty', { node, property, value });
+ }
function set_data_dev(text, data) {
data = '' + data;
if (text.wholeText === data)
@@ -1132,7 +1136,7 @@ var app = (function () {
* @param {string} search
* @return {boolean}
*/
- const startsWith = (string, search) =>
+ const startsWith$1 = (string, search) =>
string.substr(0, search.length) === search;
/**
@@ -1465,7 +1469,7 @@ var app = (function () {
*/
function resolve(to, base) {
// /foo/bar, /baz/qux => /foo/bar
- if (startsWith(to, "/")) {
+ if (startsWith$1(to, "/")) {
return to;
}
@@ -1480,7 +1484,7 @@ var app = (function () {
}
// profile, /users/789 => /users/789/profile
- if (!startsWith(toSegments[0], ".")) {
+ if (!startsWith$1(toSegments[0], ".")) {
const pathname = baseSegments.concat(toSegments).join("/");
return addQuery((basePathname === "/" ? "" : "/") + pathname, toQuery);
}
@@ -1546,7 +1550,7 @@ var app = (function () {
*
* @returns {{ pathname: string; search: string; hash: string }} The location
*/
- function createLocation(url) {
+ function createLocation$1(url) {
const searchIndex = url.indexOf("?");
const hashIndex = url.indexOf("#");
const hasSearchIndex = searchIndex !== -1;
@@ -1690,7 +1694,7 @@ var app = (function () {
}
function createStackFrame(state, uri) {
- return { ...createLocation(uri), state };
+ return { ...createLocation$1(uri), state };
}
// Stores history entries in memory for testing or other platforms like Native
@@ -1937,7 +1941,7 @@ var app = (function () {
const file$z = "node_modules/svelte-navigator/src/Router.svelte";
// (195:0) {#if isTopLevelRouter && manageFocus && a11yConfig.announcements}
- function create_if_block$9(ctx) {
+ function create_if_block$a(ctx) {
let div;
let t;
@@ -1965,7 +1969,7 @@ var app = (function () {
dispatch_dev("SvelteRegisterBlock", {
block,
- id: create_if_block$9.name,
+ id: create_if_block$a.name,
type: "if",
source: "(195:0) {#if isTopLevelRouter && manageFocus && a11yConfig.announcements}",
ctx
@@ -1982,7 +1986,7 @@ var app = (function () {
let current;
const default_slot_template = /*#slots*/ ctx[20].default;
const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[19], null);
- let if_block = /*isTopLevelRouter*/ ctx[2] && /*manageFocus*/ ctx[4] && /*a11yConfig*/ ctx[1].announcements && create_if_block$9(ctx);
+ let if_block = /*isTopLevelRouter*/ ctx[2] && /*manageFocus*/ ctx[4] && /*a11yConfig*/ ctx[1].announcements && create_if_block$a(ctx);
const block = {
c: function create() {
@@ -2113,7 +2117,7 @@ var app = (function () {
const level = isTopLevelRouter ? 0 : routerContext.level + 1;
// If we're running an SSR we force the location to the `url` prop
- const getInitialLocation = () => normalizeLocation(isSSR ? createLocation(url) : history.location, normalizedBasepath);
+ const getInitialLocation = () => normalizeLocation(isSSR ? createLocation$1(url) : history.location, normalizedBasepath);
const location = isTopLevelRouter
? writable(getInitialLocation())
@@ -2224,7 +2228,7 @@ var app = (function () {
pick,
match,
normalizeLocation,
- createLocation,
+ createLocation: createLocation$1,
isSSR,
warn,
ROUTER_ID,
@@ -2650,7 +2654,7 @@ var app = (function () {
});
// (97:0) {#if isActive}
- function create_if_block$8(ctx) {
+ function create_if_block$9(ctx) {
let router;
let current;
@@ -2697,7 +2701,7 @@ var app = (function () {
dispatch_dev("SvelteRegisterBlock", {
block,
- id: create_if_block$8.name,
+ id: create_if_block$9.name,
type: "if",
source: "(97:0) {#if isActive}",
ctx
@@ -2707,7 +2711,7 @@ var app = (function () {
}
// (113:2) {:else}
- function create_else_block$6(ctx) {
+ function create_else_block$7(ctx) {
let current;
const default_slot_template = /*#slots*/ ctx[17].default;
const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[18], get_default_slot_context);
@@ -2755,7 +2759,7 @@ var app = (function () {
dispatch_dev("SvelteRegisterBlock", {
block,
- id: create_else_block$6.name,
+ id: create_else_block$7.name,
type: "else",
source: "(113:2) {:else}",
ctx
@@ -2875,7 +2879,7 @@ var app = (function () {
let if_block;
let if_block_anchor;
let current;
- const if_block_creators = [create_if_block_1$6, create_else_block$6];
+ const if_block_creators = [create_if_block_1$6, create_else_block$7];
const if_blocks = [];
function select_block_type(ctx, dirty) {
@@ -2955,7 +2959,7 @@ var app = (function () {
let t1;
let div1;
let current;
- let if_block = /*isActive*/ ctx[2] && create_if_block$8(ctx);
+ let if_block = /*isActive*/ ctx[2] && create_if_block$9(ctx);
const block = {
c: function create() {
@@ -2993,7 +2997,7 @@ var app = (function () {
transition_in(if_block, 1);
}
} else {
- if_block = create_if_block$8(ctx);
+ if_block = create_if_block$9(ctx);
if_block.c();
transition_in(if_block, 1);
if_block.m(t1.parentNode, t1);
@@ -3423,7 +3427,7 @@ var app = (function () {
usePreflightCheck,
shouldNavigate,
isFunction,
- startsWith,
+ startsWith: startsWith$1,
LINK_ID,
to,
replace,
@@ -3468,7 +3472,7 @@ var app = (function () {
}
if ($$self.$$.dirty & /*$location, href*/ 2049) {
- $$invalidate(10, isPartiallyCurrent = startsWith($location.pathname, href));
+ $$invalidate(10, isPartiallyCurrent = startsWith$1($location.pathname, href));
}
if ($$self.$$.dirty & /*href, $location*/ 2049) {
@@ -3855,7 +3859,7 @@ var app = (function () {
}
// (33:0) {#if href}
- function create_if_block$7(ctx) {
+ function create_if_block$8(ctx) {
let a;
let current_block_type_index;
let if_block;
@@ -3863,7 +3867,7 @@ var app = (function () {
let current;
let mounted;
let dispose;
- const if_block_creators = [create_if_block_1$5, create_else_block$5];
+ const if_block_creators = [create_if_block_1$5, create_else_block$6];
const if_blocks = [];
function select_block_type_1(ctx, dirty) {
@@ -3965,7 +3969,7 @@ var app = (function () {
dispatch_dev("SvelteRegisterBlock", {
block: block_1,
- id: create_if_block$7.name,
+ id: create_if_block$8.name,
type: "if",
source: "(33:0) {#if href}",
ctx
@@ -4145,7 +4149,7 @@ var app = (function () {
}
// (46:4) {:else}
- function create_else_block$5(ctx) {
+ function create_else_block$6(ctx) {
let current;
const default_slot_template = /*#slots*/ ctx[18].default;
const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[17], null);
@@ -4193,7 +4197,7 @@ var app = (function () {
dispatch_dev("SvelteRegisterBlock", {
block: block_1,
- id: create_else_block$5.name,
+ id: create_else_block$6.name,
type: "else",
source: "(46:4) {:else}",
ctx
@@ -4239,7 +4243,7 @@ var app = (function () {
let if_block;
let if_block_anchor;
let current;
- const if_block_creators = [create_if_block$7, create_else_block_1$1];
+ const if_block_creators = [create_if_block$8, create_else_block_1$1];
const if_blocks = [];
function select_block_type(ctx, dirty) {
@@ -5106,7 +5110,7 @@ var app = (function () {
const get_label_slot_context = ctx => ({});
// (66:2) {:else}
- function create_else_block$4(ctx) {
+ function create_else_block$5(ctx) {
let input;
let mounted;
let dispose;
@@ -5176,7 +5180,7 @@ var app = (function () {
dispatch_dev("SvelteRegisterBlock", {
block,
- id: create_else_block$4.name,
+ id: create_else_block$5.name,
type: "else",
source: "(66:2) {:else}",
ctx
@@ -5348,7 +5352,7 @@ var app = (function () {
}
// (83:2) {#if label}
- function create_if_block$6(ctx) {
+ function create_if_block$7(ctx) {
let label_1;
let current;
const label_slot_template = /*#slots*/ ctx[19].label;
@@ -5413,7 +5417,7 @@ var app = (function () {
dispatch_dev("SvelteRegisterBlock", {
block,
- id: create_if_block$6.name,
+ id: create_if_block$7.name,
type: "if",
source: "(83:2) {#if label}",
ctx
@@ -5460,12 +5464,12 @@ var app = (function () {
function select_block_type(ctx, dirty) {
if (/*type*/ ctx[6] === 'radio') return create_if_block_1$4;
if (/*type*/ ctx[6] === 'switch') return create_if_block_2$3;
- return create_else_block$4;
+ return create_else_block$5;
}
let current_block_type = select_block_type(ctx);
let if_block0 = current_block_type(ctx);
- let if_block1 = /*label*/ ctx[4] && create_if_block$6(ctx);
+ let if_block1 = /*label*/ ctx[4] && create_if_block$7(ctx);
const block = {
c: function create() {
@@ -5507,7 +5511,7 @@ var app = (function () {
transition_in(if_block1, 1);
}
} else {
- if_block1 = create_if_block$6(ctx);
+ if_block1 = create_if_block$7(ctx);
if_block1.c();
transition_in(if_block1, 1);
if_block1.m(div, null);
@@ -6115,7 +6119,7 @@ var app = (function () {
const file$r = "node_modules/sveltestrap/src/FormGroup.svelte";
// (24:0) {:else}
- function create_else_block$3(ctx) {
+ function create_else_block$4(ctx) {
let div;
let current;
const default_slot_template = /*#slots*/ ctx[9].default;
@@ -6181,7 +6185,7 @@ var app = (function () {
dispatch_dev("SvelteRegisterBlock", {
block,
- id: create_else_block$3.name,
+ id: create_else_block$4.name,
type: "else",
source: "(24:0) {:else}",
ctx
@@ -6191,7 +6195,7 @@ var app = (function () {
}
// (20:0) {#if tag === 'fieldset'}
- function create_if_block$5(ctx) {
+ function create_if_block$6(ctx) {
let fieldset;
let current;
const default_slot_template = /*#slots*/ ctx[9].default;
@@ -6257,7 +6261,7 @@ var app = (function () {
dispatch_dev("SvelteRegisterBlock", {
block,
- id: create_if_block$5.name,
+ id: create_if_block$6.name,
type: "if",
source: "(20:0) {#if tag === 'fieldset'}",
ctx
@@ -6271,7 +6275,7 @@ var app = (function () {
let if_block;
let if_block_anchor;
let current;
- const if_block_creators = [create_if_block$5, create_else_block$3];
+ const if_block_creators = [create_if_block$6, create_else_block$4];
const if_blocks = [];
function select_block_type(ctx, dirty) {
@@ -6607,7 +6611,7 @@ var app = (function () {
/* node_modules/sveltestrap/src/Input.svelte generated by Svelte v3.44.0 */
const file$p = "node_modules/sveltestrap/src/Input.svelte";
- function get_each_context(ctx, list, i) {
+ function get_each_context$1(ctx, list, i) {
const child_ctx = ctx.slice();
child_ctx[210] = list[i];
return child_ctx;
@@ -8627,13 +8631,13 @@ var app = (function () {
}
// (523:0) {#if feedback}
- function create_if_block$4(ctx) {
+ function create_if_block$5(ctx) {
let show_if;
let current_block_type_index;
let if_block;
let if_block_anchor;
let current;
- const if_block_creators = [create_if_block_1$3, create_else_block$2];
+ const if_block_creators = [create_if_block_1$3, create_else_block$3];
const if_blocks = [];
function select_block_type_2(ctx, dirty) {
@@ -8699,7 +8703,7 @@ var app = (function () {
dispatch_dev("SvelteRegisterBlock", {
block,
- id: create_if_block$4.name,
+ id: create_if_block$5.name,
type: "if",
source: "(523:0) {#if feedback}",
ctx
@@ -8709,7 +8713,7 @@ var app = (function () {
}
// (528:2) {:else}
- function create_else_block$2(ctx) {
+ function create_else_block$3(ctx) {
let formfeedback;
let current;
@@ -8756,7 +8760,7 @@ var app = (function () {
dispatch_dev("SvelteRegisterBlock", {
block,
- id: create_else_block$2.name,
+ id: create_else_block$3.name,
type: "else",
source: "(528:2) {:else}",
ctx
@@ -8774,7 +8778,7 @@ var app = (function () {
let each_blocks = [];
for (let i = 0; i < each_value.length; i += 1) {
- each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i));
+ each_blocks[i] = create_each_block$1(get_each_context$1(ctx, each_value, i));
}
const out = i => transition_out(each_blocks[i], 1, 1, () => {
@@ -8804,13 +8808,13 @@ var app = (function () {
let i;
for (i = 0; i < each_value.length; i += 1) {
- const child_ctx = get_each_context(ctx, each_value, i);
+ const child_ctx = get_each_context$1(ctx, each_value, i);
if (each_blocks[i]) {
each_blocks[i].p(child_ctx, dirty);
transition_in(each_blocks[i], 1);
} else {
- each_blocks[i] = create_each_block(child_ctx);
+ each_blocks[i] = create_each_block$1(child_ctx);
each_blocks[i].c();
transition_in(each_blocks[i], 1);
each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor);
@@ -8923,7 +8927,7 @@ var app = (function () {
}
// (525:4) {#each feedback as msg}
- function create_each_block(ctx) {
+ function create_each_block$1(ctx) {
let formfeedback;
let current;
@@ -8970,7 +8974,7 @@ var app = (function () {
dispatch_dev("SvelteRegisterBlock", {
block,
- id: create_each_block.name,
+ id: create_each_block$1.name,
type: "each",
source: "(525:4) {#each feedback as msg}",
ctx
@@ -8999,7 +9003,7 @@ var app = (function () {
if_block0 = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
}
- let if_block1 = /*feedback*/ ctx[9] && create_if_block$4(ctx);
+ let if_block1 = /*feedback*/ ctx[9] && create_if_block$5(ctx);
const block = {
c: function create() {
@@ -9065,7 +9069,7 @@ var app = (function () {
transition_in(if_block1, 1);
}
} else {
- if_block1 = create_if_block$4(ctx);
+ if_block1 = create_if_block$5(ctx);
if_block1.c();
transition_in(if_block1, 1);
if_block1.m(if_block1_anchor.parentNode, if_block1_anchor);
@@ -10877,7 +10881,7 @@ var app = (function () {
const file$n = "node_modules/sveltestrap/src/ModalBackdrop.svelte";
// (12:0) {#if isOpen}
- function create_if_block$3(ctx) {
+ function create_if_block$4(ctx) {
let div;
let div_intro;
let div_outro;
@@ -10941,7 +10945,7 @@ var app = (function () {
dispatch_dev("SvelteRegisterBlock", {
block,
- id: create_if_block$3.name,
+ id: create_if_block$4.name,
type: "if",
source: "(12:0) {#if isOpen}",
ctx
@@ -10953,7 +10957,7 @@ var app = (function () {
function create_fragment$p(ctx) {
let if_block_anchor;
let current;
- let if_block = /*isOpen*/ ctx[0] && create_if_block$3(ctx);
+ let if_block = /*isOpen*/ ctx[0] && create_if_block$4(ctx);
const block = {
c: function create() {
@@ -10977,7 +10981,7 @@ var app = (function () {
transition_in(if_block, 1);
}
} else {
- if_block = create_if_block$3(ctx);
+ if_block = create_if_block$4(ctx);
if_block.c();
transition_in(if_block, 1);
if_block.m(if_block_anchor.parentNode, if_block_anchor);
@@ -11252,7 +11256,7 @@ var app = (function () {
const get_close_slot_context = ctx => ({});
// (17:4) {:else}
- function create_else_block$1(ctx) {
+ function create_else_block$2(ctx) {
let current;
const default_slot_template = /*#slots*/ ctx[7].default;
const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[6], null);
@@ -11300,7 +11304,7 @@ var app = (function () {
dispatch_dev("SvelteRegisterBlock", {
block,
- id: create_else_block$1.name,
+ id: create_else_block$2.name,
type: "else",
source: "(17:4) {:else}",
ctx
@@ -11342,7 +11346,7 @@ var app = (function () {
}
// (22:4) {#if typeof toggle === 'function'}
- function create_if_block$2(ctx) {
+ function create_if_block$3(ctx) {
let button;
let mounted;
let dispose;
@@ -11389,7 +11393,7 @@ var app = (function () {
dispatch_dev("SvelteRegisterBlock", {
block,
- id: create_if_block$2.name,
+ id: create_if_block$3.name,
type: "if",
source: "(22:4) {#if typeof toggle === 'function'}",
ctx
@@ -11401,7 +11405,7 @@ var app = (function () {
// (21:21)
function fallback_block(ctx) {
let if_block_anchor;
- let if_block = typeof /*toggle*/ ctx[0] === 'function' && create_if_block$2(ctx);
+ let if_block = typeof /*toggle*/ ctx[0] === 'function' && create_if_block$3(ctx);
const block = {
c: function create() {
@@ -11417,7 +11421,7 @@ var app = (function () {
if (if_block) {
if_block.p(ctx, dirty);
} else {
- if_block = create_if_block$2(ctx);
+ if_block = create_if_block$3(ctx);
if_block.c();
if_block.m(if_block_anchor.parentNode, if_block_anchor);
}
@@ -11450,7 +11454,7 @@ var app = (function () {
let if_block;
let t;
let current;
- const if_block_creators = [create_if_block_1$2, create_else_block$1];
+ const if_block_creators = [create_if_block_1$2, create_else_block$2];
const if_blocks = [];
function select_block_type(ctx, dirty) {
@@ -11946,7 +11950,7 @@ var app = (function () {
const external_slot_template = /*#slots*/ ctx[30].external;
const external_slot = create_slot(external_slot_template, ctx, /*$$scope*/ ctx[34], get_external_slot_context);
let if_block0 = /*header*/ ctx[3] && create_if_block_4(ctx);
- const if_block_creators = [create_if_block_3, create_else_block];
+ const if_block_creators = [create_if_block_3, create_else_block$1];
const if_blocks = [];
function select_block_type(ctx, dirty) {
@@ -12228,7 +12232,7 @@ var app = (function () {
}
// (248:14) {:else}
- function create_else_block(ctx) {
+ function create_else_block$1(ctx) {
let current;
const default_slot_template = /*#slots*/ ctx[30].default;
const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[34], null);
@@ -12276,7 +12280,7 @@ var app = (function () {
dispatch_dev("SvelteRegisterBlock", {
block,
- id: create_else_block.name,
+ id: create_else_block$1.name,
type: "else",
source: "(248:14) {:else}",
ctx
@@ -12485,7 +12489,7 @@ var app = (function () {
}
// (258:0) {#if backdrop && !staticModal}
- function create_if_block$1(ctx) {
+ function create_if_block$2(ctx) {
let switch_instance;
let switch_instance_anchor;
let current;
@@ -12566,7 +12570,7 @@ var app = (function () {
dispatch_dev("SvelteRegisterBlock", {
block,
- id: create_if_block$1.name,
+ id: create_if_block$2.name,
type: "if",
source: "(258:0) {#if backdrop && !staticModal}",
ctx
@@ -12632,7 +12636,7 @@ var app = (function () {
let if_block1_anchor;
let current;
let if_block0 = /*_isMounted*/ ctx[11] && create_if_block_1$1(ctx);
- let if_block1 = /*backdrop*/ ctx[6] && !/*staticModal*/ ctx[0] && create_if_block$1(ctx);
+ let if_block1 = /*backdrop*/ ctx[6] && !/*staticModal*/ ctx[0] && create_if_block$2(ctx);
const block = {
c: function create() {
@@ -12683,7 +12687,7 @@ var app = (function () {
transition_in(if_block1, 1);
}
} else {
- if_block1 = create_if_block$1(ctx);
+ if_block1 = create_if_block$2(ctx);
if_block1.c();
transition_in(if_block1, 1);
if_block1.m(if_block1_anchor.parentNode, if_block1_anchor);
@@ -13508,197 +13512,2907 @@ var app = (function () {
}
}
- /* src/components/Footer.svelte generated by Svelte v3.44.0 */
- const file$h = "src/components/Footer.svelte";
+ var isMergeableObject = function isMergeableObject(value) {
+ return isNonNullObject(value)
+ && !isSpecial(value)
+ };
- // (9:8)
- function create_default_slot_5$7(ctx) {
- let p;
- let t1;
- let a;
- let picture;
- let source0;
- let t2;
- let source1;
- let t3;
- let img;
- let img_src_value;
+ function isNonNullObject(value) {
+ return !!value && typeof value === 'object'
+ }
- const block = {
- c: function create() {
- p = element("p");
- p.textContent = "Bike Data Project is a project managed by Open Knowledge Belgium";
- t1 = space();
- a = element("a");
- picture = element("picture");
- source0 = element("source");
- t2 = space();
- source1 = element("source");
- t3 = space();
- img = element("img");
- attr_dev(p, "class", "svelte-vxfk2x");
- add_location(p, file$h, 9, 10, 206);
- attr_dev(source0, "media", "(max-width: 600px)");
- attr_dev(source0, "srcset", "/img/open-knowledge-belgium-footer.svg 113w");
- add_location(source0, file$h, 14, 14, 380);
- attr_dev(source1, "media", "(min-width: 600px)");
- attr_dev(source1, "srcset", "/img/open-knowledge-belgium-footer.svg 266w");
- add_location(source1, file$h, 17, 14, 517);
- attr_dev(img, "class", "Footer_footer__img__4N03j svelte-vxfk2x");
- if (!src_url_equal(img.src, img_src_value = "/img/open-knowledge-belgium-footer.svg")) attr_dev(img, "src", img_src_value);
- attr_dev(img, "alt", "Open Knowlegde Belgium");
- add_location(img, file$h, 20, 14, 654);
- add_location(picture, file$h, 13, 12, 356);
- attr_dev(a, "href", "https://be.okfn.org/");
- attr_dev(a, "class", "svelte-vxfk2x");
- add_location(a, file$h, 12, 10, 312);
- },
- m: function mount(target, anchor) {
- insert_dev(target, p, anchor);
- insert_dev(target, t1, anchor);
- insert_dev(target, a, anchor);
- append_dev(a, picture);
- append_dev(picture, source0);
- append_dev(picture, t2);
- append_dev(picture, source1);
- append_dev(picture, t3);
- append_dev(picture, img);
- },
- d: function destroy(detaching) {
- if (detaching) detach_dev(p);
- if (detaching) detach_dev(t1);
- if (detaching) detach_dev(a);
- }
- };
+ function isSpecial(value) {
+ var stringValue = Object.prototype.toString.call(value);
- dispatch_dev("SvelteRegisterBlock", {
- block,
- id: create_default_slot_5$7.name,
- type: "slot",
- source: "(9:8) ",
- ctx
- });
+ return stringValue === '[object RegExp]'
+ || stringValue === '[object Date]'
+ || isReactElement(value)
+ }
- return block;
+ // see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25
+ var canUseSymbol = typeof Symbol === 'function' && Symbol.for;
+ var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;
+
+ function isReactElement(value) {
+ return value.$$typeof === REACT_ELEMENT_TYPE
}
- // (28:8)
- function create_default_slot_4$8(ctx) {
- let h3;
- let t1;
- let ul;
- let li0;
- let a0;
- let t3;
- let li1;
- let a1;
- let t5;
- let li2;
- let a2;
+ function emptyTarget(val) {
+ return Array.isArray(val) ? [] : {}
+ }
- const block = {
- c: function create() {
- h3 = element("h3");
- h3.textContent = "Information";
- t1 = space();
- ul = element("ul");
- li0 = element("li");
- a0 = element("a");
- a0.textContent = "The Data";
- t3 = space();
- li1 = element("li");
- a1 = element("a");
- a1.textContent = "About";
- t5 = space();
- li2 = element("li");
- a2 = element("a");
- a2.textContent = "FAQ";
- attr_dev(h3, "class", "text-uppercase");
- add_location(h3, file$h, 28, 10, 934);
- attr_dev(a0, "target", "_blank");
- attr_dev(a0, "rel", "noopener noreferrer");
- attr_dev(a0, "href", "/datamap");
- attr_dev(a0, "class", "svelte-vxfk2x");
- add_location(a0, file$h, 32, 14, 1092);
- attr_dev(li0, "class", "mb-3");
- add_location(li0, file$h, 31, 12, 1060);
- attr_dev(a1, "class", "Footer_footer__navLink__1PJ9e svelte-vxfk2x");
- attr_dev(a1, "target", "_blank");
- attr_dev(a1, "rel", "noopener noreferrer");
- attr_dev(a1, "href", "/about");
- add_location(a1, file$h, 36, 14, 1245);
- attr_dev(li1, "class", "mb-3");
- add_location(li1, file$h, 35, 12, 1213);
- attr_dev(a2, "class", "Footer_footer__navLink__1PJ9e svelte-vxfk2x");
- attr_dev(a2, "target", "_blank");
- attr_dev(a2, "rel", "noopener noreferrer");
- attr_dev(a2, "href", "/faq");
- add_location(a2, file$h, 43, 14, 1478);
- attr_dev(li2, "class", "mb-3");
- add_location(li2, file$h, 42, 12, 1446);
- attr_dev(ul, "class", "list-unstyled text-muted mb-6 mb-md-8 mb-lg-0");
- add_location(ul, file$h, 30, 10, 989);
- },
- m: function mount(target, anchor) {
- insert_dev(target, h3, anchor);
- insert_dev(target, t1, anchor);
- insert_dev(target, ul, anchor);
- append_dev(ul, li0);
- append_dev(li0, a0);
- append_dev(ul, t3);
- append_dev(ul, li1);
- append_dev(li1, a1);
- append_dev(ul, t5);
- append_dev(ul, li2);
- append_dev(li2, a2);
- },
- d: function destroy(detaching) {
- if (detaching) detach_dev(h3);
- if (detaching) detach_dev(t1);
- if (detaching) detach_dev(ul);
+ function cloneUnlessOtherwiseSpecified(value, options) {
+ return (options.clone !== false && options.isMergeableObject(value))
+ ? deepmerge(emptyTarget(value), value, options)
+ : value
+ }
+
+ function defaultArrayMerge(target, source, options) {
+ return target.concat(source).map(function(element) {
+ return cloneUnlessOtherwiseSpecified(element, options)
+ })
+ }
+
+ function getMergeFunction(key, options) {
+ if (!options.customMerge) {
+ return deepmerge
+ }
+ var customMerge = options.customMerge(key);
+ return typeof customMerge === 'function' ? customMerge : deepmerge
+ }
+
+ function getEnumerableOwnPropertySymbols(target) {
+ return Object.getOwnPropertySymbols
+ ? Object.getOwnPropertySymbols(target).filter(function(symbol) {
+ return target.propertyIsEnumerable(symbol)
+ })
+ : []
+ }
+
+ function getKeys(target) {
+ return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))
+ }
+
+ function propertyIsOnObject(object, property) {
+ try {
+ return property in object
+ } catch(_) {
+ return false
+ }
+ }
+
+ // Protects from prototype poisoning and unexpected merging up the prototype chain.
+ function propertyIsUnsafe(target, key) {
+ return propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,
+ && !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,
+ && Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.
+ }
+
+ function mergeObject(target, source, options) {
+ var destination = {};
+ if (options.isMergeableObject(target)) {
+ getKeys(target).forEach(function(key) {
+ destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
+ });
+ }
+ getKeys(source).forEach(function(key) {
+ if (propertyIsUnsafe(target, key)) {
+ return
}
- };
- dispatch_dev("SvelteRegisterBlock", {
- block,
- id: create_default_slot_4$8.name,
- type: "slot",
- source: "(28:8) ",
- ctx
+ if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
+ destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
+ } else {
+ destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
+ }
});
+ return destination
+ }
- return block;
+ function deepmerge(target, source, options) {
+ options = options || {};
+ options.arrayMerge = options.arrayMerge || defaultArrayMerge;
+ options.isMergeableObject = options.isMergeableObject || isMergeableObject;
+ // cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()
+ // implementations can use it. The caller may not replace it.
+ options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
+
+ var sourceIsArray = Array.isArray(source);
+ var targetIsArray = Array.isArray(target);
+ var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
+
+ if (!sourceAndTargetTypesMatch) {
+ return cloneUnlessOtherwiseSpecified(source, options)
+ } else if (sourceIsArray) {
+ return options.arrayMerge(target, source, options)
+ } else {
+ return mergeObject(target, source, options)
+ }
}
- // (61:8)
- function create_default_slot_3$9(ctx) {
- let h3;
- let t1;
- let p0;
- let t3;
- let p1;
- let t5;
- let p2;
- let t7;
- let a0;
- let t9;
- let div;
- let a1;
- let svg0;
- let path0;
- let a2;
- let svg1;
- let path1;
- let a3;
- let svg2;
- let path2;
- let a4;
- let svg3;
- let path3;
+ deepmerge.all = function deepmergeAll(array, options) {
+ if (!Array.isArray(array)) {
+ throw new Error('first argument should be an array')
+ }
- const block = {
- c: function create() {
- h3 = element("h3");
+ return array.reduce(function(prev, next) {
+ return deepmerge(prev, next, options)
+ }, {})
+ };
+
+ var deepmerge_1 = deepmerge;
+
+ var cjs = deepmerge_1;
+
+ /*! *****************************************************************************
+ Copyright (c) Microsoft Corporation.
+
+ Permission to use, copy, modify, and/or distribute this software for any
+ purpose with or without fee is hereby granted.
+
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ PERFORMANCE OF THIS SOFTWARE.
+ ***************************************************************************** */
+ /* global Reflect, Promise */
+
+ var extendStatics = function(d, b) {
+ extendStatics = Object.setPrototypeOf ||
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
+ return extendStatics(d, b);
+ };
+
+ function __extends(d, b) {
+ if (typeof b !== "function" && b !== null)
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
+ extendStatics(d, b);
+ function __() { this.constructor = d; }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+ }
+
+ var __assign = function() {
+ __assign = Object.assign || function __assign(t) {
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
+ s = arguments[i];
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
+ }
+ return t;
+ };
+ return __assign.apply(this, arguments);
+ };
+
+ function __spreadArray(to, from, pack) {
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
+ if (ar || !(i in from)) {
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
+ ar[i] = from[i];
+ }
+ }
+ return to.concat(ar || Array.prototype.slice.call(from));
+ }
+
+ var ErrorKind;
+ (function (ErrorKind) {
+ /** Argument is unclosed (e.g. `{0`) */
+ ErrorKind[ErrorKind["EXPECT_ARGUMENT_CLOSING_BRACE"] = 1] = "EXPECT_ARGUMENT_CLOSING_BRACE";
+ /** Argument is empty (e.g. `{}`). */
+ ErrorKind[ErrorKind["EMPTY_ARGUMENT"] = 2] = "EMPTY_ARGUMENT";
+ /** Argument is malformed (e.g. `{foo!}``) */
+ ErrorKind[ErrorKind["MALFORMED_ARGUMENT"] = 3] = "MALFORMED_ARGUMENT";
+ /** Expect an argument type (e.g. `{foo,}`) */
+ ErrorKind[ErrorKind["EXPECT_ARGUMENT_TYPE"] = 4] = "EXPECT_ARGUMENT_TYPE";
+ /** Unsupported argument type (e.g. `{foo,foo}`) */
+ ErrorKind[ErrorKind["INVALID_ARGUMENT_TYPE"] = 5] = "INVALID_ARGUMENT_TYPE";
+ /** Expect an argument style (e.g. `{foo, number, }`) */
+ ErrorKind[ErrorKind["EXPECT_ARGUMENT_STYLE"] = 6] = "EXPECT_ARGUMENT_STYLE";
+ /** The number skeleton is invalid. */
+ ErrorKind[ErrorKind["INVALID_NUMBER_SKELETON"] = 7] = "INVALID_NUMBER_SKELETON";
+ /** The date time skeleton is invalid. */
+ ErrorKind[ErrorKind["INVALID_DATE_TIME_SKELETON"] = 8] = "INVALID_DATE_TIME_SKELETON";
+ /** Exepct a number skeleton following the `::` (e.g. `{foo, number, ::}`) */
+ ErrorKind[ErrorKind["EXPECT_NUMBER_SKELETON"] = 9] = "EXPECT_NUMBER_SKELETON";
+ /** Exepct a date time skeleton following the `::` (e.g. `{foo, date, ::}`) */
+ ErrorKind[ErrorKind["EXPECT_DATE_TIME_SKELETON"] = 10] = "EXPECT_DATE_TIME_SKELETON";
+ /** Unmatched apostrophes in the argument style (e.g. `{foo, number, 'test`) */
+ ErrorKind[ErrorKind["UNCLOSED_QUOTE_IN_ARGUMENT_STYLE"] = 11] = "UNCLOSED_QUOTE_IN_ARGUMENT_STYLE";
+ /** Missing select argument options (e.g. `{foo, select}`) */
+ ErrorKind[ErrorKind["EXPECT_SELECT_ARGUMENT_OPTIONS"] = 12] = "EXPECT_SELECT_ARGUMENT_OPTIONS";
+ /** Expecting an offset value in `plural` or `selectordinal` argument (e.g `{foo, plural, offset}`) */
+ ErrorKind[ErrorKind["EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE"] = 13] = "EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE";
+ /** Offset value in `plural` or `selectordinal` is invalid (e.g. `{foo, plural, offset: x}`) */
+ ErrorKind[ErrorKind["INVALID_PLURAL_ARGUMENT_OFFSET_VALUE"] = 14] = "INVALID_PLURAL_ARGUMENT_OFFSET_VALUE";
+ /** Expecting a selector in `select` argument (e.g `{foo, select}`) */
+ ErrorKind[ErrorKind["EXPECT_SELECT_ARGUMENT_SELECTOR"] = 15] = "EXPECT_SELECT_ARGUMENT_SELECTOR";
+ /** Expecting a selector in `plural` or `selectordinal` argument (e.g `{foo, plural}`) */
+ ErrorKind[ErrorKind["EXPECT_PLURAL_ARGUMENT_SELECTOR"] = 16] = "EXPECT_PLURAL_ARGUMENT_SELECTOR";
+ /** Expecting a message fragment after the `select` selector (e.g. `{foo, select, apple}`) */
+ ErrorKind[ErrorKind["EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT"] = 17] = "EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT";
+ /**
+ * Expecting a message fragment after the `plural` or `selectordinal` selector
+ * (e.g. `{foo, plural, one}`)
+ */
+ ErrorKind[ErrorKind["EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT"] = 18] = "EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT";
+ /** Selector in `plural` or `selectordinal` is malformed (e.g. `{foo, plural, =x {#}}`) */
+ ErrorKind[ErrorKind["INVALID_PLURAL_ARGUMENT_SELECTOR"] = 19] = "INVALID_PLURAL_ARGUMENT_SELECTOR";
+ /**
+ * Duplicate selectors in `plural` or `selectordinal` argument.
+ * (e.g. {foo, plural, one {#} one {#}})
+ */
+ ErrorKind[ErrorKind["DUPLICATE_PLURAL_ARGUMENT_SELECTOR"] = 20] = "DUPLICATE_PLURAL_ARGUMENT_SELECTOR";
+ /** Duplicate selectors in `select` argument.
+ * (e.g. {foo, select, apple {apple} apple {apple}})
+ */
+ ErrorKind[ErrorKind["DUPLICATE_SELECT_ARGUMENT_SELECTOR"] = 21] = "DUPLICATE_SELECT_ARGUMENT_SELECTOR";
+ /** Plural or select argument option must have `other` clause. */
+ ErrorKind[ErrorKind["MISSING_OTHER_CLAUSE"] = 22] = "MISSING_OTHER_CLAUSE";
+ /** The tag is malformed. (e.g. `foo) */
+ ErrorKind[ErrorKind["INVALID_TAG"] = 23] = "INVALID_TAG";
+ /** The tag name is invalid. (e.g. `<123>foo123>`) */
+ ErrorKind[ErrorKind["INVALID_TAG_NAME"] = 25] = "INVALID_TAG_NAME";
+ /** The closing tag does not match the opening tag. (e.g. `foo`) */
+ ErrorKind[ErrorKind["UNMATCHED_CLOSING_TAG"] = 26] = "UNMATCHED_CLOSING_TAG";
+ /** The opening tag has unmatched closing tag. (e.g. `foo`) */
+ ErrorKind[ErrorKind["UNCLOSED_TAG"] = 27] = "UNCLOSED_TAG";
+ })(ErrorKind || (ErrorKind = {}));
+
+ var TYPE;
+ (function (TYPE) {
+ /**
+ * Raw text
+ */
+ TYPE[TYPE["literal"] = 0] = "literal";
+ /**
+ * Variable w/o any format, e.g `var` in `this is a {var}`
+ */
+ TYPE[TYPE["argument"] = 1] = "argument";
+ /**
+ * Variable w/ number format
+ */
+ TYPE[TYPE["number"] = 2] = "number";
+ /**
+ * Variable w/ date format
+ */
+ TYPE[TYPE["date"] = 3] = "date";
+ /**
+ * Variable w/ time format
+ */
+ TYPE[TYPE["time"] = 4] = "time";
+ /**
+ * Variable w/ select format
+ */
+ TYPE[TYPE["select"] = 5] = "select";
+ /**
+ * Variable w/ plural format
+ */
+ TYPE[TYPE["plural"] = 6] = "plural";
+ /**
+ * Only possible within plural argument.
+ * This is the `#` symbol that will be substituted with the count.
+ */
+ TYPE[TYPE["pound"] = 7] = "pound";
+ /**
+ * XML-like tag
+ */
+ TYPE[TYPE["tag"] = 8] = "tag";
+ })(TYPE || (TYPE = {}));
+ var SKELETON_TYPE;
+ (function (SKELETON_TYPE) {
+ SKELETON_TYPE[SKELETON_TYPE["number"] = 0] = "number";
+ SKELETON_TYPE[SKELETON_TYPE["dateTime"] = 1] = "dateTime";
+ })(SKELETON_TYPE || (SKELETON_TYPE = {}));
+ /**
+ * Type Guards
+ */
+ function isLiteralElement(el) {
+ return el.type === TYPE.literal;
+ }
+ function isArgumentElement(el) {
+ return el.type === TYPE.argument;
+ }
+ function isNumberElement(el) {
+ return el.type === TYPE.number;
+ }
+ function isDateElement(el) {
+ return el.type === TYPE.date;
+ }
+ function isTimeElement(el) {
+ return el.type === TYPE.time;
+ }
+ function isSelectElement(el) {
+ return el.type === TYPE.select;
+ }
+ function isPluralElement(el) {
+ return el.type === TYPE.plural;
+ }
+ function isPoundElement(el) {
+ return el.type === TYPE.pound;
+ }
+ function isTagElement(el) {
+ return el.type === TYPE.tag;
+ }
+ function isNumberSkeleton(el) {
+ return !!(el && typeof el === 'object' && el.type === SKELETON_TYPE.number);
+ }
+ function isDateTimeSkeleton(el) {
+ return !!(el && typeof el === 'object' && el.type === SKELETON_TYPE.dateTime);
+ }
+
+ // @generated from regex-gen.ts
+ var SPACE_SEPARATOR_REGEX = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/;
+
+ /**
+ * https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
+ * Credit: https://github.com/caridy/intl-datetimeformat-pattern/blob/master/index.js
+ * with some tweaks
+ */
+ var DATE_TIME_REGEX = /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;
+ /**
+ * Parse Date time skeleton into Intl.DateTimeFormatOptions
+ * Ref: https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
+ * @public
+ * @param skeleton skeleton string
+ */
+ function parseDateTimeSkeleton(skeleton) {
+ var result = {};
+ skeleton.replace(DATE_TIME_REGEX, function (match) {
+ var len = match.length;
+ switch (match[0]) {
+ // Era
+ case 'G':
+ result.era = len === 4 ? 'long' : len === 5 ? 'narrow' : 'short';
+ break;
+ // Year
+ case 'y':
+ result.year = len === 2 ? '2-digit' : 'numeric';
+ break;
+ case 'Y':
+ case 'u':
+ case 'U':
+ case 'r':
+ throw new RangeError('`Y/u/U/r` (year) patterns are not supported, use `y` instead');
+ // Quarter
+ case 'q':
+ case 'Q':
+ throw new RangeError('`q/Q` (quarter) patterns are not supported');
+ // Month
+ case 'M':
+ case 'L':
+ result.month = ['numeric', '2-digit', 'short', 'long', 'narrow'][len - 1];
+ break;
+ // Week
+ case 'w':
+ case 'W':
+ throw new RangeError('`w/W` (week) patterns are not supported');
+ case 'd':
+ result.day = ['numeric', '2-digit'][len - 1];
+ break;
+ case 'D':
+ case 'F':
+ case 'g':
+ throw new RangeError('`D/F/g` (day) patterns are not supported, use `d` instead');
+ // Weekday
+ case 'E':
+ result.weekday = len === 4 ? 'short' : len === 5 ? 'narrow' : 'short';
+ break;
+ case 'e':
+ if (len < 4) {
+ throw new RangeError('`e..eee` (weekday) patterns are not supported');
+ }
+ result.weekday = ['short', 'long', 'narrow', 'short'][len - 4];
+ break;
+ case 'c':
+ if (len < 4) {
+ throw new RangeError('`c..ccc` (weekday) patterns are not supported');
+ }
+ result.weekday = ['short', 'long', 'narrow', 'short'][len - 4];
+ break;
+ // Period
+ case 'a': // AM, PM
+ result.hour12 = true;
+ break;
+ case 'b': // am, pm, noon, midnight
+ case 'B': // flexible day periods
+ throw new RangeError('`b/B` (period) patterns are not supported, use `a` instead');
+ // Hour
+ case 'h':
+ result.hourCycle = 'h12';
+ result.hour = ['numeric', '2-digit'][len - 1];
+ break;
+ case 'H':
+ result.hourCycle = 'h23';
+ result.hour = ['numeric', '2-digit'][len - 1];
+ break;
+ case 'K':
+ result.hourCycle = 'h11';
+ result.hour = ['numeric', '2-digit'][len - 1];
+ break;
+ case 'k':
+ result.hourCycle = 'h24';
+ result.hour = ['numeric', '2-digit'][len - 1];
+ break;
+ case 'j':
+ case 'J':
+ case 'C':
+ throw new RangeError('`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead');
+ // Minute
+ case 'm':
+ result.minute = ['numeric', '2-digit'][len - 1];
+ break;
+ // Second
+ case 's':
+ result.second = ['numeric', '2-digit'][len - 1];
+ break;
+ case 'S':
+ case 'A':
+ throw new RangeError('`S/A` (second) patterns are not supported, use `s` instead');
+ // Zone
+ case 'z': // 1..3, 4: specific non-location format
+ result.timeZoneName = len < 4 ? 'short' : 'long';
+ break;
+ case 'Z': // 1..3, 4, 5: The ISO8601 varios formats
+ case 'O': // 1, 4: miliseconds in day short, long
+ case 'v': // 1, 4: generic non-location format
+ case 'V': // 1, 2, 3, 4: time zone ID or city
+ case 'X': // 1, 2, 3, 4: The ISO8601 varios formats
+ case 'x': // 1, 2, 3, 4: The ISO8601 varios formats
+ throw new RangeError('`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead');
+ }
+ return '';
+ });
+ return result;
+ }
+
+ // @generated from regex-gen.ts
+ var WHITE_SPACE_REGEX = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i;
+
+ function parseNumberSkeletonFromString(skeleton) {
+ if (skeleton.length === 0) {
+ throw new Error('Number skeleton cannot be empty');
+ }
+ // Parse the skeleton
+ var stringTokens = skeleton
+ .split(WHITE_SPACE_REGEX)
+ .filter(function (x) { return x.length > 0; });
+ var tokens = [];
+ for (var _i = 0, stringTokens_1 = stringTokens; _i < stringTokens_1.length; _i++) {
+ var stringToken = stringTokens_1[_i];
+ var stemAndOptions = stringToken.split('/');
+ if (stemAndOptions.length === 0) {
+ throw new Error('Invalid number skeleton');
+ }
+ var stem = stemAndOptions[0], options = stemAndOptions.slice(1);
+ for (var _a = 0, options_1 = options; _a < options_1.length; _a++) {
+ var option = options_1[_a];
+ if (option.length === 0) {
+ throw new Error('Invalid number skeleton');
+ }
+ }
+ tokens.push({ stem: stem, options: options });
+ }
+ return tokens;
+ }
+ function icuUnitToEcma(unit) {
+ return unit.replace(/^(.*?)-/, '');
+ }
+ var FRACTION_PRECISION_REGEX = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g;
+ var SIGNIFICANT_PRECISION_REGEX = /^(@+)?(\+|#+)?[rs]?$/g;
+ var INTEGER_WIDTH_REGEX = /(\*)(0+)|(#+)(0+)|(0+)/g;
+ var CONCISE_INTEGER_WIDTH_REGEX = /^(0+)$/;
+ function parseSignificantPrecision(str) {
+ var result = {};
+ if (str[str.length - 1] === 'r') {
+ result.roundingPriority = 'morePrecision';
+ }
+ else if (str[str.length - 1] === 's') {
+ result.roundingPriority = 'lessPrecision';
+ }
+ str.replace(SIGNIFICANT_PRECISION_REGEX, function (_, g1, g2) {
+ // @@@ case
+ if (typeof g2 !== 'string') {
+ result.minimumSignificantDigits = g1.length;
+ result.maximumSignificantDigits = g1.length;
+ }
+ // @@@+ case
+ else if (g2 === '+') {
+ result.minimumSignificantDigits = g1.length;
+ }
+ // .### case
+ else if (g1[0] === '#') {
+ result.maximumSignificantDigits = g1.length;
+ }
+ // .@@## or .@@@ case
+ else {
+ result.minimumSignificantDigits = g1.length;
+ result.maximumSignificantDigits =
+ g1.length + (typeof g2 === 'string' ? g2.length : 0);
+ }
+ return '';
+ });
+ return result;
+ }
+ function parseSign(str) {
+ switch (str) {
+ case 'sign-auto':
+ return {
+ signDisplay: 'auto',
+ };
+ case 'sign-accounting':
+ case '()':
+ return {
+ currencySign: 'accounting',
+ };
+ case 'sign-always':
+ case '+!':
+ return {
+ signDisplay: 'always',
+ };
+ case 'sign-accounting-always':
+ case '()!':
+ return {
+ signDisplay: 'always',
+ currencySign: 'accounting',
+ };
+ case 'sign-except-zero':
+ case '+?':
+ return {
+ signDisplay: 'exceptZero',
+ };
+ case 'sign-accounting-except-zero':
+ case '()?':
+ return {
+ signDisplay: 'exceptZero',
+ currencySign: 'accounting',
+ };
+ case 'sign-never':
+ case '+_':
+ return {
+ signDisplay: 'never',
+ };
+ }
+ }
+ function parseConciseScientificAndEngineeringStem(stem) {
+ // Engineering
+ var result;
+ if (stem[0] === 'E' && stem[1] === 'E') {
+ result = {
+ notation: 'engineering',
+ };
+ stem = stem.slice(2);
+ }
+ else if (stem[0] === 'E') {
+ result = {
+ notation: 'scientific',
+ };
+ stem = stem.slice(1);
+ }
+ if (result) {
+ var signDisplay = stem.slice(0, 2);
+ if (signDisplay === '+!') {
+ result.signDisplay = 'always';
+ stem = stem.slice(2);
+ }
+ else if (signDisplay === '+?') {
+ result.signDisplay = 'exceptZero';
+ stem = stem.slice(2);
+ }
+ if (!CONCISE_INTEGER_WIDTH_REGEX.test(stem)) {
+ throw new Error('Malformed concise eng/scientific notation');
+ }
+ result.minimumIntegerDigits = stem.length;
+ }
+ return result;
+ }
+ function parseNotationOptions(opt) {
+ var result = {};
+ var signOpts = parseSign(opt);
+ if (signOpts) {
+ return signOpts;
+ }
+ return result;
+ }
+ /**
+ * https://github.com/unicode-org/icu/blob/master/docs/userguide/format_parse/numbers/skeletons.md#skeleton-stems-and-options
+ */
+ function parseNumberSkeleton(tokens) {
+ var result = {};
+ for (var _i = 0, tokens_1 = tokens; _i < tokens_1.length; _i++) {
+ var token = tokens_1[_i];
+ switch (token.stem) {
+ case 'percent':
+ case '%':
+ result.style = 'percent';
+ continue;
+ case '%x100':
+ result.style = 'percent';
+ result.scale = 100;
+ continue;
+ case 'currency':
+ result.style = 'currency';
+ result.currency = token.options[0];
+ continue;
+ case 'group-off':
+ case ',_':
+ result.useGrouping = false;
+ continue;
+ case 'precision-integer':
+ case '.':
+ result.maximumFractionDigits = 0;
+ continue;
+ case 'measure-unit':
+ case 'unit':
+ result.style = 'unit';
+ result.unit = icuUnitToEcma(token.options[0]);
+ continue;
+ case 'compact-short':
+ case 'K':
+ result.notation = 'compact';
+ result.compactDisplay = 'short';
+ continue;
+ case 'compact-long':
+ case 'KK':
+ result.notation = 'compact';
+ result.compactDisplay = 'long';
+ continue;
+ case 'scientific':
+ result = __assign(__assign(__assign({}, result), { notation: 'scientific' }), token.options.reduce(function (all, opt) { return (__assign(__assign({}, all), parseNotationOptions(opt))); }, {}));
+ continue;
+ case 'engineering':
+ result = __assign(__assign(__assign({}, result), { notation: 'engineering' }), token.options.reduce(function (all, opt) { return (__assign(__assign({}, all), parseNotationOptions(opt))); }, {}));
+ continue;
+ case 'notation-simple':
+ result.notation = 'standard';
+ continue;
+ // https://github.com/unicode-org/icu/blob/master/icu4c/source/i18n/unicode/unumberformatter.h
+ case 'unit-width-narrow':
+ result.currencyDisplay = 'narrowSymbol';
+ result.unitDisplay = 'narrow';
+ continue;
+ case 'unit-width-short':
+ result.currencyDisplay = 'code';
+ result.unitDisplay = 'short';
+ continue;
+ case 'unit-width-full-name':
+ result.currencyDisplay = 'name';
+ result.unitDisplay = 'long';
+ continue;
+ case 'unit-width-iso-code':
+ result.currencyDisplay = 'symbol';
+ continue;
+ case 'scale':
+ result.scale = parseFloat(token.options[0]);
+ continue;
+ // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#integer-width
+ case 'integer-width':
+ if (token.options.length > 1) {
+ throw new RangeError('integer-width stems only accept a single optional option');
+ }
+ token.options[0].replace(INTEGER_WIDTH_REGEX, function (_, g1, g2, g3, g4, g5) {
+ if (g1) {
+ result.minimumIntegerDigits = g2.length;
+ }
+ else if (g3 && g4) {
+ throw new Error('We currently do not support maximum integer digits');
+ }
+ else if (g5) {
+ throw new Error('We currently do not support exact integer digits');
+ }
+ return '';
+ });
+ continue;
+ }
+ // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#integer-width
+ if (CONCISE_INTEGER_WIDTH_REGEX.test(token.stem)) {
+ result.minimumIntegerDigits = token.stem.length;
+ continue;
+ }
+ if (FRACTION_PRECISION_REGEX.test(token.stem)) {
+ // Precision
+ // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#fraction-precision
+ // precision-integer case
+ if (token.options.length > 1) {
+ throw new RangeError('Fraction-precision stems only accept a single optional option');
+ }
+ token.stem.replace(FRACTION_PRECISION_REGEX, function (_, g1, g2, g3, g4, g5) {
+ // .000* case (before ICU67 it was .000+)
+ if (g2 === '*') {
+ result.minimumFractionDigits = g1.length;
+ }
+ // .### case
+ else if (g3 && g3[0] === '#') {
+ result.maximumFractionDigits = g3.length;
+ }
+ // .00## case
+ else if (g4 && g5) {
+ result.minimumFractionDigits = g4.length;
+ result.maximumFractionDigits = g4.length + g5.length;
+ }
+ else {
+ result.minimumFractionDigits = g1.length;
+ result.maximumFractionDigits = g1.length;
+ }
+ return '';
+ });
+ var opt = token.options[0];
+ // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#trailing-zero-display
+ if (opt === 'w') {
+ result = __assign(__assign({}, result), { trailingZeroDisplay: 'stripIfInteger' });
+ }
+ else if (opt) {
+ result = __assign(__assign({}, result), parseSignificantPrecision(opt));
+ }
+ continue;
+ }
+ // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#significant-digits-precision
+ if (SIGNIFICANT_PRECISION_REGEX.test(token.stem)) {
+ result = __assign(__assign({}, result), parseSignificantPrecision(token.stem));
+ continue;
+ }
+ var signOpts = parseSign(token.stem);
+ if (signOpts) {
+ result = __assign(__assign({}, result), signOpts);
+ }
+ var conciseScientificAndEngineeringOpts = parseConciseScientificAndEngineeringStem(token.stem);
+ if (conciseScientificAndEngineeringOpts) {
+ result = __assign(__assign({}, result), conciseScientificAndEngineeringOpts);
+ }
+ }
+ return result;
+ }
+
+ var _a;
+ var SPACE_SEPARATOR_START_REGEX = new RegExp("^" + SPACE_SEPARATOR_REGEX.source + "*");
+ var SPACE_SEPARATOR_END_REGEX = new RegExp(SPACE_SEPARATOR_REGEX.source + "*$");
+ function createLocation(start, end) {
+ return { start: start, end: end };
+ }
+ // #region Ponyfills
+ // Consolidate these variables up top for easier toggling during debugging
+ var hasNativeStartsWith = !!String.prototype.startsWith;
+ var hasNativeFromCodePoint = !!String.fromCodePoint;
+ var hasNativeFromEntries = !!Object.fromEntries;
+ var hasNativeCodePointAt = !!String.prototype.codePointAt;
+ var hasTrimStart = !!String.prototype.trimStart;
+ var hasTrimEnd = !!String.prototype.trimEnd;
+ var hasNativeIsSafeInteger = !!Number.isSafeInteger;
+ var isSafeInteger = hasNativeIsSafeInteger
+ ? Number.isSafeInteger
+ : function (n) {
+ return (typeof n === 'number' &&
+ isFinite(n) &&
+ Math.floor(n) === n &&
+ Math.abs(n) <= 0x1fffffffffffff);
+ };
+ // IE11 does not support y and u.
+ var REGEX_SUPPORTS_U_AND_Y = true;
+ try {
+ var re = RE('([^\\p{White_Space}\\p{Pattern_Syntax}]*)', 'yu');
+ /**
+ * legacy Edge or Xbox One browser
+ * Unicode flag support: supported
+ * Pattern_Syntax support: not supported
+ * See https://github.com/formatjs/formatjs/issues/2822
+ */
+ REGEX_SUPPORTS_U_AND_Y = ((_a = re.exec('a')) === null || _a === void 0 ? void 0 : _a[0]) === 'a';
+ }
+ catch (_) {
+ REGEX_SUPPORTS_U_AND_Y = false;
+ }
+ var startsWith = hasNativeStartsWith
+ ? // Native
+ function startsWith(s, search, position) {
+ return s.startsWith(search, position);
+ }
+ : // For IE11
+ function startsWith(s, search, position) {
+ return s.slice(position, position + search.length) === search;
+ };
+ var fromCodePoint = hasNativeFromCodePoint
+ ? String.fromCodePoint
+ : // IE11
+ function fromCodePoint() {
+ var codePoints = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ codePoints[_i] = arguments[_i];
+ }
+ var elements = '';
+ var length = codePoints.length;
+ var i = 0;
+ var code;
+ while (length > i) {
+ code = codePoints[i++];
+ if (code > 0x10ffff)
+ throw RangeError(code + ' is not a valid code point');
+ elements +=
+ code < 0x10000
+ ? String.fromCharCode(code)
+ : String.fromCharCode(((code -= 0x10000) >> 10) + 0xd800, (code % 0x400) + 0xdc00);
+ }
+ return elements;
+ };
+ var fromEntries =
+ // native
+ hasNativeFromEntries
+ ? Object.fromEntries
+ : // Ponyfill
+ function fromEntries(entries) {
+ var obj = {};
+ for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) {
+ var _a = entries_1[_i], k = _a[0], v = _a[1];
+ obj[k] = v;
+ }
+ return obj;
+ };
+ var codePointAt = hasNativeCodePointAt
+ ? // Native
+ function codePointAt(s, index) {
+ return s.codePointAt(index);
+ }
+ : // IE 11
+ function codePointAt(s, index) {
+ var size = s.length;
+ if (index < 0 || index >= size) {
+ return undefined;
+ }
+ var first = s.charCodeAt(index);
+ var second;
+ return first < 0xd800 ||
+ first > 0xdbff ||
+ index + 1 === size ||
+ (second = s.charCodeAt(index + 1)) < 0xdc00 ||
+ second > 0xdfff
+ ? first
+ : ((first - 0xd800) << 10) + (second - 0xdc00) + 0x10000;
+ };
+ var trimStart = hasTrimStart
+ ? // Native
+ function trimStart(s) {
+ return s.trimStart();
+ }
+ : // Ponyfill
+ function trimStart(s) {
+ return s.replace(SPACE_SEPARATOR_START_REGEX, '');
+ };
+ var trimEnd = hasTrimEnd
+ ? // Native
+ function trimEnd(s) {
+ return s.trimEnd();
+ }
+ : // Ponyfill
+ function trimEnd(s) {
+ return s.replace(SPACE_SEPARATOR_END_REGEX, '');
+ };
+ // Prevent minifier to translate new RegExp to literal form that might cause syntax error on IE11.
+ function RE(s, flag) {
+ return new RegExp(s, flag);
+ }
+ // #endregion
+ var matchIdentifierAtIndex;
+ if (REGEX_SUPPORTS_U_AND_Y) {
+ // Native
+ var IDENTIFIER_PREFIX_RE_1 = RE('([^\\p{White_Space}\\p{Pattern_Syntax}]*)', 'yu');
+ matchIdentifierAtIndex = function matchIdentifierAtIndex(s, index) {
+ var _a;
+ IDENTIFIER_PREFIX_RE_1.lastIndex = index;
+ var match = IDENTIFIER_PREFIX_RE_1.exec(s);
+ return (_a = match[1]) !== null && _a !== void 0 ? _a : '';
+ };
+ }
+ else {
+ // IE11
+ matchIdentifierAtIndex = function matchIdentifierAtIndex(s, index) {
+ var match = [];
+ while (true) {
+ var c = codePointAt(s, index);
+ if (c === undefined || _isWhiteSpace(c) || _isPatternSyntax(c)) {
+ break;
+ }
+ match.push(c);
+ index += c >= 0x10000 ? 2 : 1;
+ }
+ return fromCodePoint.apply(void 0, match);
+ };
+ }
+ var Parser = /** @class */ (function () {
+ function Parser(message, options) {
+ if (options === void 0) { options = {}; }
+ this.message = message;
+ this.position = { offset: 0, line: 1, column: 1 };
+ this.ignoreTag = !!options.ignoreTag;
+ this.requiresOtherClause = !!options.requiresOtherClause;
+ this.shouldParseSkeletons = !!options.shouldParseSkeletons;
+ }
+ Parser.prototype.parse = function () {
+ if (this.offset() !== 0) {
+ throw Error('parser can only be used once');
+ }
+ return this.parseMessage(0, '', false);
+ };
+ Parser.prototype.parseMessage = function (nestingLevel, parentArgType, expectingCloseTag) {
+ var elements = [];
+ while (!this.isEOF()) {
+ var char = this.char();
+ if (char === 123 /* `{` */) {
+ var result = this.parseArgument(nestingLevel, expectingCloseTag);
+ if (result.err) {
+ return result;
+ }
+ elements.push(result.val);
+ }
+ else if (char === 125 /* `}` */ && nestingLevel > 0) {
+ break;
+ }
+ else if (char === 35 /* `#` */ &&
+ (parentArgType === 'plural' || parentArgType === 'selectordinal')) {
+ var position = this.clonePosition();
+ this.bump();
+ elements.push({
+ type: TYPE.pound,
+ location: createLocation(position, this.clonePosition()),
+ });
+ }
+ else if (char === 60 /* `<` */ &&
+ !this.ignoreTag &&
+ this.peek() === 47 // char code for '/'
+ ) {
+ if (expectingCloseTag) {
+ break;
+ }
+ else {
+ return this.error(ErrorKind.UNMATCHED_CLOSING_TAG, createLocation(this.clonePosition(), this.clonePosition()));
+ }
+ }
+ else if (char === 60 /* `<` */ &&
+ !this.ignoreTag &&
+ _isAlpha(this.peek() || 0)) {
+ var result = this.parseTag(nestingLevel, parentArgType);
+ if (result.err) {
+ return result;
+ }
+ elements.push(result.val);
+ }
+ else {
+ var result = this.parseLiteral(nestingLevel, parentArgType);
+ if (result.err) {
+ return result;
+ }
+ elements.push(result.val);
+ }
+ }
+ return { val: elements, err: null };
+ };
+ /**
+ * A tag name must start with an ASCII lower/upper case letter. The grammar is based on the
+ * [custom element name][] except that a dash is NOT always mandatory and uppercase letters
+ * are accepted:
+ *
+ * ```
+ * tag ::= "<" tagName (whitespace)* "/>" | "<" tagName (whitespace)* ">" message "" tagName (whitespace)* ">"
+ * tagName ::= [a-z] (PENChar)*
+ * PENChar ::=
+ * "-" | "." | [0-9] | "_" | [a-z] | [A-Z] | #xB7 | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x37D] |
+ * [#x37F-#x1FFF] | [#x200C-#x200D] | [#x203F-#x2040] | [#x2070-#x218F] | [#x2C00-#x2FEF] |
+ * [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]
+ * ```
+ *
+ * [custom element name]: https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name
+ * NOTE: We're a bit more lax here since HTML technically does not allow uppercase HTML element but we do
+ * since other tag-based engines like React allow it
+ */
+ Parser.prototype.parseTag = function (nestingLevel, parentArgType) {
+ var startPosition = this.clonePosition();
+ this.bump(); // `<`
+ var tagName = this.parseTagName();
+ this.bumpSpace();
+ if (this.bumpIf('/>')) {
+ // Self closing tag
+ return {
+ val: {
+ type: TYPE.literal,
+ value: "<" + tagName + "/>",
+ location: createLocation(startPosition, this.clonePosition()),
+ },
+ err: null,
+ };
+ }
+ else if (this.bumpIf('>')) {
+ var childrenResult = this.parseMessage(nestingLevel + 1, parentArgType, true);
+ if (childrenResult.err) {
+ return childrenResult;
+ }
+ var children = childrenResult.val;
+ // Expecting a close tag
+ var endTagStartPosition = this.clonePosition();
+ if (this.bumpIf('')) {
+ if (this.isEOF() || !_isAlpha(this.char())) {
+ return this.error(ErrorKind.INVALID_TAG, createLocation(endTagStartPosition, this.clonePosition()));
+ }
+ var closingTagNameStartPosition = this.clonePosition();
+ var closingTagName = this.parseTagName();
+ if (tagName !== closingTagName) {
+ return this.error(ErrorKind.UNMATCHED_CLOSING_TAG, createLocation(closingTagNameStartPosition, this.clonePosition()));
+ }
+ this.bumpSpace();
+ if (!this.bumpIf('>')) {
+ return this.error(ErrorKind.INVALID_TAG, createLocation(endTagStartPosition, this.clonePosition()));
+ }
+ return {
+ val: {
+ type: TYPE.tag,
+ value: tagName,
+ children: children,
+ location: createLocation(startPosition, this.clonePosition()),
+ },
+ err: null,
+ };
+ }
+ else {
+ return this.error(ErrorKind.UNCLOSED_TAG, createLocation(startPosition, this.clonePosition()));
+ }
+ }
+ else {
+ return this.error(ErrorKind.INVALID_TAG, createLocation(startPosition, this.clonePosition()));
+ }
+ };
+ /**
+ * This method assumes that the caller has peeked ahead for the first tag character.
+ */
+ Parser.prototype.parseTagName = function () {
+ var startOffset = this.offset();
+ this.bump(); // the first tag name character
+ while (!this.isEOF() && _isPotentialElementNameChar(this.char())) {
+ this.bump();
+ }
+ return this.message.slice(startOffset, this.offset());
+ };
+ Parser.prototype.parseLiteral = function (nestingLevel, parentArgType) {
+ var start = this.clonePosition();
+ var value = '';
+ while (true) {
+ var parseQuoteResult = this.tryParseQuote(parentArgType);
+ if (parseQuoteResult) {
+ value += parseQuoteResult;
+ continue;
+ }
+ var parseUnquotedResult = this.tryParseUnquoted(nestingLevel, parentArgType);
+ if (parseUnquotedResult) {
+ value += parseUnquotedResult;
+ continue;
+ }
+ var parseLeftAngleResult = this.tryParseLeftAngleBracket();
+ if (parseLeftAngleResult) {
+ value += parseLeftAngleResult;
+ continue;
+ }
+ break;
+ }
+ var location = createLocation(start, this.clonePosition());
+ return {
+ val: { type: TYPE.literal, value: value, location: location },
+ err: null,
+ };
+ };
+ Parser.prototype.tryParseLeftAngleBracket = function () {
+ if (!this.isEOF() &&
+ this.char() === 60 /* `<` */ &&
+ (this.ignoreTag ||
+ // If at the opening tag or closing tag position, bail.
+ !_isAlphaOrSlash(this.peek() || 0))) {
+ this.bump(); // `<`
+ return '<';
+ }
+ return null;
+ };
+ /**
+ * Starting with ICU 4.8, an ASCII apostrophe only starts quoted text if it immediately precedes
+ * a character that requires quoting (that is, "only where needed"), and works the same in
+ * nested messages as on the top level of the pattern. The new behavior is otherwise compatible.
+ */
+ Parser.prototype.tryParseQuote = function (parentArgType) {
+ if (this.isEOF() || this.char() !== 39 /* `'` */) {
+ return null;
+ }
+ // Parse escaped char following the apostrophe, or early return if there is no escaped char.
+ // Check if is valid escaped character
+ switch (this.peek()) {
+ case 39 /* `'` */:
+ // double quote, should return as a single quote.
+ this.bump();
+ this.bump();
+ return "'";
+ // '{', '<', '>', '}'
+ case 123:
+ case 60:
+ case 62:
+ case 125:
+ break;
+ case 35: // '#'
+ if (parentArgType === 'plural' || parentArgType === 'selectordinal') {
+ break;
+ }
+ return null;
+ default:
+ return null;
+ }
+ this.bump(); // apostrophe
+ var codePoints = [this.char()]; // escaped char
+ this.bump();
+ // read chars until the optional closing apostrophe is found
+ while (!this.isEOF()) {
+ var ch = this.char();
+ if (ch === 39 /* `'` */) {
+ if (this.peek() === 39 /* `'` */) {
+ codePoints.push(39);
+ // Bump one more time because we need to skip 2 characters.
+ this.bump();
+ }
+ else {
+ // Optional closing apostrophe.
+ this.bump();
+ break;
+ }
+ }
+ else {
+ codePoints.push(ch);
+ }
+ this.bump();
+ }
+ return fromCodePoint.apply(void 0, codePoints);
+ };
+ Parser.prototype.tryParseUnquoted = function (nestingLevel, parentArgType) {
+ if (this.isEOF()) {
+ return null;
+ }
+ var ch = this.char();
+ if (ch === 60 /* `<` */ ||
+ ch === 123 /* `{` */ ||
+ (ch === 35 /* `#` */ &&
+ (parentArgType === 'plural' || parentArgType === 'selectordinal')) ||
+ (ch === 125 /* `}` */ && nestingLevel > 0)) {
+ return null;
+ }
+ else {
+ this.bump();
+ return fromCodePoint(ch);
+ }
+ };
+ Parser.prototype.parseArgument = function (nestingLevel, expectingCloseTag) {
+ var openingBracePosition = this.clonePosition();
+ this.bump(); // `{`
+ this.bumpSpace();
+ if (this.isEOF()) {
+ return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));
+ }
+ if (this.char() === 125 /* `}` */) {
+ this.bump();
+ return this.error(ErrorKind.EMPTY_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));
+ }
+ // argument name
+ var value = this.parseIdentifierIfPossible().value;
+ if (!value) {
+ return this.error(ErrorKind.MALFORMED_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));
+ }
+ this.bumpSpace();
+ if (this.isEOF()) {
+ return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));
+ }
+ switch (this.char()) {
+ // Simple argument: `{name}`
+ case 125 /* `}` */: {
+ this.bump(); // `}`
+ return {
+ val: {
+ type: TYPE.argument,
+ // value does not include the opening and closing braces.
+ value: value,
+ location: createLocation(openingBracePosition, this.clonePosition()),
+ },
+ err: null,
+ };
+ }
+ // Argument with options: `{name, format, ...}`
+ case 44 /* `,` */: {
+ this.bump(); // `,`
+ this.bumpSpace();
+ if (this.isEOF()) {
+ return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));
+ }
+ return this.parseArgumentOptions(nestingLevel, expectingCloseTag, value, openingBracePosition);
+ }
+ default:
+ return this.error(ErrorKind.MALFORMED_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));
+ }
+ };
+ /**
+ * Advance the parser until the end of the identifier, if it is currently on
+ * an identifier character. Return an empty string otherwise.
+ */
+ Parser.prototype.parseIdentifierIfPossible = function () {
+ var startingPosition = this.clonePosition();
+ var startOffset = this.offset();
+ var value = matchIdentifierAtIndex(this.message, startOffset);
+ var endOffset = startOffset + value.length;
+ this.bumpTo(endOffset);
+ var endPosition = this.clonePosition();
+ var location = createLocation(startingPosition, endPosition);
+ return { value: value, location: location };
+ };
+ Parser.prototype.parseArgumentOptions = function (nestingLevel, expectingCloseTag, value, openingBracePosition) {
+ var _a;
+ // Parse this range:
+ // {name, type, style}
+ // ^---^
+ var typeStartPosition = this.clonePosition();
+ var argType = this.parseIdentifierIfPossible().value;
+ var typeEndPosition = this.clonePosition();
+ switch (argType) {
+ case '':
+ // Expecting a style string number, date, time, plural, selectordinal, or select.
+ return this.error(ErrorKind.EXPECT_ARGUMENT_TYPE, createLocation(typeStartPosition, typeEndPosition));
+ case 'number':
+ case 'date':
+ case 'time': {
+ // Parse this range:
+ // {name, number, style}
+ // ^-------^
+ this.bumpSpace();
+ var styleAndLocation = null;
+ if (this.bumpIf(',')) {
+ this.bumpSpace();
+ var styleStartPosition = this.clonePosition();
+ var result = this.parseSimpleArgStyleIfPossible();
+ if (result.err) {
+ return result;
+ }
+ var style = trimEnd(result.val);
+ if (style.length === 0) {
+ return this.error(ErrorKind.EXPECT_ARGUMENT_STYLE, createLocation(this.clonePosition(), this.clonePosition()));
+ }
+ var styleLocation = createLocation(styleStartPosition, this.clonePosition());
+ styleAndLocation = { style: style, styleLocation: styleLocation };
+ }
+ var argCloseResult = this.tryParseArgumentClose(openingBracePosition);
+ if (argCloseResult.err) {
+ return argCloseResult;
+ }
+ var location_1 = createLocation(openingBracePosition, this.clonePosition());
+ // Extract style or skeleton
+ if (styleAndLocation && startsWith(styleAndLocation === null || styleAndLocation === void 0 ? void 0 : styleAndLocation.style, '::', 0)) {
+ // Skeleton starts with `::`.
+ var skeleton = trimStart(styleAndLocation.style.slice(2));
+ if (argType === 'number') {
+ var result = this.parseNumberSkeletonFromString(skeleton, styleAndLocation.styleLocation);
+ if (result.err) {
+ return result;
+ }
+ return {
+ val: { type: TYPE.number, value: value, location: location_1, style: result.val },
+ err: null,
+ };
+ }
+ else {
+ if (skeleton.length === 0) {
+ return this.error(ErrorKind.EXPECT_DATE_TIME_SKELETON, location_1);
+ }
+ var style = {
+ type: SKELETON_TYPE.dateTime,
+ pattern: skeleton,
+ location: styleAndLocation.styleLocation,
+ parsedOptions: this.shouldParseSkeletons
+ ? parseDateTimeSkeleton(skeleton)
+ : {},
+ };
+ var type = argType === 'date' ? TYPE.date : TYPE.time;
+ return {
+ val: { type: type, value: value, location: location_1, style: style },
+ err: null,
+ };
+ }
+ }
+ // Regular style or no style.
+ return {
+ val: {
+ type: argType === 'number'
+ ? TYPE.number
+ : argType === 'date'
+ ? TYPE.date
+ : TYPE.time,
+ value: value,
+ location: location_1,
+ style: (_a = styleAndLocation === null || styleAndLocation === void 0 ? void 0 : styleAndLocation.style) !== null && _a !== void 0 ? _a : null,
+ },
+ err: null,
+ };
+ }
+ case 'plural':
+ case 'selectordinal':
+ case 'select': {
+ // Parse this range:
+ // {name, plural, options}
+ // ^---------^
+ var typeEndPosition_1 = this.clonePosition();
+ this.bumpSpace();
+ if (!this.bumpIf(',')) {
+ return this.error(ErrorKind.EXPECT_SELECT_ARGUMENT_OPTIONS, createLocation(typeEndPosition_1, __assign({}, typeEndPosition_1)));
+ }
+ this.bumpSpace();
+ // Parse offset:
+ // {name, plural, offset:1, options}
+ // ^-----^
+ //
+ // or the first option:
+ //
+ // {name, plural, one {...} other {...}}
+ // ^--^
+ var identifierAndLocation = this.parseIdentifierIfPossible();
+ var pluralOffset = 0;
+ if (argType !== 'select' && identifierAndLocation.value === 'offset') {
+ if (!this.bumpIf(':')) {
+ return this.error(ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, createLocation(this.clonePosition(), this.clonePosition()));
+ }
+ this.bumpSpace();
+ var result = this.tryParseDecimalInteger(ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, ErrorKind.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);
+ if (result.err) {
+ return result;
+ }
+ // Parse another identifier for option parsing
+ this.bumpSpace();
+ identifierAndLocation = this.parseIdentifierIfPossible();
+ pluralOffset = result.val;
+ }
+ var optionsResult = this.tryParsePluralOrSelectOptions(nestingLevel, argType, expectingCloseTag, identifierAndLocation);
+ if (optionsResult.err) {
+ return optionsResult;
+ }
+ var argCloseResult = this.tryParseArgumentClose(openingBracePosition);
+ if (argCloseResult.err) {
+ return argCloseResult;
+ }
+ var location_2 = createLocation(openingBracePosition, this.clonePosition());
+ if (argType === 'select') {
+ return {
+ val: {
+ type: TYPE.select,
+ value: value,
+ options: fromEntries(optionsResult.val),
+ location: location_2,
+ },
+ err: null,
+ };
+ }
+ else {
+ return {
+ val: {
+ type: TYPE.plural,
+ value: value,
+ options: fromEntries(optionsResult.val),
+ offset: pluralOffset,
+ pluralType: argType === 'plural' ? 'cardinal' : 'ordinal',
+ location: location_2,
+ },
+ err: null,
+ };
+ }
+ }
+ default:
+ return this.error(ErrorKind.INVALID_ARGUMENT_TYPE, createLocation(typeStartPosition, typeEndPosition));
+ }
+ };
+ Parser.prototype.tryParseArgumentClose = function (openingBracePosition) {
+ // Parse: {value, number, ::currency/GBP }
+ //
+ if (this.isEOF() || this.char() !== 125 /* `}` */) {
+ return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));
+ }
+ this.bump(); // `}`
+ return { val: true, err: null };
+ };
+ /**
+ * See: https://github.com/unicode-org/icu/blob/af7ed1f6d2298013dc303628438ec4abe1f16479/icu4c/source/common/messagepattern.cpp#L659
+ */
+ Parser.prototype.parseSimpleArgStyleIfPossible = function () {
+ var nestedBraces = 0;
+ var startPosition = this.clonePosition();
+ while (!this.isEOF()) {
+ var ch = this.char();
+ switch (ch) {
+ case 39 /* `'` */: {
+ // Treat apostrophe as quoting but include it in the style part.
+ // Find the end of the quoted literal text.
+ this.bump();
+ var apostrophePosition = this.clonePosition();
+ if (!this.bumpUntil("'")) {
+ return this.error(ErrorKind.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE, createLocation(apostrophePosition, this.clonePosition()));
+ }
+ this.bump();
+ break;
+ }
+ case 123 /* `{` */: {
+ nestedBraces += 1;
+ this.bump();
+ break;
+ }
+ case 125 /* `}` */: {
+ if (nestedBraces > 0) {
+ nestedBraces -= 1;
+ }
+ else {
+ return {
+ val: this.message.slice(startPosition.offset, this.offset()),
+ err: null,
+ };
+ }
+ break;
+ }
+ default:
+ this.bump();
+ break;
+ }
+ }
+ return {
+ val: this.message.slice(startPosition.offset, this.offset()),
+ err: null,
+ };
+ };
+ Parser.prototype.parseNumberSkeletonFromString = function (skeleton, location) {
+ var tokens = [];
+ try {
+ tokens = parseNumberSkeletonFromString(skeleton);
+ }
+ catch (e) {
+ return this.error(ErrorKind.INVALID_NUMBER_SKELETON, location);
+ }
+ return {
+ val: {
+ type: SKELETON_TYPE.number,
+ tokens: tokens,
+ location: location,
+ parsedOptions: this.shouldParseSkeletons
+ ? parseNumberSkeleton(tokens)
+ : {},
+ },
+ err: null,
+ };
+ };
+ /**
+ * @param nesting_level The current nesting level of messages.
+ * This can be positive when parsing message fragment in select or plural argument options.
+ * @param parent_arg_type The parent argument's type.
+ * @param parsed_first_identifier If provided, this is the first identifier-like selector of
+ * the argument. It is a by-product of a previous parsing attempt.
+ * @param expecting_close_tag If true, this message is directly or indirectly nested inside
+ * between a pair of opening and closing tags. The nested message will not parse beyond
+ * the closing tag boundary.
+ */
+ Parser.prototype.tryParsePluralOrSelectOptions = function (nestingLevel, parentArgType, expectCloseTag, parsedFirstIdentifier) {
+ var _a;
+ var hasOtherClause = false;
+ var options = [];
+ var parsedSelectors = new Set();
+ var selector = parsedFirstIdentifier.value, selectorLocation = parsedFirstIdentifier.location;
+ // Parse:
+ // one {one apple}
+ // ^--^
+ while (true) {
+ if (selector.length === 0) {
+ var startPosition = this.clonePosition();
+ if (parentArgType !== 'select' && this.bumpIf('=')) {
+ // Try parse `={number}` selector
+ var result = this.tryParseDecimalInteger(ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR, ErrorKind.INVALID_PLURAL_ARGUMENT_SELECTOR);
+ if (result.err) {
+ return result;
+ }
+ selectorLocation = createLocation(startPosition, this.clonePosition());
+ selector = this.message.slice(startPosition.offset, this.offset());
+ }
+ else {
+ break;
+ }
+ }
+ // Duplicate selector clauses
+ if (parsedSelectors.has(selector)) {
+ return this.error(parentArgType === 'select'
+ ? ErrorKind.DUPLICATE_SELECT_ARGUMENT_SELECTOR
+ : ErrorKind.DUPLICATE_PLURAL_ARGUMENT_SELECTOR, selectorLocation);
+ }
+ if (selector === 'other') {
+ hasOtherClause = true;
+ }
+ // Parse:
+ // one {one apple}
+ // ^----------^
+ this.bumpSpace();
+ var openingBracePosition = this.clonePosition();
+ if (!this.bumpIf('{')) {
+ return this.error(parentArgType === 'select'
+ ? ErrorKind.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT
+ : ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT, createLocation(this.clonePosition(), this.clonePosition()));
+ }
+ var fragmentResult = this.parseMessage(nestingLevel + 1, parentArgType, expectCloseTag);
+ if (fragmentResult.err) {
+ return fragmentResult;
+ }
+ var argCloseResult = this.tryParseArgumentClose(openingBracePosition);
+ if (argCloseResult.err) {
+ return argCloseResult;
+ }
+ options.push([
+ selector,
+ {
+ value: fragmentResult.val,
+ location: createLocation(openingBracePosition, this.clonePosition()),
+ },
+ ]);
+ // Keep track of the existing selectors
+ parsedSelectors.add(selector);
+ // Prep next selector clause.
+ this.bumpSpace();
+ (_a = this.parseIdentifierIfPossible(), selector = _a.value, selectorLocation = _a.location);
+ }
+ if (options.length === 0) {
+ return this.error(parentArgType === 'select'
+ ? ErrorKind.EXPECT_SELECT_ARGUMENT_SELECTOR
+ : ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR, createLocation(this.clonePosition(), this.clonePosition()));
+ }
+ if (this.requiresOtherClause && !hasOtherClause) {
+ return this.error(ErrorKind.MISSING_OTHER_CLAUSE, createLocation(this.clonePosition(), this.clonePosition()));
+ }
+ return { val: options, err: null };
+ };
+ Parser.prototype.tryParseDecimalInteger = function (expectNumberError, invalidNumberError) {
+ var sign = 1;
+ var startingPosition = this.clonePosition();
+ if (this.bumpIf('+')) ;
+ else if (this.bumpIf('-')) {
+ sign = -1;
+ }
+ var hasDigits = false;
+ var decimal = 0;
+ while (!this.isEOF()) {
+ var ch = this.char();
+ if (ch >= 48 /* `0` */ && ch <= 57 /* `9` */) {
+ hasDigits = true;
+ decimal = decimal * 10 + (ch - 48);
+ this.bump();
+ }
+ else {
+ break;
+ }
+ }
+ var location = createLocation(startingPosition, this.clonePosition());
+ if (!hasDigits) {
+ return this.error(expectNumberError, location);
+ }
+ decimal *= sign;
+ if (!isSafeInteger(decimal)) {
+ return this.error(invalidNumberError, location);
+ }
+ return { val: decimal, err: null };
+ };
+ Parser.prototype.offset = function () {
+ return this.position.offset;
+ };
+ Parser.prototype.isEOF = function () {
+ return this.offset() === this.message.length;
+ };
+ Parser.prototype.clonePosition = function () {
+ // This is much faster than `Object.assign` or spread.
+ return {
+ offset: this.position.offset,
+ line: this.position.line,
+ column: this.position.column,
+ };
+ };
+ /**
+ * Return the code point at the current position of the parser.
+ * Throws if the index is out of bound.
+ */
+ Parser.prototype.char = function () {
+ var offset = this.position.offset;
+ if (offset >= this.message.length) {
+ throw Error('out of bound');
+ }
+ var code = codePointAt(this.message, offset);
+ if (code === undefined) {
+ throw Error("Offset " + offset + " is at invalid UTF-16 code unit boundary");
+ }
+ return code;
+ };
+ Parser.prototype.error = function (kind, location) {
+ return {
+ val: null,
+ err: {
+ kind: kind,
+ message: this.message,
+ location: location,
+ },
+ };
+ };
+ /** Bump the parser to the next UTF-16 code unit. */
+ Parser.prototype.bump = function () {
+ if (this.isEOF()) {
+ return;
+ }
+ var code = this.char();
+ if (code === 10 /* '\n' */) {
+ this.position.line += 1;
+ this.position.column = 1;
+ this.position.offset += 1;
+ }
+ else {
+ this.position.column += 1;
+ // 0 ~ 0x10000 -> unicode BMP, otherwise skip the surrogate pair.
+ this.position.offset += code < 0x10000 ? 1 : 2;
+ }
+ };
+ /**
+ * If the substring starting at the current position of the parser has
+ * the given prefix, then bump the parser to the character immediately
+ * following the prefix and return true. Otherwise, don't bump the parser
+ * and return false.
+ */
+ Parser.prototype.bumpIf = function (prefix) {
+ if (startsWith(this.message, prefix, this.offset())) {
+ for (var i = 0; i < prefix.length; i++) {
+ this.bump();
+ }
+ return true;
+ }
+ return false;
+ };
+ /**
+ * Bump the parser until the pattern character is found and return `true`.
+ * Otherwise bump to the end of the file and return `false`.
+ */
+ Parser.prototype.bumpUntil = function (pattern) {
+ var currentOffset = this.offset();
+ var index = this.message.indexOf(pattern, currentOffset);
+ if (index >= 0) {
+ this.bumpTo(index);
+ return true;
+ }
+ else {
+ this.bumpTo(this.message.length);
+ return false;
+ }
+ };
+ /**
+ * Bump the parser to the target offset.
+ * If target offset is beyond the end of the input, bump the parser to the end of the input.
+ */
+ Parser.prototype.bumpTo = function (targetOffset) {
+ if (this.offset() > targetOffset) {
+ throw Error("targetOffset " + targetOffset + " must be greater than or equal to the current offset " + this.offset());
+ }
+ targetOffset = Math.min(targetOffset, this.message.length);
+ while (true) {
+ var offset = this.offset();
+ if (offset === targetOffset) {
+ break;
+ }
+ if (offset > targetOffset) {
+ throw Error("targetOffset " + targetOffset + " is at invalid UTF-16 code unit boundary");
+ }
+ this.bump();
+ if (this.isEOF()) {
+ break;
+ }
+ }
+ };
+ /** advance the parser through all whitespace to the next non-whitespace code unit. */
+ Parser.prototype.bumpSpace = function () {
+ while (!this.isEOF() && _isWhiteSpace(this.char())) {
+ this.bump();
+ }
+ };
+ /**
+ * Peek at the *next* Unicode codepoint in the input without advancing the parser.
+ * If the input has been exhausted, then this returns null.
+ */
+ Parser.prototype.peek = function () {
+ if (this.isEOF()) {
+ return null;
+ }
+ var code = this.char();
+ var offset = this.offset();
+ var nextCode = this.message.charCodeAt(offset + (code >= 0x10000 ? 2 : 1));
+ return nextCode !== null && nextCode !== void 0 ? nextCode : null;
+ };
+ return Parser;
+ }());
+ /**
+ * This check if codepoint is alphabet (lower & uppercase)
+ * @param codepoint
+ * @returns
+ */
+ function _isAlpha(codepoint) {
+ return ((codepoint >= 97 && codepoint <= 122) ||
+ (codepoint >= 65 && codepoint <= 90));
+ }
+ function _isAlphaOrSlash(codepoint) {
+ return _isAlpha(codepoint) || codepoint === 47; /* '/' */
+ }
+ /** See `parseTag` function docs. */
+ function _isPotentialElementNameChar(c) {
+ return (c === 45 /* '-' */ ||
+ c === 46 /* '.' */ ||
+ (c >= 48 && c <= 57) /* 0..9 */ ||
+ c === 95 /* '_' */ ||
+ (c >= 97 && c <= 122) /** a..z */ ||
+ (c >= 65 && c <= 90) /* A..Z */ ||
+ c == 0xb7 ||
+ (c >= 0xc0 && c <= 0xd6) ||
+ (c >= 0xd8 && c <= 0xf6) ||
+ (c >= 0xf8 && c <= 0x37d) ||
+ (c >= 0x37f && c <= 0x1fff) ||
+ (c >= 0x200c && c <= 0x200d) ||
+ (c >= 0x203f && c <= 0x2040) ||
+ (c >= 0x2070 && c <= 0x218f) ||
+ (c >= 0x2c00 && c <= 0x2fef) ||
+ (c >= 0x3001 && c <= 0xd7ff) ||
+ (c >= 0xf900 && c <= 0xfdcf) ||
+ (c >= 0xfdf0 && c <= 0xfffd) ||
+ (c >= 0x10000 && c <= 0xeffff));
+ }
+ /**
+ * Code point equivalent of regex `\p{White_Space}`.
+ * From: https://www.unicode.org/Public/UCD/latest/ucd/PropList.txt
+ */
+ function _isWhiteSpace(c) {
+ return ((c >= 0x0009 && c <= 0x000d) ||
+ c === 0x0020 ||
+ c === 0x0085 ||
+ (c >= 0x200e && c <= 0x200f) ||
+ c === 0x2028 ||
+ c === 0x2029);
+ }
+ /**
+ * Code point equivalent of regex `\p{Pattern_Syntax}`.
+ * See https://www.unicode.org/Public/UCD/latest/ucd/PropList.txt
+ */
+ function _isPatternSyntax(c) {
+ return ((c >= 0x0021 && c <= 0x0023) ||
+ c === 0x0024 ||
+ (c >= 0x0025 && c <= 0x0027) ||
+ c === 0x0028 ||
+ c === 0x0029 ||
+ c === 0x002a ||
+ c === 0x002b ||
+ c === 0x002c ||
+ c === 0x002d ||
+ (c >= 0x002e && c <= 0x002f) ||
+ (c >= 0x003a && c <= 0x003b) ||
+ (c >= 0x003c && c <= 0x003e) ||
+ (c >= 0x003f && c <= 0x0040) ||
+ c === 0x005b ||
+ c === 0x005c ||
+ c === 0x005d ||
+ c === 0x005e ||
+ c === 0x0060 ||
+ c === 0x007b ||
+ c === 0x007c ||
+ c === 0x007d ||
+ c === 0x007e ||
+ c === 0x00a1 ||
+ (c >= 0x00a2 && c <= 0x00a5) ||
+ c === 0x00a6 ||
+ c === 0x00a7 ||
+ c === 0x00a9 ||
+ c === 0x00ab ||
+ c === 0x00ac ||
+ c === 0x00ae ||
+ c === 0x00b0 ||
+ c === 0x00b1 ||
+ c === 0x00b6 ||
+ c === 0x00bb ||
+ c === 0x00bf ||
+ c === 0x00d7 ||
+ c === 0x00f7 ||
+ (c >= 0x2010 && c <= 0x2015) ||
+ (c >= 0x2016 && c <= 0x2017) ||
+ c === 0x2018 ||
+ c === 0x2019 ||
+ c === 0x201a ||
+ (c >= 0x201b && c <= 0x201c) ||
+ c === 0x201d ||
+ c === 0x201e ||
+ c === 0x201f ||
+ (c >= 0x2020 && c <= 0x2027) ||
+ (c >= 0x2030 && c <= 0x2038) ||
+ c === 0x2039 ||
+ c === 0x203a ||
+ (c >= 0x203b && c <= 0x203e) ||
+ (c >= 0x2041 && c <= 0x2043) ||
+ c === 0x2044 ||
+ c === 0x2045 ||
+ c === 0x2046 ||
+ (c >= 0x2047 && c <= 0x2051) ||
+ c === 0x2052 ||
+ c === 0x2053 ||
+ (c >= 0x2055 && c <= 0x205e) ||
+ (c >= 0x2190 && c <= 0x2194) ||
+ (c >= 0x2195 && c <= 0x2199) ||
+ (c >= 0x219a && c <= 0x219b) ||
+ (c >= 0x219c && c <= 0x219f) ||
+ c === 0x21a0 ||
+ (c >= 0x21a1 && c <= 0x21a2) ||
+ c === 0x21a3 ||
+ (c >= 0x21a4 && c <= 0x21a5) ||
+ c === 0x21a6 ||
+ (c >= 0x21a7 && c <= 0x21ad) ||
+ c === 0x21ae ||
+ (c >= 0x21af && c <= 0x21cd) ||
+ (c >= 0x21ce && c <= 0x21cf) ||
+ (c >= 0x21d0 && c <= 0x21d1) ||
+ c === 0x21d2 ||
+ c === 0x21d3 ||
+ c === 0x21d4 ||
+ (c >= 0x21d5 && c <= 0x21f3) ||
+ (c >= 0x21f4 && c <= 0x22ff) ||
+ (c >= 0x2300 && c <= 0x2307) ||
+ c === 0x2308 ||
+ c === 0x2309 ||
+ c === 0x230a ||
+ c === 0x230b ||
+ (c >= 0x230c && c <= 0x231f) ||
+ (c >= 0x2320 && c <= 0x2321) ||
+ (c >= 0x2322 && c <= 0x2328) ||
+ c === 0x2329 ||
+ c === 0x232a ||
+ (c >= 0x232b && c <= 0x237b) ||
+ c === 0x237c ||
+ (c >= 0x237d && c <= 0x239a) ||
+ (c >= 0x239b && c <= 0x23b3) ||
+ (c >= 0x23b4 && c <= 0x23db) ||
+ (c >= 0x23dc && c <= 0x23e1) ||
+ (c >= 0x23e2 && c <= 0x2426) ||
+ (c >= 0x2427 && c <= 0x243f) ||
+ (c >= 0x2440 && c <= 0x244a) ||
+ (c >= 0x244b && c <= 0x245f) ||
+ (c >= 0x2500 && c <= 0x25b6) ||
+ c === 0x25b7 ||
+ (c >= 0x25b8 && c <= 0x25c0) ||
+ c === 0x25c1 ||
+ (c >= 0x25c2 && c <= 0x25f7) ||
+ (c >= 0x25f8 && c <= 0x25ff) ||
+ (c >= 0x2600 && c <= 0x266e) ||
+ c === 0x266f ||
+ (c >= 0x2670 && c <= 0x2767) ||
+ c === 0x2768 ||
+ c === 0x2769 ||
+ c === 0x276a ||
+ c === 0x276b ||
+ c === 0x276c ||
+ c === 0x276d ||
+ c === 0x276e ||
+ c === 0x276f ||
+ c === 0x2770 ||
+ c === 0x2771 ||
+ c === 0x2772 ||
+ c === 0x2773 ||
+ c === 0x2774 ||
+ c === 0x2775 ||
+ (c >= 0x2794 && c <= 0x27bf) ||
+ (c >= 0x27c0 && c <= 0x27c4) ||
+ c === 0x27c5 ||
+ c === 0x27c6 ||
+ (c >= 0x27c7 && c <= 0x27e5) ||
+ c === 0x27e6 ||
+ c === 0x27e7 ||
+ c === 0x27e8 ||
+ c === 0x27e9 ||
+ c === 0x27ea ||
+ c === 0x27eb ||
+ c === 0x27ec ||
+ c === 0x27ed ||
+ c === 0x27ee ||
+ c === 0x27ef ||
+ (c >= 0x27f0 && c <= 0x27ff) ||
+ (c >= 0x2800 && c <= 0x28ff) ||
+ (c >= 0x2900 && c <= 0x2982) ||
+ c === 0x2983 ||
+ c === 0x2984 ||
+ c === 0x2985 ||
+ c === 0x2986 ||
+ c === 0x2987 ||
+ c === 0x2988 ||
+ c === 0x2989 ||
+ c === 0x298a ||
+ c === 0x298b ||
+ c === 0x298c ||
+ c === 0x298d ||
+ c === 0x298e ||
+ c === 0x298f ||
+ c === 0x2990 ||
+ c === 0x2991 ||
+ c === 0x2992 ||
+ c === 0x2993 ||
+ c === 0x2994 ||
+ c === 0x2995 ||
+ c === 0x2996 ||
+ c === 0x2997 ||
+ c === 0x2998 ||
+ (c >= 0x2999 && c <= 0x29d7) ||
+ c === 0x29d8 ||
+ c === 0x29d9 ||
+ c === 0x29da ||
+ c === 0x29db ||
+ (c >= 0x29dc && c <= 0x29fb) ||
+ c === 0x29fc ||
+ c === 0x29fd ||
+ (c >= 0x29fe && c <= 0x2aff) ||
+ (c >= 0x2b00 && c <= 0x2b2f) ||
+ (c >= 0x2b30 && c <= 0x2b44) ||
+ (c >= 0x2b45 && c <= 0x2b46) ||
+ (c >= 0x2b47 && c <= 0x2b4c) ||
+ (c >= 0x2b4d && c <= 0x2b73) ||
+ (c >= 0x2b74 && c <= 0x2b75) ||
+ (c >= 0x2b76 && c <= 0x2b95) ||
+ c === 0x2b96 ||
+ (c >= 0x2b97 && c <= 0x2bff) ||
+ (c >= 0x2e00 && c <= 0x2e01) ||
+ c === 0x2e02 ||
+ c === 0x2e03 ||
+ c === 0x2e04 ||
+ c === 0x2e05 ||
+ (c >= 0x2e06 && c <= 0x2e08) ||
+ c === 0x2e09 ||
+ c === 0x2e0a ||
+ c === 0x2e0b ||
+ c === 0x2e0c ||
+ c === 0x2e0d ||
+ (c >= 0x2e0e && c <= 0x2e16) ||
+ c === 0x2e17 ||
+ (c >= 0x2e18 && c <= 0x2e19) ||
+ c === 0x2e1a ||
+ c === 0x2e1b ||
+ c === 0x2e1c ||
+ c === 0x2e1d ||
+ (c >= 0x2e1e && c <= 0x2e1f) ||
+ c === 0x2e20 ||
+ c === 0x2e21 ||
+ c === 0x2e22 ||
+ c === 0x2e23 ||
+ c === 0x2e24 ||
+ c === 0x2e25 ||
+ c === 0x2e26 ||
+ c === 0x2e27 ||
+ c === 0x2e28 ||
+ c === 0x2e29 ||
+ (c >= 0x2e2a && c <= 0x2e2e) ||
+ c === 0x2e2f ||
+ (c >= 0x2e30 && c <= 0x2e39) ||
+ (c >= 0x2e3a && c <= 0x2e3b) ||
+ (c >= 0x2e3c && c <= 0x2e3f) ||
+ c === 0x2e40 ||
+ c === 0x2e41 ||
+ c === 0x2e42 ||
+ (c >= 0x2e43 && c <= 0x2e4f) ||
+ (c >= 0x2e50 && c <= 0x2e51) ||
+ c === 0x2e52 ||
+ (c >= 0x2e53 && c <= 0x2e7f) ||
+ (c >= 0x3001 && c <= 0x3003) ||
+ c === 0x3008 ||
+ c === 0x3009 ||
+ c === 0x300a ||
+ c === 0x300b ||
+ c === 0x300c ||
+ c === 0x300d ||
+ c === 0x300e ||
+ c === 0x300f ||
+ c === 0x3010 ||
+ c === 0x3011 ||
+ (c >= 0x3012 && c <= 0x3013) ||
+ c === 0x3014 ||
+ c === 0x3015 ||
+ c === 0x3016 ||
+ c === 0x3017 ||
+ c === 0x3018 ||
+ c === 0x3019 ||
+ c === 0x301a ||
+ c === 0x301b ||
+ c === 0x301c ||
+ c === 0x301d ||
+ (c >= 0x301e && c <= 0x301f) ||
+ c === 0x3020 ||
+ c === 0x3030 ||
+ c === 0xfd3e ||
+ c === 0xfd3f ||
+ (c >= 0xfe45 && c <= 0xfe46));
+ }
+
+ function pruneLocation(els) {
+ els.forEach(function (el) {
+ delete el.location;
+ if (isSelectElement(el) || isPluralElement(el)) {
+ for (var k in el.options) {
+ delete el.options[k].location;
+ pruneLocation(el.options[k].value);
+ }
+ }
+ else if (isNumberElement(el) && isNumberSkeleton(el.style)) {
+ delete el.style.location;
+ }
+ else if ((isDateElement(el) || isTimeElement(el)) &&
+ isDateTimeSkeleton(el.style)) {
+ delete el.style.location;
+ }
+ else if (isTagElement(el)) {
+ pruneLocation(el.children);
+ }
+ });
+ }
+ function parse(message, opts) {
+ if (opts === void 0) { opts = {}; }
+ opts = __assign({ shouldParseSkeletons: true, requiresOtherClause: true }, opts);
+ var result = new Parser(message, opts).parse();
+ if (result.err) {
+ var error = SyntaxError(ErrorKind[result.err.kind]);
+ // @ts-expect-error Assign to error object
+ error.location = result.err.location;
+ // @ts-expect-error Assign to error object
+ error.originalMessage = result.err.message;
+ throw error;
+ }
+ if (!(opts === null || opts === void 0 ? void 0 : opts.captureLocation)) {
+ pruneLocation(result.val);
+ }
+ return result.val;
+ }
+
+ //
+ // Main
+ //
+ function memoize(fn, options) {
+ var cache = options && options.cache ? options.cache : cacheDefault;
+ var serializer = options && options.serializer ? options.serializer : serializerDefault;
+ var strategy = options && options.strategy ? options.strategy : strategyDefault;
+ return strategy(fn, {
+ cache: cache,
+ serializer: serializer,
+ });
+ }
+ //
+ // Strategy
+ //
+ function isPrimitive(value) {
+ return (value == null || typeof value === 'number' || typeof value === 'boolean'); // || typeof value === "string" 'unsafe' primitive for our needs
+ }
+ function monadic(fn, cache, serializer, arg) {
+ var cacheKey = isPrimitive(arg) ? arg : serializer(arg);
+ var computedValue = cache.get(cacheKey);
+ if (typeof computedValue === 'undefined') {
+ computedValue = fn.call(this, arg);
+ cache.set(cacheKey, computedValue);
+ }
+ return computedValue;
+ }
+ function variadic(fn, cache, serializer) {
+ var args = Array.prototype.slice.call(arguments, 3);
+ var cacheKey = serializer(args);
+ var computedValue = cache.get(cacheKey);
+ if (typeof computedValue === 'undefined') {
+ computedValue = fn.apply(this, args);
+ cache.set(cacheKey, computedValue);
+ }
+ return computedValue;
+ }
+ function assemble(fn, context, strategy, cache, serialize) {
+ return strategy.bind(context, fn, cache, serialize);
+ }
+ function strategyDefault(fn, options) {
+ var strategy = fn.length === 1 ? monadic : variadic;
+ return assemble(fn, this, strategy, options.cache.create(), options.serializer);
+ }
+ function strategyVariadic(fn, options) {
+ return assemble(fn, this, variadic, options.cache.create(), options.serializer);
+ }
+ function strategyMonadic(fn, options) {
+ return assemble(fn, this, monadic, options.cache.create(), options.serializer);
+ }
+ //
+ // Serializer
+ //
+ var serializerDefault = function () {
+ return JSON.stringify(arguments);
+ };
+ //
+ // Cache
+ //
+ function ObjectWithoutPrototypeCache() {
+ this.cache = Object.create(null);
+ }
+ ObjectWithoutPrototypeCache.prototype.get = function (key) {
+ return this.cache[key];
+ };
+ ObjectWithoutPrototypeCache.prototype.set = function (key, value) {
+ this.cache[key] = value;
+ };
+ var cacheDefault = {
+ create: function create() {
+ // @ts-ignore
+ return new ObjectWithoutPrototypeCache();
+ },
+ };
+ var strategies = {
+ variadic: strategyVariadic,
+ monadic: strategyMonadic,
+ };
+
+ var ErrorCode;
+ (function (ErrorCode) {
+ // When we have a placeholder but no value to format
+ ErrorCode["MISSING_VALUE"] = "MISSING_VALUE";
+ // When value supplied is invalid
+ ErrorCode["INVALID_VALUE"] = "INVALID_VALUE";
+ // When we need specific Intl API but it's not available
+ ErrorCode["MISSING_INTL_API"] = "MISSING_INTL_API";
+ })(ErrorCode || (ErrorCode = {}));
+ var FormatError = /** @class */ (function (_super) {
+ __extends(FormatError, _super);
+ function FormatError(msg, code, originalMessage) {
+ var _this = _super.call(this, msg) || this;
+ _this.code = code;
+ _this.originalMessage = originalMessage;
+ return _this;
+ }
+ FormatError.prototype.toString = function () {
+ return "[formatjs Error: " + this.code + "] " + this.message;
+ };
+ return FormatError;
+ }(Error));
+ var InvalidValueError = /** @class */ (function (_super) {
+ __extends(InvalidValueError, _super);
+ function InvalidValueError(variableId, value, options, originalMessage) {
+ return _super.call(this, "Invalid values for \"" + variableId + "\": \"" + value + "\". Options are \"" + Object.keys(options).join('", "') + "\"", ErrorCode.INVALID_VALUE, originalMessage) || this;
+ }
+ return InvalidValueError;
+ }(FormatError));
+ var InvalidValueTypeError = /** @class */ (function (_super) {
+ __extends(InvalidValueTypeError, _super);
+ function InvalidValueTypeError(value, type, originalMessage) {
+ return _super.call(this, "Value for \"" + value + "\" must be of type " + type, ErrorCode.INVALID_VALUE, originalMessage) || this;
+ }
+ return InvalidValueTypeError;
+ }(FormatError));
+ var MissingValueError = /** @class */ (function (_super) {
+ __extends(MissingValueError, _super);
+ function MissingValueError(variableId, originalMessage) {
+ return _super.call(this, "The intl string context variable \"" + variableId + "\" was not provided to the string \"" + originalMessage + "\"", ErrorCode.MISSING_VALUE, originalMessage) || this;
+ }
+ return MissingValueError;
+ }(FormatError));
+
+ var PART_TYPE;
+ (function (PART_TYPE) {
+ PART_TYPE[PART_TYPE["literal"] = 0] = "literal";
+ PART_TYPE[PART_TYPE["object"] = 1] = "object";
+ })(PART_TYPE || (PART_TYPE = {}));
+ function mergeLiteral(parts) {
+ if (parts.length < 2) {
+ return parts;
+ }
+ return parts.reduce(function (all, part) {
+ var lastPart = all[all.length - 1];
+ if (!lastPart ||
+ lastPart.type !== PART_TYPE.literal ||
+ part.type !== PART_TYPE.literal) {
+ all.push(part);
+ }
+ else {
+ lastPart.value += part.value;
+ }
+ return all;
+ }, []);
+ }
+ function isFormatXMLElementFn(el) {
+ return typeof el === 'function';
+ }
+ // TODO(skeleton): add skeleton support
+ function formatToParts(els, locales, formatters, formats, values, currentPluralValue,
+ // For debugging
+ originalMessage) {
+ // Hot path for straight simple msg translations
+ if (els.length === 1 && isLiteralElement(els[0])) {
+ return [
+ {
+ type: PART_TYPE.literal,
+ value: els[0].value,
+ },
+ ];
+ }
+ var result = [];
+ for (var _i = 0, els_1 = els; _i < els_1.length; _i++) {
+ var el = els_1[_i];
+ // Exit early for string parts.
+ if (isLiteralElement(el)) {
+ result.push({
+ type: PART_TYPE.literal,
+ value: el.value,
+ });
+ continue;
+ }
+ // TODO: should this part be literal type?
+ // Replace `#` in plural rules with the actual numeric value.
+ if (isPoundElement(el)) {
+ if (typeof currentPluralValue === 'number') {
+ result.push({
+ type: PART_TYPE.literal,
+ value: formatters.getNumberFormat(locales).format(currentPluralValue),
+ });
+ }
+ continue;
+ }
+ var varName = el.value;
+ // Enforce that all required values are provided by the caller.
+ if (!(values && varName in values)) {
+ throw new MissingValueError(varName, originalMessage);
+ }
+ var value = values[varName];
+ if (isArgumentElement(el)) {
+ if (!value || typeof value === 'string' || typeof value === 'number') {
+ value =
+ typeof value === 'string' || typeof value === 'number'
+ ? String(value)
+ : '';
+ }
+ result.push({
+ type: typeof value === 'string' ? PART_TYPE.literal : PART_TYPE.object,
+ value: value,
+ });
+ continue;
+ }
+ // Recursively format plural and select parts' option — which can be a
+ // nested pattern structure. The choosing of the option to use is
+ // abstracted-by and delegated-to the part helper object.
+ if (isDateElement(el)) {
+ var style = typeof el.style === 'string'
+ ? formats.date[el.style]
+ : isDateTimeSkeleton(el.style)
+ ? el.style.parsedOptions
+ : undefined;
+ result.push({
+ type: PART_TYPE.literal,
+ value: formatters
+ .getDateTimeFormat(locales, style)
+ .format(value),
+ });
+ continue;
+ }
+ if (isTimeElement(el)) {
+ var style = typeof el.style === 'string'
+ ? formats.time[el.style]
+ : isDateTimeSkeleton(el.style)
+ ? el.style.parsedOptions
+ : undefined;
+ result.push({
+ type: PART_TYPE.literal,
+ value: formatters
+ .getDateTimeFormat(locales, style)
+ .format(value),
+ });
+ continue;
+ }
+ if (isNumberElement(el)) {
+ var style = typeof el.style === 'string'
+ ? formats.number[el.style]
+ : isNumberSkeleton(el.style)
+ ? el.style.parsedOptions
+ : undefined;
+ if (style && style.scale) {
+ value =
+ value *
+ (style.scale || 1);
+ }
+ result.push({
+ type: PART_TYPE.literal,
+ value: formatters
+ .getNumberFormat(locales, style)
+ .format(value),
+ });
+ continue;
+ }
+ if (isTagElement(el)) {
+ var children = el.children, value_1 = el.value;
+ var formatFn = values[value_1];
+ if (!isFormatXMLElementFn(formatFn)) {
+ throw new InvalidValueTypeError(value_1, 'function', originalMessage);
+ }
+ var parts = formatToParts(children, locales, formatters, formats, values, currentPluralValue);
+ var chunks = formatFn(parts.map(function (p) { return p.value; }));
+ if (!Array.isArray(chunks)) {
+ chunks = [chunks];
+ }
+ result.push.apply(result, chunks.map(function (c) {
+ return {
+ type: typeof c === 'string' ? PART_TYPE.literal : PART_TYPE.object,
+ value: c,
+ };
+ }));
+ }
+ if (isSelectElement(el)) {
+ var opt = el.options[value] || el.options.other;
+ if (!opt) {
+ throw new InvalidValueError(el.value, value, Object.keys(el.options), originalMessage);
+ }
+ result.push.apply(result, formatToParts(opt.value, locales, formatters, formats, values));
+ continue;
+ }
+ if (isPluralElement(el)) {
+ var opt = el.options["=" + value];
+ if (!opt) {
+ if (!Intl.PluralRules) {
+ throw new FormatError("Intl.PluralRules is not available in this environment.\nTry polyfilling it using \"@formatjs/intl-pluralrules\"\n", ErrorCode.MISSING_INTL_API, originalMessage);
+ }
+ var rule = formatters
+ .getPluralRules(locales, { type: el.pluralType })
+ .select(value - (el.offset || 0));
+ opt = el.options[rule] || el.options.other;
+ }
+ if (!opt) {
+ throw new InvalidValueError(el.value, value, Object.keys(el.options), originalMessage);
+ }
+ result.push.apply(result, formatToParts(opt.value, locales, formatters, formats, values, value - (el.offset || 0)));
+ continue;
+ }
+ }
+ return mergeLiteral(result);
+ }
+
+ /*
+ Copyright (c) 2014, Yahoo! Inc. All rights reserved.
+ Copyrights licensed under the New BSD License.
+ See the accompanying LICENSE file for terms.
+ */
+ // -- MessageFormat --------------------------------------------------------
+ function mergeConfig(c1, c2) {
+ if (!c2) {
+ return c1;
+ }
+ return __assign(__assign(__assign({}, (c1 || {})), (c2 || {})), Object.keys(c1).reduce(function (all, k) {
+ all[k] = __assign(__assign({}, c1[k]), (c2[k] || {}));
+ return all;
+ }, {}));
+ }
+ function mergeConfigs(defaultConfig, configs) {
+ if (!configs) {
+ return defaultConfig;
+ }
+ return Object.keys(defaultConfig).reduce(function (all, k) {
+ all[k] = mergeConfig(defaultConfig[k], configs[k]);
+ return all;
+ }, __assign({}, defaultConfig));
+ }
+ function createFastMemoizeCache(store) {
+ return {
+ create: function () {
+ return {
+ get: function (key) {
+ return store[key];
+ },
+ set: function (key, value) {
+ store[key] = value;
+ },
+ };
+ },
+ };
+ }
+ function createDefaultFormatters(cache) {
+ if (cache === void 0) { cache = {
+ number: {},
+ dateTime: {},
+ pluralRules: {},
+ }; }
+ return {
+ getNumberFormat: memoize(function () {
+ var _a;
+ var args = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ args[_i] = arguments[_i];
+ }
+ return new ((_a = Intl.NumberFormat).bind.apply(_a, __spreadArray([void 0], args, false)))();
+ }, {
+ cache: createFastMemoizeCache(cache.number),
+ strategy: strategies.variadic,
+ }),
+ getDateTimeFormat: memoize(function () {
+ var _a;
+ var args = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ args[_i] = arguments[_i];
+ }
+ return new ((_a = Intl.DateTimeFormat).bind.apply(_a, __spreadArray([void 0], args, false)))();
+ }, {
+ cache: createFastMemoizeCache(cache.dateTime),
+ strategy: strategies.variadic,
+ }),
+ getPluralRules: memoize(function () {
+ var _a;
+ var args = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ args[_i] = arguments[_i];
+ }
+ return new ((_a = Intl.PluralRules).bind.apply(_a, __spreadArray([void 0], args, false)))();
+ }, {
+ cache: createFastMemoizeCache(cache.pluralRules),
+ strategy: strategies.variadic,
+ }),
+ };
+ }
+ var IntlMessageFormat = /** @class */ (function () {
+ function IntlMessageFormat(message, locales, overrideFormats, opts) {
+ var _this = this;
+ if (locales === void 0) { locales = IntlMessageFormat.defaultLocale; }
+ this.formatterCache = {
+ number: {},
+ dateTime: {},
+ pluralRules: {},
+ };
+ this.format = function (values) {
+ var parts = _this.formatToParts(values);
+ // Hot path for straight simple msg translations
+ if (parts.length === 1) {
+ return parts[0].value;
+ }
+ var result = parts.reduce(function (all, part) {
+ if (!all.length ||
+ part.type !== PART_TYPE.literal ||
+ typeof all[all.length - 1] !== 'string') {
+ all.push(part.value);
+ }
+ else {
+ all[all.length - 1] += part.value;
+ }
+ return all;
+ }, []);
+ if (result.length <= 1) {
+ return result[0] || '';
+ }
+ return result;
+ };
+ this.formatToParts = function (values) {
+ return formatToParts(_this.ast, _this.locales, _this.formatters, _this.formats, values, undefined, _this.message);
+ };
+ this.resolvedOptions = function () { return ({
+ locale: Intl.NumberFormat.supportedLocalesOf(_this.locales)[0],
+ }); };
+ this.getAst = function () { return _this.ast; };
+ if (typeof message === 'string') {
+ this.message = message;
+ if (!IntlMessageFormat.__parse) {
+ throw new TypeError('IntlMessageFormat.__parse must be set to process `message` of type `string`');
+ }
+ // Parse string messages into an AST.
+ this.ast = IntlMessageFormat.__parse(message, {
+ ignoreTag: opts === null || opts === void 0 ? void 0 : opts.ignoreTag,
+ });
+ }
+ else {
+ this.ast = message;
+ }
+ if (!Array.isArray(this.ast)) {
+ throw new TypeError('A message must be provided as a String or AST.');
+ }
+ // Creates a new object with the specified `formats` merged with the default
+ // formats.
+ this.formats = mergeConfigs(IntlMessageFormat.formats, overrideFormats);
+ // Defined first because it's used to build the format pattern.
+ this.locales = locales;
+ this.formatters =
+ (opts && opts.formatters) || createDefaultFormatters(this.formatterCache);
+ }
+ Object.defineProperty(IntlMessageFormat, "defaultLocale", {
+ get: function () {
+ if (!IntlMessageFormat.memoizedDefaultLocale) {
+ IntlMessageFormat.memoizedDefaultLocale =
+ new Intl.NumberFormat().resolvedOptions().locale;
+ }
+ return IntlMessageFormat.memoizedDefaultLocale;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ IntlMessageFormat.memoizedDefaultLocale = null;
+ IntlMessageFormat.__parse = parse;
+ // Default format options used as the prototype of the `formats` provided to the
+ // constructor. These are used when constructing the internal Intl.NumberFormat
+ // and Intl.DateTimeFormat instances.
+ IntlMessageFormat.formats = {
+ number: {
+ integer: {
+ maximumFractionDigits: 0,
+ },
+ currency: {
+ style: 'currency',
+ },
+ percent: {
+ style: 'percent',
+ },
+ },
+ date: {
+ short: {
+ month: 'numeric',
+ day: 'numeric',
+ year: '2-digit',
+ },
+ medium: {
+ month: 'short',
+ day: 'numeric',
+ year: 'numeric',
+ },
+ long: {
+ month: 'long',
+ day: 'numeric',
+ year: 'numeric',
+ },
+ full: {
+ weekday: 'long',
+ month: 'long',
+ day: 'numeric',
+ year: 'numeric',
+ },
+ },
+ time: {
+ short: {
+ hour: 'numeric',
+ minute: 'numeric',
+ },
+ medium: {
+ hour: 'numeric',
+ minute: 'numeric',
+ second: 'numeric',
+ },
+ long: {
+ hour: 'numeric',
+ minute: 'numeric',
+ second: 'numeric',
+ timeZoneName: 'short',
+ },
+ full: {
+ hour: 'numeric',
+ minute: 'numeric',
+ second: 'numeric',
+ timeZoneName: 'short',
+ },
+ },
+ };
+ return IntlMessageFormat;
+ }());
+
+ /*
+ Copyright (c) 2014, Yahoo! Inc. All rights reserved.
+ Copyrights licensed under the New BSD License.
+ See the accompanying LICENSE file for terms.
+ */
+ var o = IntlMessageFormat;
+
+ const r={},i=(e,n,t)=>t?(n in r||(r[n]={}),e in r[n]||(r[n][e]=t),t):t,l=(e,n)=>{if(null==n)return;if(n in r&&e in r[n])return r[n][e];const t=E(n);for(let o=0;o0){const n=t.slice(e,t.length).join(".");if(n in o){o=o[n];break}}o=o[t[e]];}else o=void 0;return o}(function(e){return a[e]||null}(e),n)}function m(e,...n){delete r[e],s.update((o=>(o[e]=cjs.all([o[e]||{},...n]),o)));}const f=derived([s],(([e])=>Object.keys(e)));s.subscribe((e=>a=e));const d={};function g(e){return d[e]}function w(e){return null!=e&&E(e).some((e=>{var n;return null===(n=g(e))||void 0===n?void 0:n.size}))}function h(e,n){return Promise.all(n.map((n=>(function(e,n){d[e].delete(n),0===d[e].size&&delete d[e];}(e,n),n().then((e=>e.default||e)))))).then((n=>m(e,...n)))}const p={};function b(e){if(!w(e))return e in p?p[e]:Promise.resolve();const n=function(e){return E(e).map((e=>{const n=g(e);return [e,n?[...n]:[]]})).filter((([,e])=>e.length>0))}(e);return p[e]=Promise.all(n.map((([e,n])=>h(e,n)))).then((()=>{if(w(e))return b(e);delete p[e];})),p[e]}function y(e,n){g(e)||function(e){d[e]=new Set;}(e);const t=g(e);g(e).has(n)||(u(e)||s.update((n=>(n[e]={},n))),t.add(n));}
+ /*! *****************************************************************************
+ Copyright (c) Microsoft Corporation.
+
+ Permission to use, copy, modify, and/or distribute this software for any
+ purpose with or without fee is hereby granted.
+
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ PERFORMANCE OF THIS SOFTWARE.
+ ***************************************************************************** */function v(e,n){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(t[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);rt.slice(0,n+1).join("-"))).reverse()}function E(e,n=j().fallbackLocale){const t=x(e);return n?[...new Set([...t,...x(n)])]:t}function D(){return null!=L?L:void 0}T.subscribe((e=>{L=null!=e?e:void 0,"undefined"!=typeof window&&null!=e&&document.documentElement.setAttribute("lang",e);}));const M=Object.assign(Object.assign({},T),{set:e=>{if(e&&function(e){if(null==e)return;const n=E(e);for(let e=0;ek.set(!0)),n):k.set(!0),b(e).then((()=>{T.set(e);})).finally((()=>{clearTimeout(t),k.set(!1);}))}return T.set(e)}}),I=()=>"undefined"==typeof window?null:window.navigator.language||window.navigator.languages[0],Z=e=>{const n=Object.create(null);return t=>{const o=JSON.stringify(t);return o in n?n[o]:n[o]=e(t)}},C=(e,n)=>{const{formats:t}=j();if(e in t&&n in t[e])return t[e][n];throw new Error(`[svelte-i18n] Unknown "${n}" ${e} format.`)},G=Z((e=>{var{locale:n,format:t}=e,o=v(e,["locale","format"]);if(null==n)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return t&&(o=C("number",t)),new Intl.NumberFormat(n,o)})),J=Z((e=>{var{locale:n,format:t}=e,o=v(e,["locale","format"]);if(null==n)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return t?o=C("date",t):0===Object.keys(o).length&&(o=C("date","short")),new Intl.DateTimeFormat(n,o)})),U=Z((e=>{var{locale:n,format:t}=e,o=v(e,["locale","format"]);if(null==n)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return t?o=C("time",t):0===Object.keys(o).length&&(o=C("time","short")),new Intl.DateTimeFormat(n,o)})),_=(e={})=>{var{locale:n=D()}=e,t=v(e,["locale"]);return G(Object.assign({locale:n},t))},q=(e={})=>{var{locale:n=D()}=e,t=v(e,["locale"]);return J(Object.assign({locale:n},t))},B=(e={})=>{var{locale:n=D()}=e,t=v(e,["locale"]);return U(Object.assign({locale:n},t))},H=Z(((e,n=D())=>new o(e,n,j().formats,{ignoreTag:j().ignoreTag}))),K=(e,n={})=>{let t=n;"object"==typeof e&&(t=e,e=t.id);const{values:o,locale:r=D(),default:i}=t;if(null==r)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let a=l(e,r);if(a){if("string"!=typeof a)return console.warn(`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof a}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),a}else j().warnOnMissingMessages&&console.warn(`[svelte-i18n] The message "${e}" was not found in "${E(r).join('", "')}".${w(D())?"\n\nNote: there are at least one loader still registered to this locale that wasn't executed.":""}`),a=null!=i?i:e;if(!o)return a;let s=a;try{s=H(a,r).format(o);}catch(n){console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,n.message);}return s},Q=(e,n)=>B(n).format(e),R=(e,n)=>q(n).format(e),V=(e,n)=>_(n).format(e),W=(e,n=D())=>l(e,n),X=derived([M,s],(()=>K));derived([M],(()=>Q));derived([M],(()=>R));derived([M],(()=>V));derived([M,s],(()=>W));
+
+ /* src/components/Footer.svelte generated by Svelte v3.44.0 */
+ const file$h = "src/components/Footer.svelte";
+
+ function get_each_context(ctx, list, i) {
+ const child_ctx = ctx.slice();
+ child_ctx[3] = list[i];
+ return child_ctx;
+ }
+
+ // (10:8)
+ function create_default_slot_5$7(ctx) {
+ let p;
+ let t1;
+ let a;
+ let picture;
+ let source0;
+ let t2;
+ let source1;
+ let t3;
+ let img;
+ let img_src_value;
+
+ const block = {
+ c: function create() {
+ p = element("p");
+ p.textContent = "Bike Data Project is a project managed by Open Knowledge Belgium";
+ t1 = space();
+ a = element("a");
+ picture = element("picture");
+ source0 = element("source");
+ t2 = space();
+ source1 = element("source");
+ t3 = space();
+ img = element("img");
+ attr_dev(p, "class", "svelte-vxfk2x");
+ add_location(p, file$h, 10, 10, 253);
+ attr_dev(source0, "media", "(max-width: 600px)");
+ attr_dev(source0, "srcset", "/img/open-knowledge-belgium-footer.svg 113w");
+ add_location(source0, file$h, 15, 14, 427);
+ attr_dev(source1, "media", "(min-width: 600px)");
+ attr_dev(source1, "srcset", "/img/open-knowledge-belgium-footer.svg 266w");
+ add_location(source1, file$h, 18, 14, 564);
+ attr_dev(img, "class", "Footer_footer__img__4N03j svelte-vxfk2x");
+ if (!src_url_equal(img.src, img_src_value = "/img/open-knowledge-belgium-footer.svg")) attr_dev(img, "src", img_src_value);
+ attr_dev(img, "alt", "Open Knowlegde Belgium");
+ add_location(img, file$h, 21, 14, 701);
+ add_location(picture, file$h, 14, 12, 403);
+ attr_dev(a, "href", "https://be.okfn.org/");
+ attr_dev(a, "class", "svelte-vxfk2x");
+ add_location(a, file$h, 13, 10, 359);
+ },
+ m: function mount(target, anchor) {
+ insert_dev(target, p, anchor);
+ insert_dev(target, t1, anchor);
+ insert_dev(target, a, anchor);
+ append_dev(a, picture);
+ append_dev(picture, source0);
+ append_dev(picture, t2);
+ append_dev(picture, source1);
+ append_dev(picture, t3);
+ append_dev(picture, img);
+ },
+ d: function destroy(detaching) {
+ if (detaching) detach_dev(p);
+ if (detaching) detach_dev(t1);
+ if (detaching) detach_dev(a);
+ }
+ };
+
+ dispatch_dev("SvelteRegisterBlock", {
+ block,
+ id: create_default_slot_5$7.name,
+ type: "slot",
+ source: "(10:8) ",
+ ctx
+ });
+
+ return block;
+ }
+
+ // (46:12) {#each $locales as locale}
+ function create_each_block(ctx) {
+ let option;
+ let t_value = /*locale*/ ctx[3] + "";
+ let t;
+ let option_value_value;
+
+ const block = {
+ c: function create() {
+ option = element("option");
+ t = text(t_value);
+ option.__value = option_value_value = /*locale*/ ctx[3];
+ option.value = option.__value;
+ add_location(option, file$h, 46, 14, 1634);
+ },
+ m: function mount(target, anchor) {
+ insert_dev(target, option, anchor);
+ append_dev(option, t);
+ },
+ p: function update(ctx, dirty) {
+ if (dirty & /*$locales*/ 2 && t_value !== (t_value = /*locale*/ ctx[3] + "")) set_data_dev(t, t_value);
+
+ if (dirty & /*$locales*/ 2 && option_value_value !== (option_value_value = /*locale*/ ctx[3])) {
+ prop_dev(option, "__value", option_value_value);
+ option.value = option.__value;
+ }
+ },
+ d: function destroy(detaching) {
+ if (detaching) detach_dev(option);
+ }
+ };
+
+ dispatch_dev("SvelteRegisterBlock", {
+ block,
+ id: create_each_block.name,
+ type: "each",
+ source: "(46:12) {#each $locales as locale}",
+ ctx
+ });
+
+ return block;
+ }
+
+ // (29:8)
+ function create_default_slot_4$8(ctx) {
+ let h3;
+ let t1;
+ let ul;
+ let li0;
+ let a0;
+ let t3;
+ let li1;
+ let a1;
+ let t5;
+ let li2;
+ let a2;
+ let t7;
+ let select;
+ let mounted;
+ let dispose;
+ let each_value = /*$locales*/ ctx[1];
+ validate_each_argument(each_value);
+ let each_blocks = [];
+
+ for (let i = 0; i < each_value.length; i += 1) {
+ each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i));
+ }
+
+ const block = {
+ c: function create() {
+ h3 = element("h3");
+ h3.textContent = "Information";
+ t1 = space();
+ ul = element("ul");
+ li0 = element("li");
+ a0 = element("a");
+ a0.textContent = "The Data";
+ t3 = space();
+ li1 = element("li");
+ a1 = element("a");
+ a1.textContent = "About";
+ t5 = space();
+ li2 = element("li");
+ a2 = element("a");
+ a2.textContent = "FAQ";
+ t7 = space();
+ select = element("select");
+
+ for (let i = 0; i < each_blocks.length; i += 1) {
+ each_blocks[i].c();
+ }
+
+ attr_dev(h3, "class", "text-uppercase");
+ add_location(h3, file$h, 29, 10, 981);
+ attr_dev(a0, "target", "_blank");
+ attr_dev(a0, "rel", "noopener noreferrer");
+ attr_dev(a0, "href", "/datamap");
+ attr_dev(a0, "class", "svelte-vxfk2x");
+ add_location(a0, file$h, 33, 14, 1139);
+ attr_dev(li0, "class", "mb-3");
+ add_location(li0, file$h, 32, 12, 1107);
+ attr_dev(a1, "target", "_blank");
+ attr_dev(a1, "rel", "noopener noreferrer");
+ attr_dev(a1, "href", "/about");
+ attr_dev(a1, "class", "svelte-vxfk2x");
+ add_location(a1, file$h, 37, 14, 1292);
+ attr_dev(li1, "class", "mb-3");
+ add_location(li1, file$h, 36, 12, 1260);
+ attr_dev(a2, "target", "_blank");
+ attr_dev(a2, "rel", "noopener noreferrer");
+ attr_dev(a2, "href", "/faq");
+ attr_dev(a2, "class", "svelte-vxfk2x");
+ add_location(a2, file$h, 41, 14, 1440);
+ attr_dev(li2, "class", "mb-3");
+ add_location(li2, file$h, 40, 12, 1408);
+ attr_dev(ul, "class", "list-unstyled text-muted mb-6 mb-md-8 mb-lg-0");
+ add_location(ul, file$h, 31, 10, 1036);
+ if (/*$locale*/ ctx[0] === void 0) add_render_callback(() => /*select_change_handler*/ ctx[2].call(select));
+ add_location(select, file$h, 44, 10, 1549);
+ },
+ m: function mount(target, anchor) {
+ insert_dev(target, h3, anchor);
+ insert_dev(target, t1, anchor);
+ insert_dev(target, ul, anchor);
+ append_dev(ul, li0);
+ append_dev(li0, a0);
+ append_dev(ul, t3);
+ append_dev(ul, li1);
+ append_dev(li1, a1);
+ append_dev(ul, t5);
+ append_dev(ul, li2);
+ append_dev(li2, a2);
+ insert_dev(target, t7, anchor);
+ insert_dev(target, select, anchor);
+
+ for (let i = 0; i < each_blocks.length; i += 1) {
+ each_blocks[i].m(select, null);
+ }
+
+ select_option(select, /*$locale*/ ctx[0]);
+
+ if (!mounted) {
+ dispose = listen_dev(select, "change", /*select_change_handler*/ ctx[2]);
+ mounted = true;
+ }
+ },
+ p: function update(ctx, dirty) {
+ if (dirty & /*$locales*/ 2) {
+ each_value = /*$locales*/ ctx[1];
+ validate_each_argument(each_value);
+ let i;
+
+ for (i = 0; i < each_value.length; i += 1) {
+ const child_ctx = get_each_context(ctx, each_value, i);
+
+ if (each_blocks[i]) {
+ each_blocks[i].p(child_ctx, dirty);
+ } else {
+ each_blocks[i] = create_each_block(child_ctx);
+ each_blocks[i].c();
+ each_blocks[i].m(select, null);
+ }
+ }
+
+ for (; i < each_blocks.length; i += 1) {
+ each_blocks[i].d(1);
+ }
+
+ each_blocks.length = each_value.length;
+ }
+
+ if (dirty & /*$locale, $locales*/ 3) {
+ select_option(select, /*$locale*/ ctx[0]);
+ }
+ },
+ d: function destroy(detaching) {
+ if (detaching) detach_dev(h3);
+ if (detaching) detach_dev(t1);
+ if (detaching) detach_dev(ul);
+ if (detaching) detach_dev(t7);
+ if (detaching) detach_dev(select);
+ destroy_each(each_blocks, detaching);
+ mounted = false;
+ dispose();
+ }
+ };
+
+ dispatch_dev("SvelteRegisterBlock", {
+ block,
+ id: create_default_slot_4$8.name,
+ type: "slot",
+ source: "(29:8) ",
+ ctx
+ });
+
+ return block;
+ }
+
+ // (51:8)
+ function create_default_slot_3$9(ctx) {
+ let h3;
+ let t1;
+ let p0;
+ let t3;
+ let p1;
+ let t5;
+ let p2;
+ let t7;
+ let a0;
+ let t9;
+ let div;
+ let a1;
+ let svg0;
+ let path0;
+ let a2;
+ let svg1;
+ let path1;
+ let a3;
+ let svg2;
+ let path2;
+ let a4;
+ let svg3;
+ let path3;
+
+ const block = {
+ c: function create() {
+ h3 = element("h3");
h3.textContent = "Contact";
t1 = space();
p0 = element("p");
@@ -13727,78 +16441,78 @@ var app = (function () {
svg3 = svg_element("svg");
path3 = svg_element("path");
attr_dev(h3, "class", "text-uppercase");
- add_location(h3, file$h, 61, 10, 2209);
+ add_location(h3, file$h, 51, 10, 1795);
attr_dev(p0, "class", "Footer_footer__contactBold__3W-zb svelte-vxfk2x");
- add_location(p0, file$h, 62, 10, 2259);
+ add_location(p0, file$h, 52, 10, 1845);
attr_dev(p1, "class", "svelte-vxfk2x");
- add_location(p1, file$h, 65, 10, 2365);
+ add_location(p1, file$h, 55, 10, 1951);
attr_dev(p2, "class", "svelte-vxfk2x");
- add_location(p2, file$h, 66, 10, 2397);
+ add_location(p2, file$h, 56, 10, 1983);
attr_dev(a0, "href", "mailto:bikedataproject@openknowledge.be");
attr_dev(a0, "target", "_blank");
attr_dev(a0, "rel", "noopener noreferrer");
attr_dev(a0, "class", "svelte-vxfk2x");
- add_location(a0, file$h, 67, 10, 2428);
+ add_location(a0, file$h, 57, 10, 2014);
attr_dev(path0, "d", "M16.5 0C7.38869 0 0 7.38869 0 16.5C0 25.6113 7.38869 33 16.5 33C25.6113 33 33 25.6113 33 16.5C33 7.38869 25.6113 0 16.5 0ZM24.0337 12.8649C24.041 13.0273 24.0445 13.1905 24.0445 13.3544C24.0445 18.3588 20.2353 24.1296 13.269 24.1299H13.2693H13.269C11.1302 24.1299 9.14001 23.503 7.46397 22.4287C7.76031 22.4637 8.06193 22.481 8.36732 22.481C10.1418 22.481 11.7748 21.8758 13.0711 20.8599C11.4132 20.8292 10.0154 19.7342 9.53302 18.2294C9.76389 18.2737 10.0013 18.2979 10.2448 18.2979C10.5905 18.2979 10.9253 18.2513 11.2435 18.1645C9.51061 17.8175 8.20518 16.286 8.20518 14.4521C8.20518 14.435 8.20518 14.4196 8.20569 14.4038C8.71603 14.6875 9.29963 14.8582 9.921 14.8773C8.9041 14.1988 8.23565 13.0389 8.23565 11.7249C8.23565 11.0311 8.42322 10.381 8.7485 9.8213C10.6161 12.1129 13.4073 13.62 16.5549 13.7784C16.4899 13.5009 16.4564 13.2119 16.4564 12.9148C16.4564 10.8241 18.1526 9.12792 20.2441 9.12792C21.3335 9.12792 22.3174 9.58841 23.0085 10.3246C23.8713 10.1544 24.6815 9.83917 25.4134 9.40537C25.1302 10.2893 24.53 11.0311 23.748 11.5001C24.5141 11.4085 25.2442 11.2053 25.9227 10.9037C25.4159 11.6632 24.7732 12.3304 24.0337 12.8649V12.8649Z");
attr_dev(path0, "fill", "white");
- add_location(path0, file$h, 82, 17, 2979);
+ add_location(path0, file$h, 72, 17, 2565);
attr_dev(svg0, "width", "33");
attr_dev(svg0, "height", "33");
attr_dev(svg0, "viewBox", "0 0 33 33");
attr_dev(svg0, "fill", "none");
attr_dev(svg0, "xmlns", "http://www.w3.org/2000/svg");
- add_location(svg0, file$h, 76, 15, 2787);
+ add_location(svg0, file$h, 66, 15, 2373);
attr_dev(a1, "href", "https://twitter.com/bikedataproject");
attr_dev(a1, "target", "_blank");
attr_dev(a1, "rel", "noopener noreferrer");
attr_dev(a1, "class", "svelte-vxfk2x");
- add_location(a1, file$h, 72, 12, 2642);
+ add_location(a1, file$h, 62, 12, 2228);
attr_dev(path1, "d", "M33 16.5C33 7.38633 25.6137 0 16.5 0C7.38633 0 0 7.38633 0 16.5C0 25.6137 7.38633 33 16.5 33C16.5967 33 16.6934 33 16.79 32.9936V20.1545H13.2451V16.023H16.79V12.9809C16.79 9.45527 18.9428 7.53457 22.0881 7.53457C23.5963 7.53457 24.8918 7.64414 25.2656 7.6957V11.3824H23.1C21.392 11.3824 21.0568 12.1945 21.0568 13.3869V16.0166H25.1496L24.6146 20.148H21.0568V32.3619C27.9533 30.3832 33 24.0346 33 16.5V16.5Z");
attr_dev(path1, "fill", "white");
- add_location(path1, file$h, 97, 17, 4594);
+ add_location(path1, file$h, 87, 17, 4180);
attr_dev(svg1, "width", "33");
attr_dev(svg1, "height", "33");
attr_dev(svg1, "viewBox", "0 0 33 33");
attr_dev(svg1, "fill", "none");
attr_dev(svg1, "xmlns", "http://www.w3.org/2000/svg");
- add_location(svg1, file$h, 91, 15, 4402);
+ add_location(svg1, file$h, 81, 15, 3988);
attr_dev(a2, "href", "https://www.facebook.com/BikeDataProject");
attr_dev(a2, "target", "_blank");
attr_dev(a2, "rel", "noopener noreferrer");
attr_dev(a2, "class", "svelte-vxfk2x");
- add_location(a2, file$h, 87, 13, 4252);
+ add_location(a2, file$h, 77, 13, 3838);
attr_dev(path2, "fill-rule", "evenodd");
attr_dev(path2, "clip-rule", "evenodd");
attr_dev(path2, "d", "M33 16.5C33 25.6127 25.6127 33 16.5 33C7.3873 33 0 25.6127 0 16.5C0 7.3873 7.3873 0 16.5 0C25.6127 0 33 7.3873 33 16.5ZM13.8419 6.53378C12.7402 6.5346 11.8485 7.42691 11.8493 8.52645C11.8485 9.62599 12.741 10.5183 13.8427 10.5191H15.8361V8.52726C15.8369 7.42772 14.9445 6.53541 13.8419 6.53378ZM13.8419 11.8486H8.52782C7.42608 11.8494 6.53361 12.7418 6.53443 13.8413C6.5328 14.9408 7.42526 15.8331 8.52701 15.8348H13.8419C14.9437 15.834 15.8361 14.9417 15.8353 13.8421C15.8361 12.7418 14.9437 11.8494 13.8419 11.8486ZM24.4717 11.8486C25.5734 11.8494 26.4659 12.7418 26.4651 13.8413C26.4659 14.9417 25.5734 15.834 24.4717 15.8348H22.4783V13.8413C22.4775 12.7418 23.3699 11.8494 24.4717 11.8486ZM21.1502 8.52645V13.8413C21.151 14.9417 20.2585 15.834 19.1568 15.8348C18.055 15.8331 17.1626 14.9408 17.1642 13.8413V8.52645C17.1634 7.42691 18.0558 6.5346 19.1576 6.53378C20.2593 6.53541 21.151 7.42772 21.1502 8.52645ZM19.1568 26.4628C20.2586 26.4619 21.1511 25.5696 21.1502 24.4701C21.1511 23.3706 20.2586 22.4782 19.1568 22.4774H17.1635V24.4701C17.1626 25.5688 18.0551 26.4611 19.1568 26.4628ZM19.1568 21.1471H24.4718C25.5735 21.1463 26.466 20.254 26.4652 19.1544C26.4668 18.0549 25.5743 17.1626 24.4726 17.1609H19.1577C18.0559 17.1618 17.1635 18.0541 17.1643 19.1536C17.1635 20.254 18.0551 21.1463 19.1568 21.1471ZM8.52782 21.1501C7.42608 21.1493 6.53361 20.257 6.53442 19.1574C6.53361 18.0579 7.42608 17.1656 8.52782 17.1648H10.5212V19.1574C10.522 20.257 9.62956 21.1493 8.52782 21.1501ZM11.8493 24.4723V19.1574C11.8485 18.0579 12.7402 17.1656 13.8427 17.1656C14.9445 17.1672 15.8369 18.0595 15.8353 19.1591V24.4731C15.8361 25.5726 14.9437 26.4649 13.8419 26.4658C12.7402 26.4641 11.8477 25.5718 11.8493 24.4723Z");
attr_dev(path2, "fill", "white");
- add_location(path2, file$h, 112, 17, 5513);
+ add_location(path2, file$h, 102, 17, 5099);
attr_dev(svg2, "width", "33");
attr_dev(svg2, "height", "33");
attr_dev(svg2, "viewBox", "0 0 33 33");
attr_dev(svg2, "fill", "none");
attr_dev(svg2, "xmlns", "http://www.w3.org/2000/svg");
- add_location(svg2, file$h, 106, 15, 5321);
+ add_location(svg2, file$h, 96, 15, 4907);
attr_dev(a3, "href", "https://join.slack.com/t/bikedataproject/shared_invite/zt-g60t5w5c-lT2ucV0HtLEVnE4_wG9hTg");
attr_dev(a3, "target", "_blank");
attr_dev(a3, "rel", "noopener noreferrer");
attr_dev(a3, "class", "svelte-vxfk2x");
- add_location(a3, file$h, 102, 13, 5122);
+ add_location(a3, file$h, 92, 13, 4708);
attr_dev(path3, "d", "M16 0C7.15983 0 0 7.26871 0 16.2433C0 23.877 5.15949 30.2125 12.1205 31.9986C12.0402 31.7954 12.0007 31.5106 12.0007 31.2272V28.4652H10.0003C8.92051 28.4652 7.91966 27.9786 7.47983 27.0842C6.95966 26.1096 6.87932 24.6069 5.55983 23.6724C5.15949 23.3475 5.47949 23.0226 5.91932 23.0627C6.75949 23.306 7.43898 23.8756 8.07898 24.7271C8.71898 25.5801 8.99949 25.7833 10.1991 25.7833C10.7588 25.7833 11.6385 25.7432 12.4391 25.6202C12.879 24.4825 13.6388 23.4678 14.5593 22.9812C9.19966 22.3314 6.63966 19.6509 6.63966 15.9959C6.63966 14.4116 7.31915 12.9089 8.43983 11.6095C8.08034 10.3501 7.59966 7.75117 8.60051 6.73648C11.0012 6.73648 12.4405 8.32072 12.8 8.72576C13.9997 8.31934 15.3205 8.07603 16.6795 8.07603C18.0793 8.07603 19.3593 8.31934 20.559 8.72576C20.9185 8.31934 22.3591 6.73648 24.7585 6.73648C25.7185 7.71108 25.2786 10.3501 24.8783 11.6095C25.999 12.8688 26.639 14.4116 26.639 15.9959C26.639 19.6509 24.1185 22.3314 18.7997 22.8996C20.2798 23.671 21.3202 25.8635 21.3202 27.4878V31.1871C21.3202 31.3088 21.2807 31.4304 21.2807 31.5521C27.52 29.3596 32 23.3503 32 16.2433C32 7.26871 24.8402 0 16 0Z");
attr_dev(path3, "fill", "white");
- add_location(path3, file$h, 129, 17, 7758);
+ add_location(path3, file$h, 119, 17, 7344);
attr_dev(svg3, "width", "32");
attr_dev(svg3, "height", "32");
attr_dev(svg3, "viewBox", "0 0 32 32");
attr_dev(svg3, "fill", "none");
attr_dev(svg3, "xmlns", "http://www.w3.org/2000/svg");
- add_location(svg3, file$h, 123, 15, 7566);
+ add_location(svg3, file$h, 113, 15, 7152);
attr_dev(a4, "href", "https://github.com/bikedataproject");
attr_dev(a4, "target", "_blank");
attr_dev(a4, "rel", "noopener noreferrer");
attr_dev(a4, "class", "svelte-vxfk2x");
- add_location(a4, file$h, 119, 13, 7422);
+ add_location(a4, file$h, 109, 13, 7008);
attr_dev(div, "class", "socials mt-4 svelte-vxfk2x");
- add_location(div, file$h, 71, 10, 2603);
+ add_location(div, file$h, 61, 10, 2189);
},
m: function mount(target, anchor) {
insert_dev(target, h3, anchor);
@@ -13844,14 +16558,14 @@ var app = (function () {
block,
id: create_default_slot_3$9.name,
type: "slot",
- source: "(61:8) ",
+ source: "(51:8) ",
ctx
});
return block;
}
- // (8:6)
+ // (9:6)
function create_default_slot_2$e(ctx) {
let col0;
let t0;
@@ -13915,21 +16629,21 @@ var app = (function () {
p: function update(ctx, dirty) {
const col0_changes = {};
- if (dirty & /*$$scope*/ 1) {
+ if (dirty & /*$$scope*/ 64) {
col0_changes.$$scope = { dirty, ctx };
}
col0.$set(col0_changes);
const col1_changes = {};
- if (dirty & /*$$scope*/ 1) {
+ if (dirty & /*$$scope, $locale, $locales*/ 67) {
col1_changes.$$scope = { dirty, ctx };
}
col1.$set(col1_changes);
const col2_changes = {};
- if (dirty & /*$$scope*/ 1) {
+ if (dirty & /*$$scope*/ 64) {
col2_changes.$$scope = { dirty, ctx };
}
@@ -13961,14 +16675,14 @@ var app = (function () {
block,
id: create_default_slot_2$e.name,
type: "slot",
- source: "(8:6) ",
+ source: "(9:6) ",
ctx
});
return block;
}
- // (7:4)
+ // (8:4)
function create_default_slot_1$e(ctx) {
let row;
let current;
@@ -13992,7 +16706,7 @@ var app = (function () {
p: function update(ctx, dirty) {
const row_changes = {};
- if (dirty & /*$$scope*/ 1) {
+ if (dirty & /*$$scope, $locale, $locales*/ 67) {
row_changes.$$scope = { dirty, ctx };
}
@@ -14016,14 +16730,14 @@ var app = (function () {
block,
id: create_default_slot_1$e.name,
type: "slot",
- source: "(7:4) ",
+ source: "(8:4) ",
ctx
});
return block;
}
- // (141:4)
+ // (131:4)
function create_default_slot$g(ctx) {
let p;
let t0;
@@ -14039,9 +16753,9 @@ var app = (function () {
t2 = text(".");
attr_dev(a, "href", "https://creativecommons.org/licenses/by/4.0");
attr_dev(a, "class", "svelte-vxfk2x");
- add_location(a, file$h, 143, 8, 9196);
+ add_location(a, file$h, 133, 8, 8782);
attr_dev(p, "class", "svelte-vxfk2x");
- add_location(p, file$h, 141, 6, 9105);
+ add_location(p, file$h, 131, 6, 8691);
},
m: function mount(target, anchor) {
insert_dev(target, p, anchor);
@@ -14058,7 +16772,7 @@ var app = (function () {
block,
id: create_default_slot$g.name,
type: "slot",
- source: "(141:4) ",
+ source: "(131:4) ",
ctx
});
@@ -14100,11 +16814,11 @@ var app = (function () {
div1 = element("div");
create_component(row.$$.fragment);
attr_dev(div0, "class", "pb-5");
- add_location(div0, file$h, 5, 2, 95);
+ add_location(div0, file$h, 6, 2, 142);
attr_dev(div1, "class", "subfooter svelte-vxfk2x");
- add_location(div1, file$h, 139, 2, 9053);
+ add_location(div1, file$h, 129, 2, 8639);
attr_dev(footer, "class", "pt-5");
- add_location(footer, file$h, 4, 0, 71);
+ add_location(footer, file$h, 5, 0, 118);
},
l: function claim(nodes) {
throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
@@ -14121,14 +16835,14 @@ var app = (function () {
p: function update(ctx, [dirty]) {
const container_changes = {};
- if (dirty & /*$$scope*/ 1) {
+ if (dirty & /*$$scope, $locale, $locales*/ 67) {
container_changes.$$scope = { dirty, ctx };
}
container.$set(container_changes);
const row_changes = {};
- if (dirty & /*$$scope*/ 1) {
+ if (dirty & /*$$scope*/ 64) {
row_changes.$$scope = { dirty, ctx };
}
@@ -14164,6 +16878,12 @@ var app = (function () {
}
function instance$j($$self, $$props, $$invalidate) {
+ let $locale;
+ let $locales;
+ validate_store(M, 'locale');
+ component_subscribe($$self, M, $$value => $$invalidate(0, $locale = $$value));
+ validate_store(f, 'locales');
+ component_subscribe($$self, f, $$value => $$invalidate(1, $locales = $$value));
let { $$slots: slots = {}, $$scope } = $$props;
validate_slots('Footer', slots, []);
const writable_props = [];
@@ -14172,8 +16892,22 @@ var app = (function () {
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`