@lifesg/react-design-system 1.0.0-alpha.2 → 1.0.0-alpha.21

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 (277) hide show
  1. package/README.md +2 -0
  2. package/accordion/accordion-item.style.d.ts +5 -2
  3. package/accordion/accordion.style.d.ts +1 -1
  4. package/accordion/index.js +165 -172
  5. package/accordion/index.js.map +1 -1
  6. package/alert/alert.style.d.ts +4 -1
  7. package/alert/index.js +107 -119
  8. package/alert/index.js.map +1 -1
  9. package/animations/index.d.ts +1 -0
  10. package/animations/index.js +6 -3
  11. package/animations/index.js.map +1 -1
  12. package/animations/loading-dots-spinner/loading-dots-spinner.d.ts +2 -0
  13. package/animations/loading-dots-spinner/lottie-animation.d.ts +2 -0
  14. package/box-container/box-container.styles.d.ts +8 -1
  15. package/box-container/index.js +69 -74
  16. package/box-container/index.js.map +1 -1
  17. package/breadcrumb/breadcrumb.style.d.ts +4 -4
  18. package/breadcrumb/index.js +102 -106
  19. package/breadcrumb/index.js.map +1 -1
  20. package/breadcrumb/types.d.ts +5 -1
  21. package/button/button.d.ts +2 -2
  22. package/button/index.js +140 -143
  23. package/button/index.js.map +1 -1
  24. package/calendar/calendar-day.d.ts +11 -0
  25. package/calendar/calendar-day.style.d.ts +23 -0
  26. package/calendar/calendar-month.d.ts +12 -0
  27. package/calendar/calendar-month.style.d.ts +12 -0
  28. package/calendar/calendar-year.d.ts +12 -0
  29. package/calendar/calendar-year.style.d.ts +12 -0
  30. package/calendar/calendar.d.ts +4 -0
  31. package/calendar/calendar.style.d.ts +35 -0
  32. package/calendar/index.d.ts +2 -0
  33. package/calendar/index.js +381 -0
  34. package/calendar/index.js.map +1 -0
  35. package/calendar/package.json +7 -0
  36. package/calendar/types.d.ts +15 -0
  37. package/card/card.d.ts +3 -0
  38. package/card/card.style.d.ts +1 -0
  39. package/card/index.d.ts +1 -0
  40. package/card/index.js +132 -0
  41. package/card/index.js.map +1 -0
  42. package/{icon → card}/package.json +1 -1
  43. package/card/types.d.ts +4 -0
  44. package/checkbox/checkbox.d.ts +1 -1
  45. package/checkbox/checkbox.style.d.ts +4 -1
  46. package/checkbox/index.js +11 -21
  47. package/checkbox/index.js.map +1 -1
  48. package/cjs/index.js +2240 -1057
  49. package/cjs/index.js.map +1 -1
  50. package/color/color.d.ts +4 -59
  51. package/color/index.js +1 -1
  52. package/color/index.js.map +1 -1
  53. package/color/types.d.ts +5 -1
  54. package/date-input/date-input.d.ts +1 -1
  55. package/date-input/date-input.style.d.ts +2 -6
  56. package/date-input/index.js +132 -147
  57. package/date-input/index.js.map +1 -1
  58. package/date-input/types.d.ts +14 -16
  59. package/design-token/design-token.d.ts +4 -0
  60. package/design-token/index.d.ts +2 -0
  61. package/design-token/index.js +6 -0
  62. package/design-token/index.js.map +1 -0
  63. package/design-token/package.json +7 -0
  64. package/design-token/types.d.ts +7 -0
  65. package/error-display/error-display-data.d.ts +11 -0
  66. package/error-display/error-display.d.ts +3 -0
  67. package/error-display/error-display.style.d.ts +7 -0
  68. package/error-display/index.d.ts +2 -0
  69. package/error-display/index.js +323 -0
  70. package/error-display/index.js.map +1 -0
  71. package/error-display/package.json +7 -0
  72. package/error-display/types.d.ts +20 -0
  73. package/feedback-rating/feedback-rating-data.d.ts +5 -0
  74. package/feedback-rating/feedback-rating-stars-container-data.d.ts +3 -0
  75. package/feedback-rating/feedback-rating-stars-container.d.ts +3 -0
  76. package/feedback-rating/feedback-rating-stars-container.styles.d.ts +12 -0
  77. package/feedback-rating/feedback-rating.d.ts +3 -0
  78. package/feedback-rating/feedback-rating.styles.d.ts +5 -0
  79. package/feedback-rating/index.d.ts +2 -0
  80. package/feedback-rating/index.js +329 -0
  81. package/feedback-rating/index.js.map +1 -0
  82. package/feedback-rating/package.json +7 -0
  83. package/feedback-rating/types.d.ts +14 -0
  84. package/footer/footer-download-app.d.ts +2 -0
  85. package/footer/footer-download-app.style.d.ts +6 -0
  86. package/footer/footer-helper.d.ts +12 -0
  87. package/footer/footer.d.ts +3 -0
  88. package/footer/footer.style.d.ts +12 -0
  89. package/footer/index.d.ts +2 -0
  90. package/footer/index.js +373 -0
  91. package/footer/index.js.map +1 -0
  92. package/footer/package.json +7 -0
  93. package/footer/types.d.ts +31 -0
  94. package/form/form-custom-field.d.ts +3 -0
  95. package/form/form-input-group.d.ts +1 -1
  96. package/form/form-input.d.ts +1 -1
  97. package/form/form-label-addon.d.ts +1 -2
  98. package/form/form-label.d.ts +1 -1
  99. package/form/form-label.style.d.ts +1 -0
  100. package/form/form-phone-number-input.d.ts +3 -0
  101. package/form/form-textarea.d.ts +1 -1
  102. package/form/form-unit-number-input.d.ts +3 -0
  103. package/form/index.d.ts +9 -6
  104. package/form/index.js +771 -657
  105. package/form/index.js.map +1 -1
  106. package/form/types.d.ts +14 -5
  107. package/icon-button/icon-button.d.ts +1 -1
  108. package/icon-button/icon-button.style.d.ts +6 -1
  109. package/icon-button/index.js +9 -15
  110. package/icon-button/index.js.map +1 -1
  111. package/icon-button/types.d.ts +2 -3
  112. package/index.d.ts +12 -1
  113. package/index.js +2217 -1034
  114. package/index.js.map +1 -1
  115. package/input/index.js +93 -49
  116. package/input/index.js.map +1 -1
  117. package/input/input.d.ts +1 -1
  118. package/input/input.style.d.ts +9 -4
  119. package/input/types.d.ts +2 -0
  120. package/input-group/index.js +435 -343
  121. package/input-group/index.js.map +1 -1
  122. package/input-group/input-group-list-addon.d.ts +1 -1
  123. package/input-group/input-group-list-addon.style.d.ts +13 -2
  124. package/input-group/input-group.d.ts +1 -1
  125. package/input-group/input-group.style.d.ts +4 -8
  126. package/input-group/types.d.ts +11 -10
  127. package/input-select/index.js +286 -244
  128. package/input-select/index.js.map +1 -1
  129. package/input-select/input-select-wrapper.d.ts +1 -1
  130. package/input-select/input-select.d.ts +1 -1
  131. package/input-select/input-select.styles.d.ts +5 -1
  132. package/input-select/types.d.ts +15 -11
  133. package/input-textarea/index.js +132 -121
  134. package/input-textarea/index.js.map +1 -1
  135. package/input-textarea/textarea-counter.d.ts +2 -1
  136. package/input-textarea/textarea.d.ts +2 -2
  137. package/input-textarea/types.d.ts +1 -0
  138. package/layout/container.d.ts +3 -0
  139. package/layout/content.d.ts +3 -0
  140. package/layout/index.d.ts +7 -0
  141. package/layout/index.js +55 -0
  142. package/layout/index.js.map +1 -0
  143. package/layout/package.json +7 -0
  144. package/layout/section.d.ts +3 -0
  145. package/layout/types.d.ts +15 -0
  146. package/link-list/index.js +130 -130
  147. package/link-list/index.js.map +1 -1
  148. package/link-list/link-list.styles.d.ts +12 -2
  149. package/link-list/types.d.ts +1 -1
  150. package/masonry/index.js.map +1 -1
  151. package/masonry/masonry.d.ts +2 -2
  152. package/masthead/index.d.ts +1 -0
  153. package/masthead/index.js +9 -0
  154. package/masthead/index.js.map +1 -0
  155. package/masthead/masthead.d.ts +2 -0
  156. package/masthead/masthead.style.d.ts +1 -0
  157. package/masthead/package.json +7 -0
  158. package/media/index.js +1 -1
  159. package/media/index.js.map +1 -1
  160. package/media/media.d.ts +2 -1
  161. package/modal/index.d.ts +1 -1
  162. package/modal/index.js +30 -43
  163. package/modal/index.js.map +1 -1
  164. package/modal/modal-box.styles.d.ts +5 -2
  165. package/modal/modal.d.ts +1 -1
  166. package/modal/modal.styles.d.ts +1 -0
  167. package/modal/types.d.ts +4 -2
  168. package/navbar/brand.d.ts +10 -0
  169. package/navbar/brand.styles.d.ts +5 -0
  170. package/navbar/drawer.d.ts +3 -0
  171. package/navbar/drawer.styles.d.ts +15 -0
  172. package/navbar/index.d.ts +7 -0
  173. package/navbar/index.js +651 -0
  174. package/navbar/index.js.map +1 -0
  175. package/navbar/navbar-action-buttons.d.ts +10 -0
  176. package/navbar/navbar-action-buttons.styles.d.ts +9 -0
  177. package/navbar/navbar-items.d.ts +11 -0
  178. package/navbar/navbar-items.styles.d.ts +10 -0
  179. package/navbar/navbar.d.ts +3 -0
  180. package/navbar/navbar.styles.d.ts +19 -0
  181. package/navbar/package.json +7 -0
  182. package/navbar/types.d.ts +56 -0
  183. package/notification-banner/index.d.ts +3 -0
  184. package/notification-banner/index.js +266 -0
  185. package/notification-banner/index.js.map +1 -0
  186. package/notification-banner/notification-banner-hoc.d.ts +3 -0
  187. package/notification-banner/notification-banner.d.ts +6 -0
  188. package/notification-banner/notification-banner.styles.d.ts +15 -0
  189. package/notification-banner/package.json +7 -0
  190. package/notification-banner/types.d.ts +22 -0
  191. package/otp-input/index.d.ts +2 -0
  192. package/otp-input/index.js +600 -0
  193. package/otp-input/index.js.map +1 -0
  194. package/otp-input/otp-input.d.ts +3 -0
  195. package/otp-input/otp-input.styles.d.ts +5 -0
  196. package/otp-input/package.json +7 -0
  197. package/otp-input/types.d.ts +22 -0
  198. package/overlay/index.js +1 -1
  199. package/overlay/index.js.map +1 -1
  200. package/overlay/types.d.ts +1 -1
  201. package/package.json +4 -1
  202. package/phone-number-input/data/country-code.d.ts +1 -0
  203. package/phone-number-input/index.d.ts +2 -0
  204. package/phone-number-input/index.js +860 -0
  205. package/phone-number-input/index.js.map +1 -0
  206. package/phone-number-input/package.json +7 -0
  207. package/phone-number-input/phone-number-input-helper.d.ts +5 -0
  208. package/phone-number-input/phone-number-input.d.ts +3 -0
  209. package/phone-number-input/types.d.ts +51 -0
  210. package/popover/index.js +148 -153
  211. package/popover/index.js.map +1 -1
  212. package/popover/popover.styles.d.ts +1 -1
  213. package/popover/types.d.ts +3 -3
  214. package/progress-indicator/index.d.ts +2 -0
  215. package/progress-indicator/index.js +240 -0
  216. package/progress-indicator/index.js.map +1 -0
  217. package/progress-indicator/package.json +7 -0
  218. package/progress-indicator/progress-indicator.d.ts +3 -0
  219. package/progress-indicator/progress-indicator.style.d.ts +19 -0
  220. package/progress-indicator/types.d.ts +9 -0
  221. package/radio-button/index.js +7 -7
  222. package/radio-button/index.js.map +1 -1
  223. package/shared/dropdown-list/dropdown-list.d.ts +1 -1
  224. package/shared/dropdown-list/dropdown-list.styles.d.ts +6 -2
  225. package/shared/dropdown-list/dropdown-search.d.ts +2 -1
  226. package/shared/dropdown-list/dropdown-search.styles.d.ts +9 -1
  227. package/shared/dropdown-list/types.d.ts +22 -12
  228. package/shared/input-wrapper/input-wrapper.d.ts +8 -0
  229. package/smart-app-banner/index.d.ts +2 -0
  230. package/smart-app-banner/index.js +373 -0
  231. package/smart-app-banner/index.js.map +1 -0
  232. package/smart-app-banner/package.json +7 -0
  233. package/smart-app-banner/smart-app-banner.d.ts +3 -0
  234. package/smart-app-banner/smart-app-banner.styles.d.ts +31 -0
  235. package/smart-app-banner/types.d.ts +18 -0
  236. package/spec/design-token-spec/base-design-token-set.d.ts +2 -0
  237. package/text/index.js +62 -65
  238. package/text/index.js.map +1 -1
  239. package/text/text-style.d.ts +4 -100
  240. package/text-list/index.js +7 -7
  241. package/text-list/index.js.map +1 -1
  242. package/theme/design-token-helper.d.ts +2 -0
  243. package/theme/index.js +1 -1
  244. package/theme/index.js.map +1 -1
  245. package/theme/types.d.ts +12 -3
  246. package/timeline/index.js +95 -98
  247. package/timeline/index.js.map +1 -1
  248. package/timepicker/index.js +213 -207
  249. package/timepicker/index.js.map +1 -1
  250. package/timepicker/timepicker-dropdown.styles.d.ts +2 -2
  251. package/timepicker/types.d.ts +3 -3
  252. package/toggle-button/index.js +118 -121
  253. package/toggle-button/index.js.map +1 -1
  254. package/tooltip/index.js +127 -125
  255. package/tooltip/index.js.map +1 -1
  256. package/tooltip/tooltip.styles.d.ts +3 -1
  257. package/unit-number/index.d.ts +2 -0
  258. package/unit-number/index.js +357 -0
  259. package/unit-number/index.js.map +1 -0
  260. package/unit-number/package.json +7 -0
  261. package/unit-number/types.d.ts +27 -0
  262. package/unit-number/unit-number-input.d.ts +3 -0
  263. package/unit-number/unit-number-input.style.d.ts +11 -0
  264. package/util/calendar-helper.d.ts +10 -0
  265. package/util/date-helper.d.ts +19 -0
  266. package/util/index.d.ts +3 -0
  267. package/util/utility-types.d.ts +3 -0
  268. package/icon/arrow-right-icon.d.ts +0 -3
  269. package/icon/icon.d.ts +0 -3
  270. package/icon/index.d.ts +0 -2
  271. package/icon/index.js +0 -12
  272. package/icon/index.js.map +0 -1
  273. package/icon/info-icon.d.ts +0 -3
  274. package/icon/play-alt-icon.d.ts +0 -3
  275. package/icon/search-icon.d.ts +0 -3
  276. package/icon/shared.style.d.ts +0 -1
  277. package/icon/types.d.ts +0 -9
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../src/util/string-helper.ts","../../node_modules/lodash/isArray.js","../../node_modules/lodash/_root.js","../../node_modules/lodash/_freeGlobal.js","../../node_modules/lodash/_Symbol.js","../../node_modules/lodash/_getRawTag.js","../../node_modules/lodash/_objectToString.js","../../node_modules/lodash/_baseGetTag.js","../../node_modules/lodash/isObjectLike.js","../../node_modules/lodash/isSymbol.js","../../node_modules/lodash/_isKey.js","../../node_modules/lodash/isObject.js","../../node_modules/lodash/isFunction.js","../../node_modules/lodash/_isMasked.js","../../node_modules/lodash/_coreJsData.js","../../node_modules/lodash/_toSource.js","../../node_modules/lodash/_baseIsNative.js","../../node_modules/lodash/_getValue.js","../../node_modules/lodash/_getNative.js","../../node_modules/lodash/_nativeCreate.js","../../node_modules/lodash/_hashClear.js","../../node_modules/lodash/_hashDelete.js","../../node_modules/lodash/_hashGet.js","../../node_modules/lodash/_hashHas.js","../../node_modules/lodash/_hashSet.js","../../node_modules/lodash/_Hash.js","../../node_modules/lodash/_listCacheClear.js","../../node_modules/lodash/eq.js","../../node_modules/lodash/_assocIndexOf.js","../../node_modules/lodash/_listCacheDelete.js","../../node_modules/lodash/_listCacheGet.js","../../node_modules/lodash/_listCacheHas.js","../../node_modules/lodash/_listCacheSet.js","../../node_modules/lodash/_ListCache.js","../../node_modules/lodash/_Map.js","../../node_modules/lodash/_mapCacheClear.js","../../node_modules/lodash/_isKeyable.js","../../node_modules/lodash/_getMapData.js","../../node_modules/lodash/_mapCacheDelete.js","../../node_modules/lodash/_mapCacheGet.js","../../node_modules/lodash/_mapCacheHas.js","../../node_modules/lodash/_mapCacheSet.js","../../node_modules/lodash/_MapCache.js","../../node_modules/lodash/memoize.js","../../node_modules/lodash/_memoizeCapped.js","../../node_modules/lodash/_stringToPath.js","../../node_modules/lodash/_arrayMap.js","../../node_modules/lodash/_baseToString.js","../../node_modules/lodash/toString.js","../../node_modules/lodash/_castPath.js","../../node_modules/lodash/_toKey.js","../../node_modules/lodash/_baseGet.js","../../node_modules/lodash/get.js","../../src/theme/helper.ts","../../src/theme/types.ts","../../src/theme/color-theme-helper.ts","../../src/spec/color-spec/base-color-set.ts","../../src/spec/color-spec/bookingsg-color-set.ts","../../src/color/color.ts","../../src/spec/text-spec/font-spec.ts","../../src/theme/text-theme-helper.ts","../../src/spec/text-spec/base-text-style-set.ts","../../src/text/text-style.ts","../../src/text/helper.ts","../../src/input/input.style.tsx","../../src/input/input.tsx"],"sourcesContent":["export namespace StringHelper {\n export const transformWithSpaces = (\n value: string | any,\n groupLength: number\n ) => {\n const regex = \"(.{\" + groupLength + \"})\";\n return value\n .replace(/[^\\dA-Z]/gi, \"\")\n .replace(new RegExp(regex, \"g\"), \"$1 \")\n .trim();\n };\n\n /**\n * Pads single digit values with a zero and trims leading zero for\n * values of length more than 2\n * @param value the string value\n * @param retainSingleZero setting true will allow single zero value\n */\n export const padValue = (\n value: string,\n retainSingleZero?: boolean\n ): string => {\n if (value === \"0\") {\n return retainSingleZero ? value : value.padStart(2, \"0\");\n }\n\n if (value === \"\") {\n return value;\n }\n\n const trimmedValue = parseInt(value);\n return trimmedValue.toString().padStart(2, \"0\");\n };\n\n /**\n * Checks if the text is required to be truncated and broken into two lines based\n * on the available width of container. **Note: This is relevant to font size 18px or 1.125rem only **\n * @param text input text\n * @param widthOfElement element width in px\n */\n export const shouldTruncateToTwoLines = (\n text: string,\n widthOfElement: number\n ): boolean => {\n // This is arbitrary and based on tests to derive that every 9px increment ~= 1 char length.\n // But this applies to font size 18px or 1.125rem only\n const estimatedCharOnLine = Math.floor(widthOfElement / 9);\n return (\n text.length >= estimatedCharOnLine * 2 ||\n (text.split(\" \").length === 1 && text.length > estimatedCharOnLine)\n );\n };\n\n /**\n * Performs a truncation by adding ellipsis in the middle of the text.\n * **Note: This is relevant to font size 18px or 1.125rem only **\n * @param text input text\n * @param widthOfElement the dynamic width of the container in px\n * @param minDivSize the minimum container size (using size on mobileS viewport as baseline)\n * @param baselineCharLength the baseline amount of characters to be displayed before truncation kicks. This\n * will be increased if there is more space available (derived from `widthOfElement`)\n */\n export const truncateOneLine = (\n text: string,\n widthOfElement: number,\n minDivSize: number,\n baselineCharLength: number\n ): string => {\n let additionalCharAllowed = 0;\n if (widthOfElement > minDivSize) {\n // This is arbitrary and based on tests to derive that every 8px increment ~= 1 char length.\n // But this applies to font size 18px or 1.125rem only\n additionalCharAllowed = Math.floor(\n (widthOfElement - minDivSize) / 8\n );\n }\n const allowedCharLength = baselineCharLength + additionalCharAllowed;\n if (allowedCharLength < text.length) {\n const thresholdIndex = Math.floor(allowedCharLength / 2); // We will cut it halfway to derive x num of characters\n return (\n text.substring(0, thresholdIndex) + // Use the first x\n \" ... \" +\n text.substring(text.length - thresholdIndex, text.length) // Use the last x\n );\n }\n\n return text;\n };\n}\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","var isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/;\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\nmodule.exports = isKey;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var MapCache = require('./_MapCache');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n}\n\n// Expose `MapCache`.\nmemoize.Cache = MapCache;\n\nmodule.exports = memoize;\n","var memoize = require('./memoize');\n\n/** Used as the maximum memoize cache size. */\nvar MAX_MEMOIZE_SIZE = 500;\n\n/**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\nfunction memoizeCapped(func) {\n var result = memoize(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n}\n\nmodule.exports = memoizeCapped;\n","var memoizeCapped = require('./_memoizeCapped');\n\n/** Used to match property names within property paths. */\nvar rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoizeCapped(function(string) {\n var result = [];\n if (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\nmodule.exports = stringToPath;\n","/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\nmodule.exports = arrayMap;\n","var Symbol = require('./_Symbol'),\n arrayMap = require('./_arrayMap'),\n isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = baseToString;\n","var baseToString = require('./_baseToString');\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\nmodule.exports = toString;\n","var isArray = require('./isArray'),\n isKey = require('./_isKey'),\n stringToPath = require('./_stringToPath'),\n toString = require('./toString');\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n}\n\nmodule.exports = castPath;\n","var isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = toKey;\n","var castPath = require('./_castPath'),\n toKey = require('./_toKey');\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n path = castPath(path, object);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n}\n\nmodule.exports = baseGet;\n","var baseGet = require('./_baseGet');\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n}\n\nmodule.exports = get;\n","import get from \"lodash/get\";\nimport { ThemeCollectionSpec } from \"./types\";\n\n/**\n *\n * @param collection the collection of theme-specific style attributes\n * @param attributePath (optional) the path to the value within the selected collection\n * @param attributePath (optional) the path to the value within the selected collection\n * @returns style value\n */\nexport const getValue = <C, T>(\n collection: C,\n attributePath?: string,\n customCollection?: T\n): string | number => {\n return attributePath\n ? get(customCollection, attributePath) || get(collection, attributePath)\n : customCollection || collection;\n};\n\n/**\n * Gets the theme set based on the theme context value\n * @param collectionSpec the collections of theme-specific style attributes\n * @param contextValue (optional) the theme context value\n * @returns the selected collection\n */\nexport const getCollection = <T, V, C>(\n collectionSpec: ThemeCollectionSpec<T, V>,\n contextValue?: string\n): C => {\n const themeContextValue = contextValue || collectionSpec.defaultValue;\n return get(collectionSpec.collections, themeContextValue as string);\n};\n","import { ColorSet, ColorSetOptions } from \"../color/types\";\nimport { TextStyleSetOptionsType, TextStyleSetType } from \"../text/types\";\n\nexport type Layout = \"normal\";\n\n// =============================================================================\n// COLOR THEMES\n// =============================================================================\nexport type ColorScheme = \"base\" | \"bookingsg\";\nexport type ColorCollectionsMap = {\n [key in ColorScheme]: ColorSet;\n};\n\n// =============================================================================\n// FONT STYLE THEMES\n// =============================================================================\nexport type TextStyleScheme = \"base\";\nexport type FontStyleCollectionsMap = {\n [key in TextStyleScheme]: TextStyleSetType;\n};\n\n// =============================================================================\n// GENERAL\n// =============================================================================\nexport enum ThemeContextKeys {\n colorScheme = \"colorScheme\",\n layout = \"layout\",\n textStyleScheme = \"textStyleScheme\",\n}\n\nexport interface ThemeSpecOptions {\n /** for color customisation, can specify subset of set */\n color?: ColorSetOptions | undefined;\n textStyle?: TextStyleSetOptionsType | undefined;\n}\n\nexport interface ThemeSpec {\n /** Sets the color scheme of the theme */\n [ThemeContextKeys.colorScheme]: ColorScheme;\n /** Sets the text style scheme of the theme */\n [ThemeContextKeys.textStyleScheme]: TextStyleScheme;\n /** Sets the layout scheme of the theme */\n [ThemeContextKeys.layout]?: Layout | undefined;\n /** For specific customisations to any schemes */\n options?: ThemeSpecOptions | undefined;\n}\n\nexport interface ThemeCollectionSpec<T, V> {\n collections: T;\n defaultValue: V;\n}\n","import { ColorSet } from \"../color/types\";\nimport { BaseColorSet } from \"../spec/color-spec/base-color-set\";\nimport { BookingSGColorSet } from \"../spec/color-spec/bookingsg-color-set\";\nimport { getCollection, getValue } from \"./helper\";\nimport {\n ColorCollectionsMap,\n ColorScheme,\n ThemeCollectionSpec,\n ThemeContextKeys,\n ThemeSpec,\n} from \"./types\";\n\n// =============================================================================\n// THEME SPECIFICATION\n// =============================================================================\nconst ColorSpec: ThemeCollectionSpec<ColorCollectionsMap, ColorScheme> = {\n collections: {\n base: BaseColorSet,\n bookingsg: BookingSGColorSet,\n },\n defaultValue: \"base\",\n};\n\n// =============================================================================\n// HELPER FUNCTIONS\n// =============================================================================\nexport const getThemeColors = (attributePath: string) => {\n return (props: any): string => {\n const theme = props.theme as ThemeSpec;\n const colorSet: ColorSet = getCollection(\n ColorSpec,\n theme[ThemeContextKeys.colorScheme]\n );\n\n return theme.options && theme.options.color\n ? (getValue(colorSet, attributePath, theme.options.color) as string)\n : (getValue(colorSet, attributePath) as string);\n };\n};\n","import { ColorSet, ValidationTypes } from \"../../color/types\";\n\nexport const BaseColorSet: ColorSet = {\n Brand: {\n 1: \"#EF413D\",\n 2: \"#F26664\",\n 3: \"#F58E8B\",\n 4: \"#F9B5B2\",\n 5: \"#FDDDD7\",\n 6: \"#FFEEEA\",\n },\n Primary: \"#1C76D5\",\n PrimaryDark: \"#1869BF\",\n Secondary: \"#0056b3\",\n Accent: {\n Dark: {\n 1: \"#465A88\",\n 2: \"#556D99\",\n 3: \"#8D8DBF\",\n },\n Light: {\n 1: \"#57A9FF\",\n 2: \"#81BFFF\",\n 3: \"#BED7FF\",\n 4: \"#E2ECFD\",\n 5: \"#F6F8FF\",\n 6: \"#FBFCFE\",\n },\n },\n Neutral: {\n 1: \"#282828\", // Text Black\n 2: \"#424242\",\n 3: \"#686868\", // Text Grey\n 4: \"#A4A4A4\",\n 5: \"#E0E4E5\",\n 6: \"#ECEFEF\",\n 7: \"#F8F8F8\",\n 8: \"#FFFFFF\",\n },\n Validation: {\n Green: {\n Text: \"#097123\", // Validation Text\n Icon: \"#4FC029\",\n Border: \"#95D97F\",\n Background: \"#F9FDF8\", // Validation Background\n },\n Orange: {\n Text: \"#B34E00\", // Validation Text\n Icon: \"#FEAB10\",\n Border: \"#F9CB77\",\n Background: \"#FFFCF7\", // Validation Background\n Badge: \"#F57F17\", // Orange Badge Notification\n },\n Red: {\n Text: \"#C60000\", // Validation Text\n Icon: \"#C60000\",\n Border: \"#DD6666\",\n Background: \"#FDF7F7\", // Validation Background\n },\n } as ValidationTypes,\n};\n","import { ColorSet, ValidationTypes } from \"../../color/types\";\n\nexport const BookingSGColorSet: ColorSet = {\n Brand: {\n 1: \"#EF413D\",\n 2: \"#F26664\",\n 3: \"#F58E8B\",\n 4: \"#F9B5B2\",\n 5: \"#FDDDD7\",\n 6: \"#FFEEEA\",\n },\n Primary: \"#6F4AB8\",\n PrimaryDark: \"#6443A6\",\n Secondary: \"#6443A6\",\n Accent: {\n Dark: {\n 1: \"#355985\",\n 2: \"#68819D\",\n 3: \"#9AABBE\",\n },\n Light: {\n 1: \"#9F82D9\",\n 2: \"#B5A5D7\",\n 3: \"#CEC3E4 \",\n 4: \"#E2DBEF\",\n 5: \"#F2EFF8\",\n 6: \"#F7F6FB\",\n },\n },\n Neutral: {\n 1: \"#282828\", // Text Black\n 2: \"#424242\",\n 3: \"#686868\", // Text Grey\n 4: \"#A4A4A4\",\n 5: \"#E0E4E5\",\n 6: \"#ECEFEF\",\n 7: \"#F8F8F8\",\n 8: \"#FFFFFF\",\n },\n Validation: {\n Green: {\n Text: \"#097123\", // Validation Text\n Icon: \"#4FC029\",\n Border: \"#95D97F\",\n Background: \"#F9FDF8\", // Validation Background\n },\n Orange: {\n Text: \"#B34E00\", // Validation Text\n Icon: \"#FEAB10\",\n Border: \"#F9CB77\",\n Background: \"#FFFCF7\", // Validation Background\n Badge: \"#F57F17\", // Orange Badge Notification\n },\n Red: {\n Text: \"#C60000\", // Validation Text\n Icon: \"#C60000\",\n Border: \"#DD6666\",\n Background: \"#FDF7F7\", // Validation Background\n },\n } as ValidationTypes,\n};\n","import { getThemeColors } from \"../theme/color-theme-helper\";\n\nexport const Color = {\n Brand: {\n 1: getThemeColors(\"Brand.1\"),\n 2: getThemeColors(\"Brand.2\"),\n 3: getThemeColors(\"Brand.3\"),\n 4: getThemeColors(\"Brand.4\"),\n 5: getThemeColors(\"Brand.5\"),\n 6: getThemeColors(\"Brand.6\"),\n },\n Primary: getThemeColors(\"Primary\"),\n PrimaryDark: getThemeColors(\"PrimaryDark\"),\n Secondary: getThemeColors(\"Secondary\"),\n Accent: {\n Light: {\n 1: getThemeColors(\"Accent.Light.1\"),\n 2: getThemeColors(\"Accent.Light.2\"),\n 3: getThemeColors(\"Accent.Light.3\"),\n 4: getThemeColors(\"Accent.Light.4\"),\n 5: getThemeColors(\"Accent.Light.5\"),\n 6: getThemeColors(\"Accent.Light.6\"),\n },\n Dark: {\n 1: getThemeColors(\"Accent.Dark.1\"),\n 2: getThemeColors(\"Accent.Dark.2\"),\n 3: getThemeColors(\"Accent.Dark.3\"),\n },\n },\n Neutral: {\n 1: getThemeColors(\"Neutral.1\"),\n 2: getThemeColors(\"Neutral.2\"),\n 3: getThemeColors(\"Neutral.3\"),\n 4: getThemeColors(\"Neutral.4\"),\n 5: getThemeColors(\"Neutral.5\"),\n 6: getThemeColors(\"Neutral.6\"),\n 7: getThemeColors(\"Neutral.7\"),\n 8: getThemeColors(\"Neutral.8\"),\n },\n Validation: {\n Green: {\n Text: getThemeColors(\"Validation.Green.Text\"),\n Icon: getThemeColors(\"Validation.Green.Icon\"),\n Border: getThemeColors(\"Validation.Green.Border\"),\n Background: getThemeColors(\"Validation.Green.Background\"),\n },\n Orange: {\n Text: getThemeColors(\"Validation.Orange.Text\"),\n Icon: getThemeColors(\"Validation.Orange.Icon\"),\n Border: getThemeColors(\"Validation.Orange.Border\"),\n Background: getThemeColors(\"Validation.Orange.Background\"),\n Badge: getThemeColors(\"Validation.Orange.Badge\"),\n },\n Red: {\n Text: getThemeColors(\"Validation.Red.Text\"),\n Icon: getThemeColors(\"Validation.Red.Icon\"),\n Border: getThemeColors(\"Validation.Red.Border\"),\n Background: getThemeColors(\"Validation.Red.Background\"),\n },\n },\n};\n","export const FontFamily = {\n OpenSans: {\n Regular: \"Open Sans\",\n Semibold: \"Open Sans Semibold\",\n Bold: \"Open Sans Bold\",\n Light: \"Open Sans Light\",\n },\n MerriWeather: \"Merriweather\",\n};\n","import { BaseTextStyleSet } from \"../spec/text-spec/base-text-style-set\";\nimport { TextStyleSetType } from \"../text/types\";\nimport { getCollection, getValue } from \"./helper\";\nimport {\n FontStyleCollectionsMap,\n TextStyleScheme,\n ThemeCollectionSpec,\n ThemeContextKeys,\n ThemeSpec,\n} from \"./types\";\n\n// =============================================================================\n// THEME SPECIFICATION\n// =============================================================================\nconst TextStyleSpec: ThemeCollectionSpec<\n FontStyleCollectionsMap,\n TextStyleScheme\n> = {\n collections: {\n base: BaseTextStyleSet,\n },\n defaultValue: \"base\",\n};\n\n// =============================================================================\n// HELPER FUNCTIONS\n// =============================================================================\nexport const getThemeTextStyles = (attributePath: string) => {\n return (props: any): string | number => {\n const theme = props.theme as ThemeSpec;\n const textStyleSet: TextStyleSetType = getCollection(\n TextStyleSpec,\n theme[ThemeContextKeys.textStyleScheme]\n );\n\n return theme.options && theme.options.textStyle\n ? getValue(textStyleSet, attributePath, theme.options.textStyle)\n : getValue(textStyleSet, attributePath);\n };\n};\n","import { FontFamily } from \"./font-spec\";\nimport { TextStyleSetType } from \"../../text/types\";\n\n// In rem unit\nexport const BaseTextStyleSet: TextStyleSetType = {\n D1: {\n fontFamily: FontFamily.OpenSans.Bold,\n fontSize: 3,\n fontWeight: 700,\n lineHeight: 4,\n letterSpacing: -0.056,\n },\n D2: {\n fontFamily: FontFamily.OpenSans.Bold,\n fontSize: 2.5,\n fontWeight: 700,\n lineHeight: 3.5,\n letterSpacing: -0.032,\n },\n D3: {\n fontFamily: FontFamily.OpenSans.Bold,\n fontSize: 1.625,\n fontWeight: 700,\n lineHeight: 2.25,\n },\n D4: {\n fontFamily: FontFamily.OpenSans.Bold,\n fontSize: 1.375,\n fontWeight: 700,\n lineHeight: 1.75,\n },\n DBody: {\n fontFamily: FontFamily.OpenSans.Regular,\n fontSize: 1.375,\n lineHeight: 1.75,\n },\n H1: {\n fontFamily: FontFamily.OpenSans.Bold,\n fontSize: 2,\n fontWeight: 700,\n lineHeight: 2.5,\n },\n H2: {\n fontFamily: FontFamily.OpenSans.Bold,\n fontSize: 1.625,\n fontWeight: 700,\n lineHeight: 2.25,\n },\n H3: {\n fontFamily: FontFamily.OpenSans.Bold,\n fontSize: 1.375,\n fontWeight: 700,\n lineHeight: 1.75,\n },\n H4: {\n fontFamily: FontFamily.OpenSans.Bold,\n fontSize: 1.125,\n fontWeight: 700,\n lineHeight: 1.625,\n },\n H5: {\n fontFamily: FontFamily.OpenSans.Bold,\n fontSize: 1,\n fontWeight: 700,\n lineHeight: 1.5,\n letterSpacing: 0.014,\n },\n H6: {\n fontFamily: FontFamily.OpenSans.Bold,\n fontSize: 0.875,\n fontWeight: 700,\n lineHeight: 1.6,\n letterSpacing: 0.012,\n },\n Body: {\n fontFamily: FontFamily.OpenSans.Regular,\n fontSize: 1.125,\n lineHeight: 1.625,\n },\n BodySmall: {\n fontFamily: FontFamily.OpenSans.Regular,\n fontSize: 1,\n lineHeight: 1.5,\n letterSpacing: 0.014,\n },\n XSmall: {\n fontFamily: FontFamily.OpenSans.Regular,\n fontSize: 0.75,\n lineHeight: 1.2,\n letterSpacing: 0.012,\n },\n};\n","import { getThemeTextStyles } from \"../theme/text-theme-helper\";\n\nexport const TextStyle = {\n D1: {\n fontFamily: getThemeTextStyles(\"D1.fontFamily\"),\n fontSize: getThemeTextStyles(\"D1.fontSize\"),\n fontWeight: getThemeTextStyles(\"D1.fontWeight\"),\n lineHeight: getThemeTextStyles(\"D1.lineHeight\"),\n letterSpacing: getThemeTextStyles(\"D1.letterSpacing\"),\n },\n D2: {\n fontFamily: getThemeTextStyles(\"D2.fontFamily\"),\n fontSize: getThemeTextStyles(\"D2.fontSize\"),\n fontWeight: getThemeTextStyles(\"D2.fontWeight\"),\n lineHeight: getThemeTextStyles(\"D2.lineHeight\"),\n letterSpacing: getThemeTextStyles(\"D2.letterSpacing\"),\n },\n D3: {\n fontFamily: getThemeTextStyles(\"D3.fontFamily\"),\n fontSize: getThemeTextStyles(\"D3.fontSize\"),\n fontWeight: getThemeTextStyles(\"D3.fontWeight\"),\n lineHeight: getThemeTextStyles(\"D3.lineHeight\"),\n letterSpacing: getThemeTextStyles(\"D3.letterSpacing\"),\n },\n D4: {\n fontFamily: getThemeTextStyles(\"D4.fontFamily\"),\n fontSize: getThemeTextStyles(\"D4.fontSize\"),\n fontWeight: getThemeTextStyles(\"D4.fontWeight\"),\n lineHeight: getThemeTextStyles(\"D4.lineHeight\"),\n letterSpacing: getThemeTextStyles(\"D4.letterSpacing\"),\n },\n DBody: {\n fontFamily: getThemeTextStyles(\"DBody.fontFamily\"),\n fontSize: getThemeTextStyles(\"DBody.fontSize\"),\n fontWeight: getThemeTextStyles(\"DBody.fontWeight\"),\n lineHeight: getThemeTextStyles(\"DBody.lineHeight\"),\n letterSpacing: getThemeTextStyles(\"DBody.letterSpacing\"),\n },\n H1: {\n fontFamily: getThemeTextStyles(\"H1.fontFamily\"),\n fontSize: getThemeTextStyles(\"H1.fontSize\"),\n fontWeight: getThemeTextStyles(\"H1.fontWeight\"),\n lineHeight: getThemeTextStyles(\"H1.lineHeight\"),\n letterSpacing: getThemeTextStyles(\"H1.letterSpacing\"),\n },\n H2: {\n fontFamily: getThemeTextStyles(\"H2.fontFamily\"),\n fontSize: getThemeTextStyles(\"H2.fontSize\"),\n fontWeight: getThemeTextStyles(\"H2.fontWeight\"),\n lineHeight: getThemeTextStyles(\"H2.lineHeight\"),\n letterSpacing: getThemeTextStyles(\"H2.letterSpacing\"),\n },\n H3: {\n fontFamily: getThemeTextStyles(\"H3.fontFamily\"),\n fontSize: getThemeTextStyles(\"H3.fontSize\"),\n fontWeight: getThemeTextStyles(\"H3.fontWeight\"),\n lineHeight: getThemeTextStyles(\"H3.lineHeight\"),\n letterSpacing: getThemeTextStyles(\"H3.letterSpacing\"),\n },\n H4: {\n fontFamily: getThemeTextStyles(\"H4.fontFamily\"),\n fontSize: getThemeTextStyles(\"H4.fontSize\"),\n fontWeight: getThemeTextStyles(\"H4.fontWeight\"),\n lineHeight: getThemeTextStyles(\"H4.lineHeight\"),\n letterSpacing: getThemeTextStyles(\"H4.letterSpacing\"),\n },\n H5: {\n fontFamily: getThemeTextStyles(\"H5.fontFamily\"),\n fontSize: getThemeTextStyles(\"H5.fontSize\"),\n fontWeight: getThemeTextStyles(\"H5.fontWeight\"),\n lineHeight: getThemeTextStyles(\"H5.lineHeight\"),\n letterSpacing: getThemeTextStyles(\"H5.letterSpacing\"),\n },\n H6: {\n fontFamily: getThemeTextStyles(\"H6.fontFamily\"),\n fontSize: getThemeTextStyles(\"H6.fontSize\"),\n fontWeight: getThemeTextStyles(\"H6.fontWeight\"),\n lineHeight: getThemeTextStyles(\"H6.lineHeight\"),\n letterSpacing: getThemeTextStyles(\"H6.letterSpacing\"),\n },\n Body: {\n fontFamily: getThemeTextStyles(\"Body.fontFamily\"),\n fontSize: getThemeTextStyles(\"Body.fontSize\"),\n fontWeight: getThemeTextStyles(\"Body.fontWeight\"),\n lineHeight: getThemeTextStyles(\"Body.lineHeight\"),\n letterSpacing: getThemeTextStyles(\"Body.letterSpacing\"),\n },\n BodySmall: {\n fontFamily: getThemeTextStyles(\"BodySmall.fontFamily\"),\n fontSize: getThemeTextStyles(\"BodySmall.fontSize\"),\n fontWeight: getThemeTextStyles(\"BodySmall.fontWeight\"),\n lineHeight: getThemeTextStyles(\"BodySmall.lineHeight\"),\n letterSpacing: getThemeTextStyles(\"BodySmall.letterSpacing\"),\n },\n XSmall: {\n fontFamily: getThemeTextStyles(\"XSmall.fontFamily\"),\n fontSize: getThemeTextStyles(\"XSmall.fontSize\"),\n fontWeight: getThemeTextStyles(\"XSmall.fontWeight\"),\n lineHeight: getThemeTextStyles(\"XSmall.lineHeight\"),\n letterSpacing: getThemeTextStyles(\"XSmall.letterSpacing\"),\n },\n};\n","import { css } from \"styled-components\";\nimport { FontFamily } from \"../spec/text-spec/font-spec\";\nimport { TextLinkSizeType, TextSizeType, TextWeight } from \"./types\";\nimport { TextStyle } from \"./text-style\";\n\n// =============================================================================\n// FONT STYLE\n// =============================================================================\nconst getFont = (weight: TextWeight) => {\n switch (weight) {\n case 700:\n case \"bold\":\n return FontFamily.OpenSans.Bold;\n case 600:\n case \"semibold\":\n return FontFamily.OpenSans.Semibold;\n case 300:\n case \"light\":\n return FontFamily.OpenSans.Light;\n case 400:\n case \"regular\":\n return FontFamily.OpenSans.Regular;\n default:\n return \"\";\n }\n};\n\nconst getFontFamily = (\n type: TextSizeType | TextLinkSizeType,\n weight?: TextWeight\n) => {\n return (props: any) => {\n const fontFamilyFromTheme = TextStyle[type].fontFamily(props) as string;\n const fontWeightFromTheme = TextStyle[type].fontWeight(\n props\n ) as TextWeight;\n\n if (Object.values(FontFamily.OpenSans).includes(fontFamilyFromTheme)) {\n return css`\n font-family: ${getFont(weight) ||\n getFont(fontWeightFromTheme) ||\n fontFamilyFromTheme};\n font-weight: normal !important;\n `;\n }\n\n return css`\n font-family: ${fontFamilyFromTheme};\n font-weight: ${(getFontWeight(weight) || fontWeightFromTheme) ??\n \"normal\"};\n `;\n };\n};\n\nconst getFontWeight = (weight: TextWeight) => {\n switch (weight) {\n case 300:\n case \"light\":\n return 300;\n case 400:\n case \"regular\":\n return 400;\n case 600:\n case \"semibold\":\n return 600;\n case 700:\n case \"bold\":\n return 700;\n case 900:\n case \"black\":\n return 900;\n default:\n return \"\";\n }\n};\n\n// =============================================================================\n// TEXT STYLE\n// =============================================================================\nconst getTextStyle = (\n type: TextSizeType | TextLinkSizeType,\n weight: TextWeight,\n paragraph = false\n) => {\n return (props: any) => {\n const attrs = TextStyle[type];\n const fontSize = attrs.fontSize(props) as number;\n\n // Add extra margin for paragraphs\n const getMarginBottomStyle = () => {\n const marginBottomScale = paragraph ? 1.05 : 0;\n return css`\n margin-bottom: ${fontSize * marginBottomScale}rem;\n `;\n };\n\n return css`\n ${getFontFamily(type, weight)}\n font-size: ${fontSize}rem !important;\n line-height: ${attrs.lineHeight}rem !important;\n letter-spacing: ${attrs.letterSpacing(props) || 0}rem !important;\n ${getMarginBottomStyle()}\n `;\n };\n};\n\nconst getDisplayStyle = (inline = false, paragraph = false) => {\n if (paragraph) {\n return css`\n display: block;\n `;\n } else if (inline) {\n return css`\n display: inline;\n `;\n } else {\n return css`\n display: block;\n `;\n }\n};\n\n// =============================================================================\n// EXPORTS\n// =============================================================================\nexport const TextStyleHelper = {\n getFontFamily,\n getTextStyle,\n getDisplayStyle,\n};\n","import styled, { css } from \"styled-components\";\nimport { Color } from \"../color\";\nimport { TextStyleHelper } from \"../text/helper\";\n\n// =============================================================================\n// STYLE INTERFACe\n// =============================================================================\ninterface InputStyleProps {\n error?: boolean;\n readOnly?: boolean;\n}\n\n// =============================================================================\n// STYLING\n// =============================================================================\n\nexport const InputElement = styled.input<InputStyleProps>`\n ${TextStyleHelper.getTextStyle(\"Body\", \"regular\")}\n border: 1px solid ${Color.Neutral[5]};\n border-radius: 4px;\n display: block;\n padding: 0.2rem 1rem 0.3rem 1rem; // Somehow the input text appears lower\n height: 3rem;\n width: 100%;\n background: ${Color.Neutral[8]};\n color: ${Color.Neutral[1]};\n\n :focus,\n :active {\n outline: none;\n border: 1px solid ${Color.Accent.Light[1]};\n box-shadow: inset 0 0 5px 1px rgba(87, 169, 255, 0.5);\n }\n\n ::placeholder,\n ::-webkit-input-placeholder {\n color: ${Color.Neutral[3]};\n }\n\n ${(props) => {\n if (props.readOnly) {\n return css`\n border: none;\n padding-left: 0rem;\n background: transparent !important;\n\n :focus,\n :active {\n border: none;\n box-shadow: none;\n }\n `;\n } else if (props.disabled) {\n return css`\n background: ${Color.Neutral[6](props)};\n cursor: not-allowed;\n\n :focus,\n :active {\n outline: none;\n border: 1px solid ${Color.Neutral[5](props)};\n box-shadow: none;\n }\n `;\n } else if (props.error) {\n return css`\n border: 1px solid ${Color.Validation.Red.Border(props)};\n\n :focus,\n :active {\n border: 1px solid ${Color.Validation.Red.Border(props)};\n box-shadow: inset 0 0 4px 1px rgba(221, 102, 102, 0.8);\n }\n `;\n }\n }}\n`;\n","import React from \"react\";\nimport { StringHelper } from \"../util/string-helper\";\nimport { InputElement } from \"./input.style\";\nimport { InputProps, InputRef } from \"./types\";\n\nconst Component = (\n {\n value,\n spacing,\n type,\n error,\n disabled,\n onChange,\n ...otherProps\n }: InputProps,\n ref: InputRef\n): JSX.Element => {\n // =============================================================================\n // CONST, STATE, REFS\n // =============================================================================\n // =============================================================================\n // EVENT HANDLERS\n // =============================================================================\n const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n if (shouldAllowSpacing()) {\n handleSpacingAndCaretPosition(event);\n return;\n }\n onChange(event);\n };\n\n // =============================================================================\n // HELPER FUNCTIONS\n // =============================================================================\n const shouldAllowSpacing = () => {\n return type === \"tel\" && spacing;\n };\n\n const convertInputString = (value: string | number | readonly string[]) => {\n if (!value) return \"\";\n if (shouldAllowSpacing()) {\n return StringHelper.transformWithSpaces(value, spacing);\n }\n return value;\n };\n\n const handleSpacingAndCaretPosition = (\n event: React.ChangeEvent<HTMLInputElement>\n ) => {\n const element = event.target;\n const currentValue = element.value;\n\n // Send to handler unspaced value\n const valueWithoutSpace = element.value.replace(/\\s/g, \"\");\n element.value = valueWithoutSpace;\n onChange(event);\n\n // reset element value\n element.value = currentValue;\n };\n\n // =============================================================================\n // RENDER FUNCTIONS\n // =============================================================================\n /**\n * To clear controlled input value, you have to pass in value as empty string,\n * then set `updatedValue` to empty string.\n * `updatedValue` for uncontrolled components remains as undefined such that the\n * user is free to edit the field. (else the value of the InputElement will\n * be set to empty string)\n */\n const updatedValue = value ? convertInputString(value) : value;\n const onChangeFn = onChange ? handleChange : undefined;\n\n return (\n <InputElement\n data-testid=\"input\"\n ref={ref}\n disabled={disabled}\n value={updatedValue}\n error={error}\n onChange={onChangeFn}\n type={type}\n readOnly={type === \"readonly\"}\n {...otherProps}\n />\n );\n};\n\nexport const Input = React.forwardRef(Component);\n"],"names":["StringHelper","transformWithSpaces","value","groupLength","regex","replace","RegExp","trim","padValue","retainSingleZero","padStart","parseInt","toString","shouldTruncateToTwoLines","text","widthOfElement","estimatedCharOnLine","Math","floor","length","split","truncateOneLine","minDivSize","baselineCharLength","additionalCharAllowed","allowedCharLength","thresholdIndex","substring","isArray_1","Array","isArray","freeGlobal","global","Object","freeSelf","self","_root","Function","_Symbol","require$$0","Symbol","objectProto","prototype","hasOwnProperty","nativeObjectToString","symToStringTag","toStringTag","undefined","_getRawTag","isOwn","call","tag","unmasked","e","result","getRawTag","require$$1","objectToString","_baseGetTag","baseGetTag","isObjectLike","isSymbol_1","isSymbol","reIsDeepProp","reIsPlainProp","_isKey","object","type","test","isObject_1","isObject","uid","isFunction_1","coreJsData","maskSrcKey","exec","keys","IE_PROTO","_isMasked","func","funcToString","isFunction","isMasked","require$$2","toSource","reIsHostCtor","funcProto","reIsNative","baseIsNative","getValue","key","_getNative","_nativeCreate","nativeCreate","_hashClear","this","__data__","size","_hashDelete","has","_hashGet","data","hashClear","hashDelete","hashGet","hashHas","hashSet","Hash","entries","index","clear","entry","set","get","_Hash","_listCacheClear","eq","other","_assocIndexOf","array","assocIndexOf","splice","listCacheClear","listCacheDelete","pop","listCacheGet","listCacheHas","listCacheSet","push","ListCache","_ListCache","Map","isKeyable","_getMapData","map","getMapData","mapCacheClear","hash","string","mapCacheDelete","mapCacheGet","mapCacheHas","mapCacheSet","MapCache","memoize","resolver","TypeError","memoized","args","arguments","apply","cache","Cache","rePropName","reEscapeChar","_stringToPath","memoizeCapped","charCodeAt","match","number","quote","subString","arrayMap","iteratee","require$$3","symbolProto","symbolToString","_baseToString","baseToString","isKey","stringToPath","castPath","toKey","baseGet","path","get_1","defaultValue","collection","attributePath","customCollection","getCollection","collectionSpec","contextValue","themeContextValue","collections","ThemeContextKeys","ColorSpec","base","Brand","Primary","PrimaryDark","Secondary","Accent","Dark","Light","Neutral","Validation","Green","Text","Icon","Border","Background","Orange","Badge","Red","bookingsg","getThemeColors","props","theme","colorSet","colorScheme","options","color","Color","FontFamily","Regular","Semibold","Bold","TextStyleSpec","D1","fontFamily","fontSize","fontWeight","lineHeight","letterSpacing","D2","D3","D4","DBody","H1","H2","H3","H4","H5","H6","Body","BodySmall","XSmall","getThemeTextStyles","textStyleSet","textStyleScheme","textStyle","TextStyle","getFont","weight","getFontFamily","fontFamilyFromTheme","fontWeightFromTheme","values","includes","css","getFontWeight","TextStyleHelper","paragraph","attrs","InputElement","styled","input","readOnly","disabled","error","Input","React","forwardRef","spacing","onChange","otherProps","ref","shouldAllowSpacing","handleSpacingAndCaretPosition","event","element","target","currentValue","valueWithoutSpace","updatedValue","convertInputString","_jsx"],"mappings":"wGAAM,IAAWA,GAAjB,SAAiBA,GACAA,EAAAC,oBAAsB,CAC/BC,EACAC,KAEA,MAAMC,EAAQ,MAAQD,EAAc,KACpC,OAAOD,EACFG,QAAQ,aAAc,IACtBA,QAAQ,IAAIC,OAAOF,EAAO,KAAM,OAChCG,QASIP,EAAAQ,SAAW,CACpBN,EACAO,KAEA,GAAc,MAAVP,EACA,OAAOO,EAAmBP,EAAQA,EAAMQ,SAAS,EAAG,KAGxD,GAAc,KAAVR,EACA,OAAOA,EAIX,OADqBS,SAAST,GACVU,WAAWF,SAAS,EAAG,MASlCV,EAAAa,yBAA2B,CACpCC,EACAC,KAIA,MAAMC,EAAsBC,KAAKC,MAAMH,EAAiB,GACxD,OACID,EAAKK,QAAgC,EAAtBH,GACa,IAA3BF,EAAKM,MAAM,KAAKD,QAAgBL,EAAKK,OAASH,GAa1ChB,EAAeqB,gBAAG,CAC3BP,EACAC,EACAO,EACAC,KAEA,IAAIC,EAAwB,EACxBT,EAAiBO,IAGjBE,EAAwBP,KAAKC,OACxBH,EAAiBO,GAAc,IAGxC,MAAMG,EAAoBF,EAAqBC,EAC/C,GAAIC,EAAoBX,EAAKK,OAAQ,CACjC,MAAMO,EAAiBT,KAAKC,MAAMO,EAAoB,GACtD,OACIX,EAAKa,UAAU,EAAGD,GAClB,QACAZ,EAAKa,UAAUb,EAAKK,OAASO,EAAgBZ,EAAKK,QAI1D,OAAOL,GAtFf,CAAiBd,IAAAA,EAwFhB,0JC/DD4B,EAFcC,MAAMC,QCvBhBC,ECC8B,iBAAVC,GAAsBA,GAAUA,EAAOC,SAA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AAOA,EACPK,SATWA,EAjDGK,IACdF,IACAC,EAA8BC,GAGlCL,EAASK,SA4CgC/N,EAUrCoB,KAAMA,EACN+L,SAAmB,aAAT/L,KACNuM"}
1
+ {"version":3,"file":"index.js","sources":["../../node_modules/lodash/isArray.js","../../node_modules/lodash/_root.js","../../node_modules/lodash/_freeGlobal.js","../../node_modules/lodash/_Symbol.js","../../node_modules/lodash/_getRawTag.js","../../node_modules/lodash/_objectToString.js","../../node_modules/lodash/_baseGetTag.js","../../node_modules/lodash/isObjectLike.js","../../node_modules/lodash/isSymbol.js","../../node_modules/lodash/_isKey.js","../../node_modules/lodash/isObject.js","../../node_modules/lodash/isFunction.js","../../node_modules/lodash/_isMasked.js","../../node_modules/lodash/_coreJsData.js","../../node_modules/lodash/_toSource.js","../../node_modules/lodash/_baseIsNative.js","../../node_modules/lodash/_getValue.js","../../node_modules/lodash/_getNative.js","../../node_modules/lodash/_nativeCreate.js","../../node_modules/lodash/_hashClear.js","../../node_modules/lodash/_hashDelete.js","../../node_modules/lodash/_hashGet.js","../../node_modules/lodash/_hashHas.js","../../node_modules/lodash/_hashSet.js","../../node_modules/lodash/_Hash.js","../../node_modules/lodash/_listCacheClear.js","../../node_modules/lodash/eq.js","../../node_modules/lodash/_assocIndexOf.js","../../node_modules/lodash/_listCacheDelete.js","../../node_modules/lodash/_listCacheGet.js","../../node_modules/lodash/_listCacheHas.js","../../node_modules/lodash/_listCacheSet.js","../../node_modules/lodash/_ListCache.js","../../node_modules/lodash/_Map.js","../../node_modules/lodash/_mapCacheClear.js","../../node_modules/lodash/_isKeyable.js","../../node_modules/lodash/_getMapData.js","../../node_modules/lodash/_mapCacheDelete.js","../../node_modules/lodash/_mapCacheGet.js","../../node_modules/lodash/_mapCacheHas.js","../../node_modules/lodash/_mapCacheSet.js","../../node_modules/lodash/_MapCache.js","../../node_modules/lodash/memoize.js","../../node_modules/lodash/_memoizeCapped.js","../../node_modules/lodash/_stringToPath.js","../../node_modules/lodash/_arrayMap.js","../../node_modules/lodash/_baseToString.js","../../node_modules/lodash/toString.js","../../node_modules/lodash/_castPath.js","../../node_modules/lodash/_toKey.js","../../node_modules/lodash/_baseGet.js","../../node_modules/lodash/get.js","../../src/theme/helper.ts","../../src/theme/types.ts","../../src/theme/color-theme-helper.ts","../../src/spec/color-spec/base-color-set.ts","../../src/spec/color-spec/bookingsg-color-set.ts","../../src/color/color.ts","../../src/theme/design-token-helper.ts","../../src/spec/design-token-spec/base-design-token-set.ts","../../src/design-token/design-token.ts","../../src/shared/input-wrapper/input-wrapper.tsx","../../src/util/string-helper.ts","../../node_modules/@lifesg/react-icons/cross.js","../../src/spec/text-spec/font-spec.ts","../../src/theme/text-theme-helper.ts","../../src/spec/text-spec/base-text-style-set.ts","../../src/text/text-style.ts","../../src/text/helper.ts","../../src/input/input.style.tsx","../../src/input/input.tsx"],"sourcesContent":["/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","var isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/;\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\nmodule.exports = isKey;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var MapCache = require('./_MapCache');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n}\n\n// Expose `MapCache`.\nmemoize.Cache = MapCache;\n\nmodule.exports = memoize;\n","var memoize = require('./memoize');\n\n/** Used as the maximum memoize cache size. */\nvar MAX_MEMOIZE_SIZE = 500;\n\n/**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\nfunction memoizeCapped(func) {\n var result = memoize(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n}\n\nmodule.exports = memoizeCapped;\n","var memoizeCapped = require('./_memoizeCapped');\n\n/** Used to match property names within property paths. */\nvar rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoizeCapped(function(string) {\n var result = [];\n if (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\nmodule.exports = stringToPath;\n","/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\nmodule.exports = arrayMap;\n","var Symbol = require('./_Symbol'),\n arrayMap = require('./_arrayMap'),\n isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = baseToString;\n","var baseToString = require('./_baseToString');\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\nmodule.exports = toString;\n","var isArray = require('./isArray'),\n isKey = require('./_isKey'),\n stringToPath = require('./_stringToPath'),\n toString = require('./toString');\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n}\n\nmodule.exports = castPath;\n","var isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = toKey;\n","var castPath = require('./_castPath'),\n toKey = require('./_toKey');\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n path = castPath(path, object);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n}\n\nmodule.exports = baseGet;\n","var baseGet = require('./_baseGet');\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n}\n\nmodule.exports = get;\n","import get from \"lodash/get\";\nimport { ThemeCollectionSpec } from \"./types\";\n\n/**\n *\n * @param collection the collection of theme-specific style attributes\n * @param attributePath (optional) the path to the value within the selected collection\n * @param attributePath (optional) the path to the value within the selected collection\n * @returns style value\n */\nexport const getValue = <C, T>(\n collection: C,\n attributePath?: string,\n customCollection?: T\n): string | number => {\n return attributePath\n ? get(customCollection, attributePath) || get(collection, attributePath)\n : customCollection || collection;\n};\n\n/**\n * Gets the theme set based on the theme context value\n * @param collectionSpec the collections of theme-specific style attributes\n * @param contextValue (optional) the theme context value\n * @returns the selected collection\n */\nexport const getCollection = <T, V, C>(\n collectionSpec: ThemeCollectionSpec<T, V>,\n contextValue?: string\n): C => {\n const themeContextValue = contextValue || collectionSpec.defaultValue;\n return get(collectionSpec.collections, themeContextValue as string);\n};\n","import { ColorSet, ColorSetOptions } from \"../color/types\";\nimport { DesignTokenSet, DesignTokenSetOptions } from \"../design-token/types\";\nimport { TextStyleSetOptionsType, TextStyleSetType } from \"../text/types\";\n\nexport type ThemeLayout = \"normal\";\n\n// =============================================================================\n// COLOR THEMES\n// =============================================================================\nexport type ColorScheme = \"base\" | \"bookingsg\";\nexport type ColorCollectionsMap = {\n [key in ColorScheme]: ColorSet;\n};\n\n// =============================================================================\n// FONT STYLE THEMES\n// =============================================================================\nexport type TextStyleScheme = \"base\";\nexport type FontStyleCollectionsMap = {\n [key in TextStyleScheme]: TextStyleSetType;\n};\n\n// =============================================================================\n// DESIGN TOKEN THEMES\n// =============================================================================\nexport type DesignTokenScheme = \"base\";\nexport type DesignTokenCollectionsMap = {\n [key in DesignTokenScheme]: DesignTokenSet;\n};\n\n// =============================================================================\n// GENERAL\n// =============================================================================\nexport enum ThemeContextKeys {\n colorScheme = \"colorScheme\",\n layout = \"layout\",\n textStyleScheme = \"textStyleScheme\",\n designTokenScheme = \"designTokenScheme\",\n}\n\nexport interface ThemeSpecOptions {\n /** for color customisation, can specify subset of set */\n color?: ColorSetOptions | undefined;\n textStyle?: TextStyleSetOptionsType | undefined;\n designToken?: DesignTokenSetOptions | undefined;\n}\n\nexport interface ThemeSpec {\n /** Sets the color scheme of the theme */\n [ThemeContextKeys.colorScheme]: ColorScheme;\n /** Sets the text style scheme of the theme */\n [ThemeContextKeys.textStyleScheme]: TextStyleScheme;\n /** Sets the design token scheme of the theme */\n [ThemeContextKeys.designTokenScheme]: DesignTokenScheme;\n /** Sets the layout scheme of the theme */\n [ThemeContextKeys.layout]?: ThemeLayout | undefined;\n /** For specific customisations to any schemes */\n options?: ThemeSpecOptions | undefined;\n}\n\nexport interface ThemeCollectionSpec<T, V> {\n collections: T;\n defaultValue: V;\n}\n","import { ColorSet } from \"../color/types\";\nimport { BaseColorSet } from \"../spec/color-spec/base-color-set\";\nimport { BookingSGColorSet } from \"../spec/color-spec/bookingsg-color-set\";\nimport { getCollection, getValue } from \"./helper\";\nimport {\n ColorCollectionsMap,\n ColorScheme,\n ThemeCollectionSpec,\n ThemeContextKeys,\n ThemeSpec,\n} from \"./types\";\n\n// =============================================================================\n// THEME SPECIFICATION\n// =============================================================================\nconst ColorSpec: ThemeCollectionSpec<ColorCollectionsMap, ColorScheme> = {\n collections: {\n base: BaseColorSet,\n bookingsg: BookingSGColorSet,\n },\n defaultValue: \"base\",\n};\n\n// =============================================================================\n// HELPER FUNCTIONS\n// =============================================================================\nexport const getThemeColors = (attributePath: string) => {\n return (props: any): string => {\n const theme = props.theme as ThemeSpec;\n const colorSet: ColorSet = getCollection(\n ColorSpec,\n theme[ThemeContextKeys.colorScheme]\n );\n\n return theme.options && theme.options.color\n ? (getValue(colorSet, attributePath, theme.options.color) as string)\n : (getValue(colorSet, attributePath) as string);\n };\n};\n","import { ColorSet, ValidationTypes } from \"../../color/types\";\n\nexport const BaseColorSet: ColorSet = {\n Brand: {\n 1: \"#EF413D\",\n 2: \"#F26664\",\n 3: \"#F58E8B\",\n 4: \"#F9B5B2\",\n 5: \"#FDDDD7\",\n 6: \"#FFEEEA\",\n },\n Primary: \"#1C76D5\",\n PrimaryDark: \"#1869BF\",\n Secondary: \"#0056b3\",\n Accent: {\n Dark: {\n 1: \"#465A88\",\n 2: \"#556D99\",\n 3: \"#8D8DBF\",\n },\n Light: {\n 1: \"#57A9FF\",\n 2: \"#81BFFF\",\n 3: \"#BED7FF\",\n 4: \"#E2ECFD\",\n 5: \"#F6F8FF\",\n 6: \"#FBFCFE\",\n },\n },\n Neutral: {\n 1: \"#282828\", // Text Black\n 2: \"#424242\",\n 3: \"#686868\", // Text Grey\n 4: \"#A4A4A4\",\n 5: \"#E0E4E5\",\n 6: \"#ECEFEF\",\n 7: \"#F8F8F8\",\n 8: \"#FFFFFF\",\n },\n Validation: {\n Green: {\n Text: \"#097123\", // Validation Text\n Icon: \"#4FC029\",\n Border: \"#95D97F\",\n Background: \"#F9FDF8\", // Validation Background\n },\n Orange: {\n Text: \"#B34E00\", // Validation Text\n Icon: \"#FEAB10\",\n Border: \"#F9CB77\",\n Background: \"#FFFCF7\", // Validation Background\n Badge: \"#F57F17\", // Orange Badge Notification\n },\n Red: {\n Text: \"#C60000\", // Validation Text\n Icon: \"#C60000\",\n Border: \"#DD6666\",\n Background: \"#FDF7F7\", // Validation Background\n },\n } as ValidationTypes,\n Shadow: {\n Accent: \"rgba(87, 169, 255, 0.5)\",\n Red: \"rgba(221, 102, 102, 0.8)\",\n },\n};\n","import { ColorSet, ValidationTypes } from \"../../color/types\";\n\nexport const BookingSGColorSet: ColorSet = {\n Brand: {\n 1: \"#EF413D\",\n 2: \"#F26664\",\n 3: \"#F58E8B\",\n 4: \"#F9B5B2\",\n 5: \"#FDDDD7\",\n 6: \"#FFEEEA\",\n },\n Primary: \"#6F4AB8\",\n PrimaryDark: \"#6443A6\",\n Secondary: \"#6443A6\",\n Accent: {\n Dark: {\n 1: \"#355985\",\n 2: \"#68819D\",\n 3: \"#9AABBE\",\n },\n Light: {\n 1: \"#9F82D9\",\n 2: \"#B5A5D7\",\n 3: \"#CEC3E4 \",\n 4: \"#E2DBEF\",\n 5: \"#F2EFF8\",\n 6: \"#F7F6FB\",\n },\n },\n Neutral: {\n 1: \"#282828\", // Text Black\n 2: \"#424242\",\n 3: \"#686868\", // Text Grey\n 4: \"#A4A4A4\",\n 5: \"#E0E4E5\",\n 6: \"#ECEFEF\",\n 7: \"#F8F8F8\",\n 8: \"#FFFFFF\",\n },\n Validation: {\n Green: {\n Text: \"#097123\", // Validation Text\n Icon: \"#4FC029\",\n Border: \"#95D97F\",\n Background: \"#F9FDF8\", // Validation Background\n },\n Orange: {\n Text: \"#B34E00\", // Validation Text\n Icon: \"#FEAB10\",\n Border: \"#F9CB77\",\n Background: \"#FFFCF7\", // Validation Background\n Badge: \"#F57F17\", // Orange Badge Notification\n },\n Red: {\n Text: \"#C60000\", // Validation Text\n Icon: \"#C60000\",\n Border: \"#DD6666\",\n Background: \"#FDF7F7\", // Validation Background\n },\n } as ValidationTypes,\n Shadow: {\n Accent: \"rgba(161, 87, 255, 0.5)\",\n Red: \"rgba(221, 102, 102, 0.8)\",\n },\n};\n","import { getThemeColors } from \"../theme/color-theme-helper\";\nimport { PropertiesToType } from \"../util/utility-types\";\nimport { ColorSet } from \"./types\";\n\nexport const Color: PropertiesToType<\n ColorSet,\n ReturnType<typeof getThemeColors>\n> = {\n Brand: {\n 1: getThemeColors(\"Brand.1\"),\n 2: getThemeColors(\"Brand.2\"),\n 3: getThemeColors(\"Brand.3\"),\n 4: getThemeColors(\"Brand.4\"),\n 5: getThemeColors(\"Brand.5\"),\n 6: getThemeColors(\"Brand.6\"),\n },\n Primary: getThemeColors(\"Primary\"),\n PrimaryDark: getThemeColors(\"PrimaryDark\"),\n Secondary: getThemeColors(\"Secondary\"),\n Accent: {\n Light: {\n 1: getThemeColors(\"Accent.Light.1\"),\n 2: getThemeColors(\"Accent.Light.2\"),\n 3: getThemeColors(\"Accent.Light.3\"),\n 4: getThemeColors(\"Accent.Light.4\"),\n 5: getThemeColors(\"Accent.Light.5\"),\n 6: getThemeColors(\"Accent.Light.6\"),\n },\n Dark: {\n 1: getThemeColors(\"Accent.Dark.1\"),\n 2: getThemeColors(\"Accent.Dark.2\"),\n 3: getThemeColors(\"Accent.Dark.3\"),\n },\n },\n Neutral: {\n 1: getThemeColors(\"Neutral.1\"),\n 2: getThemeColors(\"Neutral.2\"),\n 3: getThemeColors(\"Neutral.3\"),\n 4: getThemeColors(\"Neutral.4\"),\n 5: getThemeColors(\"Neutral.5\"),\n 6: getThemeColors(\"Neutral.6\"),\n 7: getThemeColors(\"Neutral.7\"),\n 8: getThemeColors(\"Neutral.8\"),\n },\n Validation: {\n Green: {\n Text: getThemeColors(\"Validation.Green.Text\"),\n Icon: getThemeColors(\"Validation.Green.Icon\"),\n Border: getThemeColors(\"Validation.Green.Border\"),\n Background: getThemeColors(\"Validation.Green.Background\"),\n },\n Orange: {\n Text: getThemeColors(\"Validation.Orange.Text\"),\n Icon: getThemeColors(\"Validation.Orange.Icon\"),\n Border: getThemeColors(\"Validation.Orange.Border\"),\n Background: getThemeColors(\"Validation.Orange.Background\"),\n Badge: getThemeColors(\"Validation.Orange.Badge\"),\n },\n Red: {\n Text: getThemeColors(\"Validation.Red.Text\"),\n Icon: getThemeColors(\"Validation.Red.Icon\"),\n Border: getThemeColors(\"Validation.Red.Border\"),\n Background: getThemeColors(\"Validation.Red.Background\"),\n },\n },\n Shadow: {\n Accent: getThemeColors(\"Shadow.Accent\"),\n Red: getThemeColors(\"Shadow.Red\"),\n },\n};\n","import { CssValue, DesignTokenSet } from \"../design-token/types\";\nimport { BaseDesignTokenSet } from \"../spec/design-token-spec/base-design-token-set\";\nimport { getCollection, getValue } from \"./helper\";\nimport {\n DesignTokenCollectionsMap,\n DesignTokenScheme,\n ThemeCollectionSpec,\n ThemeContextKeys,\n ThemeSpec,\n} from \"./types\";\n\n// =============================================================================\n// THEME SPECIFICATION\n// =============================================================================\nconst DesignTokenSpec: ThemeCollectionSpec<\n DesignTokenCollectionsMap,\n DesignTokenScheme\n> = {\n collections: {\n base: BaseDesignTokenSet,\n },\n defaultValue: \"base\",\n};\n\n// =============================================================================\n// HELPER FUNCTIONS\n// =============================================================================\nexport const getThemeDesignToken = (attributePath: string) => {\n return (props: any): CssValue => {\n const theme = props.theme as ThemeSpec;\n const DesignTokenSet: DesignTokenSet = getCollection(\n DesignTokenSpec,\n theme[ThemeContextKeys.designTokenScheme]\n );\n\n return theme.options?.designToken\n ? getValue(DesignTokenSet, attributePath, theme.options.designToken)\n : getValue(DesignTokenSet, attributePath);\n };\n};\n","import { css } from \"styled-components\";\nimport { Color } from \"../../color/color\";\nimport { DesignTokenSet } from \"../../design-token/types\";\n\nexport const BaseDesignTokenSet: DesignTokenSet = {\n InputBoxShadow: css`\n inset 0 0 6px 1px ${Color.Shadow.Accent}\n `,\n InputErrorBoxShadow: css`\n inset 0 0 6px 1px ${Color.Shadow.Red}\n `,\n};\n","import { getThemeDesignToken } from \"../theme/design-token-helper\";\nimport { PropertiesToType } from \"../util/utility-types\";\nimport { DesignTokenSet } from \"./types\";\n\nexport const DesignToken: PropertiesToType<\n DesignTokenSet,\n ReturnType<typeof getThemeDesignToken>\n> = {\n InputBoxShadow: getThemeDesignToken(\"InputBoxShadow\"),\n InputErrorBoxShadow: getThemeDesignToken(\"InputErrorBoxShadow\"),\n};\n","import { Color } from \"../../color\";\nimport { DesignToken } from \"../../design-token\";\nimport styled, { css } from \"styled-components\";\n\n// =============================================================================\n// STYLE INTERFACE, transient props are denoted with $\n// See more https://styled-components.com/docs/api#transient-props\n// =============================================================================\ninterface StyleProps {\n disabled?: boolean | undefined;\n $error?: boolean | undefined;\n $readOnly?: boolean | undefined;\n $position?: \"left\" | \"right\" | undefined;\n}\n\n// =============================================================================\n// STYLING\n// =============================================================================\nexport const InputWrapper = styled.div<StyleProps>`\n display: flex;\n align-items: center;\n position: relative;\n border: 1px solid ${Color.Neutral[5]};\n border-radius: 4px;\n background: ${Color.Neutral[8]};\n height: max-content;\n width: 100%;\n padding: 0 1rem;\n flex-direction: ${(props) =>\n props.$position === \"right\" ? \"row-reverse\" : \"row\"};\n\n :focus-within {\n border: 1px solid ${Color.Accent.Light[1]};\n box-shadow: ${DesignToken.InputBoxShadow};\n }\n\n ${(props) => {\n if (props.$readOnly) {\n return css`\n border: none;\n padding: 0;\n background: transparent !important;\n\n :focus-within {\n border: none;\n box-shadow: none;\n }\n `;\n } else if (props.disabled) {\n return css`\n background: ${Color.Neutral[6](props)};\n cursor: not-allowed;\n\n :focus-within {\n border: 1px solid ${Color.Neutral[5](props)};\n box-shadow: none;\n }\n `;\n } else if (props.$error) {\n return css`\n border: 1px solid ${Color.Validation.Red.Border(props)};\n\n :focus-within {\n border: 1px solid ${Color.Validation.Red.Border(props)};\n box-shadow: ${DesignToken.InputErrorBoxShadow};\n }\n `;\n }\n }}\n`;\n","export namespace StringHelper {\n export const transformWithSpaces = (\n value: string | any,\n groupLength: number\n ) => {\n const regex = \"(.{\" + groupLength + \"})\";\n return value\n .replace(/[^\\dA-Z]/gi, \"\")\n .replace(new RegExp(regex, \"g\"), \"$1 \")\n .trim();\n };\n\n /**\n * Pads single digit values with a zero and trims leading zero for\n * values of length more than 2\n * @param value the string value\n * @param retainSingleZero setting true will allow single zero value\n */\n export const padValue = (\n value: string,\n retainSingleZero?: boolean\n ): string => {\n if (value === \"0\") {\n return retainSingleZero ? value : value.padStart(2, \"0\");\n }\n\n if (value === \"\") {\n return value;\n }\n\n const trimmedValue = parseInt(value);\n return trimmedValue.toString().padStart(2, \"0\");\n };\n\n /**\n * Checks if the text is required to be truncated and broken into two lines based\n * on the available width of container. **Note: This is relevant to font size 18px or 1.125rem only **\n * @param text input text\n * @param widthOfElement element width in px\n */\n export const shouldTruncateToTwoLines = (\n text: string,\n widthOfElement: number\n ): boolean => {\n // This is arbitrary and based on tests to derive that every 9px increment ~= 1 char length.\n // But this applies to font size 18px or 1.125rem only\n const estimatedCharOnLine = Math.floor(widthOfElement / 9);\n return (\n text.length >= estimatedCharOnLine * 2 ||\n (text.split(\" \").length === 1 && text.length > estimatedCharOnLine)\n );\n };\n\n /**\n * Performs a truncation by adding ellipsis in the middle of the text.\n * **Note: This is relevant to font size 18px or 1.125rem only **\n * @param text input text\n * @param widthOfElement the dynamic width of the container in px\n * @param minDivSize the minimum container size (using size on mobileS viewport as baseline)\n * @param baselineCharLength the baseline amount of characters to be displayed before truncation kicks. This\n * will be increased if there is more space available (derived from `widthOfElement`)\n */\n export const truncateOneLine = (\n text: string,\n widthOfElement: number,\n minDivSize: number,\n baselineCharLength: number\n ): string => {\n let additionalCharAllowed = 0;\n if (widthOfElement > minDivSize) {\n // This is arbitrary and based on tests to derive that every 8px increment ~= 1 char length.\n // But this applies to font size 18px or 1.125rem only\n additionalCharAllowed = Math.floor(\n (widthOfElement - minDivSize) / 8\n );\n }\n const allowedCharLength = baselineCharLength + additionalCharAllowed;\n if (allowedCharLength < text.length) {\n const thresholdIndex = Math.floor(allowedCharLength / 2); // We will cut it halfway to derive x num of characters\n return (\n text.substring(0, thresholdIndex) + // Use the first x\n \" ... \" +\n text.substring(text.length - thresholdIndex, text.length) // Use the last x\n );\n }\n\n return text;\n };\n}\n","\"use strict\";Object.defineProperty(exports,\"__esModule\",{value:!0});var e=require(\"react/jsx-runtime\");const C=C=>e.jsx(\"svg\",{width:\"1em\",height:\"1em\",viewBox:\"0 0 20 20\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\",...C,children:e.jsx(\"path\",{d:\"M9.99991 11.229L5.97891 15.25C5.81224 15.4167 5.61091 15.4967 5.37491 15.49C5.13891 15.4827 4.93757 15.3957 4.77091 15.229C4.60424 15.0623 4.52091 14.8577 4.52091 14.615C4.52091 14.3717 4.60424 14.1667 4.77091 14L8.77091 10L4.74991 5.979C4.58324 5.81233 4.50324 5.60767 4.50991 5.365C4.51724 5.12167 4.60424 4.91667 4.77091 4.75C4.93757 4.58333 5.14224 4.5 5.38491 4.5C5.62824 4.5 5.83324 4.58333 5.99991 4.75L9.99991 8.771L14.0209 4.75C14.1876 4.58333 14.3922 4.5 14.6349 4.5C14.8782 4.5 15.0832 4.58333 15.2499 4.75C15.4166 4.91667 15.4999 5.12167 15.4999 5.365C15.4999 5.60767 15.4166 5.81233 15.2499 5.979L11.2289 10L15.2499 14.021C15.4166 14.1877 15.4999 14.389 15.4999 14.625C15.4999 14.861 15.4166 15.0623 15.2499 15.229C15.0832 15.3957 14.8782 15.479 14.6349 15.479C14.3922 15.479 14.1876 15.3957 14.0209 15.229L9.99991 11.229Z\",fill:\"currentColor\"})});C.displayName=\"CrossIcon\",exports.CrossIcon=C;\n","export const FontFamily = {\n OpenSans: {\n Regular: \"Open Sans\",\n Semibold: \"Open Sans Semibold\",\n Bold: \"Open Sans Bold\",\n Light: \"Open Sans Light\",\n },\n MerriWeather: \"Merriweather\",\n};\n","import { BaseTextStyleSet } from \"../spec/text-spec/base-text-style-set\";\nimport { TextStyleSetType } from \"../text/types\";\nimport { getCollection, getValue } from \"./helper\";\nimport {\n FontStyleCollectionsMap,\n TextStyleScheme,\n ThemeCollectionSpec,\n ThemeContextKeys,\n ThemeSpec,\n} from \"./types\";\n\n// =============================================================================\n// THEME SPECIFICATION\n// =============================================================================\nconst TextStyleSpec: ThemeCollectionSpec<\n FontStyleCollectionsMap,\n TextStyleScheme\n> = {\n collections: {\n base: BaseTextStyleSet,\n },\n defaultValue: \"base\",\n};\n\n// =============================================================================\n// HELPER FUNCTIONS\n// =============================================================================\nexport const getThemeTextStyles = (attributePath: string) => {\n return (props: any): string | number => {\n const theme = props.theme as ThemeSpec;\n const textStyleSet: TextStyleSetType = getCollection(\n TextStyleSpec,\n theme[ThemeContextKeys.textStyleScheme]\n );\n\n return theme.options && theme.options.textStyle\n ? getValue(textStyleSet, attributePath, theme.options.textStyle)\n : getValue(textStyleSet, attributePath);\n };\n};\n","import { FontFamily } from \"./font-spec\";\nimport { TextStyleSetType } from \"../../text/types\";\n\n// In rem unit\nexport const BaseTextStyleSet: TextStyleSetType = {\n D1: {\n fontFamily: FontFamily.OpenSans.Bold,\n fontSize: 3,\n fontWeight: 700,\n lineHeight: 4,\n letterSpacing: -0.056,\n },\n D2: {\n fontFamily: FontFamily.OpenSans.Bold,\n fontSize: 2.5,\n fontWeight: 700,\n lineHeight: 3.5,\n letterSpacing: -0.032,\n },\n D3: {\n fontFamily: FontFamily.OpenSans.Bold,\n fontSize: 1.625,\n fontWeight: 700,\n lineHeight: 2.25,\n },\n D4: {\n fontFamily: FontFamily.OpenSans.Bold,\n fontSize: 1.375,\n fontWeight: 700,\n lineHeight: 1.75,\n },\n DBody: {\n fontFamily: FontFamily.OpenSans.Regular,\n fontSize: 1.375,\n lineHeight: 1.75,\n },\n H1: {\n fontFamily: FontFamily.OpenSans.Bold,\n fontSize: 2,\n fontWeight: 700,\n lineHeight: 2.5,\n },\n H2: {\n fontFamily: FontFamily.OpenSans.Bold,\n fontSize: 1.625,\n fontWeight: 700,\n lineHeight: 2.25,\n },\n H3: {\n fontFamily: FontFamily.OpenSans.Bold,\n fontSize: 1.375,\n fontWeight: 700,\n lineHeight: 1.75,\n },\n H4: {\n fontFamily: FontFamily.OpenSans.Bold,\n fontSize: 1.125,\n fontWeight: 700,\n lineHeight: 1.625,\n },\n H5: {\n fontFamily: FontFamily.OpenSans.Bold,\n fontSize: 1,\n fontWeight: 700,\n lineHeight: 1.5,\n letterSpacing: 0.014,\n },\n H6: {\n fontFamily: FontFamily.OpenSans.Bold,\n fontSize: 0.875,\n fontWeight: 700,\n lineHeight: 1.6,\n letterSpacing: 0.012,\n },\n Body: {\n fontFamily: FontFamily.OpenSans.Regular,\n fontSize: 1.125,\n lineHeight: 1.625,\n },\n BodySmall: {\n fontFamily: FontFamily.OpenSans.Regular,\n fontSize: 1,\n lineHeight: 1.5,\n letterSpacing: 0.014,\n },\n XSmall: {\n fontFamily: FontFamily.OpenSans.Regular,\n fontSize: 0.75,\n lineHeight: 1.2,\n letterSpacing: 0.012,\n },\n};\n","import { getThemeTextStyles } from \"../theme/text-theme-helper\";\nimport { PropertiesToType } from \"../util/utility-types\";\nimport { TextStyleSetType } from \"./types\";\n\nexport const TextStyle: PropertiesToType<\n TextStyleSetType,\n ReturnType<typeof getThemeTextStyles>\n> = {\n D1: {\n fontFamily: getThemeTextStyles(\"D1.fontFamily\"),\n fontSize: getThemeTextStyles(\"D1.fontSize\"),\n fontWeight: getThemeTextStyles(\"D1.fontWeight\"),\n lineHeight: getThemeTextStyles(\"D1.lineHeight\"),\n letterSpacing: getThemeTextStyles(\"D1.letterSpacing\"),\n },\n D2: {\n fontFamily: getThemeTextStyles(\"D2.fontFamily\"),\n fontSize: getThemeTextStyles(\"D2.fontSize\"),\n fontWeight: getThemeTextStyles(\"D2.fontWeight\"),\n lineHeight: getThemeTextStyles(\"D2.lineHeight\"),\n letterSpacing: getThemeTextStyles(\"D2.letterSpacing\"),\n },\n D3: {\n fontFamily: getThemeTextStyles(\"D3.fontFamily\"),\n fontSize: getThemeTextStyles(\"D3.fontSize\"),\n fontWeight: getThemeTextStyles(\"D3.fontWeight\"),\n lineHeight: getThemeTextStyles(\"D3.lineHeight\"),\n letterSpacing: getThemeTextStyles(\"D3.letterSpacing\"),\n },\n D4: {\n fontFamily: getThemeTextStyles(\"D4.fontFamily\"),\n fontSize: getThemeTextStyles(\"D4.fontSize\"),\n fontWeight: getThemeTextStyles(\"D4.fontWeight\"),\n lineHeight: getThemeTextStyles(\"D4.lineHeight\"),\n letterSpacing: getThemeTextStyles(\"D4.letterSpacing\"),\n },\n DBody: {\n fontFamily: getThemeTextStyles(\"DBody.fontFamily\"),\n fontSize: getThemeTextStyles(\"DBody.fontSize\"),\n fontWeight: getThemeTextStyles(\"DBody.fontWeight\"),\n lineHeight: getThemeTextStyles(\"DBody.lineHeight\"),\n letterSpacing: getThemeTextStyles(\"DBody.letterSpacing\"),\n },\n H1: {\n fontFamily: getThemeTextStyles(\"H1.fontFamily\"),\n fontSize: getThemeTextStyles(\"H1.fontSize\"),\n fontWeight: getThemeTextStyles(\"H1.fontWeight\"),\n lineHeight: getThemeTextStyles(\"H1.lineHeight\"),\n letterSpacing: getThemeTextStyles(\"H1.letterSpacing\"),\n },\n H2: {\n fontFamily: getThemeTextStyles(\"H2.fontFamily\"),\n fontSize: getThemeTextStyles(\"H2.fontSize\"),\n fontWeight: getThemeTextStyles(\"H2.fontWeight\"),\n lineHeight: getThemeTextStyles(\"H2.lineHeight\"),\n letterSpacing: getThemeTextStyles(\"H2.letterSpacing\"),\n },\n H3: {\n fontFamily: getThemeTextStyles(\"H3.fontFamily\"),\n fontSize: getThemeTextStyles(\"H3.fontSize\"),\n fontWeight: getThemeTextStyles(\"H3.fontWeight\"),\n lineHeight: getThemeTextStyles(\"H3.lineHeight\"),\n letterSpacing: getThemeTextStyles(\"H3.letterSpacing\"),\n },\n H4: {\n fontFamily: getThemeTextStyles(\"H4.fontFamily\"),\n fontSize: getThemeTextStyles(\"H4.fontSize\"),\n fontWeight: getThemeTextStyles(\"H4.fontWeight\"),\n lineHeight: getThemeTextStyles(\"H4.lineHeight\"),\n letterSpacing: getThemeTextStyles(\"H4.letterSpacing\"),\n },\n H5: {\n fontFamily: getThemeTextStyles(\"H5.fontFamily\"),\n fontSize: getThemeTextStyles(\"H5.fontSize\"),\n fontWeight: getThemeTextStyles(\"H5.fontWeight\"),\n lineHeight: getThemeTextStyles(\"H5.lineHeight\"),\n letterSpacing: getThemeTextStyles(\"H5.letterSpacing\"),\n },\n H6: {\n fontFamily: getThemeTextStyles(\"H6.fontFamily\"),\n fontSize: getThemeTextStyles(\"H6.fontSize\"),\n fontWeight: getThemeTextStyles(\"H6.fontWeight\"),\n lineHeight: getThemeTextStyles(\"H6.lineHeight\"),\n letterSpacing: getThemeTextStyles(\"H6.letterSpacing\"),\n },\n Body: {\n fontFamily: getThemeTextStyles(\"Body.fontFamily\"),\n fontSize: getThemeTextStyles(\"Body.fontSize\"),\n fontWeight: getThemeTextStyles(\"Body.fontWeight\"),\n lineHeight: getThemeTextStyles(\"Body.lineHeight\"),\n letterSpacing: getThemeTextStyles(\"Body.letterSpacing\"),\n },\n BodySmall: {\n fontFamily: getThemeTextStyles(\"BodySmall.fontFamily\"),\n fontSize: getThemeTextStyles(\"BodySmall.fontSize\"),\n fontWeight: getThemeTextStyles(\"BodySmall.fontWeight\"),\n lineHeight: getThemeTextStyles(\"BodySmall.lineHeight\"),\n letterSpacing: getThemeTextStyles(\"BodySmall.letterSpacing\"),\n },\n XSmall: {\n fontFamily: getThemeTextStyles(\"XSmall.fontFamily\"),\n fontSize: getThemeTextStyles(\"XSmall.fontSize\"),\n fontWeight: getThemeTextStyles(\"XSmall.fontWeight\"),\n lineHeight: getThemeTextStyles(\"XSmall.lineHeight\"),\n letterSpacing: getThemeTextStyles(\"XSmall.letterSpacing\"),\n },\n};\n","import { css } from \"styled-components\";\nimport { FontFamily } from \"../spec/text-spec/font-spec\";\nimport { TextLinkSizeType, TextSizeType, TextWeight } from \"./types\";\nimport { TextStyle } from \"./text-style\";\n\n// =============================================================================\n// FONT STYLE\n// =============================================================================\nconst getFont = (weight: TextWeight) => {\n switch (weight) {\n case 700:\n case \"bold\":\n return FontFamily.OpenSans.Bold;\n case 600:\n case \"semibold\":\n return FontFamily.OpenSans.Semibold;\n case 300:\n case \"light\":\n return FontFamily.OpenSans.Light;\n case 400:\n case \"regular\":\n return FontFamily.OpenSans.Regular;\n default:\n return \"\";\n }\n};\n\nconst getFontFamily = (\n type: TextSizeType | TextLinkSizeType,\n weight?: TextWeight\n) => {\n return (props: any) => {\n const fontFamilyFromTheme = TextStyle[type].fontFamily(props) as string;\n const fontWeightFromTheme = TextStyle[type].fontWeight(\n props\n ) as TextWeight;\n\n if (Object.values(FontFamily.OpenSans).includes(fontFamilyFromTheme)) {\n return css`\n font-family: ${getFont(weight) ||\n getFont(fontWeightFromTheme) ||\n fontFamilyFromTheme};\n font-weight: normal !important;\n `;\n }\n\n return css`\n font-family: ${fontFamilyFromTheme};\n font-weight: ${(getFontWeight(weight) || fontWeightFromTheme) ??\n \"normal\"};\n `;\n };\n};\n\nconst getFontWeight = (weight: TextWeight) => {\n switch (weight) {\n case 300:\n case \"light\":\n return 300;\n case 400:\n case \"regular\":\n return 400;\n case 600:\n case \"semibold\":\n return 600;\n case 700:\n case \"bold\":\n return 700;\n case 900:\n case \"black\":\n return 900;\n default:\n return \"\";\n }\n};\n\n// =============================================================================\n// TEXT STYLE\n// =============================================================================\nconst getTextStyle = (\n type: TextSizeType | TextLinkSizeType,\n weight: TextWeight,\n paragraph = false\n) => {\n return (props: any) => {\n const attrs = TextStyle[type];\n const fontSize = attrs.fontSize(props) as number;\n\n // Add extra margin for paragraphs\n const getMarginBottomStyle = () => {\n const marginBottomScale = paragraph ? 1.05 : 0;\n return css`\n margin-bottom: ${fontSize * marginBottomScale}rem;\n `;\n };\n\n return css`\n ${getFontFamily(type, weight)}\n font-size: ${fontSize}rem !important;\n line-height: ${attrs.lineHeight}rem !important;\n letter-spacing: ${attrs.letterSpacing(props) || 0}rem !important;\n ${getMarginBottomStyle()}\n `;\n };\n};\n\nconst getDisplayStyle = (inline = false, paragraph = false) => {\n if (paragraph) {\n return css`\n display: block;\n `;\n } else if (inline) {\n return css`\n display: inline;\n `;\n } else {\n return css`\n display: block;\n `;\n }\n};\n\n// =============================================================================\n// EXPORTS\n// =============================================================================\nexport const TextStyleHelper = {\n getFontFamily,\n getTextStyle,\n getDisplayStyle,\n};\n","import { CrossIcon } from \"@lifesg/react-icons/cross\";\nimport styled, { css } from \"styled-components\";\nimport { Color } from \"../color\";\nimport { TextStyleHelper } from \"../text/helper\";\n\n// =============================================================================\n// STYLE INTERFACe\n// =============================================================================\ninterface StyleProps {\n type?: React.HTMLInputTypeAttribute;\n}\n\n// =============================================================================\n// STYLING\n// =============================================================================\nexport const InputElement = styled.input<StyleProps>`\n ${TextStyleHelper.getTextStyle(\"Body\", \"regular\")}\n color: ${Color.Neutral[1]};\n\n // overwrite default styles\n background: transparent;\n border: none;\n height: 3rem;\n width: 100%;\n padding: 0;\n\n :focus,\n :active {\n outline: none;\n border: none;\n box-shadow: none;\n }\n\n ::placeholder,\n ::-webkit-input-placeholder {\n color: ${Color.Neutral[3]};\n }\n\n ${(props) => {\n // Hiding of spinners for number type input\n if (props.type === \"number\") {\n return css`\n // Chrome, Safari, Edge, Opera\n ::-webkit-outer-spin-button,\n ::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n\n // Firefox\n -moz-appearance: textfield;\n `;\n }\n\n if (props.disabled) {\n return css`\n cursor: not-allowed;\n `;\n }\n }}\n`;\n\nexport const ClearContainer = styled.button<StyleProps>`\n position: relative;\n height: auto;\n padding: 0 1rem;\n\n margin-right: -1rem; // offset the padding\n cursor: pointer;\n\n color: ${Color.Neutral[3]};\n background-color: transparent;\n border: none;\n`;\n\nexport const ClearIcon = styled(CrossIcon)`\n height: 1.25rem;\n width: 1.25rem;\n`;\n","import React, { useImperativeHandle, useRef } from \"react\";\nimport { InputWrapper } from \"../shared/input-wrapper/input-wrapper\";\nimport { StringHelper } from \"../util/string-helper\";\nimport { ClearContainer, ClearIcon, InputElement } from \"./input.style\";\nimport { InputProps, InputRef } from \"./types\";\n\nconst Component = (\n {\n value,\n spacing,\n type,\n error,\n disabled,\n readOnly,\n onChange,\n onClear,\n allowClear = false,\n className,\n ...otherProps\n }: InputProps,\n ref: InputRef\n): JSX.Element => {\n // =============================================================================\n // CONST, STATE, REF\n // =============================================================================\n const elementRef = useRef<HTMLInputElement>();\n useImperativeHandle(ref, () => elementRef.current, []);\n\n // =============================================================================\n // EVENT HANDLERS\n // =============================================================================\n const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n if (onChange) {\n if (shouldAllowSpacing()) {\n handleSpacingAndCaretPosition(event);\n } else {\n onChange(event);\n }\n }\n };\n\n const handleClear = () => {\n if (onClear) onClear();\n\n if (elementRef && elementRef.current) {\n elementRef.current.focus();\n }\n };\n\n // =============================================================================\n // HELPER FUNCTIONS\n // =============================================================================\n const shouldAllowSpacing = () => {\n return type === \"tel\" && spacing;\n };\n\n const convertInputString = (value: string | number | readonly string[]) => {\n if (!value) return \"\";\n if (shouldAllowSpacing()) {\n return StringHelper.transformWithSpaces(value, spacing);\n }\n return value;\n };\n\n const handleSpacingAndCaretPosition = (\n event: React.ChangeEvent<HTMLInputElement>\n ) => {\n const element = event.target;\n const currentValue = element.value;\n\n // Send to handler unspaced value\n const valueWithoutSpace = element.value.replace(/\\s/g, \"\");\n element.value = valueWithoutSpace;\n onChange(event);\n\n // reset element value\n element.value = currentValue;\n };\n\n const shouldShowClear = () => {\n return allowClear && !disabled && !readOnly && !!value;\n };\n\n // =============================================================================\n // RENDER FUNCTIONS\n // =============================================================================\n /**\n * To clear controlled input value, you have to pass in value as empty string,\n * then set `updatedValue` to empty string.\n * `updatedValue` for uncontrolled components remains as undefined such that the\n * user is free to edit the field. (else the value of the InputElement will\n * be set to empty string)\n */\n const updatedValue = value ? convertInputString(value) : value;\n\n return (\n <InputWrapper\n disabled={disabled}\n $error={error}\n $readOnly={readOnly}\n className={className}\n >\n <InputElement\n data-testid=\"input\"\n ref={elementRef}\n disabled={disabled}\n value={updatedValue}\n onChange={handleChange}\n type={type}\n readOnly={readOnly}\n {...otherProps}\n />\n {shouldShowClear() && (\n <ClearContainer onClick={handleClear}>\n <ClearIcon />\n </ClearContainer>\n )}\n </InputWrapper>\n );\n};\n\nexport const Input = React.forwardRef(Component);\n"],"names":["isArray_1","Array","isArray","freeGlobal","global","Object","freeSelf","self","_root","Function","_Symbol","require$$0","Symbol","objectProto","prototype","hasOwnProperty","nativeObjectToString","toString","symToStringTag","toStringTag","undefined","_getRawTag","value","isOwn","call","tag","unmasked","e","result","getRawTag","require$$1","objectToString","_baseGetTag","baseGetTag","isObjectLike","isSymbol_1","isSymbol","reIsDeepProp","reIsPlainProp","_isKey","object","type","test","isObject_1","isObject","uid","isFunction_1","coreJsData","maskSrcKey","exec","keys","IE_PROTO","_isMasked","func","funcToString","isFunction","isMasked","require$$2","toSource","reIsHostCtor","funcProto","reIsNative","RegExp","replace","baseIsNative","getValue","key","_getNative","_nativeCreate","nativeCreate","_hashClear","this","__data__","size","_hashDelete","has","_hashGet","data","hashClear","hashDelete","hashGet","hashHas","hashSet","Hash","entries","index","length","clear","entry","set","get","_Hash","_listCacheClear","eq","other","_assocIndexOf","array","assocIndexOf","splice","listCacheClear","listCacheDelete","pop","listCacheGet","listCacheHas","listCacheSet","push","ListCache","_ListCache","Map","isKeyable","_getMapData","map","getMapData","mapCacheClear","hash","string","mapCacheDelete","mapCacheGet","mapCacheHas","mapCacheSet","MapCache","memoize","resolver","TypeError","memoized","args","arguments","apply","cache","Cache","rePropName","reEscapeChar","_stringToPath","memoizeCapped","charCodeAt","match","number","quote","subString","arrayMap","iteratee","require$$3","symbolProto","symbolToString","_baseToString","baseToString","isKey","stringToPath","castPath","toKey","baseGet","path","get_1","defaultValue","collection","attributePath","customCollection","getCollection","collectionSpec","contextValue","themeContextValue","collections","ThemeContextKeys","ColorSpec","base","Brand","Primary","PrimaryDark","Secondary","Accent","Dark","Light","Neutral","Validation","Green","Text","Icon","Border","Background","Orange","Badge","Red","Shadow","bookingsg","getThemeColors","props","theme","colorSet","colorScheme","options","color","Color","DesignTokenSpec","InputBoxShadow","css","InputErrorBoxShadow","getThemeDesignToken","DesignTokenSet","designTokenScheme","designToken","DesignToken","InputWrapper","styled","div","$position","$readOnly","disabled","$error","StringHelper","transformWithSpaces","groupLength","regex","trim","padValue","retainSingleZero","padStart","parseInt","shouldTruncateToTwoLines","text","widthOfElement","estimatedCharOnLine","Math","floor","split","truncateOneLine","minDivSize","baselineCharLength","additionalCharAllowed","allowedCharLength","thresholdIndex","substring","defineProperty","cross","C","jsx","width","height","viewBox","fill","xmlns","children","d","displayName","CrossIcon","FontFamily","Regular","Semibold","Bold","TextStyleSpec","D1","fontFamily","fontSize","fontWeight","lineHeight","letterSpacing","D2","D3","D4","DBody","H1","H2","H3","H4","H5","H6","Body","BodySmall","XSmall","getThemeTextStyles","textStyleSet","textStyleScheme","textStyle","TextStyle","getFont","weight","getFontFamily","fontFamilyFromTheme","fontWeightFromTheme","values","includes","getFontWeight","TextStyleHelper","paragraph","attrs","InputElement","input","ClearContainer","button","ClearIcon","Input","React","forwardRef","spacing","error","readOnly","onChange","onClear","allowClear","className","otherProps","ref","elementRef","useRef","useImperativeHandle","current","shouldAllowSpacing","handleSpacingAndCaretPosition","event","element","target","currentValue","valueWithoutSpace","updatedValue","convertInputString","_jsxs","_jsx","onClick","focus"],"mappings":"gTAyBAA,EAFcC,MAAMC,QCvBhBC,ECC8B,iBAAVC,GAAsBA,GAAUA,EAAOC,SAAWA,QAAUD,EDEhFE,EAA0B,iBAARC,MAAoBA,MAAQA,KAAKF,SAAWA,QAAUE,KAK5EC,EAFWL,GAAcG,GAAYG,SAAS,cAATA,GEDrCC,EALWC,EAGOC,OCHdA,EAASD,EAGTE,EAAcR,OAAOS,UAGrBC,EAAiBF,EAAYE,eAO7BC,EAAuBH,EAAYI,SAGnCC,EAAiBN,EAASA,EAAOO,iBAAcC,EA6BnD,IAAAC,EApBA,SAAmBC,GACjB,IAAIC,EAAQR,EAAeS,KAAKF,EAAOJ,GACnCO,EAAMH,EA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,QAxER,KACZpB,GAASA,IAETK,GAAcA,EAAWG,SACzBH,EAAWG,QAAQa,OACtB,EAmE2C7E,SAChC2E,EAAC3B,GAAY,CAAA,OAI3B"}
package/input/input.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  import React from "react";
2
2
  import { InputProps } from "./types";
