bitboss-ui 2.0.13 → 2.0.15

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.
Files changed (223) hide show
  1. package/dist/index107.js +5 -5
  2. package/dist/index115.js +1 -1
  3. package/dist/index117.js +5 -5
  4. package/dist/index119.js +1 -1
  5. package/dist/index123.js +1 -1
  6. package/dist/index124.js +1 -1
  7. package/dist/index125.js +1 -1
  8. package/dist/index127.js +1 -1
  9. package/dist/index14.js +1 -1
  10. package/dist/index16.js +3 -3
  11. package/dist/index18.js +2 -2
  12. package/dist/index20.js +12 -12
  13. package/dist/index200.js +2 -2
  14. package/dist/index200.js.map +1 -1
  15. package/dist/index201.js +126 -4
  16. package/dist/index201.js.map +1 -1
  17. package/dist/index202.js +5 -2
  18. package/dist/index202.js.map +1 -1
  19. package/dist/index203.js +123 -2
  20. package/dist/index203.js.map +1 -1
  21. package/dist/index204.js +19 -5
  22. package/dist/index204.js.map +1 -1
  23. package/dist/index205.js +2 -2
  24. package/dist/index206.js +2 -2
  25. package/dist/index207.js +2 -19
  26. package/dist/index207.js.map +1 -1
  27. package/dist/index208.js +2 -19
  28. package/dist/index208.js.map +1 -1
  29. package/dist/index209.js +34 -26
  30. package/dist/index209.js.map +1 -1
  31. package/dist/index210.js +174 -3
  32. package/dist/index210.js.map +1 -1
  33. package/dist/index211.js +6 -2
  34. package/dist/index211.js.map +1 -1
  35. package/dist/index212.js +42 -6
  36. package/dist/index212.js.map +1 -1
  37. package/dist/index214.js +13 -52
  38. package/dist/index214.js.map +1 -1
  39. package/dist/index215.js +5 -44
  40. package/dist/index215.js.map +1 -1
  41. package/dist/index216.js +369 -5
  42. package/dist/index216.js.map +1 -1
  43. package/dist/index217.js +6 -47
  44. package/dist/index217.js.map +1 -1
  45. package/dist/index218.js +3 -3
  46. package/dist/index218.js.map +1 -1
  47. package/dist/index219.js +156 -33
  48. package/dist/index219.js.map +1 -1
  49. package/dist/index22.js +13 -13
  50. package/dist/index220.js +83 -5
  51. package/dist/index220.js.map +1 -1
  52. package/dist/index222.js +3 -44
  53. package/dist/index222.js.map +1 -1
  54. package/dist/{index221.js → index223.js} +1 -1
  55. package/dist/{index221.js.map → index223.js.map} +1 -1
  56. package/dist/index224.js +19 -13
  57. package/dist/index224.js.map +1 -1
  58. package/dist/index225.js +25 -124
  59. package/dist/index225.js.map +1 -1
  60. package/dist/index226.js +3 -123
  61. package/dist/index226.js.map +1 -1
  62. package/dist/index227.js +249 -2
  63. package/dist/index227.js.map +1 -1
  64. package/dist/index228.js +49 -171
  65. package/dist/index228.js.map +1 -1
  66. package/dist/index229.js +44 -5
  67. package/dist/index229.js.map +1 -1
  68. package/dist/index230.js +5 -369
  69. package/dist/index230.js.map +1 -1
  70. package/dist/index231.js +48 -157
  71. package/dist/index231.js.map +1 -1
  72. package/dist/index232.js +2 -84
  73. package/dist/index232.js.map +1 -1
  74. package/dist/index233.js +7 -0
  75. package/dist/index233.js.map +1 -0
  76. package/dist/index234.js +2 -3
  77. package/dist/index234.js.map +1 -1
  78. package/dist/index235.js +2 -106
  79. package/dist/index235.js.map +1 -1
  80. package/dist/{index240.js → index236.js} +1 -1
  81. package/dist/{index240.js.map → index236.js.map} +1 -1
  82. package/dist/index237.js +53 -47
  83. package/dist/index237.js.map +1 -1
  84. package/dist/index239.js +100 -2
  85. package/dist/index239.js.map +1 -1
  86. package/dist/index24.js +5 -5
  87. package/dist/index244.js +281 -4
  88. package/dist/index244.js.map +1 -1
  89. package/dist/index245.js +6 -3
  90. package/dist/index245.js.map +1 -1
  91. package/dist/index246.js +2 -9
  92. package/dist/index246.js.map +1 -1
  93. package/dist/index247.js +2 -23
  94. package/dist/index247.js.map +1 -1
  95. package/dist/index248.js +2 -281
  96. package/dist/index248.js.map +1 -1
  97. package/dist/index249.js +2 -6
  98. package/dist/index249.js.map +1 -1
  99. package/dist/index250.js +2 -2
  100. package/dist/index251.js +126 -2
  101. package/dist/index251.js.map +1 -1
  102. package/dist/index252.js +431 -2
  103. package/dist/index252.js.map +1 -1
  104. package/dist/index253.js +3 -2
  105. package/dist/index253.js.map +1 -1
  106. package/dist/index255.js +7 -2
  107. package/dist/index255.js.map +1 -1
  108. package/dist/index256.js +21 -1
  109. package/dist/index256.js.map +1 -1
  110. package/dist/index258.js +3 -2
  111. package/dist/index258.js.map +1 -1
  112. package/dist/index259.js +9 -2
  113. package/dist/index259.js.map +1 -1
  114. package/dist/index26.js +1 -1
  115. package/dist/index260.js +23 -28
  116. package/dist/index260.js.map +1 -1
  117. package/dist/index261.js +199 -21
  118. package/dist/index261.js.map +1 -1
  119. package/dist/{index283.js → index262.js} +2 -2
  120. package/dist/{index283.js.map → index262.js.map} +1 -1
  121. package/dist/index263.js +126 -6
  122. package/dist/index263.js.map +1 -1
  123. package/dist/index264.js +9 -6
  124. package/dist/index264.js.map +1 -1
  125. package/dist/index265.js +6 -16
  126. package/dist/index265.js.map +1 -1
  127. package/dist/index266.js +16 -9
  128. package/dist/index266.js.map +1 -1
  129. package/dist/index267.js +219 -426
  130. package/dist/index267.js.map +1 -1
  131. package/dist/index268.js +3 -89
  132. package/dist/index268.js.map +1 -1
  133. package/dist/index269.js +11 -199
  134. package/dist/index269.js.map +1 -1
  135. package/dist/index270.js +9 -3
  136. package/dist/index270.js.map +1 -1
  137. package/dist/index271.js +12 -0
  138. package/dist/index271.js.map +1 -0
  139. package/dist/index272.js +17 -2
  140. package/dist/index272.js.map +1 -1
  141. package/dist/index273.js +89 -9
  142. package/dist/index273.js.map +1 -1
  143. package/dist/index274.js +5 -2
  144. package/dist/index274.js.map +1 -1
  145. package/dist/index275.js +2 -126
  146. package/dist/index275.js.map +1 -1
  147. package/dist/index276.js +2 -22
  148. package/dist/index276.js.map +1 -1
  149. package/dist/index277.js +5 -0
  150. package/dist/index277.js.map +1 -0
  151. package/dist/index278.js +2 -3
  152. package/dist/index278.js.map +1 -1
  153. package/dist/index279.js +2 -12
  154. package/dist/index279.js.map +1 -1
  155. package/dist/index28.js +3 -3
  156. package/dist/index280.js +2 -9
  157. package/dist/index280.js.map +1 -1
  158. package/dist/index281.js +25 -14
  159. package/dist/index281.js.map +1 -1
  160. package/dist/index282.js +22 -224
  161. package/dist/index282.js.map +1 -1
  162. package/dist/index284.js +68 -126
  163. package/dist/index284.js.map +1 -1
  164. package/dist/index285.js +2 -69
  165. package/dist/index285.js.map +1 -1
  166. package/dist/index286.js +4 -5
  167. package/dist/index286.js.map +1 -1
  168. package/dist/index287.js +1 -1
  169. package/dist/index288.js +1 -1
  170. package/dist/index289.js +2 -2
  171. package/dist/index291.js +35 -4
  172. package/dist/index291.js.map +1 -1
  173. package/dist/index292.js +79 -4
  174. package/dist/index292.js.map +1 -1
  175. package/dist/index294.js +4 -79
  176. package/dist/index294.js.map +1 -1
  177. package/dist/index295.js +7 -0
  178. package/dist/index295.js.map +1 -0
  179. package/dist/index296.js +58 -6
  180. package/dist/index296.js.map +1 -1
  181. package/dist/index297.js +10 -6
  182. package/dist/index297.js.map +1 -1
  183. package/dist/index298.js +2 -19
  184. package/dist/index298.js.map +1 -1
  185. package/dist/index299.js +6 -34
  186. package/dist/index299.js.map +1 -1
  187. package/dist/index30.js +2 -2
  188. package/dist/index300.js +6 -46
  189. package/dist/index300.js.map +1 -1
  190. package/dist/index301.js +19 -2
  191. package/dist/index301.js.map +1 -1
  192. package/dist/index302.js +46 -10
  193. package/dist/index302.js.map +1 -1
  194. package/dist/index303.js +1 -1
  195. package/dist/index32.js +2 -2
  196. package/dist/index34.js +3 -3
  197. package/dist/index36.js +13 -13
  198. package/dist/index38.js +3 -3
  199. package/dist/index40.js +2 -2
  200. package/dist/index42.js +2 -2
  201. package/dist/index44.js +6 -6
  202. package/dist/index46.js +2 -2
  203. package/dist/index48.js +2 -2
  204. package/dist/index54.js +1 -1
  205. package/dist/index56.js +1 -1
  206. package/dist/index72.js +21 -21
  207. package/dist/index72.js.map +1 -1
  208. package/dist/index76.js +2 -2
  209. package/dist/index78.js +1 -1
  210. package/dist/index81.js +2 -2
  211. package/dist/index83.js +1 -1
  212. package/dist/index85.js +3 -3
  213. package/dist/index87.js +1 -1
  214. package/dist/style.css +1 -1
  215. package/package.json +2 -2
  216. package/dist/index213.js +0 -252
  217. package/dist/index213.js.map +0 -1
  218. package/dist/index254.js +0 -5
  219. package/dist/index254.js.map +0 -1
  220. package/dist/index257.js +0 -5
  221. package/dist/index257.js.map +0 -1
  222. package/dist/index293.js +0 -62
  223. package/dist/index293.js.map +0 -1
