@everymatrix/casino-categories-providers 1.15.6 → 1.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
function schedule_update() {
|
|
135
135
|
if (!update_scheduled) {
|
|
136
136
|
update_scheduled = true;
|
|
137
|
-
resolved_promise.then(flush);
|
|
137
|
+
resolved_promise.then(flush$1);
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
function add_render_callback(fn) {
|
|
@@ -160,7 +160,7 @@
|
|
|
160
160
|
// function, guarantees this behavior.
|
|
161
161
|
const seen_callbacks = new Set();
|
|
162
162
|
let flushidx = 0; // Do *not* move this inside the flush() function
|
|
163
|
-
function flush() {
|
|
163
|
+
function flush$1() {
|
|
164
164
|
// Do not reenter flush while dirty components are updated, as this can
|
|
165
165
|
// result in an infinite loop. Instead, let the inner flush handle it.
|
|
166
166
|
// Reentrancy is ok afterwards for bindings etc.
|
|
@@ -337,7 +337,7 @@
|
|
|
337
337
|
if (options.intro)
|
|
338
338
|
transition_in(component.$$.fragment);
|
|
339
339
|
mount_component(component, options.target, options.anchor, options.customElement);
|
|
340
|
-
flush();
|
|
340
|
+
flush$1();
|
|
341
341
|
}
|
|
342
342
|
set_current_component(parent_component);
|
|
343
343
|
}
|
|
@@ -4570,21 +4570,451 @@
|
|
|
4570
4570
|
return IntlMessageFormat;
|
|
4571
4571
|
}());
|
|
4572
4572
|
|
|
4573
|
-
|
|
4574
|
-
|
|
4575
|
-
|
|
4576
|
-
|
|
4577
|
-
|
|
4578
|
-
|
|
4573
|
+
function delve(obj, fullKey) {
|
|
4574
|
+
if (fullKey == null)
|
|
4575
|
+
return void 0;
|
|
4576
|
+
if (fullKey in obj) {
|
|
4577
|
+
return obj[fullKey];
|
|
4578
|
+
}
|
|
4579
|
+
const keys = fullKey.split(".");
|
|
4580
|
+
let result = obj;
|
|
4581
|
+
for (let p = 0; p < keys.length; p++) {
|
|
4582
|
+
if (typeof result === "object") {
|
|
4583
|
+
if (p > 0) {
|
|
4584
|
+
const partialKey = keys.slice(p, keys.length).join(".");
|
|
4585
|
+
if (partialKey in result) {
|
|
4586
|
+
result = result[partialKey];
|
|
4587
|
+
break;
|
|
4588
|
+
}
|
|
4589
|
+
}
|
|
4590
|
+
result = result[keys[p]];
|
|
4591
|
+
} else {
|
|
4592
|
+
result = void 0;
|
|
4593
|
+
}
|
|
4594
|
+
}
|
|
4595
|
+
return result;
|
|
4596
|
+
}
|
|
4597
|
+
|
|
4598
|
+
const lookupCache = {};
|
|
4599
|
+
const addToCache = (path, locale, message) => {
|
|
4600
|
+
if (!message)
|
|
4601
|
+
return message;
|
|
4602
|
+
if (!(locale in lookupCache))
|
|
4603
|
+
lookupCache[locale] = {};
|
|
4604
|
+
if (!(path in lookupCache[locale]))
|
|
4605
|
+
lookupCache[locale][path] = message;
|
|
4606
|
+
return message;
|
|
4607
|
+
};
|
|
4608
|
+
const lookup = (path, refLocale) => {
|
|
4609
|
+
if (refLocale == null)
|
|
4610
|
+
return void 0;
|
|
4611
|
+
if (refLocale in lookupCache && path in lookupCache[refLocale]) {
|
|
4612
|
+
return lookupCache[refLocale][path];
|
|
4613
|
+
}
|
|
4614
|
+
const locales = getPossibleLocales(refLocale);
|
|
4615
|
+
for (let i = 0; i < locales.length; i++) {
|
|
4616
|
+
const locale = locales[i];
|
|
4617
|
+
const message = getMessageFromDictionary(locale, path);
|
|
4618
|
+
if (message) {
|
|
4619
|
+
return addToCache(path, refLocale, message);
|
|
4620
|
+
}
|
|
4621
|
+
}
|
|
4622
|
+
return void 0;
|
|
4623
|
+
};
|
|
4624
|
+
|
|
4625
|
+
let dictionary;
|
|
4626
|
+
const $dictionary = writable({});
|
|
4627
|
+
function getLocaleDictionary(locale) {
|
|
4628
|
+
return dictionary[locale] || null;
|
|
4629
|
+
}
|
|
4630
|
+
function hasLocaleDictionary(locale) {
|
|
4631
|
+
return locale in dictionary;
|
|
4632
|
+
}
|
|
4633
|
+
function getMessageFromDictionary(locale, id) {
|
|
4634
|
+
if (!hasLocaleDictionary(locale)) {
|
|
4635
|
+
return null;
|
|
4636
|
+
}
|
|
4637
|
+
const localeDictionary = getLocaleDictionary(locale);
|
|
4638
|
+
const match = delve(localeDictionary, id);
|
|
4639
|
+
return match;
|
|
4640
|
+
}
|
|
4641
|
+
function getClosestAvailableLocale(refLocale) {
|
|
4642
|
+
if (refLocale == null)
|
|
4643
|
+
return void 0;
|
|
4644
|
+
const relatedLocales = getPossibleLocales(refLocale);
|
|
4645
|
+
for (let i = 0; i < relatedLocales.length; i++) {
|
|
4646
|
+
const locale = relatedLocales[i];
|
|
4647
|
+
if (hasLocaleDictionary(locale)) {
|
|
4648
|
+
return locale;
|
|
4649
|
+
}
|
|
4650
|
+
}
|
|
4651
|
+
return void 0;
|
|
4652
|
+
}
|
|
4653
|
+
function addMessages(locale, ...partials) {
|
|
4654
|
+
delete lookupCache[locale];
|
|
4655
|
+
$dictionary.update((d) => {
|
|
4656
|
+
d[locale] = cjs.all([d[locale] || {}, ...partials]);
|
|
4657
|
+
return d;
|
|
4658
|
+
});
|
|
4659
|
+
}
|
|
4660
|
+
derived(
|
|
4661
|
+
[$dictionary],
|
|
4662
|
+
([dictionary2]) => Object.keys(dictionary2)
|
|
4663
|
+
);
|
|
4664
|
+
$dictionary.subscribe((newDictionary) => dictionary = newDictionary);
|
|
4665
|
+
|
|
4666
|
+
const queue = {};
|
|
4667
|
+
function removeLoaderFromQueue(locale, loader) {
|
|
4668
|
+
queue[locale].delete(loader);
|
|
4669
|
+
if (queue[locale].size === 0) {
|
|
4670
|
+
delete queue[locale];
|
|
4671
|
+
}
|
|
4672
|
+
}
|
|
4673
|
+
function getLocaleQueue(locale) {
|
|
4674
|
+
return queue[locale];
|
|
4675
|
+
}
|
|
4676
|
+
function getLocalesQueues(locale) {
|
|
4677
|
+
return getPossibleLocales(locale).map((localeItem) => {
|
|
4678
|
+
const localeQueue = getLocaleQueue(localeItem);
|
|
4679
|
+
return [localeItem, localeQueue ? [...localeQueue] : []];
|
|
4680
|
+
}).filter(([, localeQueue]) => localeQueue.length > 0);
|
|
4681
|
+
}
|
|
4682
|
+
function hasLocaleQueue(locale) {
|
|
4683
|
+
if (locale == null)
|
|
4684
|
+
return false;
|
|
4685
|
+
return getPossibleLocales(locale).some(
|
|
4686
|
+
(localeQueue) => {
|
|
4687
|
+
var _a;
|
|
4688
|
+
return (_a = getLocaleQueue(localeQueue)) == null ? void 0 : _a.size;
|
|
4689
|
+
}
|
|
4690
|
+
);
|
|
4691
|
+
}
|
|
4692
|
+
function loadLocaleQueue(locale, localeQueue) {
|
|
4693
|
+
const allLoadersPromise = Promise.all(
|
|
4694
|
+
localeQueue.map((loader) => {
|
|
4695
|
+
removeLoaderFromQueue(locale, loader);
|
|
4696
|
+
return loader().then((partial) => partial.default || partial);
|
|
4697
|
+
})
|
|
4698
|
+
);
|
|
4699
|
+
return allLoadersPromise.then((partials) => addMessages(locale, ...partials));
|
|
4700
|
+
}
|
|
4701
|
+
const activeFlushes = {};
|
|
4702
|
+
function flush(locale) {
|
|
4703
|
+
if (!hasLocaleQueue(locale)) {
|
|
4704
|
+
if (locale in activeFlushes) {
|
|
4705
|
+
return activeFlushes[locale];
|
|
4706
|
+
}
|
|
4707
|
+
return Promise.resolve();
|
|
4708
|
+
}
|
|
4709
|
+
const queues = getLocalesQueues(locale);
|
|
4710
|
+
activeFlushes[locale] = Promise.all(
|
|
4711
|
+
queues.map(
|
|
4712
|
+
([localeName, localeQueue]) => loadLocaleQueue(localeName, localeQueue)
|
|
4713
|
+
)
|
|
4714
|
+
).then(() => {
|
|
4715
|
+
if (hasLocaleQueue(locale)) {
|
|
4716
|
+
return flush(locale);
|
|
4717
|
+
}
|
|
4718
|
+
delete activeFlushes[locale];
|
|
4719
|
+
});
|
|
4720
|
+
return activeFlushes[locale];
|
|
4721
|
+
}
|
|
4722
|
+
const defaultFormats = {
|
|
4723
|
+
number: {
|
|
4724
|
+
scientific: { notation: "scientific" },
|
|
4725
|
+
engineering: { notation: "engineering" },
|
|
4726
|
+
compactLong: { notation: "compact", compactDisplay: "long" },
|
|
4727
|
+
compactShort: { notation: "compact", compactDisplay: "short" }
|
|
4728
|
+
},
|
|
4729
|
+
date: {
|
|
4730
|
+
short: { month: "numeric", day: "numeric", year: "2-digit" },
|
|
4731
|
+
medium: { month: "short", day: "numeric", year: "numeric" },
|
|
4732
|
+
long: { month: "long", day: "numeric", year: "numeric" },
|
|
4733
|
+
full: { weekday: "long", month: "long", day: "numeric", year: "numeric" }
|
|
4734
|
+
},
|
|
4735
|
+
time: {
|
|
4736
|
+
short: { hour: "numeric", minute: "numeric" },
|
|
4737
|
+
medium: { hour: "numeric", minute: "numeric", second: "numeric" },
|
|
4738
|
+
long: {
|
|
4739
|
+
hour: "numeric",
|
|
4740
|
+
minute: "numeric",
|
|
4741
|
+
second: "numeric",
|
|
4742
|
+
timeZoneName: "short"
|
|
4743
|
+
},
|
|
4744
|
+
full: {
|
|
4745
|
+
hour: "numeric",
|
|
4746
|
+
minute: "numeric",
|
|
4747
|
+
second: "numeric",
|
|
4748
|
+
timeZoneName: "short"
|
|
4749
|
+
}
|
|
4750
|
+
}
|
|
4751
|
+
};
|
|
4752
|
+
const defaultOptions = {
|
|
4753
|
+
fallbackLocale: null,
|
|
4754
|
+
loadingDelay: 200,
|
|
4755
|
+
formats: defaultFormats,
|
|
4756
|
+
warnOnMissingMessages: true,
|
|
4757
|
+
handleMissingMessage: void 0,
|
|
4758
|
+
ignoreTag: true
|
|
4759
|
+
};
|
|
4760
|
+
const options = defaultOptions;
|
|
4761
|
+
function getOptions() {
|
|
4762
|
+
return options;
|
|
4763
|
+
}
|
|
4764
|
+
|
|
4765
|
+
const $isLoading = writable(false);
|
|
4766
|
+
|
|
4767
|
+
var __defProp$1 = Object.defineProperty;
|
|
4768
|
+
var __defProps = Object.defineProperties;
|
|
4769
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4770
|
+
var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
|
|
4771
|
+
var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
|
|
4772
|
+
var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
|
|
4773
|
+
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4774
|
+
var __spreadValues$1 = (a, b) => {
|
|
4775
|
+
for (var prop in b || (b = {}))
|
|
4776
|
+
if (__hasOwnProp$1.call(b, prop))
|
|
4777
|
+
__defNormalProp$1(a, prop, b[prop]);
|
|
4778
|
+
if (__getOwnPropSymbols$1)
|
|
4779
|
+
for (var prop of __getOwnPropSymbols$1(b)) {
|
|
4780
|
+
if (__propIsEnum$1.call(b, prop))
|
|
4781
|
+
__defNormalProp$1(a, prop, b[prop]);
|
|
4782
|
+
}
|
|
4783
|
+
return a;
|
|
4784
|
+
};
|
|
4785
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
4786
|
+
let current;
|
|
4787
|
+
const internalLocale = writable(null);
|
|
4788
|
+
function getSubLocales(refLocale) {
|
|
4789
|
+
return refLocale.split("-").map((_, i, arr) => arr.slice(0, i + 1).join("-")).reverse();
|
|
4790
|
+
}
|
|
4791
|
+
function getPossibleLocales(refLocale, fallbackLocale = getOptions().fallbackLocale) {
|
|
4792
|
+
const locales = getSubLocales(refLocale);
|
|
4793
|
+
if (fallbackLocale) {
|
|
4794
|
+
return [.../* @__PURE__ */ new Set([...locales, ...getSubLocales(fallbackLocale)])];
|
|
4795
|
+
}
|
|
4796
|
+
return locales;
|
|
4797
|
+
}
|
|
4798
|
+
function getCurrentLocale() {
|
|
4799
|
+
return current != null ? current : void 0;
|
|
4800
|
+
}
|
|
4801
|
+
internalLocale.subscribe((newLocale) => {
|
|
4802
|
+
current = newLocale != null ? newLocale : void 0;
|
|
4803
|
+
if (typeof window !== "undefined" && newLocale != null) {
|
|
4804
|
+
document.documentElement.setAttribute("lang", newLocale);
|
|
4805
|
+
}
|
|
4806
|
+
});
|
|
4807
|
+
const set = (newLocale) => {
|
|
4808
|
+
if (newLocale && getClosestAvailableLocale(newLocale) && hasLocaleQueue(newLocale)) {
|
|
4809
|
+
const { loadingDelay } = getOptions();
|
|
4810
|
+
let loadingTimer;
|
|
4811
|
+
if (typeof window !== "undefined" && getCurrentLocale() != null && loadingDelay) {
|
|
4812
|
+
loadingTimer = window.setTimeout(
|
|
4813
|
+
() => $isLoading.set(true),
|
|
4814
|
+
loadingDelay
|
|
4815
|
+
);
|
|
4816
|
+
} else {
|
|
4817
|
+
$isLoading.set(true);
|
|
4818
|
+
}
|
|
4819
|
+
return flush(newLocale).then(() => {
|
|
4820
|
+
internalLocale.set(newLocale);
|
|
4821
|
+
}).finally(() => {
|
|
4822
|
+
clearTimeout(loadingTimer);
|
|
4823
|
+
$isLoading.set(false);
|
|
4824
|
+
});
|
|
4825
|
+
}
|
|
4826
|
+
return internalLocale.set(newLocale);
|
|
4827
|
+
};
|
|
4828
|
+
const $locale = __spreadProps(__spreadValues$1({}, internalLocale), {
|
|
4829
|
+
set
|
|
4830
|
+
});
|
|
4831
|
+
|
|
4832
|
+
const monadicMemoize = (fn) => {
|
|
4833
|
+
const cache = /* @__PURE__ */ Object.create(null);
|
|
4834
|
+
const memoizedFn = (arg) => {
|
|
4835
|
+
const cacheKey = JSON.stringify(arg);
|
|
4836
|
+
if (cacheKey in cache) {
|
|
4837
|
+
return cache[cacheKey];
|
|
4838
|
+
}
|
|
4839
|
+
return cache[cacheKey] = fn(arg);
|
|
4840
|
+
};
|
|
4841
|
+
return memoizedFn;
|
|
4842
|
+
};
|
|
4579
4843
|
|
|
4580
|
-
|
|
4844
|
+
var __defProp = Object.defineProperty;
|
|
4845
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
4846
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4847
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
4848
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4849
|
+
var __spreadValues = (a, b) => {
|
|
4850
|
+
for (var prop in b || (b = {}))
|
|
4851
|
+
if (__hasOwnProp.call(b, prop))
|
|
4852
|
+
__defNormalProp(a, prop, b[prop]);
|
|
4853
|
+
if (__getOwnPropSymbols)
|
|
4854
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
4855
|
+
if (__propIsEnum.call(b, prop))
|
|
4856
|
+
__defNormalProp(a, prop, b[prop]);
|
|
4857
|
+
}
|
|
4858
|
+
return a;
|
|
4859
|
+
};
|
|
4860
|
+
var __objRest = (source, exclude) => {
|
|
4861
|
+
var target = {};
|
|
4862
|
+
for (var prop in source)
|
|
4863
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
4864
|
+
target[prop] = source[prop];
|
|
4865
|
+
if (source != null && __getOwnPropSymbols)
|
|
4866
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
4867
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
4868
|
+
target[prop] = source[prop];
|
|
4869
|
+
}
|
|
4870
|
+
return target;
|
|
4871
|
+
};
|
|
4872
|
+
const getIntlFormatterOptions = (type, name) => {
|
|
4873
|
+
const { formats } = getOptions();
|
|
4874
|
+
if (type in formats && name in formats[type]) {
|
|
4875
|
+
return formats[type][name];
|
|
4876
|
+
}
|
|
4877
|
+
throw new Error(`[svelte-i18n] Unknown "${name}" ${type} format.`);
|
|
4878
|
+
};
|
|
4879
|
+
const createNumberFormatter = monadicMemoize(
|
|
4880
|
+
(_a) => {
|
|
4881
|
+
var _b = _a, { locale, format } = _b, options = __objRest(_b, ["locale", "format"]);
|
|
4882
|
+
if (locale == null) {
|
|
4883
|
+
throw new Error('[svelte-i18n] A "locale" must be set to format numbers');
|
|
4884
|
+
}
|
|
4885
|
+
if (format) {
|
|
4886
|
+
options = getIntlFormatterOptions("number", format);
|
|
4887
|
+
}
|
|
4888
|
+
return new Intl.NumberFormat(locale, options);
|
|
4889
|
+
}
|
|
4890
|
+
);
|
|
4891
|
+
const createDateFormatter = monadicMemoize(
|
|
4892
|
+
(_c) => {
|
|
4893
|
+
var _d = _c, { locale, format } = _d, options = __objRest(_d, ["locale", "format"]);
|
|
4894
|
+
if (locale == null) {
|
|
4895
|
+
throw new Error('[svelte-i18n] A "locale" must be set to format dates');
|
|
4896
|
+
}
|
|
4897
|
+
if (format) {
|
|
4898
|
+
options = getIntlFormatterOptions("date", format);
|
|
4899
|
+
} else if (Object.keys(options).length === 0) {
|
|
4900
|
+
options = getIntlFormatterOptions("date", "short");
|
|
4901
|
+
}
|
|
4902
|
+
return new Intl.DateTimeFormat(locale, options);
|
|
4903
|
+
}
|
|
4904
|
+
);
|
|
4905
|
+
const createTimeFormatter = monadicMemoize(
|
|
4906
|
+
(_e) => {
|
|
4907
|
+
var _f = _e, { locale, format } = _f, options = __objRest(_f, ["locale", "format"]);
|
|
4908
|
+
if (locale == null) {
|
|
4909
|
+
throw new Error(
|
|
4910
|
+
'[svelte-i18n] A "locale" must be set to format time values'
|
|
4911
|
+
);
|
|
4912
|
+
}
|
|
4913
|
+
if (format) {
|
|
4914
|
+
options = getIntlFormatterOptions("time", format);
|
|
4915
|
+
} else if (Object.keys(options).length === 0) {
|
|
4916
|
+
options = getIntlFormatterOptions("time", "short");
|
|
4917
|
+
}
|
|
4918
|
+
return new Intl.DateTimeFormat(locale, options);
|
|
4919
|
+
}
|
|
4920
|
+
);
|
|
4921
|
+
const getNumberFormatter = (_g = {}) => {
|
|
4922
|
+
var _h = _g, {
|
|
4923
|
+
locale = getCurrentLocale()
|
|
4924
|
+
} = _h, args = __objRest(_h, [
|
|
4925
|
+
"locale"
|
|
4926
|
+
]);
|
|
4927
|
+
return createNumberFormatter(__spreadValues({ locale }, args));
|
|
4928
|
+
};
|
|
4929
|
+
const getDateFormatter = (_i = {}) => {
|
|
4930
|
+
var _j = _i, {
|
|
4931
|
+
locale = getCurrentLocale()
|
|
4932
|
+
} = _j, args = __objRest(_j, [
|
|
4933
|
+
"locale"
|
|
4934
|
+
]);
|
|
4935
|
+
return createDateFormatter(__spreadValues({ locale }, args));
|
|
4936
|
+
};
|
|
4937
|
+
const getTimeFormatter = (_k = {}) => {
|
|
4938
|
+
var _l = _k, {
|
|
4939
|
+
locale = getCurrentLocale()
|
|
4940
|
+
} = _l, args = __objRest(_l, [
|
|
4941
|
+
"locale"
|
|
4942
|
+
]);
|
|
4943
|
+
return createTimeFormatter(__spreadValues({ locale }, args));
|
|
4944
|
+
};
|
|
4945
|
+
const getMessageFormatter = monadicMemoize(
|
|
4946
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
4947
|
+
(message, locale = getCurrentLocale()) => new IntlMessageFormat(message, locale, getOptions().formats, {
|
|
4948
|
+
ignoreTag: getOptions().ignoreTag
|
|
4949
|
+
})
|
|
4950
|
+
);
|
|
4951
|
+
|
|
4952
|
+
const formatMessage = (id, options = {}) => {
|
|
4953
|
+
var _a, _b, _c, _d;
|
|
4954
|
+
let messageObj = options;
|
|
4955
|
+
if (typeof id === "object") {
|
|
4956
|
+
messageObj = id;
|
|
4957
|
+
id = messageObj.id;
|
|
4958
|
+
}
|
|
4959
|
+
const {
|
|
4960
|
+
values,
|
|
4961
|
+
locale = getCurrentLocale(),
|
|
4962
|
+
default: defaultValue
|
|
4963
|
+
} = messageObj;
|
|
4964
|
+
if (locale == null) {
|
|
4965
|
+
throw new Error(
|
|
4966
|
+
"[svelte-i18n] Cannot format a message without first setting the initial locale."
|
|
4967
|
+
);
|
|
4968
|
+
}
|
|
4969
|
+
let message = lookup(id, locale);
|
|
4970
|
+
if (!message) {
|
|
4971
|
+
message = (_d = (_c = (_b = (_a = getOptions()).handleMissingMessage) == null ? void 0 : _b.call(_a, { locale, id, defaultValue })) != null ? _c : defaultValue) != null ? _d : id;
|
|
4972
|
+
} else if (typeof message !== "string") {
|
|
4973
|
+
console.warn(
|
|
4974
|
+
`[svelte-i18n] Message with id "${id}" must be of type "string", found: "${typeof message}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`
|
|
4975
|
+
);
|
|
4976
|
+
return message;
|
|
4977
|
+
}
|
|
4978
|
+
if (!values) {
|
|
4979
|
+
return message;
|
|
4980
|
+
}
|
|
4981
|
+
let result = message;
|
|
4982
|
+
try {
|
|
4983
|
+
result = getMessageFormatter(message, locale).format(values);
|
|
4984
|
+
} catch (e) {
|
|
4985
|
+
if (e instanceof Error) {
|
|
4986
|
+
console.warn(
|
|
4987
|
+
`[svelte-i18n] Message "${id}" has syntax error:`,
|
|
4988
|
+
e.message
|
|
4989
|
+
);
|
|
4990
|
+
}
|
|
4991
|
+
}
|
|
4992
|
+
return result;
|
|
4993
|
+
};
|
|
4994
|
+
const formatTime = (t, options) => {
|
|
4995
|
+
return getTimeFormatter(options).format(t);
|
|
4996
|
+
};
|
|
4997
|
+
const formatDate = (d, options) => {
|
|
4998
|
+
return getDateFormatter(options).format(d);
|
|
4999
|
+
};
|
|
5000
|
+
const formatNumber = (n, options) => {
|
|
5001
|
+
return getNumberFormatter(options).format(n);
|
|
5002
|
+
};
|
|
5003
|
+
const getJSON = (id, locale = getCurrentLocale()) => {
|
|
5004
|
+
return lookup(id, locale);
|
|
5005
|
+
};
|
|
5006
|
+
const $format = derived([$locale, $dictionary], () => formatMessage);
|
|
5007
|
+
derived([$locale], () => formatTime);
|
|
5008
|
+
derived([$locale], () => formatDate);
|
|
5009
|
+
derived([$locale], () => formatNumber);
|
|
5010
|
+
derived([$locale, $dictionary], () => getJSON);
|
|
4581
5011
|
|
|
4582
5012
|
function addNewMessages$2(lang, dict) {
|
|
4583
|
-
|
|
5013
|
+
addMessages(lang, dict);
|
|
4584
5014
|
}
|
|
4585
5015
|
|
|
4586
5016
|
function setLocale$2(_locale) {
|
|
4587
|
-
|
|
5017
|
+
$locale.set(_locale);
|
|
4588
5018
|
}
|
|
4589
5019
|
|
|
4590
5020
|
const TRANSLATIONS$2 = {
|
|
@@ -4651,11 +5081,11 @@
|
|
|
4651
5081
|
};
|
|
4652
5082
|
|
|
4653
5083
|
function addNewMessages$1(lang, dict) {
|
|
4654
|
-
|
|
5084
|
+
addMessages(lang, dict);
|
|
4655
5085
|
}
|
|
4656
5086
|
|
|
4657
5087
|
function setLocale$1(_locale) {
|
|
4658
|
-
|
|
5088
|
+
$locale.set(_locale);
|
|
4659
5089
|
}
|
|
4660
5090
|
|
|
4661
5091
|
const TRANSLATIONS$1 = {
|
|
@@ -5234,8 +5664,8 @@
|
|
|
5234
5664
|
|
|
5235
5665
|
function instance$2($$self, $$props, $$invalidate) {
|
|
5236
5666
|
let $_;
|
|
5237
|
-
validate_store(
|
|
5238
|
-
component_subscribe($$self,
|
|
5667
|
+
validate_store($format, '_');
|
|
5668
|
+
component_subscribe($$self, $format, $$value => $$invalidate(5, $_ = $$value));
|
|
5239
5669
|
let { $$slots: slots = {}, $$scope } = $$props;
|
|
5240
5670
|
validate_slots('undefined', slots, []);
|
|
5241
5671
|
let { endpoint = '' } = $$props;
|
|
@@ -5368,7 +5798,7 @@
|
|
|
5368
5798
|
};
|
|
5369
5799
|
|
|
5370
5800
|
$$self.$capture_state = () => ({
|
|
5371
|
-
_:
|
|
5801
|
+
_: $format,
|
|
5372
5802
|
addNewMessages: addNewMessages$1,
|
|
5373
5803
|
setLocale: setLocale$1,
|
|
5374
5804
|
TRANSLATIONS: TRANSLATIONS$1,
|
|
@@ -5495,7 +5925,7 @@
|
|
|
5495
5925
|
|
|
5496
5926
|
if (options.props) {
|
|
5497
5927
|
this.$set(options.props);
|
|
5498
|
-
flush();
|
|
5928
|
+
flush$1();
|
|
5499
5929
|
}
|
|
5500
5930
|
}
|
|
5501
5931
|
}
|
|
@@ -5519,7 +5949,7 @@
|
|
|
5519
5949
|
|
|
5520
5950
|
set endpoint(endpoint) {
|
|
5521
5951
|
this.$$set({ endpoint });
|
|
5522
|
-
flush();
|
|
5952
|
+
flush$1();
|
|
5523
5953
|
}
|
|
5524
5954
|
|
|
5525
5955
|
get datasource() {
|
|
@@ -5528,7 +5958,7 @@
|
|
|
5528
5958
|
|
|
5529
5959
|
set datasource(datasource) {
|
|
5530
5960
|
this.$$set({ datasource });
|
|
5531
|
-
flush();
|
|
5961
|
+
flush$1();
|
|
5532
5962
|
}
|
|
5533
5963
|
|
|
5534
5964
|
get lang() {
|
|
@@ -5537,7 +5967,7 @@
|
|
|
5537
5967
|
|
|
5538
5968
|
set lang(lang) {
|
|
5539
5969
|
this.$$set({ lang });
|
|
5540
|
-
flush();
|
|
5970
|
+
flush$1();
|
|
5541
5971
|
}
|
|
5542
5972
|
|
|
5543
5973
|
get activecategory() {
|
|
@@ -5546,7 +5976,7 @@
|
|
|
5546
5976
|
|
|
5547
5977
|
set activecategory(activecategory) {
|
|
5548
5978
|
this.$$set({ activecategory });
|
|
5549
|
-
flush();
|
|
5979
|
+
flush$1();
|
|
5550
5980
|
}
|
|
5551
5981
|
|
|
5552
5982
|
get excludedflags() {
|
|
@@ -5555,7 +5985,7 @@
|
|
|
5555
5985
|
|
|
5556
5986
|
set excludedflags(excludedflags) {
|
|
5557
5987
|
this.$$set({ excludedflags });
|
|
5558
|
-
flush();
|
|
5988
|
+
flush$1();
|
|
5559
5989
|
}
|
|
5560
5990
|
|
|
5561
5991
|
get clientstyling() {
|
|
@@ -5564,7 +5994,7 @@
|
|
|
5564
5994
|
|
|
5565
5995
|
set clientstyling(clientstyling) {
|
|
5566
5996
|
this.$$set({ clientstyling });
|
|
5567
|
-
flush();
|
|
5997
|
+
flush$1();
|
|
5568
5998
|
}
|
|
5569
5999
|
|
|
5570
6000
|
get clientstylingurl() {
|
|
@@ -5573,7 +6003,7 @@
|
|
|
5573
6003
|
|
|
5574
6004
|
set clientstylingurl(clientstylingurl) {
|
|
5575
6005
|
this.$$set({ clientstylingurl });
|
|
5576
|
-
flush();
|
|
6006
|
+
flush$1();
|
|
5577
6007
|
}
|
|
5578
6008
|
|
|
5579
6009
|
get translationurl() {
|
|
@@ -5582,7 +6012,7 @@
|
|
|
5582
6012
|
|
|
5583
6013
|
set translationurl(translationurl) {
|
|
5584
6014
|
this.$$set({ translationurl });
|
|
5585
|
-
flush();
|
|
6015
|
+
flush$1();
|
|
5586
6016
|
}
|
|
5587
6017
|
}
|
|
5588
6018
|
|
|
@@ -5682,11 +6112,11 @@
|
|
|
5682
6112
|
};
|
|
5683
6113
|
|
|
5684
6114
|
function addNewMessages(lang, dict) {
|
|
5685
|
-
|
|
6115
|
+
addMessages(lang, dict);
|
|
5686
6116
|
}
|
|
5687
6117
|
|
|
5688
6118
|
function setLocale(_locale) {
|
|
5689
|
-
|
|
6119
|
+
$locale.set(_locale);
|
|
5690
6120
|
}
|
|
5691
6121
|
|
|
5692
6122
|
/* ../casino-providers/src/CasinoProviders.svelte generated by Svelte v3.59.2 */
|
|
@@ -6160,8 +6590,8 @@
|
|
|
6160
6590
|
|
|
6161
6591
|
function instance$1($$self, $$props, $$invalidate) {
|
|
6162
6592
|
let $_;
|
|
6163
|
-
validate_store(
|
|
6164
|
-
component_subscribe($$self,
|
|
6593
|
+
validate_store($format, '_');
|
|
6594
|
+
component_subscribe($$self, $format, $$value => $$invalidate(4, $_ = $$value));
|
|
6165
6595
|
let { $$slots: slots = {}, $$scope } = $$props;
|
|
6166
6596
|
validate_slots('undefined', slots, []);
|
|
6167
6597
|
let { endpoint = '' } = $$props;
|
|
@@ -6282,7 +6712,7 @@
|
|
|
6282
6712
|
|
|
6283
6713
|
$$self.$capture_state = () => ({
|
|
6284
6714
|
TRANSLATIONS,
|
|
6285
|
-
_:
|
|
6715
|
+
_: $format,
|
|
6286
6716
|
addNewMessages,
|
|
6287
6717
|
setLocale,
|
|
6288
6718
|
endpoint,
|
|
@@ -6399,7 +6829,7 @@
|
|
|
6399
6829
|
|
|
6400
6830
|
if (options.props) {
|
|
6401
6831
|
this.$set(options.props);
|
|
6402
|
-
flush();
|
|
6832
|
+
flush$1();
|
|
6403
6833
|
}
|
|
6404
6834
|
}
|
|
6405
6835
|
}
|
|
@@ -6421,7 +6851,7 @@
|
|
|
6421
6851
|
|
|
6422
6852
|
set endpoint(endpoint) {
|
|
6423
6853
|
this.$$set({ endpoint });
|
|
6424
|
-
flush();
|
|
6854
|
+
flush$1();
|
|
6425
6855
|
}
|
|
6426
6856
|
|
|
6427
6857
|
get datasource() {
|
|
@@ -6430,7 +6860,7 @@
|
|
|
6430
6860
|
|
|
6431
6861
|
set datasource(datasource) {
|
|
6432
6862
|
this.$$set({ datasource });
|
|
6433
|
-
flush();
|
|
6863
|
+
flush$1();
|
|
6434
6864
|
}
|
|
6435
6865
|
|
|
6436
6866
|
get lang() {
|
|
@@ -6439,7 +6869,7 @@
|
|
|
6439
6869
|
|
|
6440
6870
|
set lang(lang) {
|
|
6441
6871
|
this.$$set({ lang });
|
|
6442
|
-
flush();
|
|
6872
|
+
flush$1();
|
|
6443
6873
|
}
|
|
6444
6874
|
|
|
6445
6875
|
get clientstyling() {
|
|
@@ -6448,7 +6878,7 @@
|
|
|
6448
6878
|
|
|
6449
6879
|
set clientstyling(clientstyling) {
|
|
6450
6880
|
this.$$set({ clientstyling });
|
|
6451
|
-
flush();
|
|
6881
|
+
flush$1();
|
|
6452
6882
|
}
|
|
6453
6883
|
|
|
6454
6884
|
get clientstylingurl() {
|
|
@@ -6457,7 +6887,7 @@
|
|
|
6457
6887
|
|
|
6458
6888
|
set clientstylingurl(clientstylingurl) {
|
|
6459
6889
|
this.$$set({ clientstylingurl });
|
|
6460
|
-
flush();
|
|
6890
|
+
flush$1();
|
|
6461
6891
|
}
|
|
6462
6892
|
|
|
6463
6893
|
get translationurl() {
|
|
@@ -6466,7 +6896,7 @@
|
|
|
6466
6896
|
|
|
6467
6897
|
set translationurl(translationurl) {
|
|
6468
6898
|
this.$$set({ translationurl });
|
|
6469
|
-
flush();
|
|
6899
|
+
flush$1();
|
|
6470
6900
|
}
|
|
6471
6901
|
}
|
|
6472
6902
|
|
|
@@ -6679,8 +7109,8 @@
|
|
|
6679
7109
|
|
|
6680
7110
|
function instance($$self, $$props, $$invalidate) {
|
|
6681
7111
|
let $_;
|
|
6682
|
-
validate_store(
|
|
6683
|
-
component_subscribe($$self,
|
|
7112
|
+
validate_store($format, '_');
|
|
7113
|
+
component_subscribe($$self, $format, $$value => $$invalidate(11, $_ = $$value));
|
|
6684
7114
|
let { $$slots: slots = {}, $$scope } = $$props;
|
|
6685
7115
|
validate_slots('undefined', slots, []);
|
|
6686
7116
|
let { endpointcategories = '' } = $$props;
|
|
@@ -6793,7 +7223,7 @@
|
|
|
6793
7223
|
};
|
|
6794
7224
|
|
|
6795
7225
|
$$self.$capture_state = () => ({
|
|
6796
|
-
_:
|
|
7226
|
+
_: $format,
|
|
6797
7227
|
addNewMessages: addNewMessages$2,
|
|
6798
7228
|
setLocale: setLocale$2,
|
|
6799
7229
|
TRANSLATIONS: TRANSLATIONS$2,
|
|
@@ -6916,7 +7346,7 @@
|
|
|
6916
7346
|
|
|
6917
7347
|
if (options.props) {
|
|
6918
7348
|
this.$set(options.props);
|
|
6919
|
-
flush();
|
|
7349
|
+
flush$1();
|
|
6920
7350
|
}
|
|
6921
7351
|
}
|
|
6922
7352
|
}
|
|
@@ -6942,7 +7372,7 @@
|
|
|
6942
7372
|
|
|
6943
7373
|
set endpointcategories(endpointcategories) {
|
|
6944
7374
|
this.$$set({ endpointcategories });
|
|
6945
|
-
flush();
|
|
7375
|
+
flush$1();
|
|
6946
7376
|
}
|
|
6947
7377
|
|
|
6948
7378
|
get datasourcecategories() {
|
|
@@ -6951,7 +7381,7 @@
|
|
|
6951
7381
|
|
|
6952
7382
|
set datasourcecategories(datasourcecategories) {
|
|
6953
7383
|
this.$$set({ datasourcecategories });
|
|
6954
|
-
flush();
|
|
7384
|
+
flush$1();
|
|
6955
7385
|
}
|
|
6956
7386
|
|
|
6957
7387
|
get activecategory() {
|
|
@@ -6960,7 +7390,7 @@
|
|
|
6960
7390
|
|
|
6961
7391
|
set activecategory(activecategory) {
|
|
6962
7392
|
this.$$set({ activecategory });
|
|
6963
|
-
flush();
|
|
7393
|
+
flush$1();
|
|
6964
7394
|
}
|
|
6965
7395
|
|
|
6966
7396
|
get endpointproviders() {
|
|
@@ -6969,7 +7399,7 @@
|
|
|
6969
7399
|
|
|
6970
7400
|
set endpointproviders(endpointproviders) {
|
|
6971
7401
|
this.$$set({ endpointproviders });
|
|
6972
|
-
flush();
|
|
7402
|
+
flush$1();
|
|
6973
7403
|
}
|
|
6974
7404
|
|
|
6975
7405
|
get datasourceproviders() {
|
|
@@ -6978,7 +7408,7 @@
|
|
|
6978
7408
|
|
|
6979
7409
|
set datasourceproviders(datasourceproviders) {
|
|
6980
7410
|
this.$$set({ datasourceproviders });
|
|
6981
|
-
flush();
|
|
7411
|
+
flush$1();
|
|
6982
7412
|
}
|
|
6983
7413
|
|
|
6984
7414
|
get excludedflags() {
|
|
@@ -6987,7 +7417,7 @@
|
|
|
6987
7417
|
|
|
6988
7418
|
set excludedflags(excludedflags) {
|
|
6989
7419
|
this.$$set({ excludedflags });
|
|
6990
|
-
flush();
|
|
7420
|
+
flush$1();
|
|
6991
7421
|
}
|
|
6992
7422
|
|
|
6993
7423
|
get lang() {
|
|
@@ -6996,7 +7426,7 @@
|
|
|
6996
7426
|
|
|
6997
7427
|
set lang(lang) {
|
|
6998
7428
|
this.$$set({ lang });
|
|
6999
|
-
flush();
|
|
7429
|
+
flush$1();
|
|
7000
7430
|
}
|
|
7001
7431
|
|
|
7002
7432
|
get clientstyling() {
|
|
@@ -7005,7 +7435,7 @@
|
|
|
7005
7435
|
|
|
7006
7436
|
set clientstyling(clientstyling) {
|
|
7007
7437
|
this.$$set({ clientstyling });
|
|
7008
|
-
flush();
|
|
7438
|
+
flush$1();
|
|
7009
7439
|
}
|
|
7010
7440
|
|
|
7011
7441
|
get clientstylingurl() {
|
|
@@ -7014,7 +7444,7 @@
|
|
|
7014
7444
|
|
|
7015
7445
|
set clientstylingurl(clientstylingurl) {
|
|
7016
7446
|
this.$$set({ clientstylingurl });
|
|
7017
|
-
flush();
|
|
7447
|
+
flush$1();
|
|
7018
7448
|
}
|
|
7019
7449
|
|
|
7020
7450
|
get translationurl() {
|
|
@@ -7023,7 +7453,7 @@
|
|
|
7023
7453
|
|
|
7024
7454
|
set translationurl(translationurl) {
|
|
7025
7455
|
this.$$set({ translationurl });
|
|
7026
|
-
flush();
|
|
7456
|
+
flush$1();
|
|
7027
7457
|
}
|
|
7028
7458
|
}
|
|
7029
7459
|
|