@tonconnect/ui 0.0.8 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -3875,7 +3875,7 @@ let Updates = null;
3875
3875
  let Effects = null;
3876
3876
  let ExecCount = 0;
3877
3877
  function createRoot(fn, detachedOwner) {
3878
- const listener = Listener, owner = Owner, unowned = fn.length === 0, root = unowned && true ? UNOWNED : {
3878
+ const listener = Listener, owner = Owner, unowned = fn.length === 0, root = unowned ? UNOWNED : {
3879
3879
  owned: null,
3880
3880
  cleanups: null,
3881
3881
  context: null,
@@ -3971,8 +3971,8 @@ function createResource(pSource, pFetcher, pOptions) {
3971
3971
  runUpdates(() => {
3972
3972
  if (!err)
3973
3973
  setValue(() => v);
3974
- setError(err);
3975
3974
  setState(err ? "errored" : "ready");
3975
+ setError(err);
3976
3976
  for (const c2 of contexts.keys())
3977
3977
  c2.decrement();
3978
3978
  contexts.clear();
@@ -4011,7 +4011,7 @@ function createResource(pSource, pFetcher, pOptions) {
4011
4011
  refetching
4012
4012
  }));
4013
4013
  if (typeof p2 !== "object" || !(p2 && "then" in p2)) {
4014
- loadEnd(pr, p2);
4014
+ loadEnd(pr, p2, void 0, lookup2);
4015
4015
  return p2;
4016
4016
  }
4017
4017
  pr = p2;
@@ -4021,7 +4021,7 @@ function createResource(pSource, pFetcher, pOptions) {
4021
4021
  setState(resolved ? "refreshing" : "pending");
4022
4022
  trigger();
4023
4023
  }, false);
4024
- return p2.then((v) => loadEnd(p2, v, void 0, lookup2), (e2) => loadEnd(p2, void 0, castError(e2)));
4024
+ return p2.then((v) => loadEnd(p2, v, void 0, lookup2), (e2) => loadEnd(p2, void 0, castError(e2), lookup2));
4025
4025
  }
4026
4026
  Object.defineProperties(read, {
4027
4027
  state: {
@@ -4060,11 +4060,13 @@ function batch(fn) {
4060
4060
  return runUpdates(fn, false);
4061
4061
  }
4062
4062
  function untrack(fn) {
4063
- let result, listener = Listener;
4063
+ const listener = Listener;
4064
4064
  Listener = null;
4065
- result = fn();
4066
- Listener = listener;
4067
- return result;
4065
+ try {
4066
+ return fn();
4067
+ } finally {
4068
+ Listener = listener;
4069
+ }
4068
4070
  }
4069
4071
  function on(deps, fn, options) {
4070
4072
  const isArray = Array.isArray(deps);
@@ -4102,7 +4104,7 @@ function onCleanup(fn) {
4102
4104
  function getListener() {
4103
4105
  return Listener;
4104
4106
  }
4105
- function createContext(defaultValue) {
4107
+ function createContext(defaultValue, options) {
4106
4108
  const id = Symbol("context");
4107
4109
  return {
4108
4110
  id,
@@ -4116,12 +4118,12 @@ function useContext(context) {
4116
4118
  }
4117
4119
  function children(fn) {
4118
4120
  const children2 = createMemo(fn);
4119
- const memo2 = createMemo(() => resolveChildren(children2()));
4120
- memo2.toArray = () => {
4121
- const c2 = memo2();
4121
+ const memo = createMemo(() => resolveChildren(children2()));
4122
+ memo.toArray = () => {
4123
+ const c2 = memo();
4122
4124
  return Array.isArray(c2) ? c2 : c2 != null ? [c2] : [];
4123
4125
  };
4124
- return memo2;
4126
+ return memo;
4125
4127
  }
4126
4128
  let SuspenseContext;
4127
4129
  function readSignal() {
@@ -4400,7 +4402,7 @@ function resolveChildren(children2) {
4400
4402
  }
4401
4403
  return children2;
4402
4404
  }
4403
- function createProvider(id) {
4405
+ function createProvider(id, options) {
4404
4406
  return function provider(props) {
4405
4407
  let res;
4406
4408
  createRenderEffect(() => res = untrack(() => {
@@ -4408,7 +4410,7 @@ function createProvider(id) {
4408
4410
  [id]: props.value
4409
4411
  };
4410
4412
  return children(() => props.children);
4411
- }));
4413
+ }), void 0);
4412
4414
  return res;
4413
4415
  };
4414
4416
  }
@@ -4520,6 +4522,8 @@ const propTraps = {
4520
4522
  return _.get(property);
4521
4523
  },
4522
4524
  has(_, property) {
4525
+ if (property === $PROXY)
4526
+ return true;
4523
4527
  return _.has(property);
4524
4528
  },
4525
4529
  set: trueFn,
@@ -4540,68 +4544,116 @@ const propTraps = {
4540
4544
  }
4541
4545
  };
4542
4546
  function resolveSource(s2) {
4543
- return (s2 = typeof s2 === "function" ? s2() : s2) == null ? {} : s2;
4547
+ return !(s2 = typeof s2 === "function" ? s2() : s2) ? {} : s2;
4544
4548
  }
4545
4549
  function mergeProps(...sources) {
4546
- return new Proxy({
4547
- get(property) {
4548
- for (let i2 = sources.length - 1; i2 >= 0; i2--) {
4549
- const v = resolveSource(sources[i2])[property];
4550
- if (v !== void 0)
4551
- return v;
4552
- }
4553
- },
4554
- has(property) {
4555
- for (let i2 = sources.length - 1; i2 >= 0; i2--) {
4556
- if (property in resolveSource(sources[i2]))
4557
- return true;
4550
+ let proxy = false;
4551
+ for (let i2 = 0; i2 < sources.length; i2++) {
4552
+ const s2 = sources[i2];
4553
+ proxy = proxy || !!s2 && $PROXY in s2;
4554
+ sources[i2] = typeof s2 === "function" ? (proxy = true, createMemo(s2)) : s2;
4555
+ }
4556
+ if (proxy) {
4557
+ return new Proxy({
4558
+ get(property) {
4559
+ for (let i2 = sources.length - 1; i2 >= 0; i2--) {
4560
+ const v = resolveSource(sources[i2])[property];
4561
+ if (v !== void 0)
4562
+ return v;
4563
+ }
4564
+ },
4565
+ has(property) {
4566
+ for (let i2 = sources.length - 1; i2 >= 0; i2--) {
4567
+ if (property in resolveSource(sources[i2]))
4568
+ return true;
4569
+ }
4570
+ return false;
4571
+ },
4572
+ keys() {
4573
+ const keys = [];
4574
+ for (let i2 = 0; i2 < sources.length; i2++)
4575
+ keys.push(...Object.keys(resolveSource(sources[i2])));
4576
+ return [...new Set(keys)];
4577
+ }
4578
+ }, propTraps);
4579
+ }
4580
+ const target = {};
4581
+ for (let i2 = sources.length - 1; i2 >= 0; i2--) {
4582
+ if (sources[i2]) {
4583
+ const descriptors = Object.getOwnPropertyDescriptors(sources[i2]);
4584
+ for (const key in descriptors) {
4585
+ if (key in target)
4586
+ continue;
4587
+ Object.defineProperty(target, key, {
4588
+ enumerable: true,
4589
+ get() {
4590
+ for (let i3 = sources.length - 1; i3 >= 0; i3--) {
4591
+ const v = (sources[i3] || {})[key];
4592
+ if (v !== void 0)
4593
+ return v;
4594
+ }
4595
+ }
4596
+ });
4558
4597
  }
4559
- return false;
4560
- },
4561
- keys() {
4562
- const keys = [];
4563
- for (let i2 = 0; i2 < sources.length; i2++)
4564
- keys.push(...Object.keys(resolveSource(sources[i2])));
4565
- return [...new Set(keys)];
4566
4598
  }
4567
- }, propTraps);
4599
+ }
4600
+ return target;
4568
4601
  }
4569
4602
  function splitProps(props, ...keys) {
4570
4603
  const blocked = new Set(keys.flat());
4604
+ if ($PROXY in props) {
4605
+ const res = keys.map((k) => {
4606
+ return new Proxy({
4607
+ get(property) {
4608
+ return k.includes(property) ? props[property] : void 0;
4609
+ },
4610
+ has(property) {
4611
+ return k.includes(property) && property in props;
4612
+ },
4613
+ keys() {
4614
+ return k.filter((property) => property in props);
4615
+ }
4616
+ }, propTraps);
4617
+ });
4618
+ res.push(new Proxy({
4619
+ get(property) {
4620
+ return blocked.has(property) ? void 0 : props[property];
4621
+ },
4622
+ has(property) {
4623
+ return blocked.has(property) ? false : property in props;
4624
+ },
4625
+ keys() {
4626
+ return Object.keys(props).filter((k) => !blocked.has(k));
4627
+ }
4628
+ }, propTraps));
4629
+ return res;
4630
+ }
4571
4631
  const descriptors = Object.getOwnPropertyDescriptors(props);
4572
- const res = keys.map((k) => {
4632
+ keys.push(Object.keys(descriptors).filter((k) => !blocked.has(k)));
4633
+ return keys.map((k) => {
4573
4634
  const clone = {};
4574
4635
  for (let i2 = 0; i2 < k.length; i2++) {
4575
4636
  const key = k[i2];
4637
+ if (!(key in props))
4638
+ continue;
4576
4639
  Object.defineProperty(clone, key, descriptors[key] ? descriptors[key] : {
4577
4640
  get() {
4578
4641
  return props[key];
4579
4642
  },
4580
4643
  set() {
4581
4644
  return true;
4582
- }
4645
+ },
4646
+ enumerable: true
4583
4647
  });
4584
4648
  }
4585
4649
  return clone;
4586
4650
  });
4587
- res.push(new Proxy({
4588
- get(property) {
4589
- return blocked.has(property) ? void 0 : props[property];
4590
- },
4591
- has(property) {
4592
- return blocked.has(property) ? false : property in props;
4593
- },
4594
- keys() {
4595
- return Object.keys(props).filter((k) => !blocked.has(k));
4596
- }
4597
- }, propTraps));
4598
- return res;
4599
4651
  }
4600
4652
  function For(props) {
4601
4653
  const fallback = "fallback" in props && {
4602
4654
  fallback: () => props.fallback
4603
4655
  };
4604
- return createMemo(mapArray(() => props.each, props.children, fallback ? fallback : void 0));
4656
+ return createMemo(mapArray(() => props.each, props.children, fallback || void 0));
4605
4657
  }
4606
4658
  function Show(props) {
4607
4659
  let strictEqual = false;
@@ -4618,11 +4670,12 @@ function Show(props) {
4618
4670
  return fn ? untrack(() => child(c2)) : child;
4619
4671
  }
4620
4672
  return props.fallback;
4621
- });
4673
+ }, void 0, void 0);
4622
4674
  }
4623
4675
  function Switch(props) {
4624
4676
  let strictEqual = false;
4625
4677
  let keyed = false;
4678
+ const equals = (a2, b) => a2[0] === b[0] && (strictEqual ? a2[1] === b[1] : !a2[1] === !b[1]) && a2[2] === b[2];
4626
4679
  const conditions = children(() => props.children), evalConditions = createMemo(() => {
4627
4680
  let conds = conditions();
4628
4681
  if (!Array.isArray(conds))
@@ -4636,7 +4689,7 @@ function Switch(props) {
4636
4689
  }
4637
4690
  return [-1];
4638
4691
  }, void 0, {
4639
- equals: (a2, b) => a2[0] === b[0] && (strictEqual ? a2[1] === b[1] : !a2[1] === !b[1]) && a2[2] === b[2]
4692
+ equals
4640
4693
  });
4641
4694
  return createMemo(() => {
4642
4695
  const [index, when, cond] = evalConditions();
@@ -4646,7 +4699,7 @@ function Switch(props) {
4646
4699
  const fn = typeof c2 === "function" && c2.length > 0;
4647
4700
  strictEqual = keyed || fn;
4648
4701
  return fn ? untrack(() => c2(when)) : c2;
4649
- });
4702
+ }, void 0, void 0);
4650
4703
  }
4651
4704
  function Match(props) {
4652
4705
  return props;
@@ -4654,18 +4707,18 @@ function Match(props) {
4654
4707
  const booleans = ["allowfullscreen", "async", "autofocus", "autoplay", "checked", "controls", "default", "disabled", "formnovalidate", "hidden", "indeterminate", "ismap", "loop", "multiple", "muted", "nomodule", "novalidate", "open", "playsinline", "readonly", "required", "reversed", "seamless", "selected"];
4655
4708
  const Properties = /* @__PURE__ */ new Set(["className", "value", "readOnly", "formNoValidate", "isMap", "noModule", "playsInline", ...booleans]);
4656
4709
  const ChildProperties = /* @__PURE__ */ new Set(["innerHTML", "textContent", "innerText", "children"]);
4657
- const Aliases = {
4710
+ const Aliases = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
4658
4711
  className: "class",
4659
4712
  htmlFor: "for"
4660
- };
4661
- const PropAliases = {
4713
+ });
4714
+ const PropAliases = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
4662
4715
  class: "className",
4663
4716
  formnovalidate: "formNoValidate",
4664
4717
  ismap: "isMap",
4665
4718
  nomodule: "noModule",
4666
4719
  playsinline: "playsInline",
4667
4720
  readonly: "readOnly"
4668
- };
4721
+ });
4669
4722
  const DelegatedEvents = /* @__PURE__ */ new Set(["beforeinput", "click", "dblclick", "contextmenu", "focusin", "focusout", "input", "keydown", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup", "pointerdown", "pointermove", "pointerout", "pointerover", "pointerup", "touchend", "touchmove", "touchstart"]);
4670
4723
  const SVGElements = /* @__PURE__ */ new Set([
4671
4724
  "altGlyph",
@@ -4749,11 +4802,6 @@ const SVGNamespace = {
4749
4802
  xlink: "http://www.w3.org/1999/xlink",
4750
4803
  xml: "http://www.w3.org/XML/1998/namespace"
4751
4804
  };
4752
- function memo(fn, equals) {
4753
- return createMemo(fn, void 0, !equals ? {
4754
- equals
4755
- } : void 0);
4756
- }
4757
4805
  function reconcileArrays(parentNode, a2, b) {
4758
4806
  let bLength = b.length, aEnd = a2.length, bEnd = bLength, aStart = 0, bStart = 0, after = a2[aEnd - 1].nextSibling, map = null;
4759
4807
  while (aStart < aEnd || bStart < bEnd) {
@@ -4811,12 +4859,12 @@ function reconcileArrays(parentNode, a2, b) {
4811
4859
  }
4812
4860
  }
4813
4861
  const $$EVENTS = "_$DX_DELEGATE";
4814
- function render(code, element, init) {
4862
+ function render(code, element, init, options = {}) {
4815
4863
  let disposer;
4816
4864
  createRoot((dispose2) => {
4817
4865
  disposer = dispose2;
4818
4866
  element === document ? code() : insert(element, code(), element.firstChild ? null : void 0, init);
4819
- });
4867
+ }, options.owner);
4820
4868
  return () => {
4821
4869
  disposer();
4822
4870
  element.textContent = "";
@@ -4913,11 +4961,14 @@ function style(node, value, prev) {
4913
4961
  }
4914
4962
  return prev;
4915
4963
  }
4916
- function spread(node, accessor, isSVG, skipChildren) {
4917
- if (typeof accessor === "function") {
4918
- createRenderEffect((current) => spreadExpression(node, accessor(), current, isSVG, skipChildren));
4919
- } else
4920
- spreadExpression(node, accessor, void 0, isSVG, skipChildren);
4964
+ function spread(node, props = {}, isSVG, skipChildren) {
4965
+ const prevProps = {};
4966
+ if (!skipChildren) {
4967
+ createRenderEffect(() => prevProps.children = insertExpression(node, props.children, prevProps.children));
4968
+ }
4969
+ createRenderEffect(() => props.ref && props.ref(node));
4970
+ createRenderEffect(() => assign(node, props, isSVG, true, prevProps, true));
4971
+ return prevProps;
4921
4972
  }
4922
4973
  function use(fn, element, arg) {
4923
4974
  return untrack(() => fn(element, arg));
@@ -4975,9 +5026,8 @@ function assignProp(node, prop, value, prev, isSVG, skipRef) {
4975
5026
  if (value === prev)
4976
5027
  return prev;
4977
5028
  if (prop === "ref") {
4978
- if (!skipRef) {
5029
+ if (!skipRef)
4979
5030
  value(node);
4980
- }
4981
5031
  } else if (prop.slice(0, 3) === "on:") {
4982
5032
  const e2 = prop.slice(3);
4983
5033
  prev && node.removeEventListener(e2, prev);
@@ -5032,7 +5082,7 @@ function eventHandler(e2) {
5032
5082
  sharedConfig.done = true;
5033
5083
  document.querySelectorAll("[id^=pl-]").forEach((elem) => elem.remove());
5034
5084
  }
5035
- while (node !== null) {
5085
+ while (node) {
5036
5086
  const handler = node[key];
5037
5087
  if (handler && !node.disabled) {
5038
5088
  const data = node[`${key}Data`];
@@ -5040,18 +5090,9 @@ function eventHandler(e2) {
5040
5090
  if (e2.cancelBubble)
5041
5091
  return;
5042
5092
  }
5043
- node = node.host && node.host !== node && node.host instanceof Node ? node.host : node.parentNode;
5093
+ node = node._$host || node.parentNode || node.host;
5044
5094
  }
5045
5095
  }
5046
- function spreadExpression(node, props, prevProps = {}, isSVG, skipChildren) {
5047
- props || (props = {});
5048
- if (!skipChildren) {
5049
- createRenderEffect(() => prevProps.children = insertExpression(node, props.children, prevProps.children));
5050
- }
5051
- createRenderEffect(() => props.ref && props.ref(node));
5052
- createRenderEffect(() => assign(node, props, isSVG, true, prevProps, true));
5053
- return prevProps;
5054
- }
5055
5096
  function insertExpression(parent, value, current, marker, unwrapArray) {
5056
5097
  if (sharedConfig.context && !current)
5057
5098
  current = [...parent.childNodes];
@@ -5165,7 +5206,7 @@ function normalizeIncomingArray(normalized, array, current, unwrap2) {
5165
5206
  }
5166
5207
  return dynamic;
5167
5208
  }
5168
- function appendNodes(parent, array, marker) {
5209
+ function appendNodes(parent, array, marker = null) {
5169
5210
  for (let i2 = 0, len = array.length; i2 < len; i2++)
5170
5211
  parent.insertBefore(array[i2], marker);
5171
5212
  }
@@ -5224,10 +5265,11 @@ function Portal(props) {
5224
5265
  const container = createElement(props.isSVG ? "g" : "div", props.isSVG), renderRoot = useShadow && container.attachShadow ? container.attachShadow({
5225
5266
  mode: "open"
5226
5267
  }) : container;
5227
- Object.defineProperty(container, "host", {
5268
+ Object.defineProperty(container, "_$host", {
5228
5269
  get() {
5229
5270
  return marker.parentNode;
5230
- }
5271
+ },
5272
+ configurable: true
5231
5273
  });
5232
5274
  insert(renderRoot, renderPortal());
5233
5275
  mount.appendChild(container);
@@ -5530,9 +5572,9 @@ function wrap$1(value, name) {
5530
5572
  for (let i2 = 0, l2 = keys.length; i2 < l2; i2++) {
5531
5573
  const prop = keys[i2];
5532
5574
  if (desc[prop].get) {
5533
- const get = desc[prop].get.bind(p2);
5534
5575
  Object.defineProperty(value, prop, {
5535
- get
5576
+ enumerable: desc[prop].enumerable,
5577
+ get: desc[prop].get.bind(p2)
5536
5578
  });
5537
5579
  }
5538
5580
  }
@@ -5588,7 +5630,7 @@ function getDataNodes(target) {
5588
5630
  function getDataNode(nodes, property, value) {
5589
5631
  return nodes[property] || (nodes[property] = createDataNode(value));
5590
5632
  }
5591
- function proxyDescriptor(target, property) {
5633
+ function proxyDescriptor$1(target, property) {
5592
5634
  const desc = Reflect.getOwnPropertyDescriptor(target, property);
5593
5635
  if (!desc || desc.get || !desc.configurable || property === $PROXY || property === $NODE || property === $NAME)
5594
5636
  return desc;
@@ -5640,8 +5682,7 @@ const proxyTraps$1 = {
5640
5682
  has(target, property) {
5641
5683
  if (property === $RAW || property === $PROXY || property === $TRACK || property === $NODE || property === "__proto__")
5642
5684
  return true;
5643
- const tracked = getDataNodes(target)[property];
5644
- tracked && tracked();
5685
+ this.get(target, property, target);
5645
5686
  return property in target;
5646
5687
  },
5647
5688
  set() {
@@ -5651,16 +5692,15 @@ const proxyTraps$1 = {
5651
5692
  return true;
5652
5693
  },
5653
5694
  ownKeys,
5654
- getOwnPropertyDescriptor: proxyDescriptor
5695
+ getOwnPropertyDescriptor: proxyDescriptor$1
5655
5696
  };
5656
5697
  function setProperty(state, property, value, deleting = false) {
5657
5698
  if (!deleting && state[property] === value)
5658
5699
  return;
5659
- const prev = state[property];
5660
- const len = state.length;
5661
- if (value === void 0) {
5700
+ const prev = state[property], len = state.length;
5701
+ if (value === void 0)
5662
5702
  delete state[property];
5663
- } else
5703
+ else
5664
5704
  state[property] = value;
5665
5705
  let nodes = getDataNodes(state), node;
5666
5706
  if (node = getDataNode(nodes, property, prev))
@@ -5756,60 +5796,236 @@ var THEME = /* @__PURE__ */ ((THEME2) => {
5756
5796
  THEME2["LIGHT"] = "LIGHT";
5757
5797
  return THEME2;
5758
5798
  })(THEME || {});
5759
- function hexToRgb(hex) {
5760
- if (hex[0] === "#") {
5761
- hex = hex.slice(1);
5762
- }
5763
- const bigint = parseInt(hex, 16);
5764
- const r = bigint >> 16 & 255;
5765
- const g = bigint >> 8 & 255;
5766
- const b = bigint & 255;
5767
- return [r, g, b].join(",");
5768
- }
5769
- const generateLightColors = (accentColor) => ({
5770
- primary: accentColor,
5771
- secondary: `rgba(${hexToRgb(accentColor)}, 0.16)`,
5772
- backgroundPrimary: "#FFFFFF",
5773
- backgroundSecondary: "#EFF1F3",
5774
- font: {
5775
- accent: accentColor,
5799
+ const defaultLightColorsSet = {
5800
+ constant: {
5801
+ black: "#000000",
5802
+ white: "#FFFFFF"
5803
+ },
5804
+ connectButton: {
5805
+ background: "#31A6F5",
5806
+ foreground: "#FFFFFF"
5807
+ },
5808
+ accent: "#31A6F5",
5809
+ icon: {
5776
5810
  primary: "#0F0F0F",
5777
5811
  secondary: "#7A8999",
5778
- third: "#7A8999"
5812
+ tertiary: "#C1CAD2",
5813
+ success: "#29CC6A"
5814
+ },
5815
+ background: {
5816
+ primary: "#FFFFFF",
5817
+ secondary: "#F1F3F5"
5818
+ },
5819
+ text: {
5820
+ primary: "#0F0F0F",
5821
+ secondary: "#7A8999",
5822
+ subhead: "#6A7785"
5779
5823
  }
5780
- });
5781
- const generateDarkColors = (accentColor) => ({
5782
- primary: accentColor,
5783
- secondary: accentColor,
5784
- backgroundPrimary: "#121214",
5785
- backgroundSecondary: "#18181A",
5786
- font: {
5787
- accent: "#E5E5EA",
5824
+ };
5825
+ const defaultDarkColorsSet = {
5826
+ constant: {
5827
+ black: "#000000",
5828
+ white: "#FFFFFF"
5829
+ },
5830
+ connectButton: {
5831
+ background: "#31A6F5",
5832
+ foreground: "#FFFFFF"
5833
+ },
5834
+ accent: "#E5E5EA",
5835
+ icon: {
5836
+ primary: "#E5E5EA",
5837
+ secondary: "#909099",
5838
+ tertiary: "#434347",
5839
+ success: "#29CC6A"
5840
+ },
5841
+ background: {
5842
+ primary: "#121214",
5843
+ secondary: "#18181A"
5844
+ },
5845
+ text: {
5788
5846
  primary: "#E5E5EA",
5789
5847
  secondary: "#7D7D85",
5790
- third: "#909099"
5848
+ subhead: "#8C8C93"
5791
5849
  }
5792
- });
5793
- const defaultLightColors = generateLightColors("#31A6F5");
5794
- const defaultDarkColors = generateDarkColors("#262629");
5795
- const [themeState, setThemeState] = createStore({
5796
- theme: THEME.LIGHT,
5797
- accentColor: defaultLightColors.primary,
5798
- colors: defaultLightColors
5799
- });
5800
- function setTheme(theme) {
5801
- if (theme === THEME.LIGHT) {
5802
- setThemeState({
5803
- theme,
5804
- colors: defaultLightColors
5850
+ };
5851
+ var isMergeableObject = function isMergeableObject2(value) {
5852
+ return isNonNullObject(value) && !isSpecial(value);
5853
+ };
5854
+ function isNonNullObject(value) {
5855
+ return !!value && typeof value === "object";
5856
+ }
5857
+ function isSpecial(value) {
5858
+ var stringValue = Object.prototype.toString.call(value);
5859
+ return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value);
5860
+ }
5861
+ var canUseSymbol = typeof Symbol === "function" && Symbol.for;
5862
+ var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for("react.element") : 60103;
5863
+ function isReactElement(value) {
5864
+ return value.$$typeof === REACT_ELEMENT_TYPE;
5865
+ }
5866
+ function emptyTarget(val) {
5867
+ return Array.isArray(val) ? [] : {};
5868
+ }
5869
+ function cloneUnlessOtherwiseSpecified(value, options) {
5870
+ return options.clone !== false && options.isMergeableObject(value) ? deepmerge(emptyTarget(value), value, options) : value;
5871
+ }
5872
+ function defaultArrayMerge(target, source, options) {
5873
+ return target.concat(source).map(function(element) {
5874
+ return cloneUnlessOtherwiseSpecified(element, options);
5875
+ });
5876
+ }
5877
+ function getMergeFunction(key, options) {
5878
+ if (!options.customMerge) {
5879
+ return deepmerge;
5880
+ }
5881
+ var customMerge = options.customMerge(key);
5882
+ return typeof customMerge === "function" ? customMerge : deepmerge;
5883
+ }
5884
+ function getEnumerableOwnPropertySymbols(target) {
5885
+ return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol) {
5886
+ return target.propertyIsEnumerable(symbol);
5887
+ }) : [];
5888
+ }
5889
+ function getKeys(target) {
5890
+ return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target));
5891
+ }
5892
+ function propertyIsOnObject(object, property) {
5893
+ try {
5894
+ return property in object;
5895
+ } catch (_) {
5896
+ return false;
5897
+ }
5898
+ }
5899
+ function propertyIsUnsafe(target, key) {
5900
+ return propertyIsOnObject(target, key) && !(Object.hasOwnProperty.call(target, key) && Object.propertyIsEnumerable.call(target, key));
5901
+ }
5902
+ function mergeObject(target, source, options) {
5903
+ var destination = {};
5904
+ if (options.isMergeableObject(target)) {
5905
+ getKeys(target).forEach(function(key) {
5906
+ destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
5805
5907
  });
5908
+ }
5909
+ getKeys(source).forEach(function(key) {
5910
+ if (propertyIsUnsafe(target, key)) {
5911
+ return;
5912
+ }
5913
+ if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
5914
+ destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
5915
+ } else {
5916
+ destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
5917
+ }
5918
+ });
5919
+ return destination;
5920
+ }
5921
+ function deepmerge(target, source, options) {
5922
+ options = options || {};
5923
+ options.arrayMerge = options.arrayMerge || defaultArrayMerge;
5924
+ options.isMergeableObject = options.isMergeableObject || isMergeableObject;
5925
+ options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
5926
+ var sourceIsArray = Array.isArray(source);
5927
+ var targetIsArray = Array.isArray(target);
5928
+ var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
5929
+ if (!sourceAndTargetTypesMatch) {
5930
+ return cloneUnlessOtherwiseSpecified(source, options);
5931
+ } else if (sourceIsArray) {
5932
+ return options.arrayMerge(target, source, options);
5806
5933
  } else {
5807
- setThemeState({
5808
- theme,
5809
- colors: defaultDarkColors
5810
- });
5934
+ return mergeObject(target, source, options);
5811
5935
  }
5812
5936
  }
5937
+ deepmerge.all = function deepmergeAll(array, options) {
5938
+ if (!Array.isArray(array)) {
5939
+ throw new Error("first argument should be an array");
5940
+ }
5941
+ return array.reduce(function(prev, next) {
5942
+ return deepmerge(prev, next, options);
5943
+ }, {});
5944
+ };
5945
+ var deepmerge_1 = deepmerge;
5946
+ var cjs = deepmerge_1;
5947
+ /*!
5948
+ * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
5949
+ *
5950
+ * Copyright (c) 2014-2017, Jon Schlinkert.
5951
+ * Released under the MIT License.
5952
+ */
5953
+ function isObject(o2) {
5954
+ return Object.prototype.toString.call(o2) === "[object Object]";
5955
+ }
5956
+ function isPlainObject(o2) {
5957
+ var ctor, prot;
5958
+ if (isObject(o2) === false)
5959
+ return false;
5960
+ ctor = o2.constructor;
5961
+ if (ctor === void 0)
5962
+ return true;
5963
+ prot = ctor.prototype;
5964
+ if (isObject(prot) === false)
5965
+ return false;
5966
+ if (prot.hasOwnProperty("isPrototypeOf") === false) {
5967
+ return false;
5968
+ }
5969
+ return true;
5970
+ }
5971
+ function mergeOptions(options, defaultOptions) {
5972
+ if (!options) {
5973
+ return defaultOptions;
5974
+ }
5975
+ const overwriteMerge = (_, sourceArray, __) => sourceArray;
5976
+ return cjs(defaultOptions, options, {
5977
+ arrayMerge: overwriteMerge,
5978
+ isMergeableObject: isPlainObject
5979
+ });
5980
+ }
5981
+ const [themeState, setThemeState] = createStore({
5982
+ theme: THEME.LIGHT,
5983
+ colors: defaultLightColorsSet,
5984
+ borderRadius: "m"
5985
+ });
5986
+ const themeColorsMappingDefault = {
5987
+ [THEME.LIGHT]: defaultLightColorsSet,
5988
+ [THEME.DARK]: defaultDarkColorsSet
5989
+ };
5990
+ const themeCustomColors = {
5991
+ [THEME.LIGHT]: void 0,
5992
+ [THEME.DARK]: void 0
5993
+ };
5994
+ function setTheme(theme, colorsSet) {
5995
+ if (colorsSet) {
5996
+ themeCustomColors[THEME.DARK] = mergeOptions(
5997
+ colorsSet[THEME.DARK],
5998
+ themeCustomColors[THEME.DARK]
5999
+ );
6000
+ themeCustomColors[THEME.LIGHT] = mergeOptions(
6001
+ colorsSet[THEME.LIGHT],
6002
+ themeCustomColors[THEME.LIGHT]
6003
+ );
6004
+ }
6005
+ setThemeState({
6006
+ theme,
6007
+ colors: mergeOptions(themeCustomColors[theme], themeColorsMappingDefault[theme])
6008
+ });
6009
+ }
6010
+ function setBorderRadius(borderRadius) {
6011
+ setThemeState({ borderRadius });
6012
+ }
6013
+ function setColors(colorsSet) {
6014
+ themeCustomColors[THEME.DARK] = mergeOptions(
6015
+ colorsSet[THEME.DARK],
6016
+ themeCustomColors[THEME.DARK]
6017
+ );
6018
+ themeCustomColors[THEME.LIGHT] = mergeOptions(
6019
+ colorsSet[THEME.LIGHT],
6020
+ themeCustomColors[THEME.LIGHT]
6021
+ );
6022
+ setThemeState((state) => ({
6023
+ colors: mergeOptions(
6024
+ themeCustomColors[state.theme],
6025
+ themeColorsMappingDefault[state.theme]
6026
+ )
6027
+ }));
6028
+ }
5813
6029
  const GlobalStyles = () => {
5814
6030
  document.body.addEventListener("mousedown", () => document.body.classList.add("using-mouse"));
5815
6031
  document.body.addEventListener("keydown", (event) => {
@@ -5846,22 +6062,41 @@ const GlobalStyles = () => {
5846
6062
  `;
5847
6063
  return createComponent(Styles, {});
5848
6064
  };
6065
+ function hexToRgb(hex) {
6066
+ if (hex[0] === "#") {
6067
+ hex = hex.slice(1);
6068
+ }
6069
+ const bigint = parseInt(hex, 16);
6070
+ const r = bigint >> 16 & 255;
6071
+ const g = bigint >> 8 & 255;
6072
+ const b = bigint & 255;
6073
+ return [r, g, b].join(",");
6074
+ }
6075
+ function rgba(color, opacity) {
6076
+ if (color[0] === "#") {
6077
+ color = hexToRgb(color);
6078
+ }
6079
+ return `rgba(${color}, ${opacity})`;
6080
+ }
6081
+ const borders$3 = {
6082
+ m: "16px",
6083
+ s: "8px",
6084
+ none: "0"
6085
+ };
5849
6086
  const ButtonStyled$2 = styled.button`
5850
- background-color: ${(props) => props.appearance === "flat" ? props.theme.colors.backgroundPrimary : props.theme.colors[props.appearance]};
5851
- color: ${(props) => props.appearance === "primary" ? "white" : props.appearance === "flat" ? props.theme.colors.font.primary : props.theme.colors.font.accent};
6087
+ background-color: ${(props) => rgba(props.theme.colors.accent, 0.12)};
6088
+ color: ${(props) => props.theme.colors.accent};
5852
6089
 
5853
- box-shadow: ${(props) => props.appearance === "flat" ? "0 4px 24px rgba(0, 0, 0, 0.16);" : "unset;"}
5854
-
5855
6090
  padding: 9px 16px;
5856
6091
  border: none;
5857
- border-radius: 16px;
6092
+ border-radius: ${(props) => borders$3[props.theme.borderRadius]};
5858
6093
  cursor: pointer;
5859
6094
 
5860
6095
  font-size: 14px;
5861
6096
  font-weight: 590;
5862
6097
  line-height: 18px;
5863
6098
  letter-spacing: -0.154px;
5864
-
6099
+
5865
6100
  transition: transform 0.1s ease-in-out;
5866
6101
 
5867
6102
  &:hover {
@@ -5873,13 +6108,12 @@ const ButtonStyled$2 = styled.button`
5873
6108
  }
5874
6109
  `;
5875
6110
  const Button = (props) => {
5876
- const appearance = () => props.appearance || "primary";
5877
6111
  return createComponent(ButtonStyled$2, {
5878
6112
  get ["class"]() {
5879
6113
  return props.class;
5880
6114
  },
5881
- get appearance() {
5882
- return appearance();
6115
+ get id() {
6116
+ return props.id;
5883
6117
  },
5884
6118
  onClick: () => props.onClick(),
5885
6119
  ref(r$) {
@@ -6287,7 +6521,7 @@ const rotationDegrees = {
6287
6521
  };
6288
6522
  const ArrowIcon = (props) => {
6289
6523
  const theme = useTheme();
6290
- const fill = () => props.fill || theme.colors.font.third;
6524
+ const fill = () => props.fill || theme.colors.icon.secondary;
6291
6525
  const direction = () => props.direction || "left";
6292
6526
  const Svg = styled("svg")`
6293
6527
  transform: rotate(${(props2) => rotationDegrees[props2.svgDirection]}deg);
@@ -6312,7 +6546,7 @@ const ArrowIcon = (props) => {
6312
6546
  const _tmpl$$e = /* @__PURE__ */ template$1(`<svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0.900031 0.900397L5.00002 5.00039M5.00002 5.00039L9.10003 9.1004M5.00002 5.00039L9.10003 0.900391M5.00002 5.00039L0.900024 9.1004" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"></path></svg>`);
6313
6547
  const CloseIcon = (props) => {
6314
6548
  const theme = useTheme();
6315
- const fill = () => props.fill || theme.colors.font.third;
6549
+ const fill = () => props.fill || theme.colors.icon.secondary;
6316
6550
  return (() => {
6317
6551
  const _el$ = _tmpl$$e.cloneNode(true), _el$2 = _el$.firstChild;
6318
6552
  createRenderEffect(() => setAttribute(_el$2, "stroke", fill()));
@@ -6327,7 +6561,7 @@ const IconButtonStyled = styled.button`
6327
6561
  width: 32px;
6328
6562
  height: 32px;
6329
6563
  border-radius: 50%;
6330
- background-color: ${(props) => props.theme.colors.backgroundSecondary};
6564
+ background-color: ${(props) => props.theme.colors.background.secondary};
6331
6565
  border: none;
6332
6566
  cursor: pointer;
6333
6567
 
@@ -6412,14 +6646,12 @@ const ModalBackgroundStyled = styled.div`
6412
6646
  const ModalWrapperClass = u`
6413
6647
  position: relative;
6414
6648
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 16px 64px rgba(0, 0, 0, 0.16);
6415
- border-radius: 24px;
6416
6649
  min-height: 100px;
6417
6650
  width: 440px;
6418
6651
  padding: 44px 56px 24px;
6419
6652
 
6420
6653
  ${media("mobile")} {
6421
6654
  width: 100%;
6422
- border-radius: 24px 24px 0 0;
6423
6655
  }
6424
6656
  `;
6425
6657
  const CloseButtonStyled = styled(IconButton)`
@@ -6430,6 +6662,11 @@ const CloseButtonStyled = styled(IconButton)`
6430
6662
  const _tmpl$$d = /* @__PURE__ */ template$1(`<div></div>`);
6431
6663
  const clickOutside = clickOutside$1;
6432
6664
  const keyPressed = escPressed;
6665
+ const borders$2 = {
6666
+ m: "24px",
6667
+ s: "16px",
6668
+ none: "0"
6669
+ };
6433
6670
  const Modal = (props) => {
6434
6671
  const theme = useTheme();
6435
6672
  return createComponent(Transition, {
@@ -6490,9 +6727,23 @@ const Modal = (props) => {
6490
6727
  onClick: () => props.onClose()
6491
6728
  }), null);
6492
6729
  insert(_el$, () => props.children, null);
6493
- createRenderEffect(() => className(_el$, cn(ModalWrapperClass, props.class, u`
6494
- background-color: ${theme.colors.backgroundPrimary};
6495
- `)));
6730
+ createRenderEffect((_p$) => {
6731
+ const _v$ = props.id, _v$2 = cn(ModalWrapperClass, props.class, u`
6732
+ background-color: ${theme.colors.background.primary};
6733
+ border-radius: ${borders$2[theme.borderRadius]};
6734
+
6735
+ ${media("mobile")} {
6736
+ border-radius: ${borders$2[theme.borderRadius]}
6737
+ ${borders$2[theme.borderRadius]} 0 0;
6738
+ }
6739
+ `);
6740
+ _v$ !== _p$._v$ && setAttribute(_el$, "id", _p$._v$ = _v$);
6741
+ _v$2 !== _p$._v$2 && className(_el$, _p$._v$2 = _v$2);
6742
+ return _p$;
6743
+ }, {
6744
+ _v$: void 0,
6745
+ _v$2: void 0
6746
+ });
6496
6747
  return _el$;
6497
6748
  }
6498
6749
  });
@@ -6537,7 +6788,7 @@ const H1Styled$2 = styled.h1`
6537
6788
  text-align: center;
6538
6789
  letter-spacing: 0.072px;
6539
6790
 
6540
- color: ${(props) => props.theme.colors.font.primary};
6791
+ color: ${(props) => props.theme.colors.text.primary};
6541
6792
 
6542
6793
  margin-top: 0;
6543
6794
  margin-bottom: 6px;
@@ -6550,7 +6801,7 @@ const H1 = (props) => {
6550
6801
  },
6551
6802
  get children() {
6552
6803
  var _a;
6553
- return memo(() => !!props.translationKey, true)() ? t2(props.translationKey, props.translationValues, (_a = props.children) == null ? void 0 : _a.toString()) : props.children;
6804
+ return createMemo(() => !!props.translationKey)() ? t2(props.translationKey, props.translationValues, (_a = props.children) == null ? void 0 : _a.toString()) : props.children;
6554
6805
  }
6555
6806
  });
6556
6807
  };
@@ -6563,7 +6814,7 @@ const H2Styled$1 = styled.h2`
6563
6814
  text-align: center;
6564
6815
  letter-spacing: -0.32px;
6565
6816
 
6566
- color: ${(props) => props.theme.colors.font.secondary};
6817
+ color: ${(props) => props.theme.colors.text.secondary};
6567
6818
 
6568
6819
  margin-top: 0;
6569
6820
  margin-bottom: 32px;
@@ -6576,7 +6827,7 @@ const H2 = (props) => {
6576
6827
  },
6577
6828
  get children() {
6578
6829
  var _a;
6579
- return memo(() => !!props.translationKey, true)() ? t2(props.translationKey, props.translationValues, (_a = props.children) == null ? void 0 : _a.toString()) : props.children;
6830
+ return createMemo(() => !!props.translationKey)() ? t2(props.translationKey, props.translationValues, (_a = props.children) == null ? void 0 : _a.toString()) : props.children;
6580
6831
  }
6581
6832
  });
6582
6833
  };
@@ -6588,17 +6839,17 @@ const H3Styled = styled.h3`
6588
6839
 
6589
6840
  letter-spacing: -0.24px;
6590
6841
 
6591
- color: ${(props) => props.theme.colors.font.primary};
6842
+ color: ${(props) => props.theme.colors.text.primary};
6592
6843
 
6593
6844
  margin-top: 0;
6594
- margin-bottom: 0px;
6845
+ margin-bottom: 0;
6595
6846
  `;
6596
6847
  const H3 = (props) => {
6597
6848
  const [t2] = useI18n();
6598
6849
  return createComponent(H3Styled, {
6599
6850
  get children() {
6600
6851
  var _a;
6601
- return memo(() => !!props.translationKey, true)() ? t2(props.translationKey, props.translationValues, (_a = props.children) == null ? void 0 : _a.toString()) : props.children;
6852
+ return createMemo(() => !!props.translationKey)() ? t2(props.translationKey, props.translationValues, (_a = props.children) == null ? void 0 : _a.toString()) : props.children;
6602
6853
  }
6603
6854
  });
6604
6855
  };
@@ -6614,7 +6865,7 @@ const TextStyled$3 = styled.div`
6614
6865
  const Text = (inputs) => {
6615
6866
  const theme = useTheme();
6616
6867
  const [t2] = useI18n();
6617
- const color = () => inputs.color || theme.colors.font.primary;
6868
+ const color = () => inputs.color || theme.colors.text.primary;
6618
6869
  const props = mergeProps({
6619
6870
  fontSize: "14px",
6620
6871
  fontWeight: "510",
@@ -6642,14 +6893,14 @@ const Text = (inputs) => {
6642
6893
  },
6643
6894
  get children() {
6644
6895
  var _a;
6645
- return memo(() => !!props.translationKey, true)() ? t2(props.translationKey, props.translationValues, (_a = props.children) == null ? void 0 : _a.toString()) : props.children;
6896
+ return createMemo(() => !!props.translationKey)() ? t2(props.translationKey, props.translationValues, (_a = props.children) == null ? void 0 : _a.toString()) : props.children;
6646
6897
  }
6647
6898
  });
6648
6899
  };
6649
6900
  const _tmpl$$c = /* @__PURE__ */ template$1(`<svg width="16" height="15" viewBox="0 0 16 15" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M10.1839 12.7069C9.6405 13.6507 9.36881 14.1226 9.05907 14.348C8.42775 14.8074 7.57228 14.8074 6.94096 14.348C6.63122 14.1226 6.35952 13.6507 5.81613 12.7069L1.52066 5.24638C0.768635 3.94024 0.392625 3.28717 0.337617 2.75894C0.225505 1.68236 0.818944 0.655911 1.80788 0.215893C2.29309 0 3.04667 0 4.55383 0H11.4462C12.9534 0 13.7069 0 14.1922 0.215893C15.1811 0.655911 15.7745 1.68236 15.6624 2.75894C15.6074 3.28717 15.2314 3.94024 14.4794 5.24638L10.1839 12.7069ZM7.10002 11.3412L2.56139 3.48002C2.31995 3.06185 2.19924 2.85276 2.18146 2.68365C2.14523 2.33896 2.33507 2.01015 2.65169 1.86919C2.80703 1.80002 3.04847 1.80002 3.53133 1.80002H3.53134L7.10002 1.80002V11.3412ZM8.90001 11.3412L13.4387 3.48002C13.6801 3.06185 13.8008 2.85276 13.8186 2.68365C13.8548 2.33896 13.665 2.01015 13.3484 1.86919C13.193 1.80002 12.9516 1.80002 12.4687 1.80002L8.90001 1.80002V11.3412Z"></path></svg>`);
6650
6901
  const TonIcon = (props) => {
6651
6902
  const theme = useTheme();
6652
- const fill = () => props.fill || theme.colors.font.primary;
6903
+ const fill = () => props.fill || theme.colors.icon.primary;
6653
6904
  return (() => {
6654
6905
  const _el$ = _tmpl$$c.cloneNode(true), _el$2 = _el$.firstChild;
6655
6906
  createRenderEffect(() => setAttribute(_el$2, "fill", fill()));
@@ -6658,7 +6909,8 @@ const TonIcon = (props) => {
6658
6909
  };
6659
6910
  const _tmpl$$b = /* @__PURE__ */ template$1(`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="12" r="11"></circle><path d="M7.5 13L10 15.5L16.5 9" stroke="white" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"></path></svg>`);
6660
6911
  const SuccessIcon = (props) => {
6661
- const fill = () => props.fill || "#29CC6A";
6912
+ const theme = useTheme();
6913
+ const fill = () => props.fill || theme.colors.icon.success;
6662
6914
  return (() => {
6663
6915
  const _el$ = _tmpl$$b.cloneNode(true), _el$2 = _el$.firstChild;
6664
6916
  createRenderEffect((_p$) => {
@@ -6676,7 +6928,7 @@ const SuccessIcon = (props) => {
6676
6928
  const _tmpl$$a = /* @__PURE__ */ template$1(`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="12" r="11"></circle><path fill-rule="evenodd" clip-rule="evenodd" d="M7.86358 9.13637C7.51211 8.7849 7.51211 8.21505 7.86358 7.86358C8.21505 7.51211 8.7849 7.51211 9.13637 7.86358L12 10.7272L14.8636 7.86358C15.2151 7.51211 15.7849 7.51211 16.1364 7.86358C16.4878 8.21505 16.4878 8.7849 16.1364 9.13637L13.2728 12L16.1364 14.8636C16.4878 15.2151 16.4878 15.7849 16.1364 16.1364C15.7849 16.4878 15.2151 16.4878 14.8636 16.1364L12 13.2728L9.13637 16.1364C8.7849 16.4878 8.21505 16.4878 7.86358 16.1364C7.51211 15.7849 7.51211 15.2151 7.86358 14.8636L10.7272 12L7.86358 9.13637Z" fill="white"></path></svg>`);
6677
6929
  const ErrorIcon = (props) => {
6678
6930
  const theme = useTheme();
6679
- const fill = () => props.fill || theme.colors.font.third;
6931
+ const fill = () => props.fill || theme.colors.icon.secondary;
6680
6932
  return (() => {
6681
6933
  const _el$ = _tmpl$$a.cloneNode(true), _el$2 = _el$.firstChild;
6682
6934
  createRenderEffect((_p$) => {
@@ -6694,7 +6946,7 @@ const ErrorIcon = (props) => {
6694
6946
  const _tmpl$$9 = /* @__PURE__ */ template$1(`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.00002 18.9282C11.8264 21.1373 16.7191 19.8263 18.9282 16C21.1374 12.1736 19.8264 7.28092 16 5.07178C12.1737 2.86264 7.28096 4.17364 5.07182 7.99998" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"></path></svg>`);
6695
6947
  const LoaderIcon = (props) => {
6696
6948
  const theme = useTheme();
6697
- const fill = () => props.fill || theme.colors.font.third;
6949
+ const fill = () => props.fill || theme.colors.icon.tertiary;
6698
6950
  const rotateAnimation = h`
6699
6951
  0% {
6700
6952
  transform: rotate(0deg);
@@ -6724,7 +6976,7 @@ const TonConnectUiContext = createContext();
6724
6976
  const _tmpl$$8 = /* @__PURE__ */ template$1(`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M7.76228 2.09998H7.79998H10.2001H10.2378H10.2378H10.2378C11.0459 2.09997 11.7067 2.09996 12.2438 2.14384C12.7997 2.18926 13.3017 2.28614 13.7706 2.52505C14.5045 2.89896 15.1011 3.49558 15.475 4.22941C15.7139 4.6983 15.8108 5.20038 15.8562 5.75629C15.9001 6.29337 15.9001 6.95422 15.9001 7.76227V7.79998V8.1H16.2H16.2377C17.0457 8.09999 17.7066 8.09998 18.2437 8.14386C18.7996 8.18928 19.3017 8.28616 19.7705 8.52507C20.5044 8.89898 21.101 9.4956 21.4749 10.2294C21.7138 10.6983 21.8107 11.2004 21.8561 11.7563C21.9 12.2934 21.9 12.9542 21.9 13.7623V13.8V16.2V16.2377C21.9 17.0458 21.9 17.7066 21.8561 18.2437C21.8107 18.7996 21.7138 19.3017 21.4749 19.7706C21.101 20.5044 20.5044 21.101 19.7705 21.4749C19.3017 21.7138 18.7996 21.8107 18.2437 21.8561C17.7066 21.9 17.0458 21.9 16.2378 21.9H16.2377H16.2H13.8H13.7623H13.7622C12.9542 21.9 12.2934 21.9 11.7563 21.8561C11.2004 21.8107 10.6983 21.7138 10.2294 21.4749C9.49561 21.101 8.89898 20.5044 8.52507 19.7706C8.28616 19.3017 8.18928 18.7996 8.14386 18.2437C8.09998 17.7066 8.09999 17.0458 8.1 16.2377V16.2V15.9H7.79998H7.76227H7.76218C6.95417 15.9 6.29335 15.9 5.75629 15.8561C5.20038 15.8107 4.6983 15.7138 4.22941 15.4749C3.49558 15.101 2.89896 14.5044 2.52505 13.7705C2.28614 13.3017 2.18926 12.7996 2.14384 12.2437C2.09996 11.7066 2.09997 11.0458 2.09998 10.2377V10.2377V10.2377V10.2V7.79998V7.76228V7.76225V7.76224C2.09997 6.9542 2.09996 6.29336 2.14384 5.75629C2.18926 5.20038 2.28614 4.6983 2.52505 4.22941C2.89896 3.49558 3.49558 2.89896 4.22941 2.52505C4.6983 2.28614 5.20038 2.18926 5.75629 2.14384C6.29336 2.09996 6.95419 2.09997 7.76222 2.09998H7.76224H7.76228ZM8.1 14.1V13.8V13.7623C8.09999 12.9542 8.09998 12.2934 8.14386 11.7563C8.18928 11.2004 8.28616 10.6983 8.52507 10.2294C8.89898 9.4956 9.49561 8.89898 10.2294 8.52507C10.6983 8.28616 11.2004 8.18928 11.7563 8.14386C12.2934 8.09998 12.9542 8.09999 13.7623 8.1H13.8H14.1001V7.79998C14.1001 6.94505 14.0994 6.35798 14.0622 5.90287C14.0259 5.45827 13.9593 5.21944 13.8712 5.0466C13.6699 4.65146 13.3486 4.3302 12.9535 4.12886C12.7806 4.04079 12.5418 3.97419 12.0972 3.93786C11.6421 3.90068 11.055 3.89998 10.2001 3.89998H7.79998C6.94505 3.89998 6.35798 3.90068 5.90287 3.93786C5.45827 3.97419 5.21944 4.04079 5.0466 4.12886C4.65146 4.3302 4.3302 4.65146 4.12886 5.0466C4.04079 5.21944 3.97419 5.45827 3.93786 5.90287C3.90068 6.35798 3.89998 6.94505 3.89998 7.79998V10.2C3.89998 11.0549 3.90068 11.642 3.93786 12.0971C3.97419 12.5417 4.04079 12.7805 4.12886 12.9534C4.3302 13.3485 4.65146 13.6698 5.0466 13.8711C5.21944 13.9592 5.45827 14.0258 5.90287 14.0621C6.35798 14.0993 6.94505 14.1 7.79998 14.1H8.1ZM11.0466 10.1289C11.2195 10.0408 11.4583 9.97421 11.9029 9.93788C12.358 9.9007 12.9451 9.9 13.8 9.9H16.2C17.0549 9.9 17.642 9.9007 18.0971 9.93788C18.5417 9.97421 18.7805 10.0408 18.9534 10.1289C19.3485 10.3302 19.6698 10.6515 19.8711 11.0466C19.9592 11.2195 20.0258 11.4583 20.0621 11.9029C20.0993 12.358 20.1 12.9451 20.1 13.8V16.2C20.1 17.0549 20.0993 17.642 20.0621 18.0971C20.0258 18.5417 19.9592 18.7805 19.8711 18.9534C19.6698 19.3485 19.3485 19.6698 18.9534 19.8711C18.7805 19.9592 18.5417 20.0258 18.0971 20.0621C17.642 20.0993 17.0549 20.1 16.2 20.1H13.8C12.9451 20.1 12.358 20.0993 11.9029 20.0621C11.4583 20.0258 11.2195 19.9592 11.0466 19.8711C10.6515 19.6698 10.3302 19.3485 10.1289 18.9534C10.0408 18.7805 9.97421 18.5417 9.93788 18.0971C9.9007 17.642 9.9 17.0549 9.9 16.2V13.8C9.9 12.9451 9.9007 12.358 9.93788 11.9029C9.97421 11.4583 10.0408 11.2195 10.1289 11.0466C10.3302 10.6515 10.6515 10.3302 11.0466 10.1289Z"></path></svg>`);
6725
6977
  const CopyIcon = (props) => {
6726
6978
  const theme = useTheme();
6727
- const fill = () => props.fill || theme.colors.font.primary;
6979
+ const fill = () => props.fill || theme.colors.icon.primary;
6728
6980
  return (() => {
6729
6981
  const _el$ = _tmpl$$8.cloneNode(true), _el$2 = _el$.firstChild;
6730
6982
  createRenderEffect(() => setAttribute(_el$2, "fill", fill()));
@@ -6734,7 +6986,7 @@ const CopyIcon = (props) => {
6734
6986
  const _tmpl$$7 = /* @__PURE__ */ template$1(`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12.0001 4.00003H8.80012C7.11996 4.00003 6.27989 4.00003 5.63815 4.32701C5.07366 4.61463 4.61472 5.07357 4.3271 5.63806C4.00012 6.27979 4.00012 7.11987 4.00012 8.80003V15.2C4.00012 16.8802 4.00012 17.7203 4.3271 18.362C4.61472 18.9265 5.07366 19.3854 5.63815 19.6731C6.27989 20 7.11996 20 8.80012 20H12.0001" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"></path><path d="M9 12H21M21 12L17 8M21 12L17 16" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"></path></svg>`);
6735
6987
  const DisconnectIcon = (props) => {
6736
6988
  const theme = useTheme();
6737
- const fill = () => props.fill || theme.colors.font.primary;
6989
+ const fill = () => props.fill || theme.colors.icon.primary;
6738
6990
  return (() => {
6739
6991
  const _el$ = _tmpl$$7.cloneNode(true), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
6740
6992
  createRenderEffect((_p$) => {
@@ -6771,17 +7023,27 @@ function fallbackCopyTextToClipboard(text) {
6771
7023
  document.body.removeChild(textArea);
6772
7024
  }
6773
7025
  }
7026
+ const hoverBorders = {
7027
+ m: "8px",
7028
+ s: "4px",
7029
+ none: "0"
7030
+ };
7031
+ const dropdownBorders = {
7032
+ m: "16px",
7033
+ s: "8px",
7034
+ none: "0"
7035
+ };
6774
7036
  const AccountButtonDropdownStyled = styled.div`
6775
7037
  width: 256px;
6776
7038
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.16);
6777
- border-radius: 16px;
7039
+ border-radius: ${(props) => dropdownBorders[props.theme.borderRadius]};
6778
7040
 
6779
- background-color: ${(props) => props.theme.colors.backgroundPrimary}
7041
+ background-color: ${(props) => props.theme.colors.background.primary}
6780
7042
 
6781
- color: ${(props) => props.theme.colors.font.primary}
7043
+ color: ${(props) => props.theme.colors.text.primary}
6782
7044
  `;
6783
7045
  const UlStyled$1 = styled.ul`
6784
- background-color: ${(props) => props.theme.colors.backgroundPrimary};
7046
+ background-color: ${(props) => props.theme.colors.background.primary};
6785
7047
  padding: 8px;
6786
7048
  `;
6787
7049
  const MenuButtonStyled = styled.button`
@@ -6791,15 +7053,15 @@ const MenuButtonStyled = styled.button`
6791
7053
  padding: 12px;
6792
7054
  width: 100%;
6793
7055
 
6794
- background-color: ${(props) => props.theme.colors.backgroundPrimary};
7056
+ background-color: ${(props) => props.theme.colors.background.primary};
6795
7057
  border: none;
6796
- border-radius: 8px;
7058
+ border-radius: ${(props) => hoverBorders[props.theme.borderRadius]};
6797
7059
  cursor: pointer;
6798
7060
 
6799
7061
  transition: background-color, transform 0.1s ease-in-out;
6800
7062
 
6801
7063
  &:hover {
6802
- background-color: ${(props) => props.theme.colors.backgroundSecondary};
7064
+ background-color: ${(props) => props.theme.colors.background.secondary};
6803
7065
  }
6804
7066
 
6805
7067
  &:active {
@@ -6840,6 +7102,9 @@ const AccountButtonDropdown = (props) => {
6840
7102
  get ["class"]() {
6841
7103
  return props.class;
6842
7104
  },
7105
+ get id() {
7106
+ return props.id;
7107
+ },
6843
7108
  get children() {
6844
7109
  return createComponent(UlStyled$1, {
6845
7110
  get children() {
@@ -6890,19 +7155,24 @@ const AccountButtonDropdown = (props) => {
6890
7155
  }
6891
7156
  });
6892
7157
  };
7158
+ const borders$1 = {
7159
+ m: "16px",
7160
+ s: "8px",
7161
+ none: "0"
7162
+ };
6893
7163
  const NotificationStyled = styled.div`
6894
7164
  width: 256px;
6895
7165
  padding: 12px 16px;
6896
7166
  display: flex;
6897
7167
  gap: 9px;
6898
7168
 
6899
- background-color: ${(props) => props.theme.colors.backgroundPrimary};
7169
+ background-color: ${(props) => props.theme.colors.background.primary};
6900
7170
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.16);
6901
- border-radius: 16px;
7171
+ border-radius: ${(props) => borders$1[props.theme.borderRadius]};
6902
7172
  `;
6903
7173
  const TextStyled$2 = styled(Text)`
6904
7174
  margin-top: 4px;
6905
- color: ${(props) => props.theme.colors.font.secondary};
7175
+ color: ${(props) => props.theme.colors.text.secondary};
6906
7176
  `;
6907
7177
  const _tmpl$$5 = /* @__PURE__ */ template$1(`<div></div>`);
6908
7178
  const Notification = (props) => {
@@ -6940,7 +7210,7 @@ const Notification = (props) => {
6940
7210
  }
6941
7211
  }), null);
6942
7212
  return _el$;
6943
- })(), memo(() => props.icon)];
7213
+ })(), createMemo(() => props.icon)];
6944
7214
  }
6945
7215
  });
6946
7216
  };
@@ -7000,7 +7270,7 @@ const SuccessTransactionNotification = (props) => {
7000
7270
  return createComponent(SuccessIconStyled$1, {});
7001
7271
  },
7002
7272
  get ["class"]() {
7003
- return props.class;
7273
+ return cn(props.class, "tc-notification");
7004
7274
  },
7005
7275
  children: "Transaction sent"
7006
7276
  });
@@ -7091,25 +7361,40 @@ const Notifications = (props) => {
7091
7361
  });
7092
7362
  }
7093
7363
  }));
7094
- createRenderEffect(() => className(_el$, props.class));
7364
+ createRenderEffect((_p$) => {
7365
+ const _v$ = props.class, _v$2 = props.id;
7366
+ _v$ !== _p$._v$ && className(_el$, _p$._v$ = _v$);
7367
+ _v$2 !== _p$._v$2 && setAttribute(_el$, "id", _p$._v$2 = _v$2);
7368
+ return _p$;
7369
+ }, {
7370
+ _v$: void 0,
7371
+ _v$2: void 0
7372
+ });
7095
7373
  return _el$;
7096
7374
  })();
7097
7375
  };
7098
7376
  const AccountButtonStyled = styled(Button)`
7377
+ background-color: ${(props) => props.theme.colors.connectButton.background};
7378
+ color: ${(props) => props.theme.colors.connectButton.foreground};
7379
+ box-shadow: ${(props) => `0 4px 24px ${rgba(props.theme.colors.constant.black, 0.16)}`};
7380
+
7099
7381
  display: flex;
7100
7382
  align-items: center;
7101
7383
  gap: 9px;
7102
7384
 
7103
- transition: background-color 0.1s ease-in-out;
7385
+ transition: all 0.1s ease-in-out;
7104
7386
 
7105
7387
  &:hover:not(:active) {
7106
7388
  transform: scale(1);
7107
7389
  }
7108
7390
 
7109
7391
  &:hover {
7110
- background-color: ${(props) => props.theme.colors.backgroundSecondary};
7392
+ filter: ${(props) => `brightness(${props.theme.theme === THEME.DARK ? 1.07 : 0.95})`};
7111
7393
  }
7112
7394
  `;
7395
+ const DropdownButtonStyled = styled(AccountButtonStyled)`
7396
+ background-color: ${(props) => props.theme.colors.background.primary};
7397
+ `;
7113
7398
  const DropdownContainerStyled = styled.div`
7114
7399
  display: flex;
7115
7400
  flex-direction: column;
@@ -7200,7 +7485,7 @@ const computePosition$1 = (reference, floating, config) => __async(void 0, null,
7200
7485
  } = config;
7201
7486
  const validMiddleware = middleware.filter(Boolean);
7202
7487
  const rtl = yield platform2.isRTL == null ? void 0 : platform2.isRTL(floating);
7203
- if (process.env.NODE_ENV !== "production") {
7488
+ if ({}.NODE_ENV !== "production") {
7204
7489
  if (platform2 == null) {
7205
7490
  console.error(["Floating UI: `platform` property was not passed to config. If you", "want to use Floating UI on the web, install @floating-ui/dom", "instead of the /core package. Otherwise, you can create your own", "`platform`: https://floating-ui.com/docs/platform"].join(" "));
7206
7491
  }
@@ -7257,7 +7542,7 @@ const computePosition$1 = (reference, floating, config) => __async(void 0, null,
7257
7542
  middlewareData = __spreadProps(__spreadValues({}, middlewareData), {
7258
7543
  [name]: __spreadValues(__spreadValues({}, middlewareData[name]), data)
7259
7544
  });
7260
- if (process.env.NODE_ENV !== "production") {
7545
+ if ({}.NODE_ENV !== "production") {
7261
7546
  if (resetCount > 50) {
7262
7547
  console.warn(["Floating UI: The middleware lifecycle appears to be running in an", "infinite loop. This is usually caused by a `reset` continually", "being returned without a break condition."].join(" "));
7263
7548
  }
@@ -7869,8 +8154,9 @@ function P(l2, u2, e2) {
7869
8154
  return n2().middlewareData;
7870
8155
  }, update: i2 };
7871
8156
  }
7872
- const _tmpl$$3 = /* @__PURE__ */ template$1(`<div></div>`);
8157
+ const _tmpl$$3 = /* @__PURE__ */ template$1(`<div id="tc-dropdown-container"></div>`);
7873
8158
  const AccountButton = () => {
8159
+ const theme = useTheme();
7874
8160
  const connector = useContext(ConnectorContext);
7875
8161
  const tonConnectUI = useContext(TonConnectUiContext);
7876
8162
  const [isOpened, setIsOpened] = createSignal(false);
@@ -7920,14 +8206,21 @@ const AccountButton = () => {
7920
8206
  },
7921
8207
  get children() {
7922
8208
  return createComponent(AccountButtonStyled, {
7923
- appearance: "flat",
7924
8209
  onClick: () => tonConnectUI.connectWallet(),
8210
+ id: "tc-connect-button",
7925
8211
  get children() {
7926
- return [createComponent(TonIcon, {}), createComponent(Text, {
8212
+ return [createComponent(TonIcon, {
8213
+ get fill() {
8214
+ return theme.colors.connectButton.foreground;
8215
+ }
8216
+ }), createComponent(Text, {
7927
8217
  translationKey: "button.connectWallet",
7928
8218
  fontSize: "15px",
7929
8219
  letterSpacing: "-0.24px",
7930
8220
  fontWeight: "590",
8221
+ get color() {
8222
+ return theme.colors.connectButton.foreground;
8223
+ },
7931
8224
  children: "Connect wallet"
7932
8225
  })];
7933
8226
  }
@@ -7940,10 +8233,10 @@ const AccountButton = () => {
7940
8233
  get children() {
7941
8234
  return createComponent(DropdownContainerStyled, {
7942
8235
  get children() {
7943
- return [createComponent(AccountButtonStyled, {
7944
- appearance: "flat",
8236
+ return [createComponent(DropdownButtonStyled, {
7945
8237
  onClick: () => setIsOpened((v) => !v),
7946
8238
  ref: setAnchor,
8239
+ id: "tc-dropdown-button",
7947
8240
  get children() {
7948
8241
  return [createComponent(Text, {
7949
8242
  fontSize: "15px",
@@ -7999,13 +8292,16 @@ const AccountButton = () => {
7999
8292
  ref(r$) {
8000
8293
  const _ref$ = dropDownRef;
8001
8294
  typeof _ref$ === "function" ? _ref$(r$) : dropDownRef = r$;
8002
- }
8295
+ },
8296
+ id: "tc-dropdown"
8003
8297
  });
8004
8298
  }
8005
8299
  });
8006
8300
  }
8007
8301
  }), null);
8008
- insert(_el$, createComponent(NotificationsStyled, {}), null);
8302
+ insert(_el$, createComponent(NotificationsStyled, {
8303
+ id: "tc-notifications"
8304
+ }), null);
8009
8305
  createRenderEffect((_p$) => {
8010
8306
  var _a, _b;
8011
8307
  const _v$ = position.strategy, _v$2 = `${(_a = position.y) != null ? _a : 0}px`, _v$3 = `${(_b = position.x) != null ? _b : 0}px`;
@@ -8043,14 +8339,14 @@ const QrCodeStyled = styled.div`
8043
8339
  }
8044
8340
 
8045
8341
  path {
8046
- fill: ${(props) => props.theme.colors.font.primary};
8342
+ fill: ${(props) => props.theme.colors.text.primary};
8047
8343
  }
8048
8344
  `;
8049
8345
  const ImageBackground = styled.div`
8050
8346
  position: absolute;
8051
8347
  width: 52px;
8052
8348
  height: 52px;
8053
- background: ${(props) => props.theme.colors.backgroundSecondary};
8349
+ background: ${(props) => props.theme.colors.background.secondary};
8054
8350
  padding: 7px;
8055
8351
  top: 112px;
8056
8352
  left: 112px;
@@ -9743,6 +10039,11 @@ const Translation = (props) => {
9743
10039
  const [t2] = useI18n();
9744
10040
  return t2(props.translationKey, props.translationValues, (_a = props.children) == null ? void 0 : _a.toString());
9745
10041
  };
10042
+ const borders = {
10043
+ m: "16px",
10044
+ s: "8px",
10045
+ none: "0"
10046
+ };
9746
10047
  const QrCodeModalStyled = styled.div`
9747
10048
  padding: 0 24px;
9748
10049
  `;
@@ -9753,8 +10054,8 @@ const StyledIconButton = styled(IconButton)`
9753
10054
  `;
9754
10055
  const QRBackgroundStyled = styled.div`
9755
10056
  margin-bottom: 16px;
9756
- background-color: ${(props) => props.theme.colors.backgroundSecondary};
9757
- border-radius: 16px;
10057
+ background-color: ${(props) => props.theme.colors.background.secondary};
10058
+ border-radius: ${(props) => borders[props.theme.borderRadius]};
9758
10059
  display: flex;
9759
10060
  align-items: center;
9760
10061
  justify-content: center;
@@ -9771,6 +10072,7 @@ const ActionButtonStyled = styled(Button)`
9771
10072
  line-height: 20px;
9772
10073
  letter-spacing: -0.32px;
9773
10074
  width: 100%;
10075
+ border-radius: ${(props) => borders[props.theme.borderRadius]};
9774
10076
  `;
9775
10077
  const GetWalletStyled = styled.div`
9776
10078
  display: flex;
@@ -9778,7 +10080,7 @@ const GetWalletStyled = styled.div`
9778
10080
  align-items: center;
9779
10081
  `;
9780
10082
  const TextStyled$1 = styled(Text)`
9781
- color: ${(props) => props.theme.colors.font.secondary};
10083
+ color: ${(props) => props.theme.colors.text.secondary};
9782
10084
  font-size: 16px;
9783
10085
  `;
9784
10086
  function openLink(href, target = "_self") {
@@ -9805,6 +10107,9 @@ const QrCodeModal = (props) => {
9805
10107
  bridgeUrl: props.wallet.bridgeUrl
9806
10108
  });
9807
10109
  return createComponent(QrCodeModalStyled, {
10110
+ get id() {
10111
+ return props.id;
10112
+ },
9808
10113
  get children() {
9809
10114
  return [createComponent(StyledIconButton, {
9810
10115
  icon: "arrow",
@@ -9817,7 +10122,7 @@ const QrCodeModal = (props) => {
9817
10122
  };
9818
10123
  },
9819
10124
  get children() {
9820
- return ["Connect with ", memo(() => props.wallet.name)];
10125
+ return ["Connect with ", createMemo(() => props.wallet.name)];
9821
10126
  }
9822
10127
  }), createComponent(H2, {
9823
10128
  translationKey: "walletModal.qrCodeModal.scan",
@@ -9827,7 +10132,7 @@ const QrCodeModal = (props) => {
9827
10132
  };
9828
10133
  },
9829
10134
  get children() {
9830
- return ["Scan QR code with your phone\u2019s or ", memo(() => props.wallet.name), "\u2019s camera."];
10135
+ return ["Scan QR code with your phone\u2019s or ", createMemo(() => props.wallet.name), "\u2019s camera."];
9831
10136
  }
9832
10137
  }), createComponent(QRBackgroundStyled, {
9833
10138
  get children() {
@@ -9841,7 +10146,6 @@ const QrCodeModal = (props) => {
9841
10146
  }), createComponent(ButtonsContainerStyled, {
9842
10147
  get children() {
9843
10148
  return [createComponent(ActionButtonStyled, {
9844
- appearance: "secondary",
9845
10149
  onClick: () => openLink(universalLink),
9846
10150
  get children() {
9847
10151
  return createComponent(Translation, {
@@ -9852,7 +10156,7 @@ const QrCodeModal = (props) => {
9852
10156
  };
9853
10157
  },
9854
10158
  get children() {
9855
- return ["Open ", memo(() => props.wallet.name)];
10159
+ return ["Open ", createMemo(() => props.wallet.name)];
9856
10160
  }
9857
10161
  });
9858
10162
  }
@@ -9862,7 +10166,6 @@ const QrCodeModal = (props) => {
9862
10166
  },
9863
10167
  get children() {
9864
10168
  return createComponent(ActionButtonStyled, {
9865
- appearance: "secondary",
9866
10169
  onClick: () => connector.connect({
9867
10170
  jsBridgeKey: props.wallet.jsBridgeKey
9868
10171
  }),
@@ -9886,10 +10189,9 @@ const QrCodeModal = (props) => {
9886
10189
  };
9887
10190
  },
9888
10191
  get children() {
9889
- return ["Don't have ", memo(() => props.wallet.name), "?"];
10192
+ return ["Don't have ", createMemo(() => props.wallet.name), "?"];
9890
10193
  }
9891
10194
  }), createComponent(Button, {
9892
- appearance: "secondary",
9893
10195
  onClick: () => openLinkBlank(props.wallet.aboutUrl),
9894
10196
  get children() {
9895
10197
  return createComponent(Translation, {
@@ -10007,6 +10309,9 @@ const _tmpl$ = /* @__PURE__ */ template$1(`<li></li>`);
10007
10309
  const SelectWalletModal = (props) => {
10008
10310
  const learnMoreUrl = "https://ton.org/wallets";
10009
10311
  return createComponent(SelectWalletModalStyled, {
10312
+ get id() {
10313
+ return props.id;
10314
+ },
10010
10315
  get children() {
10011
10316
  return [createComponent(H1, {
10012
10317
  translationKey: "walletModal.selectWalletModal.connectWallet",
@@ -10036,7 +10341,6 @@ const SelectWalletModal = (props) => {
10036
10341
  });
10037
10342
  }
10038
10343
  }), createComponent(ButtonStyled$1, {
10039
- appearance: "secondary",
10040
10344
  onClick: () => openLinkBlank(learnMoreUrl),
10041
10345
  get children() {
10042
10346
  return createComponent(Translation, {
@@ -10048,12 +10352,6 @@ const SelectWalletModal = (props) => {
10048
10352
  }
10049
10353
  });
10050
10354
  };
10051
- const ModalWrapper = styled.div`
10052
- color: ${(props) => {
10053
- var _a;
10054
- return ((_a = props.theme) == null ? void 0 : _a.accentColor) || "blue";
10055
- }};
10056
- `;
10057
10355
  const StyledModal = styled(Modal)`
10058
10356
  padding-left: 0;
10059
10357
  padding-right: 0;
@@ -10087,8 +10385,7 @@ const LoaderContainerStyled = styled.div`
10087
10385
  const [appState, setAppState] = createStore({
10088
10386
  buttonRootId: null,
10089
10387
  language: "en",
10090
- buttonConfiguration: {},
10091
- widgetConfiguration: {}
10388
+ walletsListConfiguration: {}
10092
10389
  });
10093
10390
  class TonConnectUIError extends TonConnectError {
10094
10391
  constructor(...args) {
@@ -10157,7 +10454,7 @@ const WalletsModal = () => {
10157
10454
  if (fetchedWalletsList.state !== "ready") {
10158
10455
  return null;
10159
10456
  }
10160
- return applyWalletsListConfiguration(fetchedWalletsList(), appState.widgetConfiguration.wallets);
10457
+ return applyWalletsListConfiguration(fetchedWalletsList(), appState.walletsListConfiguration);
10161
10458
  });
10162
10459
  const onClose = () => {
10163
10460
  setWalletsModalOpen(false);
@@ -10195,66 +10492,63 @@ const WalletsModal = () => {
10195
10492
  }
10196
10493
  });
10197
10494
  onCleanup(unsubscribe);
10198
- return createComponent(ModalWrapper, {
10495
+ return createComponent(StyledModal, {
10496
+ get opened() {
10497
+ return walletsModalOpen();
10498
+ },
10499
+ onClose,
10500
+ id: "tc-wallets-modal-container",
10199
10501
  get children() {
10200
- return createComponent(StyledModal, {
10201
- get opened() {
10202
- return walletsModalOpen();
10502
+ return [createComponent(Show, {
10503
+ get when() {
10504
+ return !walletsList();
10505
+ },
10506
+ get children() {
10507
+ return [createComponent(H1Styled$1, {
10508
+ translationKey: "walletModal.loading",
10509
+ children: "Wallets list is loading"
10510
+ }), createComponent(LoaderContainerStyled, {
10511
+ get children() {
10512
+ return createComponent(LoaderIconStyled$1, {});
10513
+ }
10514
+ })];
10515
+ }
10516
+ }), createComponent(Show, {
10517
+ get when() {
10518
+ return walletsList();
10203
10519
  },
10204
- onClose,
10205
10520
  get children() {
10206
10521
  return [createComponent(Show, {
10207
10522
  get when() {
10208
- return !walletsList();
10523
+ return !selectedWalletInfo();
10209
10524
  },
10525
+ keyed: false,
10210
10526
  get children() {
10211
- return [createComponent(H1Styled$1, {
10212
- translationKey: "walletModal.loading",
10213
- children: "Wallets list is loading"
10214
- }), createComponent(LoaderContainerStyled, {
10215
- get children() {
10216
- return createComponent(LoaderIconStyled$1, {
10217
- fill: "#7A899970"
10218
- });
10219
- }
10220
- })];
10527
+ return createComponent(SelectWalletModal, {
10528
+ get walletsList() {
10529
+ return walletsList();
10530
+ },
10531
+ onSelect,
10532
+ id: "tc-wallets-modal"
10533
+ });
10221
10534
  }
10222
10535
  }), createComponent(Show, {
10223
10536
  get when() {
10224
- return walletsList();
10537
+ return selectedWalletInfo();
10225
10538
  },
10539
+ keyed: false,
10226
10540
  get children() {
10227
- return [createComponent(Show, {
10228
- get when() {
10229
- return !selectedWalletInfo();
10230
- },
10231
- keyed: false,
10232
- get children() {
10233
- return createComponent(SelectWalletModal, {
10234
- get walletsList() {
10235
- return walletsList();
10236
- },
10237
- onSelect
10238
- });
10239
- }
10240
- }), createComponent(Show, {
10241
- get when() {
10541
+ return createComponent(QrCodeModal, {
10542
+ get wallet() {
10242
10543
  return selectedWalletInfo();
10243
10544
  },
10244
- keyed: false,
10245
- get children() {
10246
- return createComponent(QrCodeModal, {
10247
- get wallet() {
10248
- return selectedWalletInfo();
10249
- },
10250
- onBackClick: () => setSelectedWalletInfo(null)
10251
- });
10252
- }
10253
- })];
10545
+ onBackClick: () => setSelectedWalletInfo(null),
10546
+ id: "tc-qr-modal"
10547
+ });
10254
10548
  }
10255
10549
  })];
10256
10550
  }
10257
- });
10551
+ })];
10258
10552
  }
10259
10553
  });
10260
10554
  };
@@ -10275,15 +10569,18 @@ const TextStyled = styled(Text)`
10275
10569
  text-align: center;
10276
10570
  max-width: 250px;
10277
10571
 
10278
- color: ${(props) => props.theme.colors.font.secondary};
10572
+ color: ${(props) => props.theme.colors.text.secondary};
10279
10573
  `;
10280
10574
  const ButtonStyled = styled(Button)`
10281
10575
  margin-top: 32px;
10282
10576
  `;
10283
10577
  const ActionModal = (props) => {
10284
10578
  return createComponent(ActionModalStyled, {
10579
+ get id() {
10580
+ return props.id;
10581
+ },
10285
10582
  get children() {
10286
- return [memo(() => props.icon), createComponent(H1Styled, {
10583
+ return [createMemo(() => props.icon), createComponent(H1Styled, {
10287
10584
  get translationKey() {
10288
10585
  return props.headerTranslationKey;
10289
10586
  }
@@ -10297,7 +10594,6 @@ const ActionModal = (props) => {
10297
10594
  },
10298
10595
  get children() {
10299
10596
  return createComponent(ButtonStyled, {
10300
- appearance: "secondary",
10301
10597
  onClick: () => props.onClose(),
10302
10598
  get children() {
10303
10599
  return createComponent(Translation, {
@@ -10320,12 +10616,13 @@ const ConfirmTransactionModal = (props) => {
10320
10616
  headerTranslationKey: "actionModal.confirmTransaction.header",
10321
10617
  textTranslationKey: "actionModal.confirmTransaction.text",
10322
10618
  get icon() {
10323
- return createComponent(LoaderIconStyled, {
10324
- fill: "#7A899970"
10325
- });
10619
+ return createComponent(LoaderIconStyled, {});
10326
10620
  },
10327
10621
  onClose: () => props.onClose(),
10328
- showButton: false
10622
+ showButton: false,
10623
+ get id() {
10624
+ return props.id;
10625
+ }
10329
10626
  });
10330
10627
  };
10331
10628
  const ErrorIconStyled = styled(ErrorIcon)`
@@ -10339,7 +10636,10 @@ const TransactionCanceledModal = (props) => {
10339
10636
  get icon() {
10340
10637
  return createComponent(ErrorIconStyled, {});
10341
10638
  },
10342
- onClose: () => props.onClose()
10639
+ onClose: () => props.onClose(),
10640
+ get id() {
10641
+ return props.id;
10642
+ }
10343
10643
  });
10344
10644
  };
10345
10645
  const SuccessIconStyled = styled(SuccessIcon)`
@@ -10353,16 +10653,20 @@ const TransactionSentModal = (props) => {
10353
10653
  get icon() {
10354
10654
  return createComponent(SuccessIconStyled, {});
10355
10655
  },
10356
- onClose: () => props.onClose()
10656
+ onClose: () => props.onClose(),
10657
+ get id() {
10658
+ return props.id;
10659
+ }
10357
10660
  });
10358
10661
  };
10359
10662
  const ActionsModal = () => {
10360
10663
  return createComponent(Modal, {
10361
10664
  get opened() {
10362
10665
  var _a;
10363
- return memo(() => action() !== null, true)() && ((_a = action()) == null ? void 0 : _a.openModal) === true;
10666
+ return createMemo(() => action() !== null)() && ((_a = action()) == null ? void 0 : _a.openModal) === true;
10364
10667
  },
10365
10668
  onClose: () => setAction(null),
10669
+ id: "tc-actions-modal-container",
10366
10670
  get children() {
10367
10671
  return createComponent(Switch, {
10368
10672
  get children() {
@@ -10372,7 +10676,8 @@ const ActionsModal = () => {
10372
10676
  },
10373
10677
  get children() {
10374
10678
  return createComponent(TransactionSentModal, {
10375
- onClose: () => setAction(null)
10679
+ onClose: () => setAction(null),
10680
+ id: "tc-transaction-sent-modal"
10376
10681
  });
10377
10682
  }
10378
10683
  }), createComponent(Match, {
@@ -10381,7 +10686,8 @@ const ActionsModal = () => {
10381
10686
  },
10382
10687
  get children() {
10383
10688
  return createComponent(TransactionCanceledModal, {
10384
- onClose: () => setAction(null)
10689
+ onClose: () => setAction(null),
10690
+ id: "tc-transaction-canceled-modal"
10385
10691
  });
10386
10692
  }
10387
10693
  }), createComponent(Match, {
@@ -10390,7 +10696,8 @@ const ActionsModal = () => {
10390
10696
  },
10391
10697
  get children() {
10392
10698
  return createComponent(ConfirmTransactionModal, {
10393
- onClose: () => setAction(null)
10699
+ onClose: () => setAction(null),
10700
+ id: "tc-confirm-modal"
10394
10701
  });
10395
10702
  }
10396
10703
  })];
@@ -10476,142 +10783,13 @@ class WalletInfoStorage {
10476
10783
  this.localStorage.removeItem(this.storageKey);
10477
10784
  }
10478
10785
  }
10479
- var isMergeableObject = function isMergeableObject2(value) {
10480
- return isNonNullObject(value) && !isSpecial(value);
10481
- };
10482
- function isNonNullObject(value) {
10483
- return !!value && typeof value === "object";
10484
- }
10485
- function isSpecial(value) {
10486
- var stringValue = Object.prototype.toString.call(value);
10487
- return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value);
10488
- }
10489
- var canUseSymbol = typeof Symbol === "function" && Symbol.for;
10490
- var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for("react.element") : 60103;
10491
- function isReactElement(value) {
10492
- return value.$$typeof === REACT_ELEMENT_TYPE;
10493
- }
10494
- function emptyTarget(val) {
10495
- return Array.isArray(val) ? [] : {};
10496
- }
10497
- function cloneUnlessOtherwiseSpecified(value, options) {
10498
- return options.clone !== false && options.isMergeableObject(value) ? deepmerge(emptyTarget(value), value, options) : value;
10499
- }
10500
- function defaultArrayMerge(target, source, options) {
10501
- return target.concat(source).map(function(element) {
10502
- return cloneUnlessOtherwiseSpecified(element, options);
10503
- });
10504
- }
10505
- function getMergeFunction(key, options) {
10506
- if (!options.customMerge) {
10507
- return deepmerge;
10508
- }
10509
- var customMerge = options.customMerge(key);
10510
- return typeof customMerge === "function" ? customMerge : deepmerge;
10511
- }
10512
- function getEnumerableOwnPropertySymbols(target) {
10513
- return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol) {
10514
- return target.propertyIsEnumerable(symbol);
10515
- }) : [];
10516
- }
10517
- function getKeys(target) {
10518
- return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target));
10519
- }
10520
- function propertyIsOnObject(object, property) {
10521
- try {
10522
- return property in object;
10523
- } catch (_) {
10524
- return false;
10525
- }
10526
- }
10527
- function propertyIsUnsafe(target, key) {
10528
- return propertyIsOnObject(target, key) && !(Object.hasOwnProperty.call(target, key) && Object.propertyIsEnumerable.call(target, key));
10529
- }
10530
- function mergeObject(target, source, options) {
10531
- var destination = {};
10532
- if (options.isMergeableObject(target)) {
10533
- getKeys(target).forEach(function(key) {
10534
- destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
10535
- });
10536
- }
10537
- getKeys(source).forEach(function(key) {
10538
- if (propertyIsUnsafe(target, key)) {
10539
- return;
10540
- }
10541
- if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
10542
- destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
10543
- } else {
10544
- destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
10545
- }
10546
- });
10547
- return destination;
10548
- }
10549
- function deepmerge(target, source, options) {
10550
- options = options || {};
10551
- options.arrayMerge = options.arrayMerge || defaultArrayMerge;
10552
- options.isMergeableObject = options.isMergeableObject || isMergeableObject;
10553
- options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
10554
- var sourceIsArray = Array.isArray(source);
10555
- var targetIsArray = Array.isArray(target);
10556
- var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
10557
- if (!sourceAndTargetTypesMatch) {
10558
- return cloneUnlessOtherwiseSpecified(source, options);
10559
- } else if (sourceIsArray) {
10560
- return options.arrayMerge(target, source, options);
10561
- } else {
10562
- return mergeObject(target, source, options);
10563
- }
10564
- }
10565
- deepmerge.all = function deepmergeAll(array, options) {
10566
- if (!Array.isArray(array)) {
10567
- throw new Error("first argument should be an array");
10568
- }
10569
- return array.reduce(function(prev, next) {
10570
- return deepmerge(prev, next, options);
10571
- }, {});
10572
- };
10573
- var deepmerge_1 = deepmerge;
10574
- var cjs = deepmerge_1;
10575
- /*!
10576
- * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
10577
- *
10578
- * Copyright (c) 2014-2017, Jon Schlinkert.
10579
- * Released under the MIT License.
10580
- */
10581
- function isObject(o2) {
10582
- return Object.prototype.toString.call(o2) === "[object Object]";
10583
- }
10584
- function isPlainObject(o2) {
10585
- var ctor, prot;
10586
- if (isObject(o2) === false)
10587
- return false;
10588
- ctor = o2.constructor;
10589
- if (ctor === void 0)
10590
- return true;
10591
- prot = ctor.prototype;
10592
- if (isObject(prot) === false)
10593
- return false;
10594
- if (prot.hasOwnProperty("isPrototypeOf") === false) {
10595
- return false;
10596
- }
10597
- return true;
10598
- }
10599
- function mergeOptions(options, defaultOptions) {
10600
- if (!options) {
10601
- return defaultOptions;
10602
- }
10603
- const overwriteMerge = (_, sourceArray, __) => sourceArray;
10604
- return cjs(defaultOptions, options, {
10605
- arrayMerge: overwriteMerge,
10606
- isMergeableObject: isPlainObject
10607
- });
10608
- }
10609
10786
  class TonConnectUI {
10610
10787
  constructor(options) {
10611
10788
  __publicField(this, "walletInfoStorage", new WalletInfoStorage());
10612
10789
  __publicField(this, "connector");
10613
10790
  __publicField(this, "_walletInfo", null);
10614
10791
  __publicField(this, "systemThemeChangeUnsubscribe", null);
10792
+ __publicField(this, "actionsConfiguration");
10615
10793
  if (options && "connector" in options && options.connector) {
10616
10794
  this.connector = options.connector;
10617
10795
  } else if (options && "manifestUrl" in options && options.manifestUrl) {
@@ -10634,7 +10812,7 @@ class TonConnectUI {
10634
10812
  }
10635
10813
  });
10636
10814
  }
10637
- this.uiOptions = options || {};
10815
+ this.uiOptions = mergeOptions(options, { uiPreferences: { theme: "SYSTEM" } });
10638
10816
  setAppState({ connector: this.connector });
10639
10817
  widgetController.renderApp(rootId, this);
10640
10818
  }
@@ -10654,28 +10832,30 @@ class TonConnectUI {
10654
10832
  return this._walletInfo;
10655
10833
  }
10656
10834
  set uiOptions(options) {
10657
- var _a;
10835
+ var _a, _b, _c, _d, _e;
10658
10836
  this.checkButtonRootExist(options.buttonRootId);
10659
- if (options.theme === "SYSTEM") {
10660
- setTheme(getSystemTheme());
10661
- if (!this.systemThemeChangeUnsubscribe) {
10662
- this.systemThemeChangeUnsubscribe = subscribeToThemeChange(
10663
- (theme) => setTheme(theme)
10664
- );
10837
+ this.actionsConfiguration = options.actionsConfiguration;
10838
+ if ((_a = options.uiPreferences) == null ? void 0 : _a.theme) {
10839
+ if (((_b = options.uiPreferences) == null ? void 0 : _b.theme) !== "SYSTEM") {
10840
+ (_c = this.systemThemeChangeUnsubscribe) == null ? void 0 : _c.call(this);
10841
+ setTheme(options.uiPreferences.theme, options.uiPreferences.colorsSet);
10842
+ } else {
10843
+ setTheme(getSystemTheme(), options.uiPreferences.colorsSet);
10844
+ if (!this.systemThemeChangeUnsubscribe) {
10845
+ this.systemThemeChangeUnsubscribe = subscribeToThemeChange(setTheme);
10846
+ }
10665
10847
  }
10666
10848
  } else {
10667
- if (options.theme) {
10668
- (_a = this.systemThemeChangeUnsubscribe) == null ? void 0 : _a.call(this);
10669
- setTheme(options.theme);
10849
+ if ((_d = options.uiPreferences) == null ? void 0 : _d.colorsSet) {
10850
+ setColors(options.uiPreferences.colorsSet);
10670
10851
  }
10671
10852
  }
10853
+ if ((_e = options.uiPreferences) == null ? void 0 : _e.borderRadius) {
10854
+ setBorderRadius(options.uiPreferences.borderRadius);
10855
+ }
10672
10856
  setAppState((state) => {
10673
10857
  const merged = mergeOptions(
10674
- __spreadValues(__spreadValues(__spreadValues({}, options.language && { language: options.language }), options.buttonConfiguration && {
10675
- buttonConfiguration: options.buttonConfiguration
10676
- }), options.widgetConfiguration && {
10677
- widgetConfiguration: options.widgetConfiguration
10678
- }),
10858
+ __spreadValues(__spreadValues({}, options.language && { language: options.language }), options.walletsList && { walletsList: options.walletsList }),
10679
10859
  unwrap(state)
10680
10860
  );
10681
10861
  if (options.buttonRootId !== void 0) {
@@ -10736,25 +10916,24 @@ class TonConnectUI {
10736
10916
  if (!isDevice("desktop") && "universalLink" in this.walletInfo) {
10737
10917
  openLink(this.walletInfo.universalLink);
10738
10918
  }
10739
- const notification = (options == null ? void 0 : options.notifications) || ["before", "success", "error"];
10740
- const modals = (options == null ? void 0 : options.modals) || ["before"];
10919
+ const { notifications: notifications2, modals } = this.getModalsAndNotificationsConfiguration(options);
10741
10920
  widgetController.setAction({
10742
10921
  name: "confirm-transaction",
10743
- showNotification: notification.includes("before"),
10922
+ showNotification: notifications2.includes("before"),
10744
10923
  openModal: modals.includes("before")
10745
10924
  });
10746
10925
  try {
10747
10926
  const result = yield this.connector.sendTransaction(tx);
10748
10927
  widgetController.setAction({
10749
10928
  name: "transaction-sent",
10750
- showNotification: notification.includes("success"),
10929
+ showNotification: notifications2.includes("success"),
10751
10930
  openModal: modals.includes("success")
10752
10931
  });
10753
10932
  return result;
10754
10933
  } catch (e2) {
10755
10934
  widgetController.setAction({
10756
10935
  name: "transaction-canceled",
10757
- showNotification: notification.includes("error"),
10936
+ showNotification: notifications2.includes("error"),
10758
10937
  openModal: modals.includes("error")
10759
10938
  });
10760
10939
  if (e2 instanceof TonConnectError) {
@@ -10763,8 +10942,6 @@ class TonConnectUI {
10763
10942
  console.error(e2);
10764
10943
  throw new TonConnectUIError("Unhandled error:" + e2);
10765
10944
  }
10766
- } finally {
10767
- widgetController.clearAction();
10768
10945
  }
10769
10946
  });
10770
10947
  }
@@ -10803,6 +10980,44 @@ class TonConnectUI {
10803
10980
  throw new TonConnectUIError(`${buttonRootId} element not found in the document.`);
10804
10981
  }
10805
10982
  }
10983
+ getModalsAndNotificationsConfiguration(options) {
10984
+ var _a, _b, _c;
10985
+ const allActions = [
10986
+ "before",
10987
+ "success",
10988
+ "error"
10989
+ ];
10990
+ let notifications2 = allActions;
10991
+ if (((_a = this.actionsConfiguration) == null ? void 0 : _a.notifications) && ((_b = this.actionsConfiguration) == null ? void 0 : _b.notifications) !== "all") {
10992
+ notifications2 = this.actionsConfiguration.notifications;
10993
+ }
10994
+ if (options == null ? void 0 : options.notifications) {
10995
+ if (options.notifications === "all") {
10996
+ notifications2 = allActions;
10997
+ } else {
10998
+ notifications2 = options.notifications;
10999
+ }
11000
+ }
11001
+ let modals = ["before"];
11002
+ if ((_c = this.actionsConfiguration) == null ? void 0 : _c.modals) {
11003
+ if (this.actionsConfiguration.modals === "all") {
11004
+ modals = allActions;
11005
+ } else {
11006
+ modals = this.actionsConfiguration.modals;
11007
+ }
11008
+ }
11009
+ if (options == null ? void 0 : options.modals) {
11010
+ if (options.modals === "all") {
11011
+ modals = allActions;
11012
+ } else {
11013
+ modals = options.modals;
11014
+ }
11015
+ }
11016
+ return {
11017
+ notifications: notifications2,
11018
+ modals
11019
+ };
11020
+ }
10806
11021
  }
10807
11022
  export {
10808
11023
  THEME,