package/dist/index237.js CHANGED
@@ -1,103 +1,109 @@
1
- import { defineComponent as F, ref as H, computed as L, watch as N, openBlock as d, createElementBlock as v, Fragment as S, renderList as A, normalizeClass as O, withModifiers as P, toDisplayString as V } from "vue";
2
- import { hash as f } from "./index210.js";
3
- import { isNil as i } from "./index126.js";
4
- const z = ["text", "onClick:clear"], j = /* @__PURE__ */ F({
5
- __name: "CommaBox",
1
+ import { defineComponent as y, ref as F, computed as H, watch as N, openBlock as p, createElementBlock as L, Fragment as S, renderList as V, createBlock as A, normalizeClass as O, withModifiers as P, withCtx as $, createTextVNode as z, toDisplayString as D } from "vue";
2
+ import { hash as d } from "./index226.js";
3
+ import { isNil as l } from "./index126.js";
4
+ import E from "./index121.js";
5
+ /* empty css */
6
+ const K = /* @__PURE__ */ y({
7
+ __name: "ChipsBox",
6
8
  props: {
7
9
  options: {}
8
10
  },
9
11
  emits: ["option:unselected"],
10
- setup(m, { expose: h, emit: x }) {
11
- const t = m, a = x, n = H(null), l = L(() => t.options.some((e) => !e.disabled)), u = (e = 1) => {
12
- const s = i(n.value) ? -1 : n.value;
12
+ setup(f, { expose: v, emit: h }) {
13
+ const t = f, u = h, n = F(null), i = H(() => t.options.some((e) => !e.disabled)), a = (e = 1) => {
14
+ const s = l(n.value) ? -1 : n.value;
13
15
  let o = (s + e) % t.options.length;
14
16
  for (; t.options[o].disabled && o !== s; )
15
- o = u(e + 1);
17
+ o = a(e + 1);
16
18
  return o;
17
- }, b = () => {
18
- if (!l.value) return;
19
- const e = u();
19
+ }, x = () => {
20
+ if (!i.value) return;
21
+ const e = a();
20
22
  n.value = e;
21
23
  }, c = (e = 1) => {
22
- const s = i(n.value) ? 0 : n.value;
24
+ const s = l(n.value) ? 0 : n.value;
23
25
  let o = (s - e + t.options.length) % t.options.length;
24
26
  for (; t.options[o].disabled && o !== s; )
25
27
  o = c(e + 1);
26
28
  return o;
27
- }, w = async () => {
28
- if (!l.value) return;
29
+ }, m = async () => {
30
+ if (!i.value) return;
29
31
  const e = c();
30
32
  n.value = e;
31
- }, I = () => {
32
- if (!l.value) return;
33
+ }, w = () => {
34
+ if (!i.value) return;
33
35
  let e = 0;
34
36
  for (; t.options[e].disabled; )
35
37
  e++;
36
38
  n.value = e;
37
- }, g = () => {
38
- if (!l.value) return;
39
+ }, b = () => {
40
+ if (!i.value) return;
39
41
  let e = t.options.length - 1;
40
42
  for (; t.options[e].disabled && e !== 0; )
41
43
  e--;
42
44
  n.value = e;
43
- }, k = () => {
44
- if (!l.value) return;
45
+ }, I = () => {
46
+ if (!i.value) return;
45
47
  let e = 0;
46
48
  for (; !t.options[e].selected && t.options.length !== e; )
47
49
  e++;
48
50
  n.value = e;
49
- }, _ = () => {
50
- if (!l.value) return;
51
+ }, g = () => {
52
+ if (!i.value) return;
51
53
  let e = t.options.length - 1;
52
54
  for (; t.options[e].selected && e !== 0; )
53
55
  e--;
54
56
  n.value = e;
55
- }, C = (e) => {
56
- if (!l.value) return;
57
+ }, _ = (e) => {
58
+ if (!i.value) return;
57
59
  const s = t.options.findIndex(
58
60
  (o) => o.valueHash === e
59
61
  );
60
62
  s >= 0 && (n.value = s);
61
63
  }, r = () => {
62
64
  n.value = null;
63
- }, y = () => {
64
- if (!n.value) return;
65
+ }, k = () => {
66
+ if (l(n.value)) return;
65
67
  const e = t.options[n.value];
66
- e.selected && a("option:unselected", e);
67
- }, B = () => i(n.value) ? void 0 : t.options[n.value];
68
+ e.selected && u("option:unselected", e);
69
+ }, C = () => l(n.value) ? void 0 : t.options[n.value];
68
70
  return N(
69
71
  () => t.options,
70
72
  (e, s) => {
71
- f(e) !== f(s) && r();
73
+ d(e) !== d(s) && r();
72
74
  },
73
75
  {
74
76
  flush: "post"
75
77
  }
76
- ), h({
77
- focusNext: b,
78
- focusPrevious: w,
79
- focusFirst: I,
80
- focusFirstSelected: k,
81
- focusLast: g,
82
- focusLastSelected: _,
78
+ ), v({
79
+ focusNext: x,
80
+ focusPrevious: m,
81
+ focusFirst: w,
82
+ focusFirstSelected: I,
83
+ focusLast: b,
84
+ focusLastSelected: g,
83
85
  blur: r,
84
- confirmOption: y,
85
- focusByHash: C,
86
- getHighlighted: B
87
- }), (e, s) => (d(!0), v(S, null, A(e.options, (o, p) => (d(), v("span", {
86
+ confirmOption: k,
87
+ focusByHash: _,
88
+ getHighlighted: C
89
+ }), (e, s) => (p(!0), L(S, null, V(e.options, (o, B) => (p(), A(E, {
88
90
  key: o.valueHash,
89
91
  class: O({
90
- "bb-commabox-item": !0,
91
- "bb-commabox-item--focused": p === n.value,
92
- "bb-commabox-item--has-comma": p !== e.options.length - 1
92
+ "bb-chipsbox-item": !0,
93
+ "bb-chipsbox-item--focused": B === n.value
93
94
  }),
94
95
  clearable: !0,
95
96
  text: o.text,
96
- "onClick:clear": P((D) => a("option:unselected", o), ["stop"])
97
- }, V(o.text), 43, z))), 128));
97
+ "onClick:clear": P((M) => u("option:unselected", o), ["stop"])
98
+ }, {
99
+ default: $(() => [
100
+ z(D(o.text), 1)
101
+ ]),
102
+ _: 2
103
+ }, 1032, ["class", "text", "onClick:clear"]))), 128));
98
104
  }
99
105
  });
100
106
  export {
101
- j as default
107
+ K as default
102
108
  };
103
109
  //# sourceMappingURL=index237.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index237.js","sources":["../src/components/CommaBox.vue"],"sourcesContent":["<template>\n\t<span\n\t\tv-for=\"(item, index) in options\"\n\t\t:key=\"item.valueHash\"\n\t\t:class=\"{\n\t\t\t'bb-commabox-item': true,\n\t\t\t'bb-commabox-item--focused': index === focusedIndex,\n\t\t\t'bb-commabox-item--has-comma': index !== options.length - 1,\n\t\t}\"\n\t\t:clearable=\"true\"\n\t\t:text=\"item.text\"\n\t\t@click:clear.stop=\"emit('option:unselected', item)\"\n\t\t>{{ item.text }}</span\n\t>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport { hash } from '@/utilities/functions/hash';\nimport { isNil } from '@/utilities/functions/isNil';\nimport { ref } from 'vue';\nimport { watch } from 'vue';\nimport type { Option } from '@/types/Option';\n\ntype Props = {\n\toptions: Option[];\n};\nconst props = defineProps<Props>();\n\nconst emit = defineEmits<{\n\t(e: 'option:unselected', option: Option): void;\n}>();\n\n/**\n * START FOCUS HANDLING\n */\n\nconst focusedIndex = ref<null | number>(null);\n\nconst canFocus = computed(() => props.options.some((o) => !o.disabled));\n\nconst findNextAvailableIndex = (offset = 1) => {\n\tconst initialValue = isNil(focusedIndex.value) ? -1 : focusedIndex.value!;\n\tlet newIndex = (initialValue + offset) % props.options.length;\n\twhile (props.options[newIndex].disabled && newIndex !== initialValue) {\n\t\tnewIndex = findNextAvailableIndex(offset + 1);\n\t}\n\treturn newIndex;\n};\n\nconst focusNext = () => {\n\tif (!canFocus.value) return;\n\tconst newIndex = findNextAvailableIndex();\n\tfocusedIndex.value = newIndex;\n};\nconst findPreviousAvailableIndex = (offset = 1) => {\n\tconst initialValue = isNil(focusedIndex.value) ? 0 : focusedIndex.value!;\n\tlet newIndex =\n\t\t(initialValue - offset + props.options.length) % props.options.length;\n\twhile (props.options[newIndex].disabled && newIndex !== initialValue) {\n\t\tnewIndex = findPreviousAvailableIndex(offset + 1);\n\t}\n\treturn newIndex;\n};\nconst focusPrevious = async () => {\n\tif (!canFocus.value) return;\n\tconst newIndex = findPreviousAvailableIndex();\n\tfocusedIndex.value = newIndex;\n};\n\nconst focusFirst = () => {\n\tif (!canFocus.value) return;\n\tlet newIndex = 0;\n\twhile (props.options[newIndex].disabled) {\n\t\tnewIndex++;\n\t}\n\tfocusedIndex.value = newIndex;\n};\n\nconst focusLast = () => {\n\tif (!canFocus.value) return;\n\tlet newIndex = props.options.length - 1;\n\twhile (props.options[newIndex].disabled && newIndex !== 0) {\n\t\tnewIndex--;\n\t}\n\tfocusedIndex.value = newIndex;\n};\nconst focusFirstSelected = () => {\n\tif (!canFocus.value) return;\n\tlet newIndex = 0;\n\twhile (\n\t\t!props.options[newIndex].selected &&\n\t\tprops.options.length !== newIndex\n\t) {\n\t\tnewIndex++;\n\t}\n\tfocusedIndex.value = newIndex;\n};\nconst focusLastSelected = () => {\n\tif (!canFocus.value) return;\n\tlet newIndex = props.options.length - 1;\n\twhile (props.options[newIndex].selected && newIndex !== 0) {\n\t\tnewIndex--;\n\t}\n\tfocusedIndex.value = newIndex;\n};\n\nconst focusByHash = (hash: Option['valueHash']) => {\n\tif (!canFocus.value) return;\n\tconst linkedOptionIndex = props.options.findIndex(\n\t\t(o) => o.valueHash === hash\n\t);\n\tif (linkedOptionIndex >= 0) {\n\t\tfocusedIndex.value = linkedOptionIndex;\n\t}\n};\n\nconst blur = () => {\n\tfocusedIndex.value = null;\n};\n\n/**\n * END FOCUS HANDLING\n */\n\nconst confirmOption = () => {\n\tif (!focusedIndex.value) return;\n\tconst option = props.options[focusedIndex.value];\n\tif (option.selected) {\n\t\temit('option:unselected', option);\n\t}\n};\n\nconst getHighlighted = () => {\n\tif (isNil(focusedIndex.value)) return;\n\tconst option = props.options[focusedIndex.value!];\n\treturn option;\n};\n\nwatch(\n\t() => props.options,\n\t(value, previous) => {\n\t\tif (hash(value) !== hash(previous)) {\n\t\t\tblur();\n\t\t}\n\t},\n\t{\n\t\tflush: 'post',\n\t}\n);\n\ndefineExpose({\n\tfocusNext,\n\tfocusPrevious,\n\tfocusFirst,\n\tfocusFirstSelected,\n\tfocusLast,\n\tfocusLastSelected,\n\tblur,\n\tconfirmOption,\n\tfocusByHash,\n\tgetHighlighted,\n});\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/CommaBox';\n</style>\n"],"names":["props","__props","emit","__emit","focusedIndex","ref","canFocus","computed","o","findNextAvailableIndex","offset","initialValue","isNil","newIndex","focusNext","findPreviousAvailableIndex","focusPrevious","focusFirst","focusLast","focusFirstSelected","focusLastSelected","focusByHash","hash","linkedOptionIndex","blur","confirmOption","option","getHighlighted","watch","value","previous","__expose"],"mappings":";;;;;;;;;;AA2BA,UAAMA,IAAQC,GAERC,IAAOC,GAQPC,IAAeC,EAAmB,IAAI,GAEtCC,IAAWC,EAAS,MAAMP,EAAM,QAAQ,KAAK,CAACQ,MAAM,CAACA,EAAE,QAAQ,CAAC,GAEhEC,IAAyB,CAACC,IAAS,MAAM;AAC9C,YAAMC,IAAeC,EAAMR,EAAa,KAAK,IAAI,KAAKA,EAAa;AACnE,UAAIS,KAAYF,IAAeD,KAAUV,EAAM,QAAQ;AACvD,aAAOA,EAAM,QAAQa,CAAQ,EAAE,YAAYA,MAAaF;AAC5C,QAAAE,IAAAJ,EAAuBC,IAAS,CAAC;AAEtC,aAAAG;AAAA,IAAA,GAGFC,IAAY,MAAM;AACnB,UAAA,CAACR,EAAS,MAAO;AACrB,YAAMO,IAAWJ;AACjB,MAAAL,EAAa,QAAQS;AAAA,IAAA,GAEhBE,IAA6B,CAACL,IAAS,MAAM;AAClD,YAAMC,IAAeC,EAAMR,EAAa,KAAK,IAAI,IAAIA,EAAa;AAClE,UAAIS,KACFF,IAAeD,IAASV,EAAM,QAAQ,UAAUA,EAAM,QAAQ;AAChE,aAAOA,EAAM,QAAQa,CAAQ,EAAE,YAAYA,MAAaF;AAC5C,QAAAE,IAAAE,EAA2BL,IAAS,CAAC;AAE1C,aAAAG;AAAA,IAAA,GAEFG,IAAgB,YAAY;AAC7B,UAAA,CAACV,EAAS,MAAO;AACrB,YAAMO,IAAWE;AACjB,MAAAX,EAAa,QAAQS;AAAA,IAAA,GAGhBI,IAAa,MAAM;AACpB,UAAA,CAACX,EAAS,MAAO;AACrB,UAAIO,IAAW;AACf,aAAOb,EAAM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AAOC,MAAa;AACpB,QAAIR,EAAKO,CAAK,MAAMP,EAAKQ,CAAQ,KAC3BN;MAEP;AAAA,MACA;AAAA,QACC,OAAO;AAAA,MACR;AAAA,IAAA,GAGYO,EAAA;AAAA,MACZ,WAAAjB;AAAA,MACA,eAAAE;AAAA,MACA,YAAAC;AAAA,MACA,oBAAAE;AAAA,MACA,WAAAD;AAAA,MACA,mBAAAE;AAAA,MACA,MAAAI;AAAA,MACA,eAAAC;AAAA,MACA,aAAAJ;AAAA,MACA,gBAAAM;AAAA,IAAA,CACA;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index237.js","sources":["../src/components/ChipsBox.vue"],"sourcesContent":["<template>\n\t<BbChip\n\t\tv-for=\"(item, index) in options\"\n\t\t:key=\"item.valueHash\"\n\t\t:class=\"{\n\t\t\t'bb-chipsbox-item': true,\n\t\t\t'bb-chipsbox-item--focused': index === focusedIndex,\n\t\t}\"\n\t\t:clearable=\"true\"\n\t\t:text=\"item.text\"\n\t\t@click:clear.stop=\"emit('option:unselected', item)\"\n\t\t>{{ item.text }}</BbChip\n\t>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport { hash } from '@/utilities/functions/hash';\nimport { isNil } from '@/utilities/functions/isNil';\nimport { ref } from 'vue';\nimport { watch } from 'vue';\nimport BbChip from './BbChip/BbChip.vue';\nimport type { Option } from '@/types/Option';\n\ntype Props = {\n\toptions: Option[];\n};\nconst props = defineProps<Props>();\n\nconst emit = defineEmits<{\n\t(e: 'option:unselected', option: Option): void;\n}>();\n\n/**\n * START FOCUS HANDLING\n */\n\nconst focusedIndex = ref<null | number>(null);\n\nconst canFocus = computed(() => props.options.some((o) => !o.disabled));\n\nconst findNextAvailableIndex = (offset = 1) => {\n\tconst initialValue = isNil(focusedIndex.value) ? -1 : focusedIndex.value!;\n\tlet newIndex = (initialValue + offset) % props.options.length;\n\twhile (props.options[newIndex].disabled && newIndex !== initialValue) {\n\t\tnewIndex = findNextAvailableIndex(offset + 1);\n\t}\n\treturn newIndex;\n};\n\nconst focusNext = () => {\n\tif (!canFocus.value) return;\n\tconst newIndex = findNextAvailableIndex();\n\tfocusedIndex.value = newIndex;\n};\nconst findPreviousAvailableIndex = (offset = 1) => {\n\tconst initialValue = isNil(focusedIndex.value) ? 0 : focusedIndex.value!;\n\tlet newIndex =\n\t\t(initialValue - offset + props.options.length) % props.options.length;\n\twhile (props.options[newIndex].disabled && newIndex !== initialValue) {\n\t\tnewIndex = findPreviousAvailableIndex(offset + 1);\n\t}\n\treturn newIndex;\n};\nconst focusPrevious = async () => {\n\tif (!canFocus.value) return;\n\tconst newIndex = findPreviousAvailableIndex();\n\tfocusedIndex.value = newIndex;\n};\n\nconst focusFirst = () => {\n\tif (!canFocus.value) return;\n\tlet newIndex = 0;\n\twhile (props.options[newIndex].disabled) {\n\t\tnewIndex++;\n\t}\n\tfocusedIndex.value = newIndex;\n};\n\nconst focusLast = () => {\n\tif (!canFocus.value) return;\n\tlet newIndex = props.options.length - 1;\n\twhile (props.options[newIndex].disabled && newIndex !== 0) {\n\t\tnewIndex--;\n\t}\n\tfocusedIndex.value = newIndex;\n};\nconst focusFirstSelected = () => {\n\tif (!canFocus.value) return;\n\tlet newIndex = 0;\n\twhile (\n\t\t!props.options[newIndex].selected &&\n\t\tprops.options.length !== newIndex\n\t) {\n\t\tnewIndex++;\n\t}\n\tfocusedIndex.value = newIndex;\n};\nconst focusLastSelected = () => {\n\tif (!canFocus.value) return;\n\tlet newIndex = props.options.length - 1;\n\twhile (props.options[newIndex].selected && newIndex !== 0) {\n\t\tnewIndex--;\n\t}\n\tfocusedIndex.value = newIndex;\n};\n\nconst focusByHash = (hash: Option['valueHash']) => {\n\tif (!canFocus.value) return;\n\tconst linkedOptionIndex = props.options.findIndex(\n\t\t(o) => o.valueHash === hash\n\t);\n\tif (linkedOptionIndex >= 0) {\n\t\tfocusedIndex.value = linkedOptionIndex;\n\t}\n};\n\nconst blur = () => {\n\tfocusedIndex.value = null;\n};\n\n/**\n * END FOCUS HANDLING\n */\n\nconst confirmOption = () => {\n\tif (isNil(focusedIndex.value)) return;\n\tconst option = props.options[focusedIndex.value!];\n\tif (option.selected) {\n\t\temit('option:unselected', option);\n\t}\n};\n\nconst getHighlighted = () => {\n\tif (isNil(focusedIndex.value)) return;\n\tconst option = props.options[focusedIndex.value!];\n\treturn option;\n};\n\nwatch(\n\t() => props.options,\n\t(value, previous) => {\n\t\tif (hash(value) !== hash(previous)) {\n\t\t\tblur();\n\t\t}\n\t},\n\t{\n\t\tflush: 'post',\n\t}\n);\n\ndefineExpose({\n\tfocusNext,\n\tfocusPrevious,\n\tfocusFirst,\n\tfocusFirstSelected,\n\tfocusLast,\n\tfocusLastSelected,\n\tblur,\n\tconfirmOption,\n\tfocusByHash,\n\tgetHighlighted,\n});\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/ChipsBox';\n</style>\n"],"names":["props","__props","emit","__emit","focusedIndex","ref","canFocus","computed","o","findNextAvailableIndex","offset","initialValue","isNil","newIndex","focusNext","findPreviousAvailableIndex","focusPrevious","focusFirst","focusLast","focusFirstSelected","focusLastSelected","focusByHash","hash","linkedOptionIndex","blur","confirmOption","option","getHighlighted","watch","value","previous","__expose"],"mappings":";;;;;;;;;;;;AA2BA,UAAMA,IAAQC,GAERC,IAAOC,GAQPC,IAAeC,EAAmB,IAAI,GAEtCC,IAAWC,EAAS,MAAMP,EAAM,QAAQ,KAAK,CAACQ,MAAM,CAACA,EAAE,QAAQ,CAAC,GAEhEC,IAAyB,CAACC,IAAS,MAAM;AAC9C,YAAMC,IAAeC,EAAMR,EAAa,KAAK,IAAI,KAAKA,EAAa;AACnE,UAAIS,KAAYF,IAAeD,KAAUV,EAAM,QAAQ;AACvD,aAAOA,EAAM,QAAQa,CAAQ,EAAE,YAAYA,MAAaF;AAC5C,QAAAE,IAAAJ,EAAuBC,IAAS,CAAC;AAEtC,aAAAG;AAAA,IAAA,GAGFC,IAAY,MAAM;AACnB,UAAA,CAACR,E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MAA8B;AAC9C,UAAA,CAAChB,EAAS,MAAO;AACf,YAAAiB,IAAoBvB,EAAM,QAAQ;AAAA,QACvC,CAAC,MAAM,EAAE,cAAcsB;AAAAA,MAAA;AAExB,MAAIC,KAAqB,MACxBnB,EAAa,QAAQmB;AAAA,IACtB,GAGKC,IAAO,MAAM;AAClB,MAAApB,EAAa,QAAQ;AAAA,IAAA,GAOhBqB,IAAgB,MAAM;AACvB,UAAAb,EAAMR,EAAa,KAAK,EAAG;AAC/B,YAAMsB,IAAS1B,EAAM,QAAQI,EAAa,KAAM;AAChD,MAAIsB,EAAO,YACVxB,EAAK,qBAAqBwB,CAAM;AAAA,IACjC,GAGKC,IAAiB,MAClBf,EAAMR,EAAa,KAAK,IAAG,SAChBJ,EAAM,QAAQI,EAAa,KAAM;AAIjD,WAAAwB;AAAA,MACC,MAAM5B,EAAM;AAAA,MACZ,CAAC6B,GAAOC,MAAa;AACpB,QAAIR,EAAKO,CAAK,MAAMP,EAAKQ,CAAQ,KAC3BN;MAEP;AAAA,MACA;AAAA,QACC,OAAO;AAAA,MACR;AAAA,IAAA,GAGYO,EAAA;AAAA,MACZ,WAAAjB;AAAA,MACA,eAAAE;AAAA,MACA,YAAAC;AAAA,MACA,oBAAAE;AAAA,MACA,WAAAD;AAAA,MACA,mBAAAE;AAAA,MACA,MAAAI;AAAA,MACA,eAAAC;AAAA,MACA,aAAAJ;AAAA,MACA,gBAAAM;AAAA,IAAA,CACA;;;;;;;;;;;;;;;;;"}
package/dist/index239.js CHANGED
@@ -1,5 +1,103 @@
1
- import f from "./index289.js";
1
+ import { defineComponent as F, ref as H, computed as L, watch as N, openBlock as d, createElementBlock as v, Fragment as S, renderList as A, normalizeClass as O, withModifiers as P, toDisplayString as V } from "vue";
2
+ import { hash as f } from "./index226.js";
3
+ import { isNil as i } from "./index126.js";
4
+ const z = ["text", "onClick:clear"], j = /* @__PURE__ */ F({
5
+ __name: "CommaBox",
6
+ props: {
7
+ options: {}
8
+ },
9
+ emits: ["option:unselected"],
10
+ setup(m, { expose: h, emit: x }) {
11
+ const t = m, a = x, n = H(null), l = L(() => t.options.some((e) => !e.disabled)), u = (e = 1) => {
12
+ const s = i(n.value) ? -1 : n.value;
13
+ let o = (s + e) % t.options.length;
14
+ for (; t.options[o].disabled && o !== s; )
15
+ o = u(e + 1);
16
+ return o;
17
+ }, b = () => {
18
+ if (!l.value) return;
19
+ const e = u();
20
+ n.value = e;
21
+ }, c = (e = 1) => {
22
+ const s = i(n.value) ? 0 : n.value;
23
+ let o = (s - e + t.options.length) % t.options.length;
24
+ for (; t.options[o].disabled && o !== s; )
25
+ o = c(e + 1);
26
+ return o;
27
+ }, w = async () => {
28
+ if (!l.value) return;
29
+ const e = c();
30
+ n.value = e;
31
+ }, I = () => {
32
+ if (!l.value) return;
33
+ let e = 0;
34
+ for (; t.options[e].disabled; )
35
+ e++;
36
+ n.value = e;
37
+ }, g = () => {
38
+ if (!l.value) return;
39
+ let e = t.options.length - 1;
40
+ for (; t.options[e].disabled && e !== 0; )
41
+ e--;
42
+ n.value = e;
43
+ }, k = () => {
44
+ if (!l.value) return;
45
+ let e = 0;
46
+ for (; !t.options[e].selected && t.options.length !== e; )
47
+ e++;
48
+ n.value = e;
49
+ }, _ = () => {
50
+ if (!l.value) return;
51
+ let e = t.options.length - 1;
52
+ for (; t.options[e].selected && e !== 0; )
53
+ e--;
54
+ n.value = e;
55
+ }, C = (e) => {
56
+ if (!l.value) return;
57
+ const s = t.options.findIndex(
58
+ (o) => o.valueHash === e
59
+ );
60
+ s >= 0 && (n.value = s);
61
+ }, r = () => {
62
+ n.value = null;
63
+ }, y = () => {
64
+ if (!n.value) return;
65
+ const e = t.options[n.value];
66
+ e.selected && a("option:unselected", e);
67
+ }, B = () => i(n.value) ? void 0 : t.options[n.value];
68
+ return N(
69
+ () => t.options,
70
+ (e, s) => {
71
+ f(e) !== f(s) && r();
72
+ },
73
+ {
74
+ flush: "post"
75
+ }
76
+ ), h({
77
+ focusNext: b,
78
+ focusPrevious: w,
79
+ focusFirst: I,
80
+ focusFirstSelected: k,
81
+ focusLast: g,
82
+ focusLastSelected: _,
83
+ blur: r,
84
+ confirmOption: y,
85
+ focusByHash: C,
86
+ getHighlighted: B
87
+ }), (e, s) => (d(!0), v(S, null, A(e.options, (o, p) => (d(), v("span", {
88
+ key: o.valueHash,
89
+ class: O({
90
+ "bb-commabox-item": !0,
91
+ "bb-commabox-item--focused": p === n.value,
92
+ "bb-commabox-item--has-comma": p !== e.options.length - 1
93
+ }),
94
+ clearable: !0,
95
+ text: o.text,
96
+ "onClick:clear": P((D) => a("option:unselected", o), ["stop"])
97
+ }, V(o.text), 43, z))), 128));
98
+ }
99
+ });
2
100
  export {
3
- f as default
101
+ j as default
4
102
  };
5
103
  //# sourceMappingURL=index239.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index239.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
1
+ {"version":3,"file":"index239.js","sources":["../src/components/CommaBox.vue"],"sourcesContent":["<template>\n\t<span\n\t\tv-for=\"(item, index) in options\"\n\t\t:key=\"item.valueHash\"\n\t\t:class=\"{\n\t\t\t'bb-commabox-item': true,\n\t\t\t'bb-commabox-item--focused': index === focusedIndex,\n\t\t\t'bb-commabox-item--has-comma': index !== options.length - 1,\n\t\t}\"\n\t\t:clearable=\"true\"\n\t\t:text=\"item.text\"\n\t\t@click:clear.stop=\"emit('option:unselected', item)\"\n\t\t>{{ item.text }}</span\n\t>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport { hash } from '@/utilities/functions/hash';\nimport { isNil } from '@/utilities/functions/isNil';\nimport { ref } from 'vue';\nimport { watch } from 'vue';\nimport type { Option } from '@/types/Option';\n\ntype Props = {\n\toptions: Option[];\n};\nconst props = defineProps<Props>();\n\nconst emit = defineEmits<{\n\t(e: 'option:unselected', option: Option): void;\n}>();\n\n/**\n * START FOCUS HANDLING\n */\n\nconst focusedIndex = ref<null | number>(null);\n\nconst canFocus = computed(() => props.options.some((o) => !o.disabled));\n\nconst findNextAvailableIndex = (offset = 1) => {\n\tconst initialValue = isNil(focusedIndex.value) ? -1 : focusedIndex.value!;\n\tlet newIndex = (initialValue + offset) % props.options.length;\n\twhile (props.options[newIndex].disabled && newIndex !== initialValue) {\n\t\tnewIndex = findNextAvailableIndex(offset + 1);\n\t}\n\treturn newIndex;\n};\n\nconst focusNext = () => {\n\tif (!canFocus.value) return;\n\tconst newIndex = findNextAvailableIndex();\n\tfocusedIndex.value = newIndex;\n};\nconst findPreviousAvailableIndex = (offset = 1) => {\n\tconst initialValue = isNil(focusedIndex.value) ? 0 : focusedIndex.value!;\n\tlet newIndex =\n\t\t(initialValue - offset + props.options.length) % props.options.length;\n\twhile (props.options[newIndex].disabled && newIndex !== initialValue) {\n\t\tnewIndex = findPreviousAvailableIndex(offset + 1);\n\t}\n\treturn newIndex;\n};\nconst focusPrevious = async () => {\n\tif (!canFocus.value) return;\n\tconst newIndex = findPreviousAvailableIndex();\n\tfocusedIndex.value = newIndex;\n};\n\nconst focusFirst = () => {\n\tif (!canFocus.value) return;\n\tlet newIndex = 0;\n\twhile (props.options[newIndex].disabled) {\n\t\tnewIndex++;\n\t}\n\tfocusedIndex.value = newIndex;\n};\n\nconst focusLast = () => {\n\tif (!canFocus.value) return;\n\tlet newIndex = props.options.length - 1;\n\twhile (props.options[newIndex].disabled && newIndex !== 0) {\n\t\tnewIndex--;\n\t}\n\tfocusedIndex.value = newIndex;\n};\nconst focusFirstSelected = () => {\n\tif (!canFocus.value) return;\n\tlet newIndex = 0;\n\twhile (\n\t\t!props.options[newIndex].selected &&\n\t\tprops.options.length !== newIndex\n\t) {\n\t\tnewIndex++;\n\t}\n\tfocusedIndex.value = newIndex;\n};\nconst focusLastSelected = () => {\n\tif (!canFocus.value) return;\n\tlet newIndex = props.options.length - 1;\n\twhile (props.options[newIndex].selected && newIndex !== 0) {\n\t\tnewIndex--;\n\t}\n\tfocusedIndex.value = newIndex;\n};\n\nconst focusByHash = (hash: Option['valueHash']) => {\n\tif (!canFocus.value) return;\n\tconst linkedOptionIndex = props.options.findIndex(\n\t\t(o) => o.valueHash === hash\n\t);\n\tif (linkedOptionIndex >= 0) {\n\t\tfocusedIndex.value = linkedOptionIndex;\n\t}\n};\n\nconst blur = () => {\n\tfocusedIndex.value = null;\n};\n\n/**\n * END FOCUS HANDLING\n */\n\nconst confirmOption = () => {\n\tif (!focusedIndex.value) return;\n\tconst option = props.options[focusedIndex.value];\n\tif (option.selected) {\n\t\temit('option:unselected', option);\n\t}\n};\n\nconst getHighlighted = () => {\n\tif (isNil(focusedIndex.value)) return;\n\tconst option = props.options[focusedIndex.value!];\n\treturn option;\n};\n\nwatch(\n\t() => props.options,\n\t(value, previous) => {\n\t\tif (hash(value) !== hash(previous)) {\n\t\t\tblur();\n\t\t}\n\t},\n\t{\n\t\tflush: 'post',\n\t}\n);\n\ndefineExpose({\n\tfocusNext,\n\tfocusPrevious,\n\tfocusFirst,\n\tfocusFirstSelected,\n\tfocusLast,\n\tfocusLastSelected,\n\tblur,\n\tconfirmOption,\n\tfocusByHash,\n\tgetHighlighted,\n});\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/CommaBox';\n</style>\n"],"names":["props","__props","emit","__emit","focusedIndex","ref","canFocus","computed","o","findNextAvailableIndex","offset","initialValue","isNil","newIndex","focusNext","findPreviousAvailableIndex","focusPrevious","focusFirst","focusLast","focusFirstSelected","focusLastSelected","focusByHash","hash","linkedOptionIndex","blur","confirmOption","option","getHighlighted","watch","value","previous","__expose"],"mappings":";;;;;;;;;;AA2BA,UAAMA,IAAQC,GAERC,IAAOC,GAQPC,IAAeC,EAAmB,IAAI,GAEtCC,IAAWC,EAAS,MAAMP,EAAM,QAAQ,KAAK,CAACQ,MAAM,CAACA,EAAE,QAAQ,CAAC,GAEhEC,IAAyB,CAACC,IAAS,MAAM;AAC9C,YAAMC,IAAeC,EAAMR,EAAa,KAAK,IAAI,KAAKA,EAAa;AACnE,UAAIS,KAAYF,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,UAAA,CAACd,EAAS,MAAO;AACjB,UAAAO,IAAWb,EAAM,QAAQ,SAAS;AACtC,aAAOA,EAAM,QAAQa,CAAQ,EAAE,YAAYA,MAAa;AACvD,QAAAA;AAED,MAAAT,EAAa,QAAQS;AAAA,IAAA,GAGhBQ,IAAc,CAACC,MAA8B;AAC9C,UAAA,CAAChB,EAAS,MAAO;AACf,YAAAiB,IAAoBvB,EAAM,QAAQ;AAAA,QACvC,CAAC,MAAM,EAAE,cAAcsB;AAAAA,MAAA;AAExB,MAAIC,KAAqB,MACxBnB,EAAa,QAAQmB;AAAA,IACtB,GAGKC,IAAO,MAAM;AAClB,MAAApB,EAAa,QAAQ;AAAA,IAAA,GAOhBqB,IAAgB,MAAM;AACvB,UAAA,CAACrB,EAAa,MAAO;AACzB,YAAMsB,IAAS1B,EAAM,QAAQI,EAAa,KAAK;AAC/C,MAAIsB,EAAO,YACVxB,EAAK,qBAAqBwB,CAAM;AAAA,IACjC,GAGKC,IAAiB,MAClBf,EAAMR,EAAa,KAAK,IAAG,SAChBJ,EAAM,QAAQI,EAAa,KAAM;AAIjD,WAAAwB;AAAA,MACC,MAAM5B,EAAM;AAAA,MACZ,CAAC6B,GAAOC,MAAa;AACpB,QAAIR,EAAKO,CAAK,MAAMP,EAAKQ,CAAQ,KAC3BN;MAEP;AAAA,MACA;AAAA,QACC,OAAO;AAAA,MACR;AAAA,IAAA,GAGYO,EAAA;AAAA,MACZ,WAAAjB;AAAA,MACA,eAAAE;AAAA,MACA,YAAAC;AAAA,MACA,oBAAAE;AAAA,MACA,WAAAD;AAAA,MACA,mBAAAE;AAAA,MACA,MAAAI;AAAA,MACA,eAAAC;AAAA,MACA,aAAAJ;AAAA,MACA,gBAAAM;AAAA,IAAA,CACA;;;;;;;;;;;;;"}
package/dist/index24.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import { defineComponent as ae, ref as o, getCurrentInstance as se, computed as m, nextTick as N, useAttrs as ne, onMounted as ie, onBeforeUnmount as F, watch as re, openBlock as _, createBlock as ue, Teleport as de, createElementVNode as a, mergeProps as G, createElementBlock as T, renderSlot as u, createTextVNode as ce, toDisplayString as P, createCommentVNode as z } from "vue";
2
- import { throttle as ve } from "./index218.js";
3
- import { useFocusTrap as fe } from "./index219.js";
2
+ import { throttle as ve } from "./index222.js";
3
+ import { useFocusTrap as fe } from "./index209.js";
4
4
  import { useId as K } from "./index9.js";
5
5
  import { wait as H } from "./index128.js";
6
- import { waitFor as be } from "./index220.js";
7
- import { useModalsState as k } from "./index221.js";
8
- import { useLogger as pe } from "./index212.js";
6
+ import { waitFor as be } from "./index211.js";
7
+ import { useModalsState as k } from "./index223.js";
8
+ import { useLogger as pe } from "./index217.js";
9
9
  const me = { class: "bb-base-dialog-close" }, ge = ["aria-label"], ye = /* @__PURE__ */ a("span", { class: "bb-base-dialog-close__icon" }, [
10
10
  /* @__PURE__ */ a("svg", {
11
11
  "aria-hidden": "true",
package/dist/index244.js CHANGED
@@ -1,7 +1,284 @@
1
- const e = function(t) {
2
- return (...n) => n.length >= t.length ? t(...n) : e(t.bind(void 0, ...n));
3
- };
1
+ import { commonjsGlobal as R } from "./index245.js";
2
+ import { __module as U } from "./index246.js";
3
+ var V;
4
+ function et() {
5
+ return V ? U.exports : (V = 1, function(B, K) {
6
+ (function(C, k) {
7
+ B.exports = k();
8
+ })(R, function() {
9
+ var C = 1e3, k = 6e4, q = 36e5, A = "millisecond", S = "second", w = "minute", _ = "hour", M = "day", T = "week", m = "month", F = "quarter", y = "year", O = "date", J = "Invalid Date", E = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, G = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, P = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(i) {
10
+ var n = ["th", "st", "nd", "rd"], t = i % 100;
11
+ return "[" + i + (n[(t - 20) % 10] || n[t] || n[0]) + "]";
12
+ } }, I = function(i, n, t) {
13
+ var r = String(i);
14
+ return !r || r.length >= n ? i : "" + Array(n + 1 - r.length).join(t) + i;
15
+ }, Q = { s: I, z: function(i) {
16
+ var n = -i.utcOffset(), t = Math.abs(n), r = Math.floor(t / 60), e = t % 60;
17
+ return (n <= 0 ? "+" : "-") + I(r, 2, "0") + ":" + I(e, 2, "0");
18
+ }, m: function i(n, t) {
19
+ if (n.date() < t.date()) return -i(t, n);
20
+ var r = 12 * (t.year() - n.year()) + (t.month() - n.month()), e = n.clone().add(r, m), s = t - e < 0, u = n.clone().add(r + (s ? -1 : 1), m);
21
+ return +(-(r + (t - e) / (s ? e - u : u - e)) || 0);
22
+ }, a: function(i) {
23
+ return i < 0 ? Math.ceil(i) || 0 : Math.floor(i);
24
+ }, p: function(i) {
25
+ return { M: m, y, w: T, d: M, D: O, h: _, m: w, s: S, ms: A, Q: F }[i] || String(i || "").toLowerCase().replace(/s$/, "");
26
+ }, u: function(i) {
27
+ return i === void 0;
28
+ } }, x = "en", D = {};
29
+ D[x] = P;
30
+ var Z = "$isDayjsObject", N = function(i) {
31
+ return i instanceof L || !(!i || !i[Z]);
32
+ }, j = function i(n, t, r) {
33
+ var e;
34
+ if (!n) return x;
35
+ if (typeof n == "string") {
36
+ var s = n.toLowerCase();
37
+ D[s] && (e = s), t && (D[s] = t, e = s);
38
+ var u = n.split("-");
39
+ if (!e && u.length > 1) return i(u[0]);
40
+ } else {
41
+ var o = n.name;
42
+ D[o] = n, e = o;
43
+ }
44
+ return !r && e && (x = e), e || !r && x;
45
+ }, f = function(i, n) {
46
+ if (N(i)) return i.clone();
47
+ var t = typeof n == "object" ? n : {};
48
+ return t.date = i, t.args = arguments, new L(t);
49
+ }, a = Q;
50
+ a.l = j, a.i = N, a.w = function(i, n) {
51
+ return f(i, { locale: n.$L, utc: n.$u, x: n.$x, $offset: n.$offset });
52
+ };
53
+ var L = function() {
54
+ function i(t) {
55
+ this.$L = j(t.locale, null, !0), this.parse(t), this.$x = this.$x || t.x || {}, this[Z] = !0;
56
+ }
57
+ var n = i.prototype;
58
+ return n.parse = function(t) {
59
+ this.$d = function(r) {
60
+ var e = r.date, s = r.utc;
61
+ if (e === null) return /* @__PURE__ */ new Date(NaN);
62
+ if (a.u(e)) return /* @__PURE__ */ new Date();
63
+ if (e instanceof Date) return new Date(e);
64
+ if (typeof e == "string" && !/Z$/i.test(e)) {
65
+ var u = e.match(E);
66
+ if (u) {
67
+ var o = u[2] - 1 || 0, c = (u[7] || "0").substring(0, 3);
68
+ return s ? new Date(Date.UTC(u[1], o, u[3] || 1, u[4] || 0, u[5] || 0, u[6] || 0, c)) : new Date(u[1], o, u[3] || 1, u[4] || 0, u[5] || 0, u[6] || 0, c);
69
+ }
70
+ }
71
+ return new Date(e);
72
+ }(t), this.init();
73
+ }, n.init = function() {
74
+ var t = this.$d;
75
+ this.$y = t.getFullYear(), this.$M = t.getMonth(), this.$D = t.getDate(), this.$W = t.getDay(), this.$H = t.getHours(), this.$m = t.getMinutes(), this.$s = t.getSeconds(), this.$ms = t.getMilliseconds();
76
+ }, n.$utils = function() {
77
+ return a;
78
+ }, n.isValid = function() {
79
+ return this.$d.toString() !== J;
80
+ }, n.isSame = function(t, r) {
81
+ var e = f(t);
82
+ return this.startOf(r) <= e && e <= this.endOf(r);
83
+ }, n.isAfter = function(t, r) {
84
+ return f(t) < this.startOf(r);
85
+ }, n.isBefore = function(t, r) {
86
+ return this.endOf(r) < f(t);
87
+ }, n.$g = function(t, r, e) {
88
+ return a.u(t) ? this[r] : this.set(e, t);
89
+ }, n.unix = function() {
90
+ return Math.floor(this.valueOf() / 1e3);
91
+ }, n.valueOf = function() {
92
+ return this.$d.getTime();
93
+ }, n.startOf = function(t, r) {
94
+ var e = this, s = !!a.u(r) || r, u = a.p(t), o = function(p, $) {
95
+ var v = a.w(e.$u ? Date.UTC(e.$y, $, p) : new Date(e.$y, $, p), e);
96
+ return s ? v : v.endOf(M);
97
+ }, c = function(p, $) {
98
+ return a.w(e.toDate()[p].apply(e.toDate("s"), (s ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice($)), e);
99
+ }, h = this.$W, d = this.$M, l = this.$D, b = "set" + (this.$u ? "UTC" : "");
100
+ switch (u) {
101
+ case y:
102
+ return s ? o(1, 0) : o(31, 11);
103
+ case m:
104
+ return s ? o(1, d) : o(0, d + 1);
105
+ case T:
106
+ var g = this.$locale().weekStart || 0, Y = (h < g ? h + 7 : h) - g;
107
+ return o(s ? l - Y : l + (6 - Y), d);
108
+ case M:
109
+ case O:
110
+ return c(b + "Hours", 0);
111
+ case _:
112
+ return c(b + "Minutes", 1);
113
+ case w:
114
+ return c(b + "Seconds", 2);
115
+ case S:
116
+ return c(b + "Milliseconds", 3);
117
+ default:
118
+ return this.clone();
119
+ }
120
+ }, n.endOf = function(t) {
121
+ return this.startOf(t, !1);
122
+ }, n.$set = function(t, r) {
123
+ var e, s = a.p(t), u = "set" + (this.$u ? "UTC" : ""), o = (e = {}, e[M] = u + "Date", e[O] = u + "Date", e[m] = u + "Month", e[y] = u + "FullYear", e[_] = u + "Hours", e[w] = u + "Minutes", e[S] = u + "Seconds", e[A] = u + "Milliseconds", e)[s], c = s === M ? this.$D + (r - this.$W) : r;
124
+ if (s === m || s === y) {
125
+ var h = this.clone().set(O, 1);
126
+ h.$d[o](c), h.init(), this.$d = h.set(O, Math.min(this.$D, h.daysInMonth())).$d;
127
+ } else o && this.$d[o](c);
128
+ return this.init(), this;
129
+ }, n.set = function(t, r) {
130
+ return this.clone().$set(t, r);
131
+ }, n.get = function(t) {
132
+ return this[a.p(t)]();
133
+ }, n.add = function(t, r) {
134
+ var e, s = this;
135
+ t = Number(t);
136
+ var u = a.p(r), o = function(d) {
137
+ var l = f(s);
138
+ return a.w(l.date(l.date() + Math.round(d * t)), s);
139
+ };
140
+ if (u === m) return this.set(m, this.$M + t);
141
+ if (u === y) return this.set(y, this.$y + t);
142
+ if (u === M) return o(1);
143
+ if (u === T) return o(7);
144
+ var c = (e = {}, e[w] = k, e[_] = q, e[S] = C, e)[u] || 1, h = this.$d.getTime() + t * c;
145
+ return a.w(h, this);
146
+ }, n.subtract = function(t, r) {
147
+ return this.add(-1 * t, r);
148
+ }, n.format = function(t) {
149
+ var r = this, e = this.$locale();
150
+ if (!this.isValid()) return e.invalidDate || J;
151
+ var s = t || "YYYY-MM-DDTHH:mm:ssZ", u = a.z(this), o = this.$H, c = this.$m, h = this.$M, d = e.weekdays, l = e.months, b = e.meridiem, g = function($, v, H, W) {
152
+ return $ && ($[v] || $(r, s)) || H[v].slice(0, W);
153
+ }, Y = function($) {
154
+ return a.s(o % 12 || 12, $, "0");
155
+ }, p = b || function($, v, H) {
156
+ var W = $ < 12 ? "AM" : "PM";
157
+ return H ? W.toLowerCase() : W;
158
+ };
159
+ return s.replace(G, function($, v) {
160
+ return v || function(H) {
161
+ switch (H) {
162
+ case "YY":
163
+ return String(r.$y).slice(-2);
164
+ case "YYYY":
165
+ return a.s(r.$y, 4, "0");
166
+ case "M":
167
+ return h + 1;
168
+ case "MM":
169
+ return a.s(h + 1, 2, "0");
170
+ case "MMM":
171
+ return g(e.monthsShort, h, l, 3);
172
+ case "MMMM":
173
+ return g(l, h);
174
+ case "D":
175
+ return r.$D;
176
+ case "DD":
177
+ return a.s(r.$D, 2, "0");
178
+ case "d":
179
+ return String(r.$W);
180
+ case "dd":
181
+ return g(e.weekdaysMin, r.$W, d, 2);
182
+ case "ddd":
183
+ return g(e.weekdaysShort, r.$W, d, 3);
184
+ case "dddd":
185
+ return d[r.$W];
186
+ case "H":
187
+ return String(o);
188
+ case "HH":
189
+ return a.s(o, 2, "0");
190
+ case "h":
191
+ return Y(1);
192
+ case "hh":
193
+ return Y(2);
194
+ case "a":
195
+ return p(o, c, !0);
196
+ case "A":
197
+ return p(o, c, !1);
198
+ case "m":
199
+ return String(c);
200
+ case "mm":
201
+ return a.s(c, 2, "0");
202
+ case "s":
203
+ return String(r.$s);
204
+ case "ss":
205
+ return a.s(r.$s, 2, "0");
206
+ case "SSS":
207
+ return a.s(r.$ms, 3, "0");
208
+ case "Z":
209
+ return u;
210
+ }
211
+ return null;
212
+ }($) || u.replace(":", "");
213
+ });
214
+ }, n.utcOffset = function() {
215
+ return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
216
+ }, n.diff = function(t, r, e) {
217
+ var s, u = this, o = a.p(r), c = f(t), h = (c.utcOffset() - this.utcOffset()) * k, d = this - c, l = function() {
218
+ return a.m(u, c);
219
+ };
220
+ switch (o) {
221
+ case y:
222
+ s = l() / 12;
223
+ break;
224
+ case m:
225
+ s = l();
226
+ break;
227
+ case F:
228
+ s = l() / 3;
229
+ break;
230
+ case T:
231
+ s = (d - h) / 6048e5;
232
+ break;
233
+ case M:
234
+ s = (d - h) / 864e5;
235
+ break;
236
+ case _:
237
+ s = d / q;
238
+ break;
239
+ case w:
240
+ s = d / k;
241
+ break;
242
+ case S:
243
+ s = d / C;
244
+ break;
245
+ default:
246
+ s = d;
247
+ }
248
+ return e ? s : a.a(s);
249
+ }, n.daysInMonth = function() {
250
+ return this.endOf(m).$D;
251
+ }, n.$locale = function() {
252
+ return D[this.$L];
253
+ }, n.locale = function(t, r) {
254
+ if (!t) return this.$L;
255
+ var e = this.clone(), s = j(t, r, !0);
256
+ return s && (e.$L = s), e;
257
+ }, n.clone = function() {
258
+ return a.w(this.$d, this);
259
+ }, n.toDate = function() {
260
+ return new Date(this.valueOf());
261
+ }, n.toJSON = function() {
262
+ return this.isValid() ? this.toISOString() : null;
263
+ }, n.toISOString = function() {
264
+ return this.$d.toISOString();
265
+ }, n.toString = function() {
266
+ return this.$d.toUTCString();
267
+ }, i;
268
+ }(), z = L.prototype;
269
+ return f.prototype = z, [["$ms", A], ["$s", S], ["$m", w], ["$H", _], ["$W", M], ["$M", m], ["$y", y], ["$D", O]].forEach(function(i) {
270
+ z[i[1]] = function(n) {
271
+ return this.$g(n, i[0], i[1]);
272
+ };
273
+ }), f.extend = function(i, n) {
274
+ return i.$i || (i(n, L, f), i.$i = !0), f;
275
+ }, f.locale = j, f.isDayjs = N, f.unix = function(i) {
276
+ return f(1e3 * i);
277
+ }, f.en = D[x], f.Ls = D, f.p = {}, f;
278
+ });
279
+ }(U), U.exports);
280
+ }
4
281
  export {
5
- e as curry
282
+ et as __require
6
283
  };
7
284
  //# sourceMappingURL=index244.js.map