@everymatrix/casino-categories-providers 1.15.6 → 1.15.7

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
- Copyright (c) 2014, Yahoo! Inc. All rights reserved.
4575
- Copyrights licensed under the New BSD License.
4576
- See the accompanying LICENSE file for terms.
4577
- */
4578
- var o = IntlMessageFormat;
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
- const i={},r=(e,n,t)=>t?(n in i||(i[n]={}),e in i[n]||(i[n][e]=t),t):t,s=(e,n)=>{if(null==n)return;if(n in i&&e in i[n])return i[n][e];const t=E(n);for(let o=0;o<t.length;o++){const i=c(t[o],e);if(i)return r(e,n,i)}};let l;const a=writable({});function u(e){return e in l}function c(e,n){if(!u(e))return null;const t=function(e){return l[e]||null}(e);return function(e,n){if(null==n)return;if(n in e)return e[n];const t=n.split(".");let o=e;for(let e=0;e<t.length;e++)if("object"==typeof o){if(e>0){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}(t,n)}function m(e,...n){delete i[e],a.update((o=>(o[e]=cjs.all([o[e]||{},...n]),o)));}derived([a],(([e])=>Object.keys(e)));a.subscribe((e=>l=e));const d={};function g(e){return d[e]}function h(e){return null!=e&&E(e).some((e=>{var n;return null===(n=g(e))||void 0===n?void 0:n.size}))}function w(e,n){const t=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))))));return t.then((n=>m(e,...n)))}const p={};function b(e){if(!h(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])=>w(e,n)))).then((()=>{if(h(e))return b(e);delete p[e];})),p[e]}const M={fallbackLocale:null,loadingDelay:200,formats:{number:{scientific:{notation:"scientific"},engineering:{notation:"engineering"},compactLong:{notation:"compact",compactDisplay:"long"},compactShort:{notation:"compact",compactDisplay:"short"}},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"}}},warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0};function j(){return M}const $=writable(!1);let k;const T=writable(null);function L(e){return e.split("-").map(((e,n,t)=>t.slice(0,n+1).join("-"))).reverse()}function E(e,n=j().fallbackLocale){const t=L(e);return n?[...new Set([...t,...L(n)])]:t}function D(){return null!=k?k:void 0}T.subscribe((e=>{k=null!=e?e:void 0,"undefined"!=typeof window&&null!=e&&document.documentElement.setAttribute("lang",e);}));const x={...T,set:e=>{if(e&&function(e){if(null==e)return;const n=E(e);for(let e=0;e<n.length;e++){const t=n[e];if(u(t))return t}}(e)&&h(e)){const{loadingDelay:n}=j();let t;return "undefined"!=typeof window&&null!=D()&&n?t=window.setTimeout((()=>$.set(!0)),n):$.set(!0),b(e).then((()=>{T.set(e);})).finally((()=>{clearTimeout(t),$.set(!1);}))}return T.set(e)}},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((({locale:e,format:n,...t})=>{if(null==e)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return n&&(t=C("number",n)),new Intl.NumberFormat(e,t)})),J=Z((({locale:e,format:n,...t})=>{if(null==e)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return n?t=C("date",n):0===Object.keys(t).length&&(t=C("date","short")),new Intl.DateTimeFormat(e,t)})),U=Z((({locale:e,format:n,...t})=>{if(null==e)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return n?t=C("time",n):0===Object.keys(t).length&&(t=C("time","short")),new Intl.DateTimeFormat(e,t)})),V=({locale:e=D(),...n}={})=>G({locale:e,...n}),_=({locale:e=D(),...n}={})=>J({locale:e,...n}),q=({locale:e=D(),...n}={})=>U({locale:e,...n}),B=Z(((e,n=D())=>new o(e,n,j().formats,{ignoreTag:j().ignoreTag}))),H=(e,n={})=>{var t,o,i,r;let l=n;"object"==typeof e&&(l=e,e=l.id);const{values:a,locale:u=D(),default:c}=l;if(null==u)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let m=s(e,u);if(m){if("string"!=typeof m)return console.warn(`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof m}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),m}else m=null!==(r=null!==(i=null===(o=(t=j()).handleMissingMessage)||void 0===o?void 0:o.call(t,{locale:u,id:e,defaultValue:c}))&&void 0!==i?i:c)&&void 0!==r?r:e;if(!a)return m;let f=m;try{f=B(m,u).format(a);}catch(n){n instanceof Error&&console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,n.message);}return f},K=(e,n)=>q(n).format(e),Q=(e,n)=>_(n).format(e),R=(e,n)=>V(n).format(e),W=(e,n=D())=>s(e,n),X=derived([x,a],(()=>H));derived([x],(()=>K));derived([x],(()=>Q));derived([x],(()=>R));derived([x,a],(()=>W));
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
- m(lang, dict);
5013
+ addMessages(lang, dict);
4584
5014
  }
4585
5015
 
4586
5016
  function setLocale$2(_locale) {
4587
- x.set(_locale);
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
- m(lang, dict);
5084
+ addMessages(lang, dict);
4655
5085
  }
4656
5086
 
4657
5087
  function setLocale$1(_locale) {
4658
- x.set(_locale);
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(X, '_');
5238
- component_subscribe($$self, X, $$value => $$invalidate(5, $_ = $$value));
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
- _: X,
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
- m(lang, dict);
6115
+ addMessages(lang, dict);
5686
6116
  }
5687
6117
 
5688
6118
  function setLocale(_locale) {
5689
- x.set(_locale);
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(X, '_');
6164
- component_subscribe($$self, X, $$value => $$invalidate(4, $_ = $$value));
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
- _: X,
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(X, '_');
6683
- component_subscribe($$self, X, $$value => $$invalidate(11, $_ = $$value));
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
- _: X,
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