3
- export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
3
+ export declare const Input: (props: InputProps & React.RefAttributes<HTMLInputElement>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
@@ -1,6 +1,11 @@
1
- interface InputStyleProps {
2
- error?: boolean;
3
- readOnly?: boolean;
1
+ /// <reference types="react" />
2
+ interface StyleProps {
3
+ type?: React.HTMLInputTypeAttribute;
4
4
  }
5
- export declare const InputElement: import("styled-components").StyledComponent<"input", any, InputStyleProps, never>;
5
+ export declare const InputElement: import("styled-components").StyledComponent<"input", any, StyleProps, never>;
6
+ export declare const ClearContainer: import("styled-components").StyledComponent<"button", any, StyleProps, never>;
7
+ export declare const ClearIcon: import("styled-components").StyledComponent<{
8
+ (props: import("react").SVGProps<SVGSVGElement>): JSX.Element;
9
+ displayName: string;
10
+ }, any, {}, never>;
6
11
  export {};
package/input/types.d.ts CHANGED
@@ -3,6 +3,8 @@ export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement>
3
3
  /** Sets the number of characters before a space is added (works only with type `tel` input) */
4
4
  spacing?: number | undefined;
5
5
  error?: boolean | undefined;
6
+ allowClear?: boolean | undefined;
7
+ onClear?: () => void | undefined;
6
8
  "data-testid"?: string | undefined;
7
9
  }
8
10
  /** To be exposed for Form component inheritance */