@pie-element/graphing 10.1.2-next.0 → 10.1.2-next.2

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 (188) hide show
  1. package/dist/author/configure.js +46 -46
  2. package/dist/author/correct-response.js +86 -87
  3. package/dist/author/graphing-config.js +60 -60
  4. package/dist/author/index.js +19 -19
  5. package/dist/author/utils.js +1 -1
  6. package/dist/browser/author/index.js +1280 -4426
  7. package/dist/browser/author/index.js.map +1 -1
  8. package/dist/browser/{container-Bg6U_CJ-.js → container-DwOO2mgz.js} +13412 -14269
  9. package/dist/browser/container-DwOO2mgz.js.map +1 -0
  10. package/dist/browser/controller/index.js +126 -153
  11. package/dist/browser/controller/index.js.map +1 -1
  12. package/dist/browser/delivery/index.js +26 -26
  13. package/dist/browser/delivery/index.js.map +1 -1
  14. package/dist/browser/dist-BrN2xZtM.js +547 -0
  15. package/dist/browser/dist-BrN2xZtM.js.map +1 -0
  16. package/dist/controller/index.d.ts +1 -1
  17. package/dist/controller/index.js +56 -58
  18. package/dist/controller/utils.d.ts +14 -14
  19. package/dist/controller/utils.js +1 -4
  20. package/dist/index.iife.js +105 -103
  21. package/dist/runtime-support.d.ts +12 -0
  22. package/dist/runtime-support.js +12 -0
  23. package/package.json +14 -11
  24. package/dist/browser/container-Bg6U_CJ-.js.map +0 -1
  25. package/dist/browser/dist-eInAO7us.js +0 -1468
  26. package/dist/browser/dist-eInAO7us.js.map +0 -1
  27. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_DataView.js +0 -6
  28. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Hash.js +0 -16
  29. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_ListCache.js +0 -16
  30. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Map.js +0 -6
  31. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_MapCache.js +0 -16
  32. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Promise.js +0 -6
  33. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Set.js +0 -6
  34. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_SetCache.js +0 -11
  35. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Stack.js +0 -14
  36. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js +0 -5
  37. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Uint8Array.js +0 -5
  38. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_WeakMap.js +0 -6
  39. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_apply.js +0 -12
  40. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayEach.js +0 -7
  41. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayFilter.js +0 -10
  42. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayIncludes.js +0 -7
  43. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayIncludesWith.js +0 -7
  44. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayLikeKeys.js +0 -15
  45. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayMap.js +0 -7
  46. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayPush.js +0 -7
  47. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arraySome.js +0 -7
  48. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignValue.js +0 -10
  49. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assocIndexOf.js +0 -8
  50. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssign.js +0 -8
  51. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignIn.js +0 -8
  52. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignValue.js +0 -12
  53. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseClone.js +0 -57
  54. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseCreate.js +0 -14
  55. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseDifference.js +0 -23
  56. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFindIndex.js +0 -7
  57. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFlatten.js +0 -13
  58. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetAllKeys.js +0 -9
  59. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js +0 -10
  60. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIndexOf.js +0 -9
  61. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIntersection.js +0 -29
  62. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.js +0 -9
  63. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqual.js +0 -8
  64. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqualDeep.js +0 -30
  65. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMap.js +0 -9
  66. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNaN.js +0 -6
  67. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNative.js +0 -11
  68. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsSet.js +0 -9
  69. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsTypedArray.js +0 -11
  70. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeys.js +0 -12
  71. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeysIn.js +0 -13
  72. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseRest.js +0 -9
  73. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseSet.js +0 -22
  74. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseSetToString.js +0 -14
  75. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.js +0 -7
  76. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseToString.js +0 -15
  77. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js +0 -8
  78. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUniq.js +0 -27
  79. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cacheHas.js +0 -6
  80. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_castArrayLikeObject.js +0 -7
  81. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_castPath.js +0 -10
  82. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneArrayBuffer.js +0 -8
  83. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneBuffer.js +0 -10
  84. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneDataView.js +0 -8
  85. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneRegExp.js +0 -8
  86. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneSymbol.js +0 -8
  87. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneTypedArray.js +0 -8
  88. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyArray.js +0 -8
  89. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyObject.js +0 -14
  90. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbols.js +0 -8
  91. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbolsIn.js +0 -8
  92. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_coreJsData.js +0 -5
  93. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createSet.js +0 -9
  94. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.js +0 -10
  95. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalArrays.js +0 -35
  96. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalByTag.js +0 -35
  97. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalObjects.js +0 -32
  98. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.js +0 -4
  99. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeys.js +0 -9
  100. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeysIn.js +0 -9
  101. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMapData.js +0 -8
  102. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getNative.js +0 -9
  103. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getPrototype.js +0 -5
  104. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.js +0 -14
  105. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbols.js +0 -10
  106. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbolsIn.js +0 -11
  107. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getTag.js +0 -23
  108. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getValue.js +0 -6
  109. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashClear.js +0 -7
  110. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashDelete.js +0 -7
  111. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashGet.js +0 -13
  112. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashHas.js +0 -9
  113. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashSet.js +0 -9
  114. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneArray.js +0 -8
  115. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneByTag.js +0 -33
  116. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneObject.js +0 -9
  117. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isFlattenable.js +0 -10
  118. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIndex.js +0 -8
  119. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKey.js +0 -11
  120. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKeyable.js +0 -7
  121. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isMasked.js +0 -11
  122. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.js +0 -8
  123. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheClear.js +0 -6
  124. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheDelete.js +0 -9
  125. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheGet.js +0 -8
  126. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheHas.js +0 -7
  127. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheSet.js +0 -8
  128. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheClear.js +0 -13
  129. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheDelete.js +0 -8
  130. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheGet.js +0 -7
  131. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheHas.js +0 -7
  132. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheSet.js +0 -8
  133. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapToArray.js +0 -9
  134. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_memoizeCapped.js +0 -11
  135. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeCreate.js +0 -5
  136. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeys.js +0 -5
  137. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeysIn.js +0 -8
  138. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.js +0 -9
  139. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.js +0 -7
  140. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overArg.js +0 -8
  141. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overRest.js +0 -13
  142. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_root.js +0 -5
  143. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheAdd.js +0 -7
  144. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheHas.js +0 -6
  145. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToArray.js +0 -9
  146. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToString.js +0 -6
  147. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_shortOut.js +0 -14
  148. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackClear.js +0 -7
  149. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackDelete.js +0 -7
  150. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackGet.js +0 -6
  151. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackHas.js +0 -6
  152. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackSet.js +0 -16
  153. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_strictIndexOf.js +0 -7
  154. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stringToPath.js +0 -10
  155. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toKey.js +0 -10
  156. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toSource.js +0 -15
  157. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js +0 -8
  158. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/constant.js +0 -8
  159. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/differenceWith.js +0 -12
  160. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/eq.js +0 -6
  161. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/identity.js +0 -6
  162. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/intersection.js +0 -11
  163. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArguments.js +0 -10
  164. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArray.js +0 -4
  165. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js +0 -8
  166. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLikeObject.js +0 -8
  167. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isBuffer.js +0 -6
  168. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js +0 -21
  169. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEqual.js +0 -7
  170. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isFunction.js +0 -11
  171. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isLength.js +0 -7
  172. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isMap.js +0 -7
  173. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObject.js +0 -7
  174. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.js +0 -6
  175. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSet.js +0 -7
  176. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSymbol.js +0 -9
  177. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isTypedArray.js +0 -7
  178. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keys.js +0 -9
  179. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keysIn.js +0 -9
  180. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/last.js +0 -7
  181. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/memoize.js +0 -16
  182. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/noop.js +0 -4
  183. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/set.js +0 -7
  184. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubArray.js +0 -6
  185. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.js +0 -6
  186. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toString.js +0 -7
  187. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/uniq.js +0 -7
  188. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/uniqWith.js +0 -7
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["isFinite","isObject","isIndex","useUtilityClasses","capitalize","useControlled","useUtilityClasses","capitalize","defaultCheckedIcon","CheckBoxIcon","defaultIcon","CheckBoxOutlineBlankIcon","IndeterminateCheckBoxIcon","useUtilityClasses","capitalize","capitalize","useUtilityClasses","React","RadioButtonUncheckedIcon","RadioButtonCheckedIcon","React","useUtilityClasses","capitalize","createChainedFunction","round","useUtilityClasses","capitalize","React","useControlled","useId","useEventCallback","useForkRef","capitalize","_typeof","_typeof","clone","config","format","toFixed","toExponential","toEngineering","format","_typeof","formatNumber","formatBigNumber","typedFunction","dependencies","P","cosh","hypot","log","sinh","name","dependencies","P","parse","Complex","name","dependencies","format","Complex","P","Fraction","name","dependencies","Fraction","name","dependencies","name","dependencies","clone","name","dependencies","config","e","e","e","t","e","e","t","n","r","i","a","o","s","c","l","u","d","f","S","p","g","_","y","v","b","x","C","w","T","E","D","O","s","c","l","u","d","r","a","e","t","i","o","f"],"sources":["../../../../../../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIntersection.js","../../../../../../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_castArrayLikeObject.js","../../../../../../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/intersection.js","../../../../../../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isFinite.js","../../../../../../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseSet.js","../../../../../../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/set.js","../../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/utils/createChainedFunction.js","../../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/internal/switchBaseClasses.js","../../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/internal/SwitchBase.js","../../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/internal/svg-icons/CheckBoxOutlineBlank.js","../../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/internal/svg-icons/CheckBox.js","../../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/internal/svg-icons/IndeterminateCheckBox.js","../../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Checkbox/checkboxClasses.js","../../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Checkbox/Checkbox.js","../../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/FormControlLabel/formControlLabelClasses.js","../../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/FormControlLabel/FormControlLabel.js","../../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/InputAdornment/inputAdornmentClasses.js","../../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/InputAdornment/InputAdornment.js","../../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/internal/svg-icons/RadioButtonUnchecked.js","../../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/internal/svg-icons/RadioButtonChecked.js","../../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Radio/RadioButtonIcon.js","../../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/RadioGroup/RadioGroupContext.js","../../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/RadioGroup/useRadioGroup.js","../../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Radio/radioClasses.js","../../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Radio/Radio.js","../../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Tooltip/tooltipClasses.js","../../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Tooltip/Tooltip.js","../../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Switch/switchClasses.js","../../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Switch/Switch.js","../../../../../lib-react/config-ui/dist/alert-dialog.js","../../../../../lib-react/config-ui/dist/radio-with-label.js","../../../../../lib-react/config-ui/dist/tabs/index.js","../../../../../lib-react/config-ui/dist/checkbox.js","../../../../../lib-react/config-ui/dist/number-text-field.js","../../../../../../node_modules/.bun/@mui+icons-material@7.3.11+44ccb211c00abd9d/node_modules/@mui/icons-material/esm/Remove.js","../../../../../../node_modules/.bun/@mui+icons-material@7.3.11+44ccb211c00abd9d/node_modules/@mui/icons-material/esm/Add.js","../../../../../../node_modules/.bun/mathjs@7.6.0/node_modules/mathjs/es/core/config.js","../../../../../../node_modules/.bun/mathjs@7.6.0/node_modules/mathjs/es/utils/is.js","../../../../../../node_modules/.bun/mathjs@7.6.0/node_modules/mathjs/es/utils/object.js","../../../../../../node_modules/.bun/mathjs@7.6.0/node_modules/mathjs/es/core/function/config.js","../../../../../../node_modules/.bun/mathjs@7.6.0/node_modules/mathjs/es/entry/configReadonly.js","../../../../../../node_modules/.bun/typed-function@2.1.0/node_modules/typed-function/typed-function.js","../../../../../../node_modules/.bun/mathjs@7.6.0/node_modules/mathjs/es/utils/number.js","../../../../../../node_modules/.bun/mathjs@7.6.0/node_modules/mathjs/es/utils/bignumber/formatter.js","../../../../../../node_modules/.bun/mathjs@7.6.0/node_modules/mathjs/es/utils/string.js","../../../../../../node_modules/.bun/mathjs@7.6.0/node_modules/mathjs/es/error/DimensionError.js","../../../../../../node_modules/.bun/mathjs@7.6.0/node_modules/mathjs/es/error/IndexError.js","../../../../../../node_modules/.bun/mathjs@7.6.0/node_modules/mathjs/es/utils/array.js","../../../../../../node_modules/.bun/mathjs@7.6.0/node_modules/mathjs/es/utils/factory.js","../../../../../../node_modules/.bun/mathjs@7.6.0/node_modules/mathjs/es/core/function/typed.js","../../../../../../node_modules/.bun/decimal.js@10.6.0/node_modules/decimal.js/decimal.mjs","../../../../../../node_modules/.bun/mathjs@7.6.0/node_modules/mathjs/es/type/bignumber/BigNumber.js","../../../../../../node_modules/.bun/complex.js@2.4.3/node_modules/complex.js/dist/complex.mjs","../../../../../../node_modules/.bun/mathjs@7.6.0/node_modules/mathjs/es/type/complex/Complex.js","../../../../../../node_modules/.bun/fraction.js@4.3.7/node_modules/fraction.js/fraction.js","../../../../../../node_modules/.bun/mathjs@7.6.0/node_modules/mathjs/es/type/fraction/Fraction.js","../../../../../../node_modules/.bun/mathjs@7.6.0/node_modules/mathjs/es/type/matrix/Matrix.js","../../../../../../node_modules/.bun/mathjs@7.6.0/node_modules/mathjs/es/type/matrix/DenseMatrix.js","../../../../../../node_modules/.bun/mathjs@7.6.0/node_modules/mathjs/es/utils/collection.js","../../../../../../node_modules/.bun/mathjs@7.6.0/node_modules/mathjs/es/type/number.js","../../../../../../node_modules/.bun/mathjs@7.6.0/node_modules/mathjs/es/type/fraction/function/fraction.js","../../../../../../node_modules/.bun/mathjs@7.6.0/node_modules/mathjs/es/entry/pureFunctionsAny.generated.js","../../../../../lib-react/config-ui/dist/number-text-field-custom.js","../../../../../lib-react/config-ui/dist/two-choice.js","../../../../../lib-react/config-ui/dist/_virtual/_rolldown/runtime.js","../../../../../lib-react/config-ui/dist/layout/layout-contents.js","../../../../../lib-react/config-ui/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/extends.js","../../../../../lib-react/config-ui/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","../../../../../lib-react/config-ui/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","../../../../../lib-react/config-ui/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","../../../../../lib-react/config-ui/dist/node_modules/.bun/resize-observer-polyfill@1.5.1/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js","../../../../../lib-react/config-ui/dist/node_modules/.bun/react-measure@2.5.2_6dbf9a050bc9aadb/node_modules/react-measure/dist/index.esm.js","../../../../../lib-react/config-ui/dist/layout/settings-box.js","../../../../../lib-react/config-ui/dist/layout/config-layout.js","../../../../../lib-react/config-ui/dist/layout/index.js","../../../../../lib-react/config-ui/dist/settings/toggle.js","../../../../../lib-react/config-ui/dist/settings/settings-radio-label.js","../../../../../lib-react/config-ui/dist/settings/panel.js","../../../../../lib-react/config-ui/dist/settings/index.js","../../../../../lib-react/config-ui/dist/index.js","../../../../../lib-react/graphing/dist/grid-setup.js","../../../src/author/utils.ts","../../../src/author/graphing-config.tsx","../../../../../../node_modules/.bun/@mui+icons-material@7.3.11+44ccb211c00abd9d/node_modules/@mui/icons-material/esm/Info.js","../../../src/author/correct-response.tsx","../../../src/author/configure.tsx","../../../../../shared/configure-events/dist/index.js","../../../src/author/defaults.tsx","../../../src/author/index.ts"],"sourcesContent":["import SetCache from './_SetCache.js';\nimport arrayIncludes from './_arrayIncludes.js';\nimport arrayIncludesWith from './_arrayIncludesWith.js';\nimport arrayMap from './_arrayMap.js';\nimport baseUnary from './_baseUnary.js';\nimport cacheHas from './_cacheHas.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMin = Math.min;\n\n/**\n * The base implementation of methods like `_.intersection`, without support\n * for iteratee shorthands, that accepts an array of arrays to inspect.\n *\n * @private\n * @param {Array} arrays The arrays to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of shared values.\n */\nfunction baseIntersection(arrays, iteratee, comparator) {\n var includes = comparator ? arrayIncludesWith : arrayIncludes,\n length = arrays[0].length,\n othLength = arrays.length,\n othIndex = othLength,\n caches = Array(othLength),\n maxLength = Infinity,\n result = [];\n\n while (othIndex--) {\n var array = arrays[othIndex];\n if (othIndex && iteratee) {\n array = arrayMap(array, baseUnary(iteratee));\n }\n maxLength = nativeMin(array.length, maxLength);\n caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))\n ? new SetCache(othIndex && array)\n : undefined;\n }\n array = arrays[0];\n\n var index = -1,\n seen = caches[0];\n\n outer:\n while (++index < length && result.length < maxLength) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (!(seen\n ? cacheHas(seen, computed)\n : includes(result, computed, comparator)\n )) {\n othIndex = othLength;\n while (--othIndex) {\n var cache = caches[othIndex];\n if (!(cache\n ? cacheHas(cache, computed)\n : includes(arrays[othIndex], computed, comparator))\n ) {\n continue outer;\n }\n }\n if (seen) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n}\n\nexport default baseIntersection;\n","import isArrayLikeObject from './isArrayLikeObject.js';\n\n/**\n * Casts `value` to an empty array if it's not an array like object.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Array|Object} Returns the cast array-like object.\n */\nfunction castArrayLikeObject(value) {\n return isArrayLikeObject(value) ? value : [];\n}\n\nexport default castArrayLikeObject;\n","import arrayMap from './_arrayMap.js';\nimport baseIntersection from './_baseIntersection.js';\nimport baseRest from './_baseRest.js';\nimport castArrayLikeObject from './_castArrayLikeObject.js';\n\n/**\n * Creates an array of unique values that are included in all given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * _.intersection([2, 1], [2, 3]);\n * // => [2]\n */\nvar intersection = baseRest(function(arrays) {\n var mapped = arrayMap(arrays, castArrayLikeObject);\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped)\n : [];\n});\n\nexport default intersection;\n","import root from './_root.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsFinite = root.isFinite;\n\n/**\n * Checks if `value` is a finite primitive number.\n *\n * **Note:** This method is based on\n * [`Number.isFinite`](https://mdn.io/Number/isFinite).\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 finite number, else `false`.\n * @example\n *\n * _.isFinite(3);\n * // => true\n *\n * _.isFinite(Number.MIN_VALUE);\n * // => true\n *\n * _.isFinite(Infinity);\n * // => false\n *\n * _.isFinite('3');\n * // => false\n */\nfunction isFinite(value) {\n return typeof value == 'number' && nativeIsFinite(value);\n}\n\nexport default isFinite;\n","import assignValue from './_assignValue.js';\nimport castPath from './_castPath.js';\nimport isIndex from './_isIndex.js';\nimport isObject from './isObject.js';\nimport toKey from './_toKey.js';\n\n/**\n * The base implementation of `_.set`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\nfunction baseSet(object, path, value, customizer) {\n if (!isObject(object)) {\n return object;\n }\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n lastIndex = length - 1,\n nested = object;\n\n while (nested != null && ++index < length) {\n var key = toKey(path[index]),\n newValue = value;\n\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n return object;\n }\n\n if (index != lastIndex) {\n var objValue = nested[key];\n newValue = customizer ? customizer(objValue, key, nested) : undefined;\n if (newValue === undefined) {\n newValue = isObject(objValue)\n ? objValue\n : (isIndex(path[index + 1]) ? [] : {});\n }\n }\n assignValue(nested, key, newValue);\n nested = nested[key];\n }\n return object;\n}\n\nexport default baseSet;\n","import baseSet from './_baseSet.js';\n\n/**\n * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,\n * it's created. Arrays are created for missing index properties while objects\n * are created for all other missing properties. Use `_.setWith` to customize\n * `path` creation.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.set(object, 'a[0].b.c', 4);\n * console.log(object.a[0].b.c);\n * // => 4\n *\n * _.set(object, ['x', '0', 'y', 'z'], 5);\n * console.log(object.x[0].y.z);\n * // => 5\n */\nfunction set(object, path, value) {\n return object == null ? object : baseSet(object, path, value);\n}\n\nexport default set;\n","import createChainedFunction from '@mui/utils/createChainedFunction';\nexport default createChainedFunction;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getSwitchBaseUtilityClass(slot) {\n return generateUtilityClass('PrivateSwitchBase', slot);\n}\nconst switchBaseClasses = generateUtilityClasses('PrivateSwitchBase', ['root', 'checked', 'disabled', 'input', 'edgeStart', 'edgeEnd']);\nexport default switchBaseClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport refType from '@mui/utils/refType';\nimport composeClasses from '@mui/utils/composeClasses';\nimport capitalize from \"../utils/capitalize.js\";\nimport rootShouldForwardProp from \"../styles/rootShouldForwardProp.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport useControlled from \"../utils/useControlled.js\";\nimport useFormControl from \"../FormControl/useFormControl.js\";\nimport ButtonBase from \"../ButtonBase/index.js\";\nimport { getSwitchBaseUtilityClass } from \"./switchBaseClasses.js\";\nimport useSlot from \"../utils/useSlot.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n checked,\n disabled,\n edge\n } = ownerState;\n const slots = {\n root: ['root', checked && 'checked', disabled && 'disabled', edge && `edge${capitalize(edge)}`],\n input: ['input']\n };\n return composeClasses(slots, getSwitchBaseUtilityClass, classes);\n};\nconst SwitchBaseRoot = styled(ButtonBase, {\n name: 'MuiSwitchBase'\n})({\n padding: 9,\n borderRadius: '50%',\n variants: [{\n props: {\n edge: 'start',\n size: 'small'\n },\n style: {\n marginLeft: -3\n }\n }, {\n props: ({\n edge,\n ownerState\n }) => edge === 'start' && ownerState.size !== 'small',\n style: {\n marginLeft: -12\n }\n }, {\n props: {\n edge: 'end',\n size: 'small'\n },\n style: {\n marginRight: -3\n }\n }, {\n props: ({\n edge,\n ownerState\n }) => edge === 'end' && ownerState.size !== 'small',\n style: {\n marginRight: -12\n }\n }]\n});\nconst SwitchBaseInput = styled('input', {\n name: 'MuiSwitchBase',\n shouldForwardProp: rootShouldForwardProp\n})({\n cursor: 'inherit',\n position: 'absolute',\n opacity: 0,\n width: '100%',\n height: '100%',\n top: 0,\n left: 0,\n margin: 0,\n padding: 0,\n zIndex: 1\n});\n\n/**\n * @ignore - internal component.\n */\nconst SwitchBase = /*#__PURE__*/React.forwardRef(function SwitchBase(props, ref) {\n const {\n autoFocus,\n checked: checkedProp,\n checkedIcon,\n defaultChecked,\n disabled: disabledProp,\n disableFocusRipple = false,\n edge = false,\n icon,\n id,\n inputProps,\n inputRef,\n name,\n onBlur,\n onChange,\n onFocus,\n readOnly,\n required = false,\n tabIndex,\n type,\n value,\n slots = {},\n slotProps = {},\n ...other\n } = props;\n const [checked, setCheckedState] = useControlled({\n controlled: checkedProp,\n default: Boolean(defaultChecked),\n name: 'SwitchBase',\n state: 'checked'\n });\n const muiFormControl = useFormControl();\n const handleFocus = event => {\n if (onFocus) {\n onFocus(event);\n }\n if (muiFormControl && muiFormControl.onFocus) {\n muiFormControl.onFocus(event);\n }\n };\n const handleBlur = event => {\n if (onBlur) {\n onBlur(event);\n }\n if (muiFormControl && muiFormControl.onBlur) {\n muiFormControl.onBlur(event);\n }\n };\n const handleInputChange = event => {\n // Workaround for https://github.com/facebook/react/issues/9023\n if (event.nativeEvent.defaultPrevented || readOnly) {\n return;\n }\n const newChecked = event.target.checked;\n setCheckedState(newChecked);\n if (onChange) {\n // TODO v6: remove the second argument.\n onChange(event, newChecked);\n }\n };\n let disabled = disabledProp;\n if (muiFormControl) {\n if (typeof disabled === 'undefined') {\n disabled = muiFormControl.disabled;\n }\n }\n const hasLabelFor = type === 'checkbox' || type === 'radio';\n const ownerState = {\n ...props,\n checked,\n disabled,\n disableFocusRipple,\n edge\n };\n const classes = useUtilityClasses(ownerState);\n const externalForwardedProps = {\n slots,\n slotProps: {\n input: inputProps,\n ...slotProps\n }\n };\n const [RootSlot, rootSlotProps] = useSlot('root', {\n ref,\n elementType: SwitchBaseRoot,\n className: classes.root,\n shouldForwardComponentProp: true,\n externalForwardedProps: {\n ...externalForwardedProps,\n component: 'span',\n ...other\n },\n getSlotProps: handlers => ({\n ...handlers,\n onFocus: event => {\n handlers.onFocus?.(event);\n handleFocus(event);\n },\n onBlur: event => {\n handlers.onBlur?.(event);\n handleBlur(event);\n }\n }),\n ownerState,\n additionalProps: {\n centerRipple: true,\n focusRipple: !disableFocusRipple,\n role: undefined,\n tabIndex: null\n }\n });\n const [InputSlot, inputSlotProps] = useSlot('input', {\n ref: inputRef,\n elementType: SwitchBaseInput,\n className: classes.input,\n externalForwardedProps,\n getSlotProps: handlers => ({\n ...handlers,\n onChange: event => {\n handlers.onChange?.(event);\n handleInputChange(event);\n }\n }),\n ownerState,\n additionalProps: {\n autoFocus,\n checked: checkedProp,\n defaultChecked,\n disabled,\n id: hasLabelFor ? id : undefined,\n name,\n readOnly,\n required,\n tabIndex,\n type,\n ...(type === 'checkbox' && value === undefined ? {} : {\n value\n })\n }\n });\n return /*#__PURE__*/_jsxs(RootSlot, {\n ...rootSlotProps,\n children: [/*#__PURE__*/_jsx(InputSlot, {\n ...inputSlotProps\n }), checked ? checkedIcon : icon]\n });\n});\n\n// NB: If changed, please update Checkbox, Switch and Radio\n// so that the API documentation is updated.\nprocess.env.NODE_ENV !== \"production\" ? SwitchBase.propTypes = {\n /**\n * If `true`, the `input` element is focused during the first mount.\n */\n autoFocus: PropTypes.bool,\n /**\n * If `true`, the component is checked.\n */\n checked: PropTypes.bool,\n /**\n * The icon to display when the component is checked.\n */\n checkedIcon: PropTypes.node.isRequired,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * @ignore\n */\n defaultChecked: PropTypes.bool,\n /**\n * If `true`, the component is disabled.\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, the keyboard focus ripple is disabled.\n * @default false\n */\n disableFocusRipple: PropTypes.bool,\n /**\n * If given, uses a negative margin to counteract the padding on one\n * side (this is often helpful for aligning the left or right\n * side of the icon with content above or below, without ruining the border\n * size and shape).\n * @default false\n */\n edge: PropTypes.oneOf(['end', 'start', false]),\n /**\n * The icon to display when the component is unchecked.\n */\n icon: PropTypes.node.isRequired,\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#attributes) applied to the `input` element.\n */\n inputProps: PropTypes.object,\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n /*\n * @ignore\n */\n name: PropTypes.string,\n /**\n * @ignore\n */\n onBlur: PropTypes.func,\n /**\n * Callback fired when the state is changed.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new checked state by accessing `event.target.checked` (boolean).\n */\n onChange: PropTypes.func,\n /**\n * @ignore\n */\n onFocus: PropTypes.func,\n /**\n * It prevents the user from changing the value of the field\n * (not from interacting with the field).\n */\n readOnly: PropTypes.bool,\n /**\n * If `true`, the `input` element is required.\n */\n required: PropTypes.bool,\n /**\n * The props used for each slot inside.\n * @default {}\n */\n slotProps: PropTypes.shape({\n input: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside.\n * @default {}\n */\n slots: PropTypes.shape({\n input: PropTypes.elementType,\n root: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.object,\n /**\n * @ignore\n */\n tabIndex: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /**\n * The input component prop `type`.\n */\n type: PropTypes.string.isRequired,\n /**\n * The value of the component.\n */\n value: PropTypes.any\n} : void 0;\nexport default SwitchBase;","'use client';\n\nimport createSvgIcon from \"../../utils/createSvgIcon.js\";\n\n/**\n * @ignore - internal component.\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z\"\n}), 'CheckBoxOutlineBlank');","'use client';\n\nimport createSvgIcon from \"../../utils/createSvgIcon.js\";\n\n/**\n * @ignore - internal component.\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z\"\n}), 'CheckBox');","'use client';\n\nimport createSvgIcon from \"../../utils/createSvgIcon.js\";\n\n/**\n * @ignore - internal component.\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z\"\n}), 'IndeterminateCheckBox');","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getCheckboxUtilityClass(slot) {\n return generateUtilityClass('MuiCheckbox', slot);\n}\nconst checkboxClasses = generateUtilityClasses('MuiCheckbox', ['root', 'checked', 'disabled', 'indeterminate', 'colorPrimary', 'colorSecondary', 'sizeSmall', 'sizeMedium']);\nexport default checkboxClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport SwitchBase from \"../internal/SwitchBase.js\";\nimport CheckBoxOutlineBlankIcon from \"../internal/svg-icons/CheckBoxOutlineBlank.js\";\nimport CheckBoxIcon from \"../internal/svg-icons/CheckBox.js\";\nimport IndeterminateCheckBoxIcon from \"../internal/svg-icons/IndeterminateCheckBox.js\";\nimport capitalize from \"../utils/capitalize.js\";\nimport rootShouldForwardProp from \"../styles/rootShouldForwardProp.js\";\nimport checkboxClasses, { getCheckboxUtilityClass } from \"./checkboxClasses.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport createSimplePaletteValueFilter from \"../utils/createSimplePaletteValueFilter.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport { mergeSlotProps } from \"../utils/index.js\";\nimport useSlot from \"../utils/useSlot.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n indeterminate,\n color,\n size\n } = ownerState;\n const slots = {\n root: ['root', indeterminate && 'indeterminate', `color${capitalize(color)}`, `size${capitalize(size)}`]\n };\n const composedClasses = composeClasses(slots, getCheckboxUtilityClass, classes);\n return {\n ...classes,\n // forward the disabled and checked classes to the SwitchBase\n ...composedClasses\n };\n};\nconst CheckboxRoot = styled(SwitchBase, {\n shouldForwardProp: prop => rootShouldForwardProp(prop) || prop === 'classes',\n name: 'MuiCheckbox',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.indeterminate && styles.indeterminate, styles[`size${capitalize(ownerState.size)}`], ownerState.color !== 'default' && styles[`color${capitalize(ownerState.color)}`]];\n }\n})(memoTheme(({\n theme\n}) => ({\n color: (theme.vars || theme).palette.text.secondary,\n variants: [{\n props: {\n color: 'default',\n disableRipple: false\n },\n style: {\n '&:hover': {\n backgroundColor: theme.alpha((theme.vars || theme).palette.action.active, (theme.vars || theme).palette.action.hoverOpacity)\n }\n }\n }, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({\n props: {\n color,\n disableRipple: false\n },\n style: {\n '&:hover': {\n backgroundColor: theme.alpha((theme.vars || theme).palette[color].main, (theme.vars || theme).palette.action.hoverOpacity)\n }\n }\n })), ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({\n props: {\n color\n },\n style: {\n [`&.${checkboxClasses.checked}, &.${checkboxClasses.indeterminate}`]: {\n color: (theme.vars || theme).palette[color].main\n },\n [`&.${checkboxClasses.disabled}`]: {\n color: (theme.vars || theme).palette.action.disabled\n }\n }\n })), {\n // Should be last to override other colors\n props: {\n disableRipple: false\n },\n style: {\n // Reset on touch devices, it doesn't add specificity\n '&:hover': {\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n }\n }]\n})));\nconst defaultCheckedIcon = /*#__PURE__*/_jsx(CheckBoxIcon, {});\nconst defaultIcon = /*#__PURE__*/_jsx(CheckBoxOutlineBlankIcon, {});\nconst defaultIndeterminateIcon = /*#__PURE__*/_jsx(IndeterminateCheckBoxIcon, {});\nconst Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiCheckbox'\n });\n const {\n checkedIcon = defaultCheckedIcon,\n color = 'primary',\n icon: iconProp = defaultIcon,\n indeterminate = false,\n indeterminateIcon: indeterminateIconProp = defaultIndeterminateIcon,\n inputProps,\n size = 'medium',\n disableRipple = false,\n className,\n slots = {},\n slotProps = {},\n ...other\n } = props;\n const icon = indeterminate ? indeterminateIconProp : iconProp;\n const indeterminateIcon = indeterminate ? indeterminateIconProp : checkedIcon;\n const ownerState = {\n ...props,\n disableRipple,\n color,\n indeterminate,\n size\n };\n const classes = useUtilityClasses(ownerState);\n const externalInputProps = slotProps.input ?? inputProps;\n const [RootSlot, rootSlotProps] = useSlot('root', {\n ref,\n elementType: CheckboxRoot,\n className: clsx(classes.root, className),\n shouldForwardComponentProp: true,\n externalForwardedProps: {\n slots,\n slotProps,\n ...other\n },\n ownerState,\n additionalProps: {\n type: 'checkbox',\n icon: /*#__PURE__*/React.cloneElement(icon, {\n fontSize: icon.props.fontSize ?? size\n }),\n checkedIcon: /*#__PURE__*/React.cloneElement(indeterminateIcon, {\n fontSize: indeterminateIcon.props.fontSize ?? size\n }),\n disableRipple,\n slots,\n slotProps: {\n input: mergeSlotProps(typeof externalInputProps === 'function' ? externalInputProps(ownerState) : externalInputProps, {\n 'data-indeterminate': indeterminate,\n 'aria-checked': indeterminate ? 'mixed' : undefined\n })\n }\n }\n });\n return /*#__PURE__*/_jsx(RootSlot, {\n ...rootSlotProps,\n classes: classes\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Checkbox.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * If `true`, the component is checked.\n */\n checked: PropTypes.bool,\n /**\n * The icon to display when the component is checked.\n * @default <CheckBoxIcon />\n */\n checkedIcon: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The color of the component.\n * It supports both default and custom theme colors, which can be added as shown in the\n * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).\n * @default 'primary'\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['default', 'primary', 'secondary', 'error', 'info', 'success', 'warning']), PropTypes.string]),\n /**\n * The default checked state. Use when the component is not controlled.\n */\n defaultChecked: PropTypes.bool,\n /**\n * If `true`, the component is disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, the ripple effect is disabled.\n * @default false\n */\n disableRipple: PropTypes.bool,\n /**\n * The icon to display when the component is unchecked.\n * @default <CheckBoxOutlineBlankIcon />\n */\n icon: PropTypes.node,\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n /**\n * If `true`, the component appears indeterminate.\n * This does not set the native input element to indeterminate due\n * to inconsistent behavior across browsers.\n * However, we set a `data-indeterminate` attribute on the `input`.\n * @default false\n */\n indeterminate: PropTypes.bool,\n /**\n * The icon to display when the component is indeterminate.\n * @default <IndeterminateCheckBoxIcon />\n */\n indeterminateIcon: PropTypes.node,\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#attributes) applied to the `input` element.\n * @deprecated Use `slotProps.input` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n */\n inputProps: PropTypes.object,\n /**\n * Callback fired when the state is changed.\n *\n * @param {React.ChangeEvent<HTMLInputElement>} event The event source of the callback.\n * You can pull out the new checked state by accessing `event.target.checked` (boolean).\n */\n onChange: PropTypes.func,\n /**\n * If `true`, the `input` element is required.\n * @default false\n */\n required: PropTypes.bool,\n /**\n * The size of the component.\n * `small` is equivalent to the dense checkbox styling.\n * @default 'medium'\n */\n size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['medium', 'small']), PropTypes.string]),\n /**\n * The props used for each slot inside.\n * @default {}\n */\n slotProps: PropTypes.shape({\n input: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside.\n * @default {}\n */\n slots: PropTypes.shape({\n input: PropTypes.elementType,\n root: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The value of the component. The DOM API casts this to a string.\n * The browser uses \"on\" as the default value.\n */\n value: PropTypes.any\n} : void 0;\nexport default Checkbox;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getFormControlLabelUtilityClasses(slot) {\n return generateUtilityClass('MuiFormControlLabel', slot);\n}\nconst formControlLabelClasses = generateUtilityClasses('MuiFormControlLabel', ['root', 'labelPlacementStart', 'labelPlacementTop', 'labelPlacementBottom', 'disabled', 'label', 'error', 'required', 'asterisk']);\nexport default formControlLabelClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport refType from '@mui/utils/refType';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { useFormControl } from \"../FormControl/index.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport Typography from \"../Typography/index.js\";\nimport capitalize from \"../utils/capitalize.js\";\nimport formControlLabelClasses, { getFormControlLabelUtilityClasses } from \"./formControlLabelClasses.js\";\nimport formControlState from \"../FormControl/formControlState.js\";\nimport useSlot from \"../utils/useSlot.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n disabled,\n labelPlacement,\n error,\n required\n } = ownerState;\n const slots = {\n root: ['root', disabled && 'disabled', `labelPlacement${capitalize(labelPlacement)}`, error && 'error', required && 'required'],\n label: ['label', disabled && 'disabled'],\n asterisk: ['asterisk', error && 'error']\n };\n return composeClasses(slots, getFormControlLabelUtilityClasses, classes);\n};\nexport const FormControlLabelRoot = styled('label', {\n name: 'MuiFormControlLabel',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [{\n [`& .${formControlLabelClasses.label}`]: styles.label\n }, styles.root, styles[`labelPlacement${capitalize(ownerState.labelPlacement)}`]];\n }\n})(memoTheme(({\n theme\n}) => ({\n display: 'inline-flex',\n alignItems: 'center',\n cursor: 'pointer',\n // For correct alignment with the text.\n verticalAlign: 'middle',\n WebkitTapHighlightColor: 'transparent',\n marginLeft: -11,\n marginRight: 16,\n // used for row presentation of radio/checkbox\n [`&.${formControlLabelClasses.disabled}`]: {\n cursor: 'default'\n },\n [`& .${formControlLabelClasses.label}`]: {\n [`&.${formControlLabelClasses.disabled}`]: {\n color: (theme.vars || theme).palette.text.disabled\n }\n },\n variants: [{\n props: {\n labelPlacement: 'start'\n },\n style: {\n flexDirection: 'row-reverse',\n marginRight: -11\n }\n }, {\n props: {\n labelPlacement: 'top'\n },\n style: {\n flexDirection: 'column-reverse'\n }\n }, {\n props: {\n labelPlacement: 'bottom'\n },\n style: {\n flexDirection: 'column'\n }\n }, {\n props: ({\n labelPlacement\n }) => labelPlacement === 'start' || labelPlacement === 'top' || labelPlacement === 'bottom',\n style: {\n marginLeft: 16 // used for row presentation of radio/checkbox\n }\n }]\n})));\nconst AsteriskComponent = styled('span', {\n name: 'MuiFormControlLabel',\n slot: 'Asterisk'\n})(memoTheme(({\n theme\n}) => ({\n [`&.${formControlLabelClasses.error}`]: {\n color: (theme.vars || theme).palette.error.main\n }\n})));\n\n/**\n * Drop-in replacement of the `Radio`, `Switch` and `Checkbox` component.\n * Use this component if you want to display an extra label.\n */\nconst FormControlLabel = /*#__PURE__*/React.forwardRef(function FormControlLabel(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiFormControlLabel'\n });\n const {\n checked,\n className,\n componentsProps = {},\n control,\n disabled: disabledProp,\n disableTypography,\n inputRef,\n label: labelProp,\n labelPlacement = 'end',\n name,\n onChange,\n required: requiredProp,\n slots = {},\n slotProps = {},\n value,\n ...other\n } = props;\n const muiFormControl = useFormControl();\n const disabled = disabledProp ?? control.props.disabled ?? muiFormControl?.disabled;\n const required = requiredProp ?? control.props.required;\n const controlProps = {\n disabled,\n required\n };\n ['checked', 'name', 'onChange', 'value', 'inputRef'].forEach(key => {\n if (typeof control.props[key] === 'undefined' && typeof props[key] !== 'undefined') {\n controlProps[key] = props[key];\n }\n });\n const fcs = formControlState({\n props,\n muiFormControl,\n states: ['error']\n });\n const ownerState = {\n ...props,\n disabled,\n labelPlacement,\n required,\n error: fcs.error\n };\n const classes = useUtilityClasses(ownerState);\n const externalForwardedProps = {\n slots,\n slotProps: {\n ...componentsProps,\n ...slotProps\n }\n };\n const [TypographySlot, typographySlotProps] = useSlot('typography', {\n elementType: Typography,\n externalForwardedProps,\n ownerState\n });\n let label = labelProp;\n if (label != null && label.type !== Typography && !disableTypography) {\n label = /*#__PURE__*/_jsx(TypographySlot, {\n component: \"span\",\n ...typographySlotProps,\n className: clsx(classes.label, typographySlotProps?.className),\n children: label\n });\n }\n return /*#__PURE__*/_jsxs(FormControlLabelRoot, {\n className: clsx(classes.root, className),\n ownerState: ownerState,\n ref: ref,\n ...other,\n children: [/*#__PURE__*/React.cloneElement(control, controlProps), required ? /*#__PURE__*/_jsxs(\"div\", {\n children: [label, /*#__PURE__*/_jsxs(AsteriskComponent, {\n ownerState: ownerState,\n \"aria-hidden\": true,\n className: classes.asterisk,\n children: [\"\\u2009\", '*']\n })]\n }) : label]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? FormControlLabel.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * If `true`, the component appears selected.\n */\n checked: PropTypes.bool,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The props used for each slot inside.\n * @default {}\n * @deprecated use the `slotProps` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n */\n componentsProps: PropTypes.shape({\n typography: PropTypes.object\n }),\n /**\n * A control element. For instance, it can be a `Radio`, a `Switch` or a `Checkbox`.\n */\n control: PropTypes.element.isRequired,\n /**\n * If `true`, the control is disabled.\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, the label is rendered as it is passed without an additional typography node.\n */\n disableTypography: PropTypes.bool,\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n /**\n * A text or an element to be used in an enclosing label element.\n */\n label: PropTypes.node,\n /**\n * The position of the label.\n * @default 'end'\n */\n labelPlacement: PropTypes.oneOf(['bottom', 'end', 'start', 'top']),\n /**\n * @ignore\n */\n name: PropTypes.string,\n /**\n * Callback fired when the state is changed.\n *\n * @param {React.SyntheticEvent} event The event source of the callback.\n * You can pull out the new checked state by accessing `event.target.checked` (boolean).\n */\n onChange: PropTypes.func,\n /**\n * If `true`, the label will indicate that the `input` is required.\n */\n required: PropTypes.bool,\n /**\n * The props used for each slot inside.\n * @default {}\n */\n slotProps: PropTypes.shape({\n typography: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside.\n * @default {}\n */\n slots: PropTypes.shape({\n typography: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The value of the component.\n */\n value: PropTypes.any\n} : void 0;\nexport default FormControlLabel;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getInputAdornmentUtilityClass(slot) {\n return generateUtilityClass('MuiInputAdornment', slot);\n}\nconst inputAdornmentClasses = generateUtilityClasses('MuiInputAdornment', ['root', 'filled', 'standard', 'outlined', 'positionStart', 'positionEnd', 'disablePointerEvents', 'hiddenLabel', 'sizeSmall']);\nexport default inputAdornmentClasses;","'use client';\n\nvar _span;\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport capitalize from \"../utils/capitalize.js\";\nimport Typography from \"../Typography/index.js\";\nimport FormControlContext from \"../FormControl/FormControlContext.js\";\nimport useFormControl from \"../FormControl/useFormControl.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport inputAdornmentClasses, { getInputAdornmentUtilityClass } from \"./inputAdornmentClasses.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst overridesResolver = (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, styles[`position${capitalize(ownerState.position)}`], ownerState.disablePointerEvents === true && styles.disablePointerEvents, styles[ownerState.variant]];\n};\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n disablePointerEvents,\n hiddenLabel,\n position,\n size,\n variant\n } = ownerState;\n const slots = {\n root: ['root', disablePointerEvents && 'disablePointerEvents', position && `position${capitalize(position)}`, variant, hiddenLabel && 'hiddenLabel', size && `size${capitalize(size)}`]\n };\n return composeClasses(slots, getInputAdornmentUtilityClass, classes);\n};\nconst InputAdornmentRoot = styled('div', {\n name: 'MuiInputAdornment',\n slot: 'Root',\n overridesResolver\n})(memoTheme(({\n theme\n}) => ({\n display: 'flex',\n maxHeight: '2em',\n alignItems: 'center',\n whiteSpace: 'nowrap',\n color: (theme.vars || theme).palette.action.active,\n variants: [{\n props: {\n variant: 'filled'\n },\n style: {\n [`&.${inputAdornmentClasses.positionStart}&:not(.${inputAdornmentClasses.hiddenLabel})`]: {\n marginTop: 16\n }\n }\n }, {\n props: {\n position: 'start'\n },\n style: {\n marginRight: 8\n }\n }, {\n props: {\n position: 'end'\n },\n style: {\n marginLeft: 8\n }\n }, {\n props: {\n disablePointerEvents: true\n },\n style: {\n pointerEvents: 'none'\n }\n }]\n})));\nconst InputAdornment = /*#__PURE__*/React.forwardRef(function InputAdornment(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiInputAdornment'\n });\n const {\n children,\n className,\n component = 'div',\n disablePointerEvents = false,\n disableTypography = false,\n position,\n variant: variantProp,\n ...other\n } = props;\n const muiFormControl = useFormControl() || {};\n let variant = variantProp;\n if (variantProp && muiFormControl.variant) {\n if (process.env.NODE_ENV !== 'production') {\n if (variantProp === muiFormControl.variant) {\n console.error('MUI: The `InputAdornment` variant infers the variant prop ' + 'you do not have to provide one.');\n }\n }\n }\n if (muiFormControl && !variant) {\n variant = muiFormControl.variant;\n }\n const ownerState = {\n ...props,\n hiddenLabel: muiFormControl.hiddenLabel,\n size: muiFormControl.size,\n disablePointerEvents,\n position,\n variant\n };\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(FormControlContext.Provider, {\n value: null,\n children: /*#__PURE__*/_jsx(InputAdornmentRoot, {\n as: component,\n ownerState: ownerState,\n className: clsx(classes.root, className),\n ref: ref,\n ...other,\n children: typeof children === 'string' && !disableTypography ? /*#__PURE__*/_jsx(Typography, {\n color: \"textSecondary\",\n children: children\n }) : /*#__PURE__*/_jsxs(React.Fragment, {\n children: [position === 'start' ? (/* notranslate needed while Google Translate will not fix zero-width space issue */_span || (_span = /*#__PURE__*/_jsx(\"span\", {\n className: \"notranslate\",\n \"aria-hidden\": true,\n children: \"\\u200B\"\n }))) : null, children]\n })\n })\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? InputAdornment.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The content of the component, normally an `IconButton` or string.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * Disable pointer events on the root.\n * This allows for the content of the adornment to focus the `input` on click.\n * @default false\n */\n disablePointerEvents: PropTypes.bool,\n /**\n * If children is a string then disable wrapping in a Typography component.\n * @default false\n */\n disableTypography: PropTypes.bool,\n /**\n * The position this adornment should appear relative to the `Input`.\n */\n position: PropTypes.oneOf(['end', 'start']).isRequired,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The variant to use.\n * Note: If you are using the `TextField` component or the `FormControl` component\n * you do not have to set this manually.\n */\n variant: PropTypes.oneOf(['filled', 'outlined', 'standard'])\n} : void 0;\nexport default InputAdornment;","'use client';\n\nimport createSvgIcon from \"../../utils/createSvgIcon.js\";\n\n/**\n * @ignore - internal component.\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z\"\n}), 'RadioButtonUnchecked');","'use client';\n\nimport createSvgIcon from \"../../utils/createSvgIcon.js\";\n\n/**\n * @ignore - internal component.\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z\"\n}), 'RadioButtonChecked');","'use client';\n\nimport PropTypes from 'prop-types';\nimport RadioButtonUncheckedIcon from \"../internal/svg-icons/RadioButtonUnchecked.js\";\nimport RadioButtonCheckedIcon from \"../internal/svg-icons/RadioButtonChecked.js\";\nimport rootShouldForwardProp from \"../styles/rootShouldForwardProp.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst RadioButtonIconRoot = styled('span', {\n name: 'MuiRadioButtonIcon',\n shouldForwardProp: rootShouldForwardProp\n})({\n position: 'relative',\n display: 'flex'\n});\nconst RadioButtonIconBackground = styled(RadioButtonUncheckedIcon, {\n name: 'MuiRadioButtonIcon'\n})({\n // Scale applied to prevent dot misalignment in Safari\n transform: 'scale(1)'\n});\nconst RadioButtonIconDot = styled(RadioButtonCheckedIcon, {\n name: 'MuiRadioButtonIcon'\n})(memoTheme(({\n theme\n}) => ({\n left: 0,\n position: 'absolute',\n transform: 'scale(0)',\n transition: theme.transitions.create('transform', {\n easing: theme.transitions.easing.easeIn,\n duration: theme.transitions.duration.shortest\n }),\n variants: [{\n props: {\n checked: true\n },\n style: {\n transform: 'scale(1)',\n transition: theme.transitions.create('transform', {\n easing: theme.transitions.easing.easeOut,\n duration: theme.transitions.duration.shortest\n })\n }\n }]\n})));\n\n/**\n * @ignore - internal component.\n */\nfunction RadioButtonIcon(props) {\n const {\n checked = false,\n classes = {},\n fontSize\n } = props;\n const ownerState = {\n ...props,\n checked\n };\n return /*#__PURE__*/_jsxs(RadioButtonIconRoot, {\n className: classes.root,\n ownerState: ownerState,\n children: [/*#__PURE__*/_jsx(RadioButtonIconBackground, {\n fontSize: fontSize,\n className: classes.background,\n ownerState: ownerState\n }), /*#__PURE__*/_jsx(RadioButtonIconDot, {\n fontSize: fontSize,\n className: classes.dot,\n ownerState: ownerState\n })]\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? RadioButtonIcon.propTypes /* remove-proptypes */ = {\n /**\n * If `true`, the component is checked.\n */\n checked: PropTypes.bool,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * The size of the component.\n * `small` is equivalent to the dense radio styling.\n */\n fontSize: PropTypes.oneOf(['small', 'medium'])\n} : void 0;\nexport default RadioButtonIcon;","'use client';\n\nimport * as React from 'react';\n/**\n * @ignore - internal component.\n */\nconst RadioGroupContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== 'production') {\n RadioGroupContext.displayName = 'RadioGroupContext';\n}\nexport default RadioGroupContext;","'use client';\n\nimport * as React from 'react';\nimport RadioGroupContext from \"./RadioGroupContext.js\";\nexport default function useRadioGroup() {\n return React.useContext(RadioGroupContext);\n}","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getRadioUtilityClass(slot) {\n return generateUtilityClass('MuiRadio', slot);\n}\nconst radioClasses = generateUtilityClasses('MuiRadio', ['root', 'checked', 'disabled', 'colorPrimary', 'colorSecondary', 'sizeSmall']);\nexport default radioClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport refType from '@mui/utils/refType';\nimport composeClasses from '@mui/utils/composeClasses';\nimport SwitchBase from \"../internal/SwitchBase.js\";\nimport RadioButtonIcon from \"./RadioButtonIcon.js\";\nimport capitalize from \"../utils/capitalize.js\";\nimport createChainedFunction from \"../utils/createChainedFunction.js\";\nimport useFormControl from \"../FormControl/useFormControl.js\";\nimport useRadioGroup from \"../RadioGroup/useRadioGroup.js\";\nimport radioClasses, { getRadioUtilityClass } from \"./radioClasses.js\";\nimport rootShouldForwardProp from \"../styles/rootShouldForwardProp.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport createSimplePaletteValueFilter from \"../utils/createSimplePaletteValueFilter.js\";\nimport useSlot from \"../utils/useSlot.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n color,\n size\n } = ownerState;\n const slots = {\n root: ['root', `color${capitalize(color)}`, size !== 'medium' && `size${capitalize(size)}`]\n };\n return {\n ...classes,\n ...composeClasses(slots, getRadioUtilityClass, classes)\n };\n};\nconst RadioRoot = styled(SwitchBase, {\n shouldForwardProp: prop => rootShouldForwardProp(prop) || prop === 'classes',\n name: 'MuiRadio',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.size !== 'medium' && styles[`size${capitalize(ownerState.size)}`], styles[`color${capitalize(ownerState.color)}`]];\n }\n})(memoTheme(({\n theme\n}) => ({\n color: (theme.vars || theme).palette.text.secondary,\n [`&.${radioClasses.disabled}`]: {\n color: (theme.vars || theme).palette.action.disabled\n },\n variants: [{\n props: {\n color: 'default',\n disabled: false,\n disableRipple: false\n },\n style: {\n '&:hover': {\n backgroundColor: theme.alpha((theme.vars || theme).palette.action.active, (theme.vars || theme).palette.action.hoverOpacity)\n }\n }\n }, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({\n props: {\n color,\n disabled: false,\n disableRipple: false\n },\n style: {\n '&:hover': {\n backgroundColor: theme.alpha((theme.vars || theme).palette[color].main, (theme.vars || theme).palette.action.hoverOpacity)\n }\n }\n })), ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({\n props: {\n color,\n disabled: false\n },\n style: {\n [`&.${radioClasses.checked}`]: {\n color: (theme.vars || theme).palette[color].main\n }\n }\n })), {\n // Should be last to override other colors\n props: {\n disableRipple: false\n },\n style: {\n // Reset on touch devices, it doesn't add specificity\n '&:hover': {\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n }\n }]\n})));\nfunction areEqualValues(a, b) {\n if (typeof b === 'object' && b !== null) {\n return a === b;\n }\n\n // The value could be a number, the DOM will stringify it anyway.\n return String(a) === String(b);\n}\nconst defaultCheckedIcon = /*#__PURE__*/_jsx(RadioButtonIcon, {\n checked: true\n});\nconst defaultIcon = /*#__PURE__*/_jsx(RadioButtonIcon, {});\nconst Radio = /*#__PURE__*/React.forwardRef(function Radio(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiRadio'\n });\n const {\n checked: checkedProp,\n checkedIcon = defaultCheckedIcon,\n color = 'primary',\n icon = defaultIcon,\n name: nameProp,\n onChange: onChangeProp,\n size = 'medium',\n className,\n disabled: disabledProp,\n disableRipple = false,\n slots = {},\n slotProps = {},\n inputProps,\n ...other\n } = props;\n const muiFormControl = useFormControl();\n let disabled = disabledProp;\n if (muiFormControl) {\n if (typeof disabled === 'undefined') {\n disabled = muiFormControl.disabled;\n }\n }\n disabled ??= false;\n const ownerState = {\n ...props,\n disabled,\n disableRipple,\n color,\n size\n };\n const classes = useUtilityClasses(ownerState);\n const radioGroup = useRadioGroup();\n let checked = checkedProp;\n const onChange = createChainedFunction(onChangeProp, radioGroup && radioGroup.onChange);\n let name = nameProp;\n if (radioGroup) {\n if (typeof checked === 'undefined') {\n checked = areEqualValues(radioGroup.value, props.value);\n }\n if (typeof name === 'undefined') {\n name = radioGroup.name;\n }\n }\n const externalInputProps = slotProps.input ?? inputProps;\n const [RootSlot, rootSlotProps] = useSlot('root', {\n ref,\n elementType: RadioRoot,\n className: clsx(classes.root, className),\n shouldForwardComponentProp: true,\n externalForwardedProps: {\n slots,\n slotProps,\n ...other\n },\n getSlotProps: handlers => ({\n ...handlers,\n onChange: (event, ...args) => {\n handlers.onChange?.(event, ...args);\n onChange(event, ...args);\n }\n }),\n ownerState,\n additionalProps: {\n type: 'radio',\n icon: /*#__PURE__*/React.cloneElement(icon, {\n fontSize: icon.props.fontSize ?? size\n }),\n checkedIcon: /*#__PURE__*/React.cloneElement(checkedIcon, {\n fontSize: checkedIcon.props.fontSize ?? size\n }),\n disabled,\n name,\n checked,\n slots,\n slotProps: {\n // Do not forward `slotProps.root` again because it's already handled by the `RootSlot` in this file.\n input: typeof externalInputProps === 'function' ? externalInputProps(ownerState) : externalInputProps\n }\n }\n });\n return /*#__PURE__*/_jsx(RootSlot, {\n ...rootSlotProps,\n classes: classes\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Radio.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * If `true`, the component is checked.\n */\n checked: PropTypes.bool,\n /**\n * The icon to display when the component is checked.\n * @default <RadioButtonIcon checked />\n */\n checkedIcon: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The color of the component.\n * It supports both default and custom theme colors, which can be added as shown in the\n * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).\n * @default 'primary'\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['default', 'primary', 'secondary', 'error', 'info', 'success', 'warning']), PropTypes.string]),\n /**\n * If `true`, the component is disabled.\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, the ripple effect is disabled.\n * @default false\n */\n disableRipple: PropTypes.bool,\n /**\n * The icon to display when the component is unchecked.\n * @default <RadioButtonIcon />\n */\n icon: PropTypes.node,\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#attributes) applied to the `input` element.\n * @deprecated Use `slotProps.input` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n */\n inputProps: PropTypes.object,\n /**\n * Pass a ref to the `input` element.\n * @deprecated Use `slotProps.input.ref` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n */\n inputRef: refType,\n /**\n * Name attribute of the `input` element.\n */\n name: PropTypes.string,\n /**\n * Callback fired when the state is changed.\n *\n * @param {React.ChangeEvent<HTMLInputElement>} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n * You can pull out the new checked state by accessing `event.target.checked` (boolean).\n */\n onChange: PropTypes.func,\n /**\n * If `true`, the `input` element is required.\n * @default false\n */\n required: PropTypes.bool,\n /**\n * The size of the component.\n * `small` is equivalent to the dense radio styling.\n * @default 'medium'\n */\n size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['medium', 'small']), PropTypes.string]),\n /**\n * The props used for each slot inside.\n * @default {}\n */\n slotProps: PropTypes.shape({\n input: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside.\n * @default {}\n */\n slots: PropTypes.shape({\n input: PropTypes.elementType,\n root: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The value of the component. The DOM API casts this to a string.\n */\n value: PropTypes.any\n} : void 0;\nexport default Radio;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getTooltipUtilityClass(slot) {\n return generateUtilityClass('MuiTooltip', slot);\n}\nconst tooltipClasses = generateUtilityClasses('MuiTooltip', ['popper', 'popperInteractive', 'popperArrow', 'popperClose', 'tooltip', 'tooltipArrow', 'touch', 'tooltipPlacementLeft', 'tooltipPlacementRight', 'tooltipPlacementTop', 'tooltipPlacementBottom', 'arrow']);\nexport default tooltipClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport useTimeout, { Timeout } from '@mui/utils/useTimeout';\nimport elementAcceptingRef from '@mui/utils/elementAcceptingRef';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { useRtl } from '@mui/system/RtlProvider';\nimport isFocusVisible from '@mui/utils/isFocusVisible';\nimport getReactElementRef from '@mui/utils/getReactElementRef';\nimport { styled, useTheme } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport capitalize from \"../utils/capitalize.js\";\nimport Grow from \"../Grow/index.js\";\nimport Popper from \"../Popper/index.js\";\nimport useEventCallback from \"../utils/useEventCallback.js\";\nimport useForkRef from \"../utils/useForkRef.js\";\nimport useId from \"../utils/useId.js\";\nimport useControlled from \"../utils/useControlled.js\";\nimport useSlot from \"../utils/useSlot.js\";\nimport tooltipClasses, { getTooltipUtilityClass } from \"./tooltipClasses.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction round(value) {\n return Math.round(value * 1e5) / 1e5;\n}\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n disableInteractive,\n arrow,\n touch,\n placement\n } = ownerState;\n const slots = {\n popper: ['popper', !disableInteractive && 'popperInteractive', arrow && 'popperArrow'],\n tooltip: ['tooltip', arrow && 'tooltipArrow', touch && 'touch', `tooltipPlacement${capitalize(placement.split('-')[0])}`],\n arrow: ['arrow']\n };\n return composeClasses(slots, getTooltipUtilityClass, classes);\n};\nconst TooltipPopper = styled(Popper, {\n name: 'MuiTooltip',\n slot: 'Popper',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.popper, !ownerState.disableInteractive && styles.popperInteractive, ownerState.arrow && styles.popperArrow, !ownerState.open && styles.popperClose];\n }\n})(memoTheme(({\n theme\n}) => ({\n zIndex: (theme.vars || theme).zIndex.tooltip,\n pointerEvents: 'none',\n variants: [{\n props: ({\n ownerState\n }) => !ownerState.disableInteractive,\n style: {\n pointerEvents: 'auto'\n }\n }, {\n props: ({\n open\n }) => !open,\n style: {\n pointerEvents: 'none'\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.arrow,\n style: {\n [`&[data-popper-placement*=\"bottom\"] .${tooltipClasses.arrow}`]: {\n top: 0,\n marginTop: '-0.71em',\n '&::before': {\n transformOrigin: '0 100%'\n }\n },\n [`&[data-popper-placement*=\"top\"] .${tooltipClasses.arrow}`]: {\n bottom: 0,\n marginBottom: '-0.71em',\n '&::before': {\n transformOrigin: '100% 0'\n }\n },\n [`&[data-popper-placement*=\"right\"] .${tooltipClasses.arrow}`]: {\n height: '1em',\n width: '0.71em',\n '&::before': {\n transformOrigin: '100% 100%'\n }\n },\n [`&[data-popper-placement*=\"left\"] .${tooltipClasses.arrow}`]: {\n height: '1em',\n width: '0.71em',\n '&::before': {\n transformOrigin: '0 0'\n }\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.arrow && !ownerState.isRtl,\n style: {\n [`&[data-popper-placement*=\"right\"] .${tooltipClasses.arrow}`]: {\n left: 0,\n marginLeft: '-0.71em'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.arrow && !!ownerState.isRtl,\n style: {\n [`&[data-popper-placement*=\"right\"] .${tooltipClasses.arrow}`]: {\n right: 0,\n marginRight: '-0.71em'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.arrow && !ownerState.isRtl,\n style: {\n [`&[data-popper-placement*=\"left\"] .${tooltipClasses.arrow}`]: {\n right: 0,\n marginRight: '-0.71em'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.arrow && !!ownerState.isRtl,\n style: {\n [`&[data-popper-placement*=\"left\"] .${tooltipClasses.arrow}`]: {\n left: 0,\n marginLeft: '-0.71em'\n }\n }\n }]\n})));\nconst TooltipTooltip = styled('div', {\n name: 'MuiTooltip',\n slot: 'Tooltip',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.tooltip, ownerState.touch && styles.touch, ownerState.arrow && styles.tooltipArrow, styles[`tooltipPlacement${capitalize(ownerState.placement.split('-')[0])}`]];\n }\n})(memoTheme(({\n theme\n}) => ({\n backgroundColor: theme.vars ? theme.vars.palette.Tooltip.bg : theme.alpha(theme.palette.grey[700], 0.92),\n borderRadius: (theme.vars || theme).shape.borderRadius,\n color: (theme.vars || theme).palette.common.white,\n fontFamily: theme.typography.fontFamily,\n padding: '4px 8px',\n fontSize: theme.typography.pxToRem(11),\n maxWidth: 300,\n margin: 2,\n wordWrap: 'break-word',\n fontWeight: theme.typography.fontWeightMedium,\n [`.${tooltipClasses.popper}[data-popper-placement*=\"left\"] &`]: {\n transformOrigin: 'right center'\n },\n [`.${tooltipClasses.popper}[data-popper-placement*=\"right\"] &`]: {\n transformOrigin: 'left center'\n },\n [`.${tooltipClasses.popper}[data-popper-placement*=\"top\"] &`]: {\n transformOrigin: 'center bottom',\n marginBottom: '14px'\n },\n [`.${tooltipClasses.popper}[data-popper-placement*=\"bottom\"] &`]: {\n transformOrigin: 'center top',\n marginTop: '14px'\n },\n variants: [{\n props: ({\n ownerState\n }) => ownerState.arrow,\n style: {\n position: 'relative',\n margin: 0\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.touch,\n style: {\n padding: '8px 16px',\n fontSize: theme.typography.pxToRem(14),\n lineHeight: `${round(16 / 14)}em`,\n fontWeight: theme.typography.fontWeightRegular\n }\n }, {\n props: ({\n ownerState\n }) => !ownerState.isRtl,\n style: {\n [`.${tooltipClasses.popper}[data-popper-placement*=\"left\"] &`]: {\n marginRight: '14px'\n },\n [`.${tooltipClasses.popper}[data-popper-placement*=\"right\"] &`]: {\n marginLeft: '14px'\n }\n }\n }, {\n props: ({\n ownerState\n }) => !ownerState.isRtl && ownerState.touch,\n style: {\n [`.${tooltipClasses.popper}[data-popper-placement*=\"left\"] &`]: {\n marginRight: '24px'\n },\n [`.${tooltipClasses.popper}[data-popper-placement*=\"right\"] &`]: {\n marginLeft: '24px'\n }\n }\n }, {\n props: ({\n ownerState\n }) => !!ownerState.isRtl,\n style: {\n [`.${tooltipClasses.popper}[data-popper-placement*=\"left\"] &`]: {\n marginLeft: '14px'\n },\n [`.${tooltipClasses.popper}[data-popper-placement*=\"right\"] &`]: {\n marginRight: '14px'\n }\n }\n }, {\n props: ({\n ownerState\n }) => !!ownerState.isRtl && ownerState.touch,\n style: {\n [`.${tooltipClasses.popper}[data-popper-placement*=\"left\"] &`]: {\n marginLeft: '24px'\n },\n [`.${tooltipClasses.popper}[data-popper-placement*=\"right\"] &`]: {\n marginRight: '24px'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.touch,\n style: {\n [`.${tooltipClasses.popper}[data-popper-placement*=\"top\"] &`]: {\n marginBottom: '24px'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.touch,\n style: {\n [`.${tooltipClasses.popper}[data-popper-placement*=\"bottom\"] &`]: {\n marginTop: '24px'\n }\n }\n }]\n})));\nconst TooltipArrow = styled('span', {\n name: 'MuiTooltip',\n slot: 'Arrow'\n})(memoTheme(({\n theme\n}) => ({\n overflow: 'hidden',\n position: 'absolute',\n width: '1em',\n height: '0.71em' /* = width / sqrt(2) = (length of the hypotenuse) */,\n boxSizing: 'border-box',\n color: theme.vars ? theme.vars.palette.Tooltip.bg : theme.alpha(theme.palette.grey[700], 0.9),\n '&::before': {\n content: '\"\"',\n margin: 'auto',\n display: 'block',\n width: '100%',\n height: '100%',\n backgroundColor: 'currentColor',\n transform: 'rotate(45deg)'\n }\n})));\nlet hystersisOpen = false;\nconst hystersisTimer = new Timeout();\nlet cursorPosition = {\n x: 0,\n y: 0\n};\nexport function testReset() {\n hystersisOpen = false;\n hystersisTimer.clear();\n}\nfunction composeEventHandler(handler, eventHandler) {\n return (event, ...params) => {\n if (eventHandler) {\n eventHandler(event, ...params);\n }\n handler(event, ...params);\n };\n}\n\n// TODO v6: Remove PopperComponent, PopperProps, TransitionComponent and TransitionProps.\nconst Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiTooltip'\n });\n const {\n arrow = false,\n children: childrenProp,\n classes: classesProp,\n components = {},\n componentsProps = {},\n describeChild = false,\n disableFocusListener = false,\n disableHoverListener = false,\n disableInteractive: disableInteractiveProp = false,\n disableTouchListener = false,\n enterDelay = 100,\n enterNextDelay = 0,\n enterTouchDelay = 700,\n followCursor = false,\n id: idProp,\n leaveDelay = 0,\n leaveTouchDelay = 1500,\n onClose,\n onOpen,\n open: openProp,\n placement = 'bottom',\n PopperComponent: PopperComponentProp,\n PopperProps = {},\n slotProps = {},\n slots = {},\n title,\n TransitionComponent: TransitionComponentProp,\n TransitionProps,\n ...other\n } = props;\n\n // to prevent runtime errors, developers will need to provide a child as a React element anyway.\n const children = /*#__PURE__*/React.isValidElement(childrenProp) ? childrenProp : /*#__PURE__*/_jsx(\"span\", {\n children: childrenProp\n });\n const theme = useTheme();\n const isRtl = useRtl();\n const [childNode, setChildNode] = React.useState();\n const [arrowRef, setArrowRef] = React.useState(null);\n const ignoreNonTouchEvents = React.useRef(false);\n const disableInteractive = disableInteractiveProp || followCursor;\n const closeTimer = useTimeout();\n const enterTimer = useTimeout();\n const leaveTimer = useTimeout();\n const touchTimer = useTimeout();\n const [openState, setOpenState] = useControlled({\n controlled: openProp,\n default: false,\n name: 'Tooltip',\n state: 'open'\n });\n let open = openState;\n if (process.env.NODE_ENV !== 'production') {\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler\n // eslint-disable-next-line react-hooks/rules-of-hooks -- process.env never changes\n const {\n current: isControlled\n } = React.useRef(openProp !== undefined);\n\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler\n // eslint-disable-next-line react-hooks/rules-of-hooks -- process.env never changes\n React.useEffect(() => {\n if (childNode && childNode.disabled && !isControlled && title !== '' && childNode.tagName.toLowerCase() === 'button') {\n console.warn(['MUI: You are providing a disabled `button` child to the Tooltip component.', 'A disabled element does not fire events.', \"Tooltip needs to listen to the child element's events to display the title.\", '', 'Add a simple wrapper element, such as a `span`.'].join('\\n'));\n }\n }, [title, childNode, isControlled]);\n }\n const id = useId(idProp);\n const prevUserSelect = React.useRef();\n const stopTouchInteraction = useEventCallback(() => {\n if (prevUserSelect.current !== undefined) {\n document.body.style.WebkitUserSelect = prevUserSelect.current;\n prevUserSelect.current = undefined;\n }\n touchTimer.clear();\n });\n React.useEffect(() => stopTouchInteraction, [stopTouchInteraction]);\n const handleOpen = event => {\n hystersisTimer.clear();\n hystersisOpen = true;\n\n // The mouseover event will trigger for every nested element in the tooltip.\n // We can skip rerendering when the tooltip is already open.\n // We are using the mouseover event instead of the mouseenter event to fix a hide/show issue.\n setOpenState(true);\n if (onOpen && !open) {\n onOpen(event);\n }\n };\n const handleClose = useEventCallback(\n /**\n * @param {React.SyntheticEvent | Event} event\n */\n event => {\n hystersisTimer.start(800 + leaveDelay, () => {\n hystersisOpen = false;\n });\n setOpenState(false);\n if (onClose && open) {\n onClose(event);\n }\n closeTimer.start(theme.transitions.duration.shortest, () => {\n ignoreNonTouchEvents.current = false;\n });\n });\n const handleMouseOver = event => {\n if (ignoreNonTouchEvents.current && event.type !== 'touchstart') {\n return;\n }\n\n // Remove the title ahead of time.\n // We don't want to wait for the next render commit.\n // We would risk displaying two tooltips at the same time (native + this one).\n if (childNode) {\n childNode.removeAttribute('title');\n }\n enterTimer.clear();\n leaveTimer.clear();\n if (enterDelay || hystersisOpen && enterNextDelay) {\n enterTimer.start(hystersisOpen ? enterNextDelay : enterDelay, () => {\n handleOpen(event);\n });\n } else {\n handleOpen(event);\n }\n };\n const handleMouseLeave = event => {\n enterTimer.clear();\n leaveTimer.start(leaveDelay, () => {\n handleClose(event);\n });\n };\n const [, setChildIsFocusVisible] = React.useState(false);\n const handleBlur = event => {\n // Needed for https://github.com/mui/material-ui/issues/45373\n const target = event?.target ?? childNode;\n if (!target || !isFocusVisible(target)) {\n setChildIsFocusVisible(false);\n\n // InputBase can call onBlur() without an event when the input becomes disabled.\n // Tooltip must not assume an event object exists.\n const closeEvent = event ?? new Event('blur');\n\n // `new Event('blur')` has `target/currentTarget === null`, but Tooltip's close logic\n // (and user callbacks like onClose) may expect them to reference the anchor element.\n if (!event && target) {\n Object.defineProperty(closeEvent, 'target', {\n value: target\n });\n Object.defineProperty(closeEvent, 'currentTarget', {\n value: target\n });\n }\n handleMouseLeave(closeEvent);\n }\n };\n const handleFocus = event => {\n // Workaround for https://github.com/facebook/react/issues/7769\n // The autoFocus of React might trigger the event before the componentDidMount.\n // We need to account for this eventuality.\n if (!childNode) {\n setChildNode(event.currentTarget);\n }\n if (isFocusVisible(event.target)) {\n setChildIsFocusVisible(true);\n handleMouseOver(event);\n }\n };\n const detectTouchStart = event => {\n ignoreNonTouchEvents.current = true;\n const childrenProps = children.props;\n if (childrenProps.onTouchStart) {\n childrenProps.onTouchStart(event);\n }\n };\n const handleTouchStart = event => {\n detectTouchStart(event);\n leaveTimer.clear();\n closeTimer.clear();\n stopTouchInteraction();\n prevUserSelect.current = document.body.style.WebkitUserSelect;\n // Prevent iOS text selection on long-tap.\n document.body.style.WebkitUserSelect = 'none';\n touchTimer.start(enterTouchDelay, () => {\n document.body.style.WebkitUserSelect = prevUserSelect.current;\n handleMouseOver(event);\n });\n };\n const handleTouchEnd = event => {\n if (children.props.onTouchEnd) {\n children.props.onTouchEnd(event);\n }\n stopTouchInteraction();\n leaveTimer.start(leaveTouchDelay, () => {\n handleClose(event);\n });\n };\n React.useEffect(() => {\n if (!open) {\n return undefined;\n }\n\n /**\n * @param {KeyboardEvent} nativeEvent\n */\n function handleKeyDown(nativeEvent) {\n if (nativeEvent.key === 'Escape') {\n handleClose(nativeEvent);\n }\n }\n document.addEventListener('keydown', handleKeyDown);\n return () => {\n document.removeEventListener('keydown', handleKeyDown);\n };\n }, [handleClose, open]);\n const handleRef = useForkRef(getReactElementRef(children), setChildNode, ref);\n\n // There is no point in displaying an empty tooltip.\n // So we exclude all falsy values, except 0, which is valid.\n if (!title && title !== 0) {\n open = false;\n }\n const popperRef = React.useRef();\n const handleMouseMove = event => {\n const childrenProps = children.props;\n if (childrenProps.onMouseMove) {\n childrenProps.onMouseMove(event);\n }\n cursorPosition = {\n x: event.clientX,\n y: event.clientY\n };\n if (popperRef.current) {\n popperRef.current.update();\n }\n };\n const nameOrDescProps = {};\n const titleIsString = typeof title === 'string';\n if (describeChild) {\n nameOrDescProps.title = !open && titleIsString && !disableHoverListener ? title : null;\n nameOrDescProps['aria-describedby'] = open ? id : null;\n } else {\n nameOrDescProps['aria-label'] = titleIsString ? title : null;\n nameOrDescProps['aria-labelledby'] = open && !titleIsString ? id : null;\n }\n const childrenProps = {\n ...nameOrDescProps,\n ...other,\n ...children.props,\n className: clsx(other.className, children.props.className),\n onTouchStart: detectTouchStart,\n ref: handleRef,\n ...(followCursor ? {\n onMouseMove: handleMouseMove\n } : {})\n };\n if (process.env.NODE_ENV !== 'production') {\n childrenProps['data-mui-internal-clone-element'] = true;\n\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler\n // eslint-disable-next-line react-hooks/rules-of-hooks -- process.env never changes\n React.useEffect(() => {\n if (childNode && !childNode.getAttribute('data-mui-internal-clone-element')) {\n console.error(['MUI: The `children` component of the Tooltip is not forwarding its props correctly.', 'Please make sure that props are spread on the same element that the ref is applied to.'].join('\\n'));\n }\n }, [childNode]);\n }\n const interactiveWrapperListeners = {};\n if (!disableTouchListener) {\n childrenProps.onTouchStart = handleTouchStart;\n childrenProps.onTouchEnd = handleTouchEnd;\n }\n if (!disableHoverListener) {\n childrenProps.onMouseOver = composeEventHandler(handleMouseOver, childrenProps.onMouseOver);\n childrenProps.onMouseLeave = composeEventHandler(handleMouseLeave, childrenProps.onMouseLeave);\n if (!disableInteractive) {\n interactiveWrapperListeners.onMouseOver = handleMouseOver;\n interactiveWrapperListeners.onMouseLeave = handleMouseLeave;\n }\n }\n if (!disableFocusListener) {\n childrenProps.onFocus = composeEventHandler(handleFocus, childrenProps.onFocus);\n childrenProps.onBlur = composeEventHandler(handleBlur, childrenProps.onBlur);\n if (!disableInteractive) {\n interactiveWrapperListeners.onFocus = handleFocus;\n interactiveWrapperListeners.onBlur = handleBlur;\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n if (children.props.title) {\n console.error(['MUI: You have provided a `title` prop to the child of <Tooltip />.', `Remove this title prop \\`${children.props.title}\\` or the Tooltip component.`].join('\\n'));\n }\n }\n const ownerState = {\n ...props,\n isRtl,\n arrow,\n disableInteractive,\n placement,\n PopperComponentProp,\n touch: ignoreNonTouchEvents.current\n };\n const resolvedPopperProps = typeof slotProps.popper === 'function' ? slotProps.popper(ownerState) : slotProps.popper;\n const popperOptions = React.useMemo(() => {\n let tooltipModifiers = [{\n name: 'arrow',\n enabled: Boolean(arrowRef),\n options: {\n element: arrowRef,\n padding: 4\n }\n }];\n if (PopperProps.popperOptions?.modifiers) {\n tooltipModifiers = tooltipModifiers.concat(PopperProps.popperOptions.modifiers);\n }\n if (resolvedPopperProps?.popperOptions?.modifiers) {\n tooltipModifiers = tooltipModifiers.concat(resolvedPopperProps.popperOptions.modifiers);\n }\n return {\n ...PopperProps.popperOptions,\n ...resolvedPopperProps?.popperOptions,\n modifiers: tooltipModifiers\n };\n }, [arrowRef, PopperProps.popperOptions, resolvedPopperProps?.popperOptions]);\n const classes = useUtilityClasses(ownerState);\n const resolvedTransitionProps = typeof slotProps.transition === 'function' ? slotProps.transition(ownerState) : slotProps.transition;\n const externalForwardedProps = {\n slots: {\n popper: components.Popper,\n transition: components.Transition ?? TransitionComponentProp,\n tooltip: components.Tooltip,\n arrow: components.Arrow,\n ...slots\n },\n slotProps: {\n arrow: slotProps.arrow ?? componentsProps.arrow,\n popper: {\n ...PopperProps,\n ...(resolvedPopperProps ?? componentsProps.popper)\n },\n // resolvedPopperProps can be spread because it's already an object\n tooltip: slotProps.tooltip ?? componentsProps.tooltip,\n transition: {\n ...TransitionProps,\n ...(resolvedTransitionProps ?? componentsProps.transition)\n }\n }\n };\n const [PopperSlot, popperSlotProps] = useSlot('popper', {\n elementType: TooltipPopper,\n externalForwardedProps,\n ownerState,\n className: clsx(classes.popper, PopperProps?.className)\n });\n const [TransitionSlot, transitionSlotProps] = useSlot('transition', {\n elementType: Grow,\n externalForwardedProps,\n ownerState\n });\n const [TooltipSlot, tooltipSlotProps] = useSlot('tooltip', {\n elementType: TooltipTooltip,\n className: classes.tooltip,\n externalForwardedProps,\n ownerState\n });\n const [ArrowSlot, arrowSlotProps] = useSlot('arrow', {\n elementType: TooltipArrow,\n className: classes.arrow,\n externalForwardedProps,\n ownerState,\n ref: setArrowRef\n });\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/React.cloneElement(children, childrenProps), /*#__PURE__*/_jsx(PopperSlot, {\n as: PopperComponentProp ?? Popper,\n placement: placement,\n anchorEl: followCursor ? {\n getBoundingClientRect: () => ({\n top: cursorPosition.y,\n left: cursorPosition.x,\n right: cursorPosition.x,\n bottom: cursorPosition.y,\n width: 0,\n height: 0\n })\n } : childNode,\n popperRef: popperRef,\n open: childNode ? open : false,\n id: id,\n transition: true,\n ...interactiveWrapperListeners,\n ...popperSlotProps,\n popperOptions: popperOptions,\n children: ({\n TransitionProps: TransitionPropsInner\n }) => /*#__PURE__*/_jsx(TransitionSlot, {\n timeout: theme.transitions.duration.shorter,\n ...TransitionPropsInner,\n ...transitionSlotProps,\n children: /*#__PURE__*/_jsxs(TooltipSlot, {\n ...tooltipSlotProps,\n children: [title, arrow ? /*#__PURE__*/_jsx(ArrowSlot, {\n ...arrowSlotProps\n }) : null]\n })\n })\n })]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Tooltip.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * If `true`, adds an arrow to the tooltip.\n * @default false\n */\n arrow: PropTypes.bool,\n /**\n * Tooltip reference element.\n */\n children: elementAcceptingRef.isRequired,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The components used for each slot inside.\n *\n * @deprecated use the `slots` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n *\n * @default {}\n */\n components: PropTypes.shape({\n Arrow: PropTypes.elementType,\n Popper: PropTypes.elementType,\n Tooltip: PropTypes.elementType,\n Transition: PropTypes.elementType\n }),\n /**\n * The extra props for the slot components.\n * You can override the existing props or add new ones.\n *\n * @deprecated use the `slotProps` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n *\n * @default {}\n */\n componentsProps: PropTypes.shape({\n arrow: PropTypes.object,\n popper: PropTypes.object,\n tooltip: PropTypes.object,\n transition: PropTypes.object\n }),\n /**\n * Set to `true` if the `title` acts as an accessible description.\n * By default the `title` acts as an accessible label for the child.\n * @default false\n */\n describeChild: PropTypes.bool,\n /**\n * Do not respond to focus-visible events.\n * @default false\n */\n disableFocusListener: PropTypes.bool,\n /**\n * Do not respond to hover events.\n * @default false\n */\n disableHoverListener: PropTypes.bool,\n /**\n * Makes a tooltip not interactive, i.e. it will close when the user\n * hovers over the tooltip before the `leaveDelay` is expired.\n * @default false\n */\n disableInteractive: PropTypes.bool,\n /**\n * Do not respond to long press touch events.\n * @default false\n */\n disableTouchListener: PropTypes.bool,\n /**\n * The number of milliseconds to wait before showing the tooltip.\n * This prop won't impact the enter touch delay (`enterTouchDelay`).\n * @default 100\n */\n enterDelay: PropTypes.number,\n /**\n * The number of milliseconds to wait before showing the tooltip when one was already recently opened.\n * @default 0\n */\n enterNextDelay: PropTypes.number,\n /**\n * The number of milliseconds a user must touch the element before showing the tooltip.\n * @default 700\n */\n enterTouchDelay: PropTypes.number,\n /**\n * If `true`, the tooltip follow the cursor over the wrapped element.\n * @default false\n */\n followCursor: PropTypes.bool,\n /**\n * This prop is used to help implement the accessibility logic.\n * If you don't provide this prop. It falls back to a randomly generated id.\n */\n id: PropTypes.string,\n /**\n * The number of milliseconds to wait before hiding the tooltip.\n * This prop won't impact the leave touch delay (`leaveTouchDelay`).\n * @default 0\n */\n leaveDelay: PropTypes.number,\n /**\n * The number of milliseconds after the user stops touching an element before hiding the tooltip.\n * @default 1500\n */\n leaveTouchDelay: PropTypes.number,\n /**\n * Callback fired when the component requests to be closed.\n *\n * @param {React.SyntheticEvent} event The event source of the callback.\n */\n onClose: PropTypes.func,\n /**\n * Callback fired when the component requests to be open.\n *\n * @param {React.SyntheticEvent} event The event source of the callback.\n */\n onOpen: PropTypes.func,\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool,\n /**\n * Tooltip placement.\n * @default 'bottom'\n */\n placement: PropTypes.oneOf(['auto-end', 'auto-start', 'auto', 'bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),\n /**\n * The component used for the popper.\n * @deprecated use the `slots.popper` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n */\n PopperComponent: PropTypes.elementType,\n /**\n * Props applied to the [`Popper`](https://mui.com/material-ui/api/popper/) element.\n * @deprecated use the `slotProps.popper` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n * @default {}\n */\n PopperProps: PropTypes.object,\n /**\n * The props used for each slot inside.\n * @default {}\n */\n slotProps: PropTypes.shape({\n arrow: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n popper: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n tooltip: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n transition: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside.\n * @default {}\n */\n slots: PropTypes.shape({\n arrow: PropTypes.elementType,\n popper: PropTypes.elementType,\n tooltip: PropTypes.elementType,\n transition: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * Tooltip title. Zero-length titles string, undefined, null and false are never displayed.\n */\n title: PropTypes.node,\n /**\n * The component used for the transition.\n * [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n * @deprecated use the `slots.transition` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n */\n TransitionComponent: PropTypes.elementType,\n /**\n * Props applied to the transition element.\n * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.\n * @deprecated use the `slotProps.transition` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n * @default {}\n */\n TransitionProps: PropTypes.object\n} : void 0;\nexport default Tooltip;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getSwitchUtilityClass(slot) {\n return generateUtilityClass('MuiSwitch', slot);\n}\nconst switchClasses = generateUtilityClasses('MuiSwitch', ['root', 'edgeStart', 'edgeEnd', 'switchBase', 'colorPrimary', 'colorSecondary', 'sizeSmall', 'sizeMedium', 'checked', 'disabled', 'input', 'thumb', 'track']);\nexport default switchClasses;","'use client';\n\n// @inheritedComponent IconButton\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport refType from '@mui/utils/refType';\nimport composeClasses from '@mui/utils/composeClasses';\nimport capitalize from \"../utils/capitalize.js\";\nimport createSimplePaletteValueFilter from \"../utils/createSimplePaletteValueFilter.js\";\nimport SwitchBase from \"../internal/SwitchBase.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport switchClasses, { getSwitchUtilityClass } from \"./switchClasses.js\";\nimport { mergeSlotProps } from \"../utils/index.js\";\nimport useSlot from \"../utils/useSlot.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n edge,\n size,\n color,\n checked,\n disabled\n } = ownerState;\n const slots = {\n root: ['root', edge && `edge${capitalize(edge)}`, `size${capitalize(size)}`],\n switchBase: ['switchBase', `color${capitalize(color)}`, checked && 'checked', disabled && 'disabled'],\n thumb: ['thumb'],\n track: ['track'],\n input: ['input']\n };\n const composedClasses = composeClasses(slots, getSwitchUtilityClass, classes);\n return {\n ...classes,\n // forward the disabled and checked classes to the SwitchBase\n ...composedClasses\n };\n};\nconst SwitchRoot = styled('span', {\n name: 'MuiSwitch',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.edge && styles[`edge${capitalize(ownerState.edge)}`], styles[`size${capitalize(ownerState.size)}`]];\n }\n})({\n display: 'inline-flex',\n width: 34 + 12 * 2,\n height: 14 + 12 * 2,\n overflow: 'hidden',\n padding: 12,\n boxSizing: 'border-box',\n position: 'relative',\n flexShrink: 0,\n zIndex: 0,\n // Reset the stacking context.\n verticalAlign: 'middle',\n // For correct alignment with the text.\n '@media print': {\n colorAdjust: 'exact'\n },\n variants: [{\n props: {\n edge: 'start'\n },\n style: {\n marginLeft: -8\n }\n }, {\n props: {\n edge: 'end'\n },\n style: {\n marginRight: -8\n }\n }, {\n props: {\n size: 'small'\n },\n style: {\n width: 40,\n height: 24,\n padding: 7,\n [`& .${switchClasses.thumb}`]: {\n width: 16,\n height: 16\n },\n [`& .${switchClasses.switchBase}`]: {\n padding: 4,\n [`&.${switchClasses.checked}`]: {\n transform: 'translateX(16px)'\n }\n }\n }\n }]\n});\nconst SwitchSwitchBase = styled(SwitchBase, {\n name: 'MuiSwitch',\n slot: 'SwitchBase',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.switchBase, {\n [`& .${switchClasses.input}`]: styles.input\n }, ownerState.color !== 'default' && styles[`color${capitalize(ownerState.color)}`]];\n }\n})(memoTheme(({\n theme\n}) => ({\n position: 'absolute',\n top: 0,\n left: 0,\n zIndex: 1,\n // Render above the focus ripple.\n color: theme.vars ? theme.vars.palette.Switch.defaultColor : `${theme.palette.mode === 'light' ? theme.palette.common.white : theme.palette.grey[300]}`,\n transition: theme.transitions.create(['left', 'transform'], {\n duration: theme.transitions.duration.shortest\n }),\n [`&.${switchClasses.checked}`]: {\n transform: 'translateX(20px)'\n },\n [`&.${switchClasses.disabled}`]: {\n color: theme.vars ? theme.vars.palette.Switch.defaultDisabledColor : `${theme.palette.mode === 'light' ? theme.palette.grey[100] : theme.palette.grey[600]}`\n },\n [`&.${switchClasses.checked} + .${switchClasses.track}`]: {\n opacity: 0.5\n },\n [`&.${switchClasses.disabled} + .${switchClasses.track}`]: {\n opacity: theme.vars ? theme.vars.opacity.switchTrackDisabled : `${theme.palette.mode === 'light' ? 0.12 : 0.2}`\n },\n [`& .${switchClasses.input}`]: {\n left: '-100%',\n width: '300%'\n }\n})), memoTheme(({\n theme\n}) => ({\n '&:hover': {\n backgroundColor: theme.alpha((theme.vars || theme).palette.action.active, (theme.vars || theme).palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n },\n variants: [...Object.entries(theme.palette).filter(createSimplePaletteValueFilter(['light'])) // check all the used fields in the style below\n .map(([color]) => ({\n props: {\n color\n },\n style: {\n [`&.${switchClasses.checked}`]: {\n color: (theme.vars || theme).palette[color].main,\n '&:hover': {\n backgroundColor: theme.alpha((theme.vars || theme).palette[color].main, (theme.vars || theme).palette.action.hoverOpacity),\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n },\n [`&.${switchClasses.disabled}`]: {\n color: theme.vars ? theme.vars.palette.Switch[`${color}DisabledColor`] : `${theme.palette.mode === 'light' ? theme.lighten(theme.palette[color].main, 0.62) : theme.darken(theme.palette[color].main, 0.55)}`\n }\n },\n [`&.${switchClasses.checked} + .${switchClasses.track}`]: {\n backgroundColor: (theme.vars || theme).palette[color].main\n }\n }\n }))]\n})));\nconst SwitchTrack = styled('span', {\n name: 'MuiSwitch',\n slot: 'Track'\n})(memoTheme(({\n theme\n}) => ({\n height: '100%',\n width: '100%',\n borderRadius: 14 / 2,\n boxSizing: 'border-box',\n border: '1px solid transparent',\n zIndex: -1,\n transition: theme.transitions.create(['opacity', 'background-color'], {\n duration: theme.transitions.duration.shortest\n }),\n backgroundColor: theme.vars ? theme.vars.palette.common.onBackground : `${theme.palette.mode === 'light' ? theme.palette.common.black : theme.palette.common.white}`,\n opacity: theme.vars ? theme.vars.opacity.switchTrack : `${theme.palette.mode === 'light' ? 0.38 : 0.3}`\n})));\nconst SwitchThumb = styled('span', {\n name: 'MuiSwitch',\n slot: 'Thumb'\n})(memoTheme(({\n theme\n}) => ({\n boxShadow: (theme.vars || theme).shadows[1],\n backgroundColor: 'currentColor',\n boxSizing: 'border-box',\n border: '1px solid transparent',\n width: 20,\n height: 20,\n borderRadius: '50%'\n})));\nconst Switch = /*#__PURE__*/React.forwardRef(function Switch(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiSwitch'\n });\n const {\n className,\n color = 'primary',\n edge = false,\n size = 'medium',\n sx,\n slots = {},\n slotProps = {},\n ...other\n } = props;\n const ownerState = {\n ...props,\n color,\n edge,\n size\n };\n const classes = useUtilityClasses(ownerState);\n const externalInputProps = slotProps.input;\n const externalForwardedProps = {\n slots,\n slotProps\n };\n const [RootSlot, rootSlotProps] = useSlot('root', {\n className: clsx(classes.root, className),\n elementType: SwitchRoot,\n externalForwardedProps,\n ownerState,\n additionalProps: {\n sx\n }\n });\n const [ThumbSlot, thumbSlotProps] = useSlot('thumb', {\n className: classes.thumb,\n elementType: SwitchThumb,\n externalForwardedProps,\n ownerState\n });\n const icon = /*#__PURE__*/_jsx(ThumbSlot, {\n ...thumbSlotProps\n });\n const [TrackSlot, trackSlotProps] = useSlot('track', {\n className: classes.track,\n elementType: SwitchTrack,\n externalForwardedProps,\n ownerState\n });\n return /*#__PURE__*/_jsxs(RootSlot, {\n ...rootSlotProps,\n children: [/*#__PURE__*/_jsx(SwitchSwitchBase, {\n type: \"checkbox\",\n icon: icon,\n checkedIcon: icon,\n ref: ref,\n ownerState: ownerState,\n ...other,\n classes: {\n ...classes,\n root: classes.switchBase\n },\n slots: {\n ...(slots.switchBase && {\n root: slots.switchBase\n }),\n ...(slots.input && {\n input: slots.input\n })\n },\n slotProps: {\n ...(slotProps.switchBase && {\n root: typeof slotProps.switchBase === 'function' ? slotProps.switchBase(ownerState) : slotProps.switchBase\n }),\n input: mergeSlotProps(typeof externalInputProps === 'function' ? externalInputProps(ownerState) : externalInputProps, {\n role: 'switch'\n })\n }\n }), /*#__PURE__*/_jsx(TrackSlot, {\n ...trackSlotProps\n })]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Switch.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * If `true`, the component is checked.\n */\n checked: PropTypes.bool,\n /**\n * The icon to display when the component is checked.\n */\n checkedIcon: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The color of the component.\n * It supports both default and custom theme colors, which can be added as shown in the\n * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).\n * @default 'primary'\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['default', 'primary', 'secondary', 'error', 'info', 'success', 'warning']), PropTypes.string]),\n /**\n * The default checked state. Use when the component is not controlled.\n */\n defaultChecked: PropTypes.bool,\n /**\n * If `true`, the component is disabled.\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, the ripple effect is disabled.\n * @default false\n */\n disableRipple: PropTypes.bool,\n /**\n * If given, uses a negative margin to counteract the padding on one\n * side (this is often helpful for aligning the left or right\n * side of the icon with content above or below, without ruining the border\n * size and shape).\n * @default false\n */\n edge: PropTypes.oneOf(['end', 'start', false]),\n /**\n * The icon to display when the component is unchecked.\n */\n icon: PropTypes.node,\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#attributes) applied to the `input` element.\n * @deprecated Use `slotProps.input` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n */\n inputProps: PropTypes.object,\n /**\n * Pass a ref to the `input` element.\n * @deprecated Use `slotProps.input.ref` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n */\n inputRef: refType,\n /**\n * Callback fired when the state is changed.\n *\n * @param {React.ChangeEvent<HTMLInputElement>} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n * You can pull out the new checked state by accessing `event.target.checked` (boolean).\n */\n onChange: PropTypes.func,\n /**\n * If `true`, the `input` element is required.\n * @default false\n */\n required: PropTypes.bool,\n /**\n * The size of the component.\n * `small` is equivalent to the dense switch styling.\n * @default 'medium'\n */\n size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['medium', 'small']), PropTypes.string]),\n /**\n * The props used for each slot inside.\n * @default {}\n */\n slotProps: PropTypes.shape({\n input: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n switchBase: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n thumb: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n track: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside.\n * @default {}\n */\n slots: PropTypes.shape({\n input: PropTypes.elementType,\n root: PropTypes.elementType,\n switchBase: PropTypes.elementType,\n thumb: PropTypes.elementType,\n track: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The value of the component. The DOM API casts this to a string.\n * The browser uses \"on\" as the default value.\n */\n value: PropTypes.any\n} : void 0;\nexport default Switch;","import \"react\";\nimport e from \"prop-types\";\nimport { Button as t, Dialog as n, DialogActions as r, DialogContent as i, DialogContentText as a, DialogTitle as o } from \"@mui/material\";\nimport { styled as s } from \"@mui/material/styles\";\nimport { jsx as c, jsxs as l } from \"react/jsx-runtime\";\n//#region src/alert-dialog.tsx\nvar u = s(o)(() => ({ fontSize: \"max(1.25rem, 18px)\" })), d = s(a)(() => ({ fontSize: \"max(1rem, 14px)\" })), f = ({ text: e, title: a, onClose: o, onConfirm: s, open: f, onCloseText: p, onConfirmText: m, disableAutoFocus: h, disableEnforceFocus: g, disableRestoreFocus: _ }) => /* @__PURE__ */ l(n, {\n\topen: f,\n\tdisableAutoFocus: h,\n\tdisableEnforceFocus: g,\n\tdisableRestoreFocus: _,\n\tonClose: o,\n\tchildren: [\n\t\ta && /* @__PURE__ */ c(u, { children: a }),\n\t\te && /* @__PURE__ */ c(i, { children: /* @__PURE__ */ c(d, { children: e }) }),\n\t\t/* @__PURE__ */ l(r, { children: [o && /* @__PURE__ */ c(t, {\n\t\t\tonClick: o,\n\t\t\tcolor: \"primary\",\n\t\t\tchildren: p\n\t\t}), s && /* @__PURE__ */ c(t, {\n\t\t\tautoFocus: !0,\n\t\t\tonClick: s,\n\t\t\tcolor: \"primary\",\n\t\t\tchildren: m\n\t\t})] })\n\t]\n});\nf.defaultProps = {\n\tonCloseText: \"CANCEL\",\n\tonConfirmText: \"OK\",\n\tdisableAutoFocus: !1,\n\tdisableEnforceFocus: !1,\n\tdisableRestoreFocus: !1\n}, f.propTypes = {\n\ttext: e.oneOfType([e.string, e.object]),\n\ttitle: e.string,\n\tonClose: e.func,\n\tonConfirm: e.func,\n\topen: e.bool,\n\tonConfirmText: e.string,\n\tonCloseText: e.string,\n\tdisableAutoFocus: e.bool,\n\tdisableEnforceFocus: e.bool,\n\tdisableRestoreFocus: e.bool\n};\n//#endregion\nexport { f as default };\n","import \"react\";\nimport e from \"prop-types\";\nimport { styled as t } from \"@mui/material/styles\";\nimport { jsx as n } from \"react/jsx-runtime\";\nimport { color as r } from \"@pie-lib/render-ui\";\nimport i from \"@mui/material/FormControlLabel\";\nimport a from \"@mui/material/Radio\";\n//#region src/radio-with-label.tsx\nvar o = t(i)(() => ({ \"& .MuiFormControlLabel-label\": {\n\tleft: \"-5px\",\n\tposition: \"relative\"\n} })), s = t(a)(() => ({ color: `${r.tertiary()} !important` })), c = ({ label: e, value: t, checked: r, onChange: i }) => /* @__PURE__ */ n(o, {\n\tvalue: t,\n\tcontrol: /* @__PURE__ */ n(s, {\n\t\tchecked: r,\n\t\tonChange: i\n\t}),\n\tlabel: e\n});\nc.propTypes = {\n\tlabel: e.string,\n\tvalue: e.string,\n\tchecked: e.bool,\n\tonChange: e.func\n};\n//#endregion\nexport { c as default };\n","import e from \"react\";\nimport t from \"prop-types\";\nimport { styled as n } from \"@mui/material/styles\";\nimport { jsx as r, jsxs as i } from \"react/jsx-runtime\";\nimport a from \"@mui/material/Tabs\";\nimport o from \"@mui/material/Tab\";\n//#region src/tabs/index.tsx\nvar s = n(o)(() => ({})), c = class extends e.Component {\n\tstatic propTypes = {\n\t\tclassName: t.string,\n\t\tcontentClassName: t.string,\n\t\tcontentStyle: t.object,\n\t\tchildren: t.oneOfType([t.arrayOf(t.node), t.node]).isRequired\n\t};\n\tconstructor(e) {\n\t\tsuper(e), this.state = { value: 0 };\n\t}\n\thandleChange = (e, t) => {\n\t\tthis.setState({ value: t });\n\t};\n\trender() {\n\t\tlet { value: t } = this.state, { children: n, className: o, contentClassName: c, contentStyle: l = {} } = this.props;\n\t\treturn /* @__PURE__ */ i(\"div\", {\n\t\t\tclassName: o,\n\t\t\tchildren: [/* @__PURE__ */ r(a, {\n\t\t\t\tindicatorColor: \"primary\",\n\t\t\t\tvalue: t,\n\t\t\t\tonChange: this.handleChange,\n\t\t\t\tchildren: e.Children.map(n, (e, t) => e && e.props.title ? /* @__PURE__ */ r(s, { label: e.props.title }, t) : null)\n\t\t\t}), /* @__PURE__ */ r(\"div\", {\n\t\t\t\tclassName: c,\n\t\t\t\tstyle: l,\n\t\t\t\tchildren: n[t]\n\t\t\t})]\n\t\t});\n\t}\n};\n//#endregion\nexport { c as default };\n","import \"react\";\nimport e from \"prop-types\";\nimport { styled as t } from \"@mui/material/styles\";\nimport { jsx as n } from \"react/jsx-runtime\";\nimport { color as r } from \"@pie-lib/render-ui\";\nimport i from \"@mui/material/FormControlLabel\";\nimport a from \"@mui/material/Checkbox\";\nimport { grey as o } from \"@mui/material/colors\";\n//#region src/checkbox.tsx\nvar s = t(i)(({ theme: e, mini: t }) => ({\n\tmargin: 0,\n\tmarginLeft: 0,\n\tpadding: 0,\n\t\"& .MuiFormControlLabel-label\": {\n\t\tfontSize: e.typography.fontSize - 1,\n\t\ttransform: \"translate(-4%, 2%)\",\n\t\tcolor: \"rgba(0,0,0,1.0)\",\n\t\t...t && {\n\t\t\tmarginLeft: e.spacing(1),\n\t\t\tcolor: o[700],\n\t\t\tfontSize: e.typography.fontSize - 3\n\t\t}\n\t}\n})), c = t(a)(({ theme: e, mini: t, error: n }) => ({\n\tcolor: `${r.tertiary()} !important`,\n\t...t && {\n\t\tmargin: 0,\n\t\tpadding: 0,\n\t\twidth: e.spacing(3),\n\t\theight: e.spacing(3)\n\t},\n\t...n && { color: `${e.palette.error.main} !important` }\n})), l = ({ mini: e, checked: t, onChange: r, value: i, label: a, error: o }) => /* @__PURE__ */ n(s, {\n\tmini: e,\n\tcontrol: /* @__PURE__ */ n(c, {\n\t\tchecked: t,\n\t\tonChange: r,\n\t\tvalue: i,\n\t\tmini: e,\n\t\terror: o\n\t}),\n\tlabel: a\n});\nl.propTypes = {\n\tmini: e.bool,\n\tchecked: e.bool.isRequired,\n\tonChange: e.func.isRequired,\n\tvalue: e.string,\n\tlabel: e.string.isRequired,\n\terror: e.bool\n}, l.defaultProps = {\n\tvalue: \"\",\n\tmini: !1,\n\terror: !1\n};\n//#endregion\nexport { l as default };\n","import e from \"react\";\nimport t from \"prop-types\";\nimport { styled as n } from \"@mui/material/styles\";\nimport { jsx as r } from \"react/jsx-runtime\";\nimport { isFinite as i } from \"lodash-es\";\nimport a from \"debug\";\nimport o from \"@mui/material/TextField\";\nimport s from \"@mui/material/InputAdornment\";\n//#region src/number-text-field.tsx\nvar c = a(\"@pie-lib:config-ui:number-text-field\"), l = n(o)(({ theme: e }) => ({\n\tmarginRight: e.spacing(1),\n\t\"& .MuiInputLabel-root\": {\n\t\twidth: \"auto\",\n\t\tminWidth: \"max-content\",\n\t\tmaxWidth: \"none\",\n\t\twhiteSpace: \"nowrap\",\n\t\toverflow: \"visible\",\n\t\ttransform: \"translate(0, 8px) scale(0.75)\",\n\t\ttransformOrigin: \"top left\",\n\t\tposition: \"relative\"\n\t},\n\t\"& .MuiInputBase-root, & .MuiInput-root, & .MuiFilledInput-root, & .MuiOutlinedInput-root\": {\n\t\theight: \"auto\",\n\t\tminHeight: \"auto\",\n\t\tmarginTop: 0\n\t},\n\t\"& .MuiInputBase-input\": {\n\t\theight: \"auto\",\n\t\tminHeight: \"auto\",\n\t\tpadding: \"6px 0 7px\"\n\t}\n})), u = (e, t) => {\n\tif (!i(e) && !i(t)) return 0;\n\tif (!i(e) && i(t)) return t;\n\tif (i(e)) return e;\n}, d = class extends e.Component {\n\tstatic propTypes = {\n\t\tdisabled: t.bool,\n\t\tclassName: t.string,\n\t\tinputClassName: t.string,\n\t\tonChange: t.func.isRequired,\n\t\tvalue: t.number,\n\t\tmin: t.number,\n\t\tmax: t.number,\n\t\tlabel: t.string,\n\t\tsuffix: t.string,\n\t\tshowErrorWhenOutsideRange: t.bool,\n\t\tdisableUnderline: t.bool,\n\t\tvariant: t.string\n\t};\n\tstatic defaultProps = { showErrorWhenOutsideRange: !1 };\n\tconstructor(e) {\n\t\tsuper(e);\n\t\tlet t = this.clamp(e.value);\n\t\tthis.state = { value: t }, t !== e.value && this.props.onChange({}, t), this.onChange = this.onChange.bind(this);\n\t}\n\tUNSAFE_componentWillReceiveProps(e) {\n\t\tlet t = this.clamp(e.value, e.min, e.max);\n\t\tthis.setState({ value: t });\n\t}\n\tclamp(e, t = this.props.min, n = this.props.max) {\n\t\treturn i(e) ? (i(n) && (e = Math.min(e, n)), i(t) && (e = Math.max(e, t)), e) : u(t, n);\n\t}\n\tonBlur = (e) => {\n\t\tlet t = e.target.value, n = parseFloat(t);\n\t\tc(\"rawNumber: \", n);\n\t\tlet r = this.clamp(n);\n\t\tc(\"number: \", r), r !== this.state.value && (c(\"trigger update...\"), this.setState({ value: r.toString() }, () => {\n\t\t\tthis.props.onChange(e, r);\n\t\t}));\n\t};\n\tonChange(e) {\n\t\tlet t = e.target.value;\n\t\tthis.setState({ value: t });\n\t}\n\terrorMessage = () => {\n\t\tlet { min: e, max: t } = this.props;\n\t\tif (e && t) return `The value must be between ${e} and ${t}`;\n\t\tif (e) return `The value must be greater than ${e}`;\n\t\tif (t) return `The value must be less than ${t}`;\n\t};\n\tgetError = () => {\n\t\tlet { value: e } = this.state, t = parseFloat(e);\n\t\tif (this.clamp(t) !== t) return this.errorMessage();\n\t};\n\trender() {\n\t\tlet { className: e, label: t, disabled: n, suffix: i, min: a, max: o, inputClassName: c, disableUnderline: u, showErrorWhenOutsideRange: d, variant: f } = this.props, p = d && this.getError();\n\t\treturn /* @__PURE__ */ r(l, {\n\t\t\tvariant: u ? \"filled\" : f || \"standard\",\n\t\t\tinputRef: (e) => {\n\t\t\t\tthis.inputRef = e;\n\t\t\t},\n\t\t\tdisabled: n,\n\t\t\tlabel: t,\n\t\t\tInputLabelProps: { shrink: !0 },\n\t\t\tvalue: this.state.value,\n\t\t\terror: !!p,\n\t\t\thelperText: p,\n\t\t\tonChange: this.onChange,\n\t\t\tonBlur: this.onBlur,\n\t\t\tonKeyDown: (e) => {\n\t\t\t\te.key === \"Enter\" && this.inputRef && this.inputRef.blur();\n\t\t\t},\n\t\t\ttype: \"number\",\n\t\t\tclassName: e,\n\t\t\tslotProps: { input: {\n\t\t\t\tendAdornment: i && /* @__PURE__ */ r(s, {\n\t\t\t\t\tposition: \"end\",\n\t\t\t\t\tchildren: i\n\t\t\t\t}),\n\t\t\t\tclassName: c,\n\t\t\t\tinputProps: {\n\t\t\t\t\tmin: a,\n\t\t\t\t\tmax: o\n\t\t\t\t}\n\t\t\t} },\n\t\t\tmargin: \"normal\"\n\t\t});\n\t}\n};\n//#endregion\nexport { d as default };\n","\"use client\";\n\nimport createSvgIcon from \"./utils/createSvgIcon.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M19 13H5v-2h14z\"\n}), 'Remove');","\"use client\";\n\nimport createSvgIcon from \"./utils/createSvgIcon.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z\"\n}), 'Add');","export var DEFAULT_CONFIG = {\n // minimum relative difference between two compared values,\n // used by all comparison functions\n epsilon: 1e-12,\n // type of default matrix output. Choose 'matrix' (default) or 'array'\n matrix: 'Matrix',\n // type of default number output. Choose 'number' (default) 'BigNumber', or 'Fraction\n number: 'number',\n // number of significant digits in BigNumbers\n precision: 64,\n // predictable output type of functions. When true, output type depends only\n // on the input types. When false (default), output type can vary depending\n // on input values. For example `math.sqrt(-4)` returns `complex('2i')` when\n // predictable is false, and returns `NaN` when true.\n predictable: false,\n // random seed for seeded pseudo random number generation\n // null = randomly seed\n randomSeed: null\n};","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n// type checks for all known types\n//\n// note that:\n//\n// - check by duck-typing on a property like `isUnit`, instead of checking instanceof.\n// instanceof cannot be used because that would not allow to pass data from\n// one instance of math.js to another since each has it's own instance of Unit.\n// - check the `isUnit` property via the constructor, so there will be no\n// matches for \"fake\" instances like plain objects with a property `isUnit`.\n// That is important for security reasons.\n// - It must not be possible to override the type checks used internally,\n// for security reasons, so these functions are not exposed in the expression\n// parser.\nexport function isNumber(x) {\n return typeof x === 'number';\n}\nexport function isBigNumber(x) {\n return x && x.constructor.prototype.isBigNumber === true || false;\n}\nexport function isComplex(x) {\n return x && _typeof(x) === 'object' && Object.getPrototypeOf(x).isComplex === true || false;\n}\nexport function isFraction(x) {\n return x && _typeof(x) === 'object' && Object.getPrototypeOf(x).isFraction === true || false;\n}\nexport function isUnit(x) {\n return x && x.constructor.prototype.isUnit === true || false;\n}\nexport function isString(x) {\n return typeof x === 'string';\n}\nexport var isArray = Array.isArray;\nexport function isMatrix(x) {\n return x && x.constructor.prototype.isMatrix === true || false;\n}\n/**\n * Test whether a value is a collection: an Array or Matrix\n * @param {*} x\n * @returns {boolean} isCollection\n */\n\nexport function isCollection(x) {\n return Array.isArray(x) || isMatrix(x);\n}\nexport function isDenseMatrix(x) {\n return x && x.isDenseMatrix && x.constructor.prototype.isMatrix === true || false;\n}\nexport function isSparseMatrix(x) {\n return x && x.isSparseMatrix && x.constructor.prototype.isMatrix === true || false;\n}\nexport function isRange(x) {\n return x && x.constructor.prototype.isRange === true || false;\n}\nexport function isIndex(x) {\n return x && x.constructor.prototype.isIndex === true || false;\n}\nexport function isBoolean(x) {\n return typeof x === 'boolean';\n}\nexport function isResultSet(x) {\n return x && x.constructor.prototype.isResultSet === true || false;\n}\nexport function isHelp(x) {\n return x && x.constructor.prototype.isHelp === true || false;\n}\nexport function isFunction(x) {\n return typeof x === 'function';\n}\nexport function isDate(x) {\n return x instanceof Date;\n}\nexport function isRegExp(x) {\n return x instanceof RegExp;\n}\nexport function isObject(x) {\n return !!(x && _typeof(x) === 'object' && x.constructor === Object && !isComplex(x) && !isFraction(x));\n}\nexport function isNull(x) {\n return x === null;\n}\nexport function isUndefined(x) {\n return x === undefined;\n}\nexport function isAccessorNode(x) {\n return x && x.isAccessorNode === true && x.constructor.prototype.isNode === true || false;\n}\nexport function isArrayNode(x) {\n return x && x.isArrayNode === true && x.constructor.prototype.isNode === true || false;\n}\nexport function isAssignmentNode(x) {\n return x && x.isAssignmentNode === true && x.constructor.prototype.isNode === true || false;\n}\nexport function isBlockNode(x) {\n return x && x.isBlockNode === true && x.constructor.prototype.isNode === true || false;\n}\nexport function isConditionalNode(x) {\n return x && x.isConditionalNode === true && x.constructor.prototype.isNode === true || false;\n}\nexport function isConstantNode(x) {\n return x && x.isConstantNode === true && x.constructor.prototype.isNode === true || false;\n}\nexport function isFunctionAssignmentNode(x) {\n return x && x.isFunctionAssignmentNode === true && x.constructor.prototype.isNode === true || false;\n}\nexport function isFunctionNode(x) {\n return x && x.isFunctionNode === true && x.constructor.prototype.isNode === true || false;\n}\nexport function isIndexNode(x) {\n return x && x.isIndexNode === true && x.constructor.prototype.isNode === true || false;\n}\nexport function isNode(x) {\n return x && x.isNode === true && x.constructor.prototype.isNode === true || false;\n}\nexport function isObjectNode(x) {\n return x && x.isObjectNode === true && x.constructor.prototype.isNode === true || false;\n}\nexport function isOperatorNode(x) {\n return x && x.isOperatorNode === true && x.constructor.prototype.isNode === true || false;\n}\nexport function isParenthesisNode(x) {\n return x && x.isParenthesisNode === true && x.constructor.prototype.isNode === true || false;\n}\nexport function isRangeNode(x) {\n return x && x.isRangeNode === true && x.constructor.prototype.isNode === true || false;\n}\nexport function isSymbolNode(x) {\n return x && x.isSymbolNode === true && x.constructor.prototype.isNode === true || false;\n}\nexport function isChain(x) {\n return x && x.constructor.prototype.isChain === true || false;\n}\nexport function typeOf(x) {\n var t = _typeof(x);\n\n if (t === 'object') {\n // JavaScript types\n if (x === null) return 'null';\n if (Array.isArray(x)) return 'Array';\n if (x instanceof Date) return 'Date';\n if (x instanceof RegExp) return 'RegExp'; // math.js types\n\n if (isBigNumber(x)) return 'BigNumber';\n if (isComplex(x)) return 'Complex';\n if (isFraction(x)) return 'Fraction';\n if (isMatrix(x)) return 'Matrix';\n if (isUnit(x)) return 'Unit';\n if (isIndex(x)) return 'Index';\n if (isRange(x)) return 'Range';\n if (isResultSet(x)) return 'ResultSet';\n if (isNode(x)) return x.type;\n if (isChain(x)) return 'Chain';\n if (isHelp(x)) return 'Help';\n return 'Object';\n }\n\n if (t === 'function') return 'Function';\n return t; // can be 'string', 'number', 'boolean', ...\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nimport { isBigNumber } from './is';\n/**\n * Clone an object\n *\n * clone(x)\n *\n * Can clone any primitive type, array, and object.\n * If x has a function clone, this function will be invoked to clone the object.\n *\n * @param {*} x\n * @return {*} clone\n */\n\nexport function clone(x) {\n var type = _typeof(x); // immutable primitive types\n\n\n if (type === 'number' || type === 'string' || type === 'boolean' || x === null || x === undefined) {\n return x;\n } // use clone function of the object when available\n\n\n if (typeof x.clone === 'function') {\n return x.clone();\n } // array\n\n\n if (Array.isArray(x)) {\n return x.map(function (value) {\n return clone(value);\n });\n }\n\n if (x instanceof Date) return new Date(x.valueOf());\n if (isBigNumber(x)) return x; // bignumbers are immutable\n\n if (x instanceof RegExp) throw new TypeError('Cannot clone ' + x); // TODO: clone a RegExp\n // object\n\n return mapObject(x, clone);\n}\n/**\n * Apply map to all properties of an object\n * @param {Object} object\n * @param {function} callback\n * @return {Object} Returns a copy of the object with mapped properties\n */\n\nexport function mapObject(object, callback) {\n var clone = {};\n\n for (var key in object) {\n if (hasOwnProperty(object, key)) {\n clone[key] = callback(object[key]);\n }\n }\n\n return clone;\n}\n/**\n * Extend object a with the properties of object b\n * @param {Object} a\n * @param {Object} b\n * @return {Object} a\n */\n\nexport function extend(a, b) {\n for (var prop in b) {\n if (hasOwnProperty(b, prop)) {\n a[prop] = b[prop];\n }\n }\n\n return a;\n}\n/**\n * Deep extend an object a with the properties of object b\n * @param {Object} a\n * @param {Object} b\n * @returns {Object}\n */\n\nexport function deepExtend(a, b) {\n // TODO: add support for Arrays to deepExtend\n if (Array.isArray(b)) {\n throw new TypeError('Arrays are not supported by deepExtend');\n }\n\n for (var prop in b) {\n // We check against prop not being in Object.prototype or Function.prototype\n // to prevent polluting for example Object.__proto__.\n if (hasOwnProperty(b, prop) && !(prop in Object.prototype) && !(prop in Function.prototype)) {\n if (b[prop] && b[prop].constructor === Object) {\n if (a[prop] === undefined) {\n a[prop] = {};\n }\n\n if (a[prop] && a[prop].constructor === Object) {\n deepExtend(a[prop], b[prop]);\n } else {\n a[prop] = b[prop];\n }\n } else if (Array.isArray(b[prop])) {\n throw new TypeError('Arrays are not supported by deepExtend');\n } else {\n a[prop] = b[prop];\n }\n }\n }\n\n return a;\n}\n/**\n * Deep test equality of all fields in two pairs of arrays or objects.\n * Compares values and functions strictly (ie. 2 is not the same as '2').\n * @param {Array | Object} a\n * @param {Array | Object} b\n * @returns {boolean}\n */\n\nexport function deepStrictEqual(a, b) {\n var prop, i, len;\n\n if (Array.isArray(a)) {\n if (!Array.isArray(b)) {\n return false;\n }\n\n if (a.length !== b.length) {\n return false;\n }\n\n for (i = 0, len = a.length; i < len; i++) {\n if (!deepStrictEqual(a[i], b[i])) {\n return false;\n }\n }\n\n return true;\n } else if (typeof a === 'function') {\n return a === b;\n } else if (a instanceof Object) {\n if (Array.isArray(b) || !(b instanceof Object)) {\n return false;\n }\n\n for (prop in a) {\n // noinspection JSUnfilteredForInLoop\n if (!(prop in b) || !deepStrictEqual(a[prop], b[prop])) {\n return false;\n }\n }\n\n for (prop in b) {\n // noinspection JSUnfilteredForInLoop\n if (!(prop in a) || !deepStrictEqual(a[prop], b[prop])) {\n return false;\n }\n }\n\n return true;\n } else {\n return a === b;\n }\n}\n/**\n * Recursively flatten a nested object.\n * @param {Object} nestedObject\n * @return {Object} Returns the flattened object\n */\n\nexport function deepFlatten(nestedObject) {\n var flattenedObject = {};\n\n _deepFlatten(nestedObject, flattenedObject);\n\n return flattenedObject;\n} // helper function used by deepFlatten\n\nfunction _deepFlatten(nestedObject, flattenedObject) {\n for (var prop in nestedObject) {\n if (hasOwnProperty(nestedObject, prop)) {\n var value = nestedObject[prop];\n\n if (_typeof(value) === 'object' && value !== null) {\n _deepFlatten(value, flattenedObject);\n } else {\n flattenedObject[prop] = value;\n }\n }\n }\n}\n/**\n * Test whether the current JavaScript engine supports Object.defineProperty\n * @returns {boolean} returns true if supported\n */\n\n\nexport function canDefineProperty() {\n // test needed for broken IE8 implementation\n try {\n if (Object.defineProperty) {\n Object.defineProperty({}, 'x', {\n get: function get() {}\n });\n return true;\n }\n } catch (e) {}\n\n return false;\n}\n/**\n * Attach a lazy loading property to a constant.\n * The given function `fn` is called once when the property is first requested.\n *\n * @param {Object} object Object where to add the property\n * @param {string} prop Property name\n * @param {Function} valueResolver Function returning the property value. Called\n * without arguments.\n */\n\nexport function lazy(object, prop, valueResolver) {\n var _uninitialized = true;\n\n var _value;\n\n Object.defineProperty(object, prop, {\n get: function get() {\n if (_uninitialized) {\n _value = valueResolver();\n _uninitialized = false;\n }\n\n return _value;\n },\n set: function set(value) {\n _value = value;\n _uninitialized = false;\n },\n configurable: true,\n enumerable: true\n });\n}\n/**\n * Traverse a path into an object.\n * When a namespace is missing, it will be created\n * @param {Object} object\n * @param {string | string[]} path A dot separated string like 'name.space'\n * @return {Object} Returns the object at the end of the path\n */\n\nexport function traverse(object, path) {\n if (path && typeof path === 'string') {\n return traverse(object, path.split('.'));\n }\n\n var obj = object;\n\n if (path) {\n for (var i = 0; i < path.length; i++) {\n var key = path[i];\n\n if (!(key in obj)) {\n obj[key] = {};\n }\n\n obj = obj[key];\n }\n }\n\n return obj;\n}\n/**\n * A safe hasOwnProperty\n * @param {Object} object\n * @param {string} property\n */\n\nexport function hasOwnProperty(object, property) {\n return object && Object.hasOwnProperty.call(object, property);\n}\n/**\n * Test whether an object is a factory. a factory has fields:\n *\n * - factory: function (type: Object, config: Object, load: function, typed: function [, math: Object]) (required)\n * - name: string (optional)\n * - path: string A dot separated path (optional)\n * - math: boolean If true (false by default), the math namespace is passed\n * as fifth argument of the factory function\n *\n * @param {*} object\n * @returns {boolean}\n */\n\nexport function isLegacyFactory(object) {\n return object && typeof object.factory === 'function';\n}\n/**\n * Get a nested property from an object\n * @param {Object} object\n * @param {string | string[]} path\n * @returns {Object}\n */\n\nexport function get(object, path) {\n if (typeof path === 'string') {\n if (isPath(path)) {\n return get(object, path.split('.'));\n } else {\n return object[path];\n }\n }\n\n var child = object;\n\n for (var i = 0; i < path.length; i++) {\n var key = path[i];\n child = child ? child[key] : undefined;\n }\n\n return child;\n}\n/**\n * Set a nested property in an object\n * Mutates the object itself\n * If the path doesn't exist, it will be created\n * @param {Object} object\n * @param {string | string[]} path\n * @param {*} value\n * @returns {Object}\n */\n\nexport function set(object, path, value) {\n if (typeof path === 'string') {\n if (isPath(path)) {\n return set(object, path.split('.'), value);\n } else {\n object[path] = value;\n return object;\n }\n }\n\n var child = object;\n\n for (var i = 0; i < path.length - 1; i++) {\n var key = path[i];\n\n if (child[key] === undefined) {\n child[key] = {};\n }\n\n child = child[key];\n }\n\n if (path.length > 0) {\n var lastKey = path[path.length - 1];\n child[lastKey] = value;\n }\n\n return object;\n}\n/**\n * Create an object composed of the picked object properties\n * @param {Object} object\n * @param {string[]} properties\n * @param {function} [transform] Optional value to transform a value when picking it\n * @return {Object}\n */\n\nexport function pick(object, properties, transform) {\n var copy = {};\n\n for (var i = 0; i < properties.length; i++) {\n var key = properties[i];\n var value = get(object, key);\n\n if (value !== undefined) {\n set(copy, key, transform ? transform(value, key) : value);\n }\n }\n\n return copy;\n}\n/**\n * Shallow version of pick, creating an object composed of the picked object properties\n * but not for nested properties\n * @param {Object} object\n * @param {string[]} properties\n * @return {Object}\n */\n\nexport function pickShallow(object, properties) {\n var copy = {};\n\n for (var i = 0; i < properties.length; i++) {\n var key = properties[i];\n var value = object[key];\n\n if (value !== undefined) {\n copy[key] = value;\n }\n }\n\n return copy;\n}\nexport function values(object) {\n return Object.keys(object).map(function (key) {\n return object[key];\n });\n} // helper function to test whether a string contains a path like 'user.name'\n\nfunction isPath(str) {\n return str.indexOf('.') !== -1;\n}","import { clone, mapObject, deepExtend } from '../../utils/object';\nimport { DEFAULT_CONFIG } from '../config';\nexport var MATRIX_OPTIONS = ['Matrix', 'Array']; // valid values for option matrix\n\nexport var NUMBER_OPTIONS = ['number', 'BigNumber', 'Fraction']; // valid values for option number\n\nexport function configFactory(config, emit) {\n /**\n * Set configuration options for math.js, and get current options.\n * Will emit a 'config' event, with arguments (curr, prev, changes).\n *\n * This function is only available on a mathjs instance created using `create`.\n *\n * Syntax:\n *\n * math.config(config: Object): Object\n *\n * Examples:\n *\n *\n * import { create, all } from 'mathjs'\n *\n * // create a mathjs instance\n * const math = create(all)\n *\n * math.config().number // outputs 'number'\n * math.evaluate('0.4') // outputs number 0.4\n * math.config({number: 'Fraction'})\n * math.evaluate('0.4') // outputs Fraction 2/5\n *\n * @param {Object} [options] Available options:\n * {number} epsilon\n * Minimum relative difference between two\n * compared values, used by all comparison functions.\n * {string} matrix\n * A string 'Matrix' (default) or 'Array'.\n * {string} number\n * A string 'number' (default), 'BigNumber', or 'Fraction'\n * {number} precision\n * The number of significant digits for BigNumbers.\n * Not applicable for Numbers.\n * {string} parenthesis\n * How to display parentheses in LaTeX and string\n * output.\n * {string} randomSeed\n * Random seed for seeded pseudo random number generator.\n * Set to null to randomly seed.\n * @return {Object} Returns the current configuration\n */\n function _config(options) {\n if (options) {\n var prev = mapObject(config, clone); // validate some of the options\n\n validateOption(options, 'matrix', MATRIX_OPTIONS);\n validateOption(options, 'number', NUMBER_OPTIONS); // merge options\n\n deepExtend(config, options);\n var curr = mapObject(config, clone);\n var changes = mapObject(options, clone); // emit 'config' event\n\n emit('config', curr, prev, changes);\n return curr;\n } else {\n return mapObject(config, clone);\n }\n } // attach the valid options to the function so they can be extended\n\n\n _config.MATRIX_OPTIONS = MATRIX_OPTIONS;\n _config.NUMBER_OPTIONS = NUMBER_OPTIONS; // attach the config properties as readonly properties to the config function\n\n Object.keys(DEFAULT_CONFIG).forEach(function (key) {\n Object.defineProperty(_config, key, {\n get: function get() {\n return config[key];\n },\n enumerable: true,\n configurable: true\n });\n });\n return _config;\n}\n/**\n * Test whether an Array contains a specific item.\n * @param {Array.<string>} array\n * @param {string} item\n * @return {boolean}\n */\n\nfunction contains(array, item) {\n return array.indexOf(item) !== -1;\n}\n/**\n * Validate an option\n * @param {Object} options Object with options\n * @param {string} name Name of the option to validate\n * @param {Array.<string>} values Array with valid values for this option\n */\n\n\nfunction validateOption(options, name, values) {\n if (options[name] !== undefined && !contains(values, options[name])) {\n // unknown value\n console.warn('Warning: Unknown value \"' + options[name] + '\" for configuration option \"' + name + '\". ' + 'Available options: ' + values.map(function (value) {\n return JSON.stringify(value);\n }).join(', ') + '.');\n }\n}","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nimport { DEFAULT_CONFIG } from '../core/config';\nimport { MATRIX_OPTIONS, NUMBER_OPTIONS } from '../core/function/config'; // create a read-only version of config\n\nexport var config = /* #__PURE__ */function config(options) {\n if (options) {\n throw new Error('The global config is readonly. \\n' + 'Please create a mathjs instance if you want to change the default configuration. \\n' + 'Example:\\n' + '\\n' + ' import { create, all } from \\'mathjs\\';\\n' + ' const mathjs = create(all);\\n' + ' mathjs.config({ number: \\'BigNumber\\' });\\n');\n }\n\n return Object.freeze(DEFAULT_CONFIG);\n};\n\n_extends(config, DEFAULT_CONFIG, {\n MATRIX_OPTIONS: MATRIX_OPTIONS,\n NUMBER_OPTIONS: NUMBER_OPTIONS\n});","/**\n * typed-function\n *\n * Type checking for JavaScript functions\n *\n * https://github.com/josdejong/typed-function\n */\n'use strict';\n\n(function (root, factory) {\n if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module.\n define([], factory);\n } else if (typeof exports === 'object') {\n // OldNode. Does not work with strict CommonJS, but\n // only CommonJS-like environments that support module.exports,\n // like OldNode.\n module.exports = factory();\n } else {\n // Browser globals (root is window)\n root.typed = factory();\n }\n}(this, function () {\n\n function ok () {\n return true;\n }\n\n function notOk () {\n return false;\n }\n\n function undef () {\n return undefined;\n }\n\n /**\n * @typedef {{\n * params: Param[],\n * fn: function\n * }} Signature\n *\n * @typedef {{\n * types: Type[],\n * restParam: boolean\n * }} Param\n *\n * @typedef {{\n * name: string,\n * typeIndex: number,\n * test: function,\n * conversion?: ConversionDef,\n * conversionIndex: number,\n * }} Type\n *\n * @typedef {{\n * from: string,\n * to: string,\n * convert: function (*) : *\n * }} ConversionDef\n *\n * @typedef {{\n * name: string,\n * test: function(*) : boolean\n * }} TypeDef\n */\n\n // create a new instance of typed-function\n function create () {\n // data type tests\n var _types = [\n { name: 'number', test: function (x) { return typeof x === 'number' } },\n { name: 'string', test: function (x) { return typeof x === 'string' } },\n { name: 'boolean', test: function (x) { return typeof x === 'boolean' } },\n { name: 'Function', test: function (x) { return typeof x === 'function'} },\n { name: 'Array', test: Array.isArray },\n { name: 'Date', test: function (x) { return x instanceof Date } },\n { name: 'RegExp', test: function (x) { return x instanceof RegExp } },\n { name: 'Object', test: function (x) {\n return typeof x === 'object' && x !== null && x.constructor === Object\n }},\n { name: 'null', test: function (x) { return x === null } },\n { name: 'undefined', test: function (x) { return x === undefined } }\n ];\n\n var anyType = {\n name: 'any',\n test: ok\n }\n\n // types which need to be ignored\n var _ignore = [];\n\n // type conversions\n var _conversions = [];\n\n // This is a temporary object, will be replaced with a typed function at the end\n var typed = {\n types: _types,\n conversions: _conversions,\n ignore: _ignore\n };\n\n /**\n * Find the test function for a type\n * @param {String} typeName\n * @return {TypeDef} Returns the type definition when found,\n * Throws a TypeError otherwise\n */\n function findTypeByName (typeName) {\n var entry = findInArray(typed.types, function (entry) {\n return entry.name === typeName;\n });\n\n if (entry) {\n return entry;\n }\n\n if (typeName === 'any') { // special baked-in case 'any'\n return anyType;\n }\n\n var hint = findInArray(typed.types, function (entry) {\n return entry.name.toLowerCase() === typeName.toLowerCase();\n });\n\n throw new TypeError('Unknown type \"' + typeName + '\"' +\n (hint ? ('. Did you mean \"' + hint.name + '\"?') : ''));\n }\n\n /**\n * Find the index of a type definition. Handles special case 'any'\n * @param {TypeDef} type\n * @return {number}\n */\n function findTypeIndex(type) {\n if (type === anyType) {\n return 999;\n }\n\n return typed.types.indexOf(type);\n }\n\n /**\n * Find a type that matches a value.\n * @param {*} value\n * @return {string} Returns the name of the first type for which\n * the type test matches the value.\n */\n function findTypeName(value) {\n var entry = findInArray(typed.types, function (entry) {\n return entry.test(value);\n });\n\n if (entry) {\n return entry.name;\n }\n\n throw new TypeError('Value has unknown type. Value: ' + value);\n }\n\n /**\n * Find a specific signature from a (composed) typed function, for example:\n *\n * typed.find(fn, ['number', 'string'])\n * typed.find(fn, 'number, string')\n *\n * Function find only only works for exact matches.\n *\n * @param {Function} fn A typed-function\n * @param {string | string[]} signature Signature to be found, can be\n * an array or a comma separated string.\n * @return {Function} Returns the matching signature, or\n * throws an error when no signature\n * is found.\n */\n function find (fn, signature) {\n if (!fn.signatures) {\n throw new TypeError('Function is no typed-function');\n }\n\n // normalize input\n var arr;\n if (typeof signature === 'string') {\n arr = signature.split(',');\n for (var i = 0; i < arr.length; i++) {\n arr[i] = arr[i].trim();\n }\n }\n else if (Array.isArray(signature)) {\n arr = signature;\n }\n else {\n throw new TypeError('String array or a comma separated string expected');\n }\n\n var str = arr.join(',');\n\n // find an exact match\n var match = fn.signatures[str];\n if (match) {\n return match;\n }\n\n // TODO: extend find to match non-exact signatures\n\n throw new TypeError('Signature not found (signature: ' + (fn.name || 'unnamed') + '(' + arr.join(', ') + '))');\n }\n\n /**\n * Convert a given value to another data type.\n * @param {*} value\n * @param {string} type\n */\n function convert (value, type) {\n var from = findTypeName(value);\n\n // check conversion is needed\n if (type === from) {\n return value;\n }\n\n for (var i = 0; i < typed.conversions.length; i++) {\n var conversion = typed.conversions[i];\n if (conversion.from === from && conversion.to === type) {\n return conversion.convert(value);\n }\n }\n\n throw new Error('Cannot convert from ' + from + ' to ' + type);\n }\n \n /**\n * Stringify parameters in a normalized way\n * @param {Param[]} params\n * @return {string}\n */\n function stringifyParams (params) {\n return params\n .map(function (param) {\n var typeNames = param.types.map(getTypeName);\n\n return (param.restParam ? '...' : '') + typeNames.join('|');\n })\n .join(',');\n }\n\n /**\n * Parse a parameter, like \"...number | boolean\"\n * @param {string} param\n * @param {ConversionDef[]} conversions\n * @return {Param} param\n */\n function parseParam (param, conversions) {\n var restParam = param.indexOf('...') === 0;\n var types = (!restParam)\n ? param\n : (param.length > 3)\n ? param.slice(3)\n : 'any';\n\n var typeNames = types.split('|').map(trim)\n .filter(notEmpty)\n .filter(notIgnore);\n\n var matchingConversions = filterConversions(conversions, typeNames);\n\n var exactTypes = typeNames.map(function (typeName) {\n var type = findTypeByName(typeName);\n\n return {\n name: typeName,\n typeIndex: findTypeIndex(type),\n test: type.test,\n conversion: null,\n conversionIndex: -1\n };\n });\n\n var convertibleTypes = matchingConversions.map(function (conversion) {\n var type = findTypeByName(conversion.from);\n\n return {\n name: conversion.from,\n typeIndex: findTypeIndex(type),\n test: type.test,\n conversion: conversion,\n conversionIndex: conversions.indexOf(conversion)\n };\n });\n\n return {\n types: exactTypes.concat(convertibleTypes),\n restParam: restParam\n };\n }\n\n /**\n * Parse a signature with comma separated parameters,\n * like \"number | boolean, ...string\"\n * @param {string} signature\n * @param {function} fn\n * @param {ConversionDef[]} conversions\n * @return {Signature | null} signature\n */\n function parseSignature (signature, fn, conversions) {\n var params = [];\n\n if (signature.trim() !== '') {\n params = signature\n .split(',')\n .map(trim)\n .map(function (param, index, array) {\n var parsedParam = parseParam(param, conversions);\n\n if (parsedParam.restParam && (index !== array.length - 1)) {\n throw new SyntaxError('Unexpected rest parameter \"' + param + '\": ' +\n 'only allowed for the last parameter');\n }\n\n return parsedParam;\n });\n }\n\n if (params.some(isInvalidParam)) {\n // invalid signature: at least one parameter has no types\n // (they may have been filtered)\n return null;\n }\n\n return {\n params: params,\n fn: fn\n };\n }\n\n /**\n * Test whether a set of params contains a restParam\n * @param {Param[]} params\n * @return {boolean} Returns true when the last parameter is a restParam\n */\n function hasRestParam(params) {\n var param = last(params)\n return param ? param.restParam : false;\n }\n\n /**\n * Test whether a parameter contains conversions\n * @param {Param} param\n * @return {boolean} Returns true when at least one of the parameters\n * contains a conversion.\n */\n function hasConversions(param) {\n return param.types.some(function (type) {\n return type.conversion != null;\n });\n }\n\n /**\n * Create a type test for a single parameter, which can have one or multiple\n * types.\n * @param {Param} param\n * @return {function(x: *) : boolean} Returns a test function\n */\n function compileTest(param) {\n if (!param || param.types.length === 0) {\n // nothing to do\n return ok;\n }\n else if (param.types.length === 1) {\n return findTypeByName(param.types[0].name).test;\n }\n else if (param.types.length === 2) {\n var test0 = findTypeByName(param.types[0].name).test;\n var test1 = findTypeByName(param.types[1].name).test;\n return function or(x) {\n return test0(x) || test1(x);\n }\n }\n else { // param.types.length > 2\n var tests = param.types.map(function (type) {\n return findTypeByName(type.name).test;\n })\n return function or(x) {\n for (var i = 0; i < tests.length; i++) {\n if (tests[i](x)) {\n return true;\n }\n }\n return false;\n }\n }\n }\n\n /**\n * Create a test for all parameters of a signature\n * @param {Param[]} params\n * @return {function(args: Array<*>) : boolean}\n */\n function compileTests(params) {\n var tests, test0, test1;\n\n if (hasRestParam(params)) {\n // variable arguments like '...number'\n tests = initial(params).map(compileTest);\n var varIndex = tests.length;\n var lastTest = compileTest(last(params));\n var testRestParam = function (args) {\n for (var i = varIndex; i < args.length; i++) {\n if (!lastTest(args[i])) {\n return false;\n }\n }\n return true;\n }\n\n return function testArgs(args) {\n for (var i = 0; i < tests.length; i++) {\n if (!tests[i](args[i])) {\n return false;\n }\n }\n return testRestParam(args) && (args.length >= varIndex + 1);\n };\n }\n else {\n // no variable arguments\n if (params.length === 0) {\n return function testArgs(args) {\n return args.length === 0;\n };\n }\n else if (params.length === 1) {\n test0 = compileTest(params[0]);\n return function testArgs(args) {\n return test0(args[0]) && args.length === 1;\n };\n }\n else if (params.length === 2) {\n test0 = compileTest(params[0]);\n test1 = compileTest(params[1]);\n return function testArgs(args) {\n return test0(args[0]) && test1(args[1]) && args.length === 2;\n };\n }\n else { // arguments.length > 2\n tests = params.map(compileTest);\n return function testArgs(args) {\n for (var i = 0; i < tests.length; i++) {\n if (!tests[i](args[i])) {\n return false;\n }\n }\n return args.length === tests.length;\n };\n }\n }\n }\n\n /**\n * Find the parameter at a specific index of a signature.\n * Handles rest parameters.\n * @param {Signature} signature\n * @param {number} index\n * @return {Param | null} Returns the matching parameter when found,\n * null otherwise.\n */\n function getParamAtIndex(signature, index) {\n return index < signature.params.length\n ? signature.params[index]\n : hasRestParam(signature.params)\n ? last(signature.params)\n : null\n }\n\n /**\n * Get all type names of a parameter\n * @param {Signature} signature\n * @param {number} index\n * @param {boolean} excludeConversions\n * @return {string[]} Returns an array with type names\n */\n function getExpectedTypeNames (signature, index, excludeConversions) {\n var param = getParamAtIndex(signature, index);\n var types = param\n ? excludeConversions\n ? param.types.filter(isExactType)\n : param.types\n : [];\n\n return types.map(getTypeName);\n }\n\n /**\n * Returns the name of a type\n * @param {Type} type\n * @return {string} Returns the type name\n */\n function getTypeName(type) {\n return type.name;\n }\n\n /**\n * Test whether a type is an exact type or conversion\n * @param {Type} type\n * @return {boolean} Returns true when\n */\n function isExactType(type) {\n return type.conversion === null || type.conversion === undefined;\n }\n\n /**\n * Helper function for creating error messages: create an array with\n * all available types on a specific argument index.\n * @param {Signature[]} signatures\n * @param {number} index\n * @return {string[]} Returns an array with available types\n */\n function mergeExpectedParams(signatures, index) {\n var typeNames = uniq(flatMap(signatures, function (signature) {\n return getExpectedTypeNames(signature, index, false);\n }));\n\n return (typeNames.indexOf('any') !== -1) ? ['any'] : typeNames;\n }\n\n /**\n * Create\n * @param {string} name The name of the function\n * @param {array.<*>} args The actual arguments passed to the function\n * @param {Signature[]} signatures A list with available signatures\n * @return {TypeError} Returns a type error with additional data\n * attached to it in the property `data`\n */\n function createError(name, args, signatures) {\n var err, expected;\n var _name = name || 'unnamed';\n\n // test for wrong type at some index\n var matchingSignatures = signatures;\n var index;\n for (index = 0; index < args.length; index++) {\n var nextMatchingDefs = matchingSignatures.filter(function (signature) {\n var test = compileTest(getParamAtIndex(signature, index));\n return (index < signature.params.length || hasRestParam(signature.params)) &&\n test(args[index]);\n });\n\n if (nextMatchingDefs.length === 0) {\n // no matching signatures anymore, throw error \"wrong type\"\n expected = mergeExpectedParams(matchingSignatures, index);\n if (expected.length > 0) {\n var actualType = findTypeName(args[index]);\n\n err = new TypeError('Unexpected type of argument in function ' + _name +\n ' (expected: ' + expected.join(' or ') +\n ', actual: ' + actualType + ', index: ' + index + ')');\n err.data = {\n category: 'wrongType',\n fn: _name,\n index: index,\n actual: actualType,\n expected: expected\n }\n return err;\n }\n }\n else {\n matchingSignatures = nextMatchingDefs;\n }\n }\n\n // test for too few arguments\n var lengths = matchingSignatures.map(function (signature) {\n return hasRestParam(signature.params) ? Infinity : signature.params.length;\n });\n if (args.length < Math.min.apply(null, lengths)) {\n expected = mergeExpectedParams(matchingSignatures, index);\n err = new TypeError('Too few arguments in function ' + _name +\n ' (expected: ' + expected.join(' or ') +\n ', index: ' + args.length + ')');\n err.data = {\n category: 'tooFewArgs',\n fn: _name,\n index: args.length,\n expected: expected\n }\n return err;\n }\n\n // test for too many arguments\n var maxLength = Math.max.apply(null, lengths);\n if (args.length > maxLength) {\n err = new TypeError('Too many arguments in function ' + _name +\n ' (expected: ' + maxLength + ', actual: ' + args.length + ')');\n err.data = {\n category: 'tooManyArgs',\n fn: _name,\n index: args.length,\n expectedLength: maxLength\n }\n return err;\n }\n\n err = new TypeError('Arguments of type \"' + args.join(', ') +\n '\" do not match any of the defined signatures of function ' + _name + '.');\n err.data = {\n category: 'mismatch',\n actual: args.map(findTypeName)\n }\n return err;\n }\n\n /**\n * Find the lowest index of all exact types of a parameter (no conversions)\n * @param {Param} param\n * @return {number} Returns the index of the lowest type in typed.types\n */\n function getLowestTypeIndex (param) {\n var min = 999;\n\n for (var i = 0; i < param.types.length; i++) {\n if (isExactType(param.types[i])) {\n min = Math.min(min, param.types[i].typeIndex);\n }\n }\n\n return min;\n }\n\n /**\n * Find the lowest index of the conversion of all types of the parameter\n * having a conversion\n * @param {Param} param\n * @return {number} Returns the lowest index of the conversions of this type\n */\n function getLowestConversionIndex (param) {\n var min = 999;\n\n for (var i = 0; i < param.types.length; i++) {\n if (!isExactType(param.types[i])) {\n min = Math.min(min, param.types[i].conversionIndex);\n }\n }\n\n return min;\n }\n\n /**\n * Compare two params\n * @param {Param} param1\n * @param {Param} param2\n * @return {number} returns a negative number when param1 must get a lower\n * index than param2, a positive number when the opposite,\n * or zero when both are equal\n */\n function compareParams (param1, param2) {\n var c;\n\n // compare having a rest parameter or not\n c = param1.restParam - param2.restParam;\n if (c !== 0) {\n return c;\n }\n\n // compare having conversions or not\n c = hasConversions(param1) - hasConversions(param2);\n if (c !== 0) {\n return c;\n }\n\n // compare the index of the types\n c = getLowestTypeIndex(param1) - getLowestTypeIndex(param2);\n if (c !== 0) {\n return c;\n }\n\n // compare the index of any conversion\n return getLowestConversionIndex(param1) - getLowestConversionIndex(param2);\n }\n\n /**\n * Compare two signatures\n * @param {Signature} signature1\n * @param {Signature} signature2\n * @return {number} returns a negative number when param1 must get a lower\n * index than param2, a positive number when the opposite,\n * or zero when both are equal\n */\n function compareSignatures (signature1, signature2) {\n var len = Math.min(signature1.params.length, signature2.params.length);\n var i;\n var c;\n\n // compare whether the params have conversions at all or not\n c = signature1.params.some(hasConversions) - signature2.params.some(hasConversions)\n if (c !== 0) {\n return c;\n }\n\n // next compare whether the params have conversions one by one\n for (i = 0; i < len; i++) {\n c = hasConversions(signature1.params[i]) - hasConversions(signature2.params[i]);\n if (c !== 0) {\n return c;\n }\n }\n\n // compare the types of the params one by one\n for (i = 0; i < len; i++) {\n c = compareParams(signature1.params[i], signature2.params[i]);\n if (c !== 0) {\n return c;\n }\n }\n\n // compare the number of params\n return signature1.params.length - signature2.params.length;\n }\n\n /**\n * Get params containing all types that can be converted to the defined types.\n *\n * @param {ConversionDef[]} conversions\n * @param {string[]} typeNames\n * @return {ConversionDef[]} Returns the conversions that are available\n * for every type (if any)\n */\n function filterConversions(conversions, typeNames) {\n var matches = {};\n\n conversions.forEach(function (conversion) {\n if (typeNames.indexOf(conversion.from) === -1 &&\n typeNames.indexOf(conversion.to) !== -1 &&\n !matches[conversion.from]) {\n matches[conversion.from] = conversion;\n }\n });\n\n return Object.keys(matches).map(function (from) {\n return matches[from];\n });\n }\n\n /**\n * Preprocess arguments before calling the original function:\n * - if needed convert the parameters\n * - in case of rest parameters, move the rest parameters into an Array\n * @param {Param[]} params\n * @param {function} fn\n * @return {function} Returns a wrapped function\n */\n function compileArgsPreprocessing(params, fn) {\n var fnConvert = fn;\n\n // TODO: can we make this wrapper function smarter/simpler?\n\n if (params.some(hasConversions)) {\n var restParam = hasRestParam(params);\n var compiledConversions = params.map(compileArgConversion)\n\n fnConvert = function convertArgs() {\n var args = [];\n var last = restParam ? arguments.length - 1 : arguments.length;\n for (var i = 0; i < last; i++) {\n args[i] = compiledConversions[i](arguments[i]);\n }\n if (restParam) {\n args[last] = arguments[last].map(compiledConversions[last]);\n }\n\n return fn.apply(this, args);\n }\n }\n\n var fnPreprocess = fnConvert;\n if (hasRestParam(params)) {\n var offset = params.length - 1;\n\n fnPreprocess = function preprocessRestParams () {\n return fnConvert.apply(this,\n slice(arguments, 0, offset).concat([slice(arguments, offset)]));\n }\n }\n\n return fnPreprocess;\n }\n\n /**\n * Compile conversion for a parameter to the right type\n * @param {Param} param\n * @return {function} Returns the wrapped function that will convert arguments\n *\n */\n function compileArgConversion(param) {\n var test0, test1, conversion0, conversion1;\n var tests = [];\n var conversions = [];\n\n param.types.forEach(function (type) {\n if (type.conversion) {\n tests.push(findTypeByName(type.conversion.from).test);\n conversions.push(type.conversion.convert);\n }\n });\n\n // create optimized conversion functions depending on the number of conversions\n switch (conversions.length) {\n case 0:\n return function convertArg(arg) {\n return arg;\n }\n\n case 1:\n test0 = tests[0]\n conversion0 = conversions[0];\n return function convertArg(arg) {\n if (test0(arg)) {\n return conversion0(arg)\n }\n return arg;\n }\n\n case 2:\n test0 = tests[0]\n test1 = tests[1]\n conversion0 = conversions[0];\n conversion1 = conversions[1];\n return function convertArg(arg) {\n if (test0(arg)) {\n return conversion0(arg)\n }\n if (test1(arg)) {\n return conversion1(arg)\n }\n return arg;\n }\n\n default:\n return function convertArg(arg) {\n for (var i = 0; i < conversions.length; i++) {\n if (tests[i](arg)) {\n return conversions[i](arg);\n }\n }\n return arg;\n }\n }\n }\n\n /**\n * Convert an array with signatures into a map with signatures,\n * where signatures with union types are split into separate signatures\n *\n * Throws an error when there are conflicting types\n *\n * @param {Signature[]} signatures\n * @return {Object.<string, function>} Returns a map with signatures\n * as key and the original function\n * of this signature as value.\n */\n function createSignaturesMap(signatures) {\n var signaturesMap = {};\n signatures.forEach(function (signature) {\n if (!signature.params.some(hasConversions)) {\n splitParams(signature.params, true).forEach(function (params) {\n signaturesMap[stringifyParams(params)] = signature.fn;\n });\n }\n });\n\n return signaturesMap;\n }\n\n /**\n * Split params with union types in to separate params.\n *\n * For example:\n *\n * splitParams([['Array', 'Object'], ['string', 'RegExp'])\n * // returns:\n * // [\n * // ['Array', 'string'],\n * // ['Array', 'RegExp'],\n * // ['Object', 'string'],\n * // ['Object', 'RegExp']\n * // ]\n *\n * @param {Param[]} params\n * @param {boolean} ignoreConversionTypes\n * @return {Param[]}\n */\n function splitParams(params, ignoreConversionTypes) {\n function _splitParams(params, index, types) {\n if (index < params.length) {\n var param = params[index]\n var filteredTypes = ignoreConversionTypes\n ? param.types.filter(isExactType)\n : param.types;\n var typeGroups\n\n if (param.restParam) {\n // split the types of a rest parameter in two:\n // one with only exact types, and one with exact types and conversions\n var exactTypes = filteredTypes.filter(isExactType)\n typeGroups = exactTypes.length < filteredTypes.length\n ? [exactTypes, filteredTypes]\n : [filteredTypes]\n\n }\n else {\n // split all the types of a regular parameter into one type per group\n typeGroups = filteredTypes.map(function (type) {\n return [type]\n })\n }\n\n // recurse over the groups with types\n return flatMap(typeGroups, function (typeGroup) {\n return _splitParams(params, index + 1, types.concat([typeGroup]));\n });\n\n }\n else {\n // we've reached the end of the parameters. Now build a new Param\n var splittedParams = types.map(function (type, typeIndex) {\n return {\n types: type,\n restParam: (typeIndex === params.length - 1) && hasRestParam(params)\n }\n });\n\n return [splittedParams];\n }\n }\n\n return _splitParams(params, 0, []);\n }\n\n /**\n * Test whether two signatures have a conflicting signature\n * @param {Signature} signature1\n * @param {Signature} signature2\n * @return {boolean} Returns true when the signatures conflict, false otherwise.\n */\n function hasConflictingParams(signature1, signature2) {\n var ii = Math.max(signature1.params.length, signature2.params.length);\n\n for (var i = 0; i < ii; i++) {\n var typesNames1 = getExpectedTypeNames(signature1, i, true);\n var typesNames2 = getExpectedTypeNames(signature2, i, true);\n\n if (!hasOverlap(typesNames1, typesNames2)) {\n return false;\n }\n }\n\n var len1 = signature1.params.length;\n var len2 = signature2.params.length;\n var restParam1 = hasRestParam(signature1.params);\n var restParam2 = hasRestParam(signature2.params);\n\n return restParam1\n ? restParam2 ? (len1 === len2) : (len2 >= len1)\n : restParam2 ? (len1 >= len2) : (len1 === len2)\n }\n\n /**\n * Create a typed function\n * @param {String} name The name for the typed function\n * @param {Object.<string, function>} signaturesMap\n * An object with one or\n * multiple signatures as key, and the\n * function corresponding to the\n * signature as value.\n * @return {function} Returns the created typed function.\n */\n function createTypedFunction(name, signaturesMap) {\n if (Object.keys(signaturesMap).length === 0) {\n throw new SyntaxError('No signatures provided');\n }\n\n // parse the signatures, and check for conflicts\n var parsedSignatures = [];\n Object.keys(signaturesMap)\n .map(function (signature) {\n return parseSignature(signature, signaturesMap[signature], typed.conversions);\n })\n .filter(notNull)\n .forEach(function (parsedSignature) {\n // check whether this parameter conflicts with already parsed signatures\n var conflictingSignature = findInArray(parsedSignatures, function (s) {\n return hasConflictingParams(s, parsedSignature)\n });\n if (conflictingSignature) {\n throw new TypeError('Conflicting signatures \"' +\n stringifyParams(conflictingSignature.params) + '\" and \"' +\n stringifyParams(parsedSignature.params) + '\".');\n }\n\n parsedSignatures.push(parsedSignature);\n });\n\n // split and filter the types of the signatures, and then order them\n var signatures = flatMap(parsedSignatures, function (parsedSignature) {\n var params = parsedSignature ? splitParams(parsedSignature.params, false) : []\n\n return params.map(function (params) {\n return {\n params: params,\n fn: parsedSignature.fn\n };\n });\n }).filter(notNull);\n\n signatures.sort(compareSignatures);\n\n // we create a highly optimized checks for the first couple of signatures with max 2 arguments\n var ok0 = signatures[0] && signatures[0].params.length <= 2 && !hasRestParam(signatures[0].params);\n var ok1 = signatures[1] && signatures[1].params.length <= 2 && !hasRestParam(signatures[1].params);\n var ok2 = signatures[2] && signatures[2].params.length <= 2 && !hasRestParam(signatures[2].params);\n var ok3 = signatures[3] && signatures[3].params.length <= 2 && !hasRestParam(signatures[3].params);\n var ok4 = signatures[4] && signatures[4].params.length <= 2 && !hasRestParam(signatures[4].params);\n var ok5 = signatures[5] && signatures[5].params.length <= 2 && !hasRestParam(signatures[5].params);\n var allOk = ok0 && ok1 && ok2 && ok3 && ok4 && ok5;\n\n // compile the tests\n var tests = signatures.map(function (signature) {\n return compileTests(signature.params);\n });\n\n var test00 = ok0 ? compileTest(signatures[0].params[0]) : notOk;\n var test10 = ok1 ? compileTest(signatures[1].params[0]) : notOk;\n var test20 = ok2 ? compileTest(signatures[2].params[0]) : notOk;\n var test30 = ok3 ? compileTest(signatures[3].params[0]) : notOk;\n var test40 = ok4 ? compileTest(signatures[4].params[0]) : notOk;\n var test50 = ok5 ? compileTest(signatures[5].params[0]) : notOk;\n\n var test01 = ok0 ? compileTest(signatures[0].params[1]) : notOk;\n var test11 = ok1 ? compileTest(signatures[1].params[1]) : notOk;\n var test21 = ok2 ? compileTest(signatures[2].params[1]) : notOk;\n var test31 = ok3 ? compileTest(signatures[3].params[1]) : notOk;\n var test41 = ok4 ? compileTest(signatures[4].params[1]) : notOk;\n var test51 = ok5 ? compileTest(signatures[5].params[1]) : notOk;\n\n // compile the functions\n var fns = signatures.map(function(signature) {\n return compileArgsPreprocessing(signature.params, signature.fn);\n });\n\n var fn0 = ok0 ? fns[0] : undef;\n var fn1 = ok1 ? fns[1] : undef;\n var fn2 = ok2 ? fns[2] : undef;\n var fn3 = ok3 ? fns[3] : undef;\n var fn4 = ok4 ? fns[4] : undef;\n var fn5 = ok5 ? fns[5] : undef;\n\n var len0 = ok0 ? signatures[0].params.length : -1;\n var len1 = ok1 ? signatures[1].params.length : -1;\n var len2 = ok2 ? signatures[2].params.length : -1;\n var len3 = ok3 ? signatures[3].params.length : -1;\n var len4 = ok4 ? signatures[4].params.length : -1;\n var len5 = ok5 ? signatures[5].params.length : -1;\n\n // simple and generic, but also slow\n var iStart = allOk ? 6 : 0;\n var iEnd = signatures.length;\n var generic = function generic() {\n 'use strict';\n\n for (var i = iStart; i < iEnd; i++) {\n if (tests[i](arguments)) {\n return fns[i].apply(this, arguments);\n }\n }\n\n return typed.onMismatch(name, arguments, signatures);\n }\n\n // create the typed function\n // fast, specialized version. Falls back to the slower, generic one if needed\n var fn = function fn(arg0, arg1) {\n 'use strict';\n\n if (arguments.length === len0 && test00(arg0) && test01(arg1)) { return fn0.apply(fn, arguments); }\n if (arguments.length === len1 && test10(arg0) && test11(arg1)) { return fn1.apply(fn, arguments); }\n if (arguments.length === len2 && test20(arg0) && test21(arg1)) { return fn2.apply(fn, arguments); }\n if (arguments.length === len3 && test30(arg0) && test31(arg1)) { return fn3.apply(fn, arguments); }\n if (arguments.length === len4 && test40(arg0) && test41(arg1)) { return fn4.apply(fn, arguments); }\n if (arguments.length === len5 && test50(arg0) && test51(arg1)) { return fn5.apply(fn, arguments); }\n\n return generic.apply(fn, arguments);\n }\n\n // attach name the typed function\n try {\n Object.defineProperty(fn, 'name', {value: name});\n }\n catch (err) {\n // old browsers do not support Object.defineProperty and some don't support setting the name property\n // the function name is not essential for the functioning, it's mostly useful for debugging,\n // so it's fine to have unnamed functions.\n }\n\n // attach signatures to the function\n fn.signatures = createSignaturesMap(signatures);\n\n return fn;\n }\n\n /**\n * Action to take on mismatch\n * @param {string} name Name of function that was attempted to be called\n * @param {Array} args Actual arguments to the call\n * @param {Array} signatures Known signatures of the named typed-function\n */\n function _onMismatch(name, args, signatures) {\n throw createError(name, args, signatures);\n }\n\n /**\n * Test whether a type should be NOT be ignored\n * @param {string} typeName\n * @return {boolean}\n */\n function notIgnore(typeName) {\n return typed.ignore.indexOf(typeName) === -1;\n }\n\n /**\n * trim a string\n * @param {string} str\n * @return {string}\n */\n function trim(str) {\n return str.trim();\n }\n\n /**\n * Test whether a string is not empty\n * @param {string} str\n * @return {boolean}\n */\n function notEmpty(str) {\n return !!str;\n }\n\n /**\n * test whether a value is not strict equal to null\n * @param {*} value\n * @return {boolean}\n */\n function notNull(value) {\n return value !== null;\n }\n\n /**\n * Test whether a parameter has no types defined\n * @param {Param} param\n * @return {boolean}\n */\n function isInvalidParam (param) {\n return param.types.length === 0;\n }\n\n /**\n * Return all but the last items of an array\n * @param {Array} arr\n * @return {Array}\n */\n function initial(arr) {\n return arr.slice(0, arr.length - 1);\n }\n\n /**\n * return the last item of an array\n * @param {Array} arr\n * @return {*}\n */\n function last(arr) {\n return arr[arr.length - 1];\n }\n\n /**\n * Slice an array or function Arguments\n * @param {Array | Arguments | IArguments} arr\n * @param {number} start\n * @param {number} [end]\n * @return {Array}\n */\n function slice(arr, start, end) {\n return Array.prototype.slice.call(arr, start, end);\n }\n\n /**\n * Test whether an array contains some item\n * @param {Array} array\n * @param {*} item\n * @return {boolean} Returns true if array contains item, false if not.\n */\n function contains(array, item) {\n return array.indexOf(item) !== -1;\n }\n\n /**\n * Test whether two arrays have overlapping items\n * @param {Array} array1\n * @param {Array} array2\n * @return {boolean} Returns true when at least one item exists in both arrays\n */\n function hasOverlap(array1, array2) {\n for (var i = 0; i < array1.length; i++) {\n if (contains(array2, array1[i])) {\n return true;\n }\n }\n\n return false;\n }\n\n /**\n * Return the first item from an array for which test(arr[i]) returns true\n * @param {Array} arr\n * @param {function} test\n * @return {* | undefined} Returns the first matching item\n * or undefined when there is no match\n */\n function findInArray(arr, test) {\n for (var i = 0; i < arr.length; i++) {\n if (test(arr[i])) {\n return arr[i];\n }\n }\n return undefined;\n }\n\n /**\n * Filter unique items of an array with strings\n * @param {string[]} arr\n * @return {string[]}\n */\n function uniq(arr) {\n var entries = {}\n for (var i = 0; i < arr.length; i++) {\n entries[arr[i]] = true;\n }\n return Object.keys(entries);\n }\n\n /**\n * Flat map the result invoking a callback for every item in an array.\n * https://gist.github.com/samgiles/762ee337dff48623e729\n * @param {Array} arr\n * @param {function} callback\n * @return {Array}\n */\n function flatMap(arr, callback) {\n return Array.prototype.concat.apply([], arr.map(callback));\n }\n\n /**\n * Retrieve the function name from a set of typed functions,\n * and check whether the name of all functions match (if given)\n * @param {function[]} fns\n */\n function getName (fns) {\n var name = '';\n\n for (var i = 0; i < fns.length; i++) {\n var fn = fns[i];\n\n // check whether the names are the same when defined\n if ((typeof fn.signatures === 'object' || typeof fn.signature === 'string') && fn.name !== '') {\n if (name === '') {\n name = fn.name;\n }\n else if (name !== fn.name) {\n var err = new Error('Function names do not match (expected: ' + name + ', actual: ' + fn.name + ')');\n err.data = {\n actual: fn.name,\n expected: name\n };\n throw err;\n }\n }\n }\n\n return name;\n }\n\n // extract and merge all signatures of a list with typed functions\n function extractSignatures(fns) {\n var err;\n var signaturesMap = {};\n\n function validateUnique(_signature, _fn) {\n if (signaturesMap.hasOwnProperty(_signature) && _fn !== signaturesMap[_signature]) {\n err = new Error('Signature \"' + _signature + '\" is defined twice');\n err.data = {signature: _signature};\n throw err;\n // else: both signatures point to the same function, that's fine\n }\n }\n\n for (var i = 0; i < fns.length; i++) {\n var fn = fns[i];\n\n // test whether this is a typed-function\n if (typeof fn.signatures === 'object') {\n // merge the signatures\n for (var signature in fn.signatures) {\n if (fn.signatures.hasOwnProperty(signature)) {\n validateUnique(signature, fn.signatures[signature]);\n signaturesMap[signature] = fn.signatures[signature];\n }\n }\n }\n else if (typeof fn.signature === 'string') {\n validateUnique(fn.signature, fn);\n signaturesMap[fn.signature] = fn;\n }\n else {\n err = new TypeError('Function is no typed-function (index: ' + i + ')');\n err.data = {index: i};\n throw err;\n }\n }\n\n return signaturesMap;\n }\n\n typed = createTypedFunction('typed', {\n 'string, Object': createTypedFunction,\n 'Object': function (signaturesMap) {\n // find existing name\n var fns = [];\n for (var signature in signaturesMap) {\n if (signaturesMap.hasOwnProperty(signature)) {\n fns.push(signaturesMap[signature]);\n }\n }\n var name = getName(fns);\n return createTypedFunction(name, signaturesMap);\n },\n '...Function': function (fns) {\n return createTypedFunction(getName(fns), extractSignatures(fns));\n },\n 'string, ...Function': function (name, fns) {\n return createTypedFunction(name, extractSignatures(fns));\n }\n });\n\n typed.create = create;\n typed.types = _types;\n typed.conversions = _conversions;\n typed.ignore = _ignore;\n typed.onMismatch = _onMismatch;\n typed.throwMismatchError = _onMismatch;\n typed.createError = createError;\n typed.convert = convert;\n typed.find = find;\n\n /**\n * add a type\n * @param {{name: string, test: function}} type\n * @param {boolean} [beforeObjectTest=true]\n * If true, the new test will be inserted before\n * the test with name 'Object' (if any), since\n * tests for Object match Array and classes too.\n */\n typed.addType = function (type, beforeObjectTest) {\n if (!type || typeof type.name !== 'string' || typeof type.test !== 'function') {\n throw new TypeError('Object with properties {name: string, test: function} expected');\n }\n\n if (beforeObjectTest !== false) {\n for (var i = 0; i < typed.types.length; i++) {\n if (typed.types[i].name === 'Object') {\n typed.types.splice(i, 0, type);\n return\n }\n }\n }\n\n typed.types.push(type);\n };\n\n // add a conversion\n typed.addConversion = function (conversion) {\n if (!conversion\n || typeof conversion.from !== 'string'\n || typeof conversion.to !== 'string'\n || typeof conversion.convert !== 'function') {\n throw new TypeError('Object with properties {from: string, to: string, convert: function} expected');\n }\n\n typed.conversions.push(conversion);\n };\n\n return typed;\n }\n\n return create();\n}));\n","import { isNumber } from './is';\n/**\n * @typedef {{sign: '+' | '-' | '', coefficients: number[], exponent: number}} SplitValue\n */\n\n/**\n * Check if a number is integer\n * @param {number | boolean} value\n * @return {boolean} isInteger\n */\n\nexport function isInteger(value) {\n if (typeof value === 'boolean') {\n return true;\n }\n\n return isFinite(value) ? value === Math.round(value) : false; // Note: we use ==, not ===, as we can have Booleans as well\n}\n/**\n * Calculate the sign of a number\n * @param {number} x\n * @returns {number}\n */\n\nexport var sign = /* #__PURE__ */Math.sign || function (x) {\n if (x > 0) {\n return 1;\n } else if (x < 0) {\n return -1;\n } else {\n return 0;\n }\n};\n/**\n * Calculate the base-2 logarithm of a number\n * @param {number} x\n * @returns {number}\n */\n\nexport var log2 = /* #__PURE__ */Math.log2 || function log2(x) {\n return Math.log(x) / Math.LN2;\n};\n/**\n * Calculate the base-10 logarithm of a number\n * @param {number} x\n * @returns {number}\n */\n\nexport var log10 = /* #__PURE__ */Math.log10 || function log10(x) {\n return Math.log(x) / Math.LN10;\n};\n/**\n * Calculate the natural logarithm of a number + 1\n * @param {number} x\n * @returns {number}\n */\n\nexport var log1p = /* #__PURE__ */Math.log1p || function (x) {\n return Math.log(x + 1);\n};\n/**\n * Calculate cubic root for a number\n *\n * Code from es6-shim.js:\n * https://github.com/paulmillr/es6-shim/blob/master/es6-shim.js#L1564-L1577\n *\n * @param {number} x\n * @returns {number} Returns the cubic root of x\n */\n\nexport var cbrt = /* #__PURE__ */Math.cbrt || function cbrt(x) {\n if (x === 0) {\n return x;\n }\n\n var negate = x < 0;\n var result;\n\n if (negate) {\n x = -x;\n }\n\n if (isFinite(x)) {\n result = Math.exp(Math.log(x) / 3); // from https://en.wikipedia.org/wiki/Cube_root#Numerical_methods\n\n result = (x / (result * result) + 2 * result) / 3;\n } else {\n result = x;\n }\n\n return negate ? -result : result;\n};\n/**\n * Calculates exponentiation minus 1\n * @param {number} x\n * @return {number} res\n */\n\nexport var expm1 = /* #__PURE__ */Math.expm1 || function expm1(x) {\n return x >= 2e-4 || x <= -2e-4 ? Math.exp(x) - 1 : x + x * x / 2 + x * x * x / 6;\n};\n/**\n * Convert a number to a formatted string representation.\n *\n * Syntax:\n *\n * format(value)\n * format(value, options)\n * format(value, precision)\n * format(value, fn)\n *\n * Where:\n *\n * {number} value The value to be formatted\n * {Object} options An object with formatting options. Available options:\n * {string} notation\n * Number notation. Choose from:\n * 'fixed' Always use regular number notation.\n * For example '123.40' and '14000000'\n * 'exponential' Always use exponential notation.\n * For example '1.234e+2' and '1.4e+7'\n * 'engineering' Always use engineering notation.\n * For example '123.4e+0' and '14.0e+6'\n * 'auto' (default) Regular number notation for numbers\n * having an absolute value between\n * `lowerExp` and `upperExp` bounds, and\n * uses exponential notation elsewhere.\n * Lower bound is included, upper bound\n * is excluded.\n * For example '123.4' and '1.4e7'.\n * {number} precision A number between 0 and 16 to round\n * the digits of the number.\n * In case of notations 'exponential',\n * 'engineering', and 'auto',\n * `precision` defines the total\n * number of significant digits returned.\n * In case of notation 'fixed',\n * `precision` defines the number of\n * significant digits after the decimal\n * point.\n * `precision` is undefined by default,\n * not rounding any digits.\n * {number} lowerExp Exponent determining the lower boundary\n * for formatting a value with an exponent\n * when `notation='auto`.\n * Default value is `-3`.\n * {number} upperExp Exponent determining the upper boundary\n * for formatting a value with an exponent\n * when `notation='auto`.\n * Default value is `5`.\n * {Function} fn A custom formatting function. Can be used to override the\n * built-in notations. Function `fn` is called with `value` as\n * parameter and must return a string. Is useful for example to\n * format all values inside a matrix in a particular way.\n *\n * Examples:\n *\n * format(6.4) // '6.4'\n * format(1240000) // '1.24e6'\n * format(1/3) // '0.3333333333333333'\n * format(1/3, 3) // '0.333'\n * format(21385, 2) // '21000'\n * format(12.071, {notation: 'fixed'}) // '12'\n * format(2.3, {notation: 'fixed', precision: 2}) // '2.30'\n * format(52.8, {notation: 'exponential'}) // '5.28e+1'\n * format(12345678, {notation: 'engineering'}) // '12.345678e+6'\n *\n * @param {number} value\n * @param {Object | Function | number} [options]\n * @return {string} str The formatted value\n */\n\nexport function format(value, options) {\n if (typeof options === 'function') {\n // handle format(value, fn)\n return options(value);\n } // handle special cases\n\n\n if (value === Infinity) {\n return 'Infinity';\n } else if (value === -Infinity) {\n return '-Infinity';\n } else if (isNaN(value)) {\n return 'NaN';\n } // default values for options\n\n\n var notation = 'auto';\n var precision;\n\n if (options) {\n // determine notation from options\n if (options.notation) {\n notation = options.notation;\n } // determine precision from options\n\n\n if (isNumber(options)) {\n precision = options;\n } else if (isNumber(options.precision)) {\n precision = options.precision;\n }\n } // handle the various notations\n\n\n switch (notation) {\n case 'fixed':\n return toFixed(value, precision);\n\n case 'exponential':\n return toExponential(value, precision);\n\n case 'engineering':\n return toEngineering(value, precision);\n\n case 'auto':\n // remove trailing zeros after the decimal point\n return toPrecision(value, precision, options && options).replace(/((\\.\\d*?)(0+))($|e)/, function () {\n var digits = arguments[2];\n var e = arguments[4];\n return digits !== '.' ? digits + e : e;\n });\n\n default:\n throw new Error('Unknown notation \"' + notation + '\". ' + 'Choose \"auto\", \"exponential\", or \"fixed\".');\n }\n}\n/**\n * Split a number into sign, coefficients, and exponent\n * @param {number | string} value\n * @return {SplitValue}\n * Returns an object containing sign, coefficients, and exponent\n */\n\nexport function splitNumber(value) {\n // parse the input value\n var match = String(value).toLowerCase().match(/^0*?(-?)(\\d+\\.?\\d*)(e([+-]?\\d+))?$/);\n\n if (!match) {\n throw new SyntaxError('Invalid number ' + value);\n }\n\n var sign = match[1];\n var digits = match[2];\n var exponent = parseFloat(match[4] || '0');\n var dot = digits.indexOf('.');\n exponent += dot !== -1 ? dot - 1 : digits.length - 1;\n var coefficients = digits.replace('.', '') // remove the dot (must be removed before removing leading zeros)\n .replace(/^0*/, function (zeros) {\n // remove leading zeros, add their count to the exponent\n exponent -= zeros.length;\n return '';\n }).replace(/0*$/, '') // remove trailing zeros\n .split('').map(function (d) {\n return parseInt(d);\n });\n\n if (coefficients.length === 0) {\n coefficients.push(0);\n exponent++;\n }\n\n return {\n sign: sign,\n coefficients: coefficients,\n exponent: exponent\n };\n}\n/**\n * Format a number in engineering notation. Like '1.23e+6', '2.3e+0', '3.500e-3'\n * @param {number | string} value\n * @param {number} [precision] Optional number of significant figures to return.\n */\n\nexport function toEngineering(value, precision) {\n if (isNaN(value) || !isFinite(value)) {\n return String(value);\n }\n\n var split = splitNumber(value);\n var rounded = roundDigits(split, precision);\n var e = rounded.exponent;\n var c = rounded.coefficients; // find nearest lower multiple of 3 for exponent\n\n var newExp = e % 3 === 0 ? e : e < 0 ? e - 3 - e % 3 : e - e % 3;\n\n if (isNumber(precision)) {\n // add zeroes to give correct sig figs\n while (precision > c.length || e - newExp + 1 > c.length) {\n c.push(0);\n }\n } else {\n // concatenate coefficients with necessary zeros\n // add zeros if necessary (for example: 1e+8 -> 100e+6)\n var missingZeros = Math.abs(e - newExp) - (c.length - 1);\n\n for (var i = 0; i < missingZeros; i++) {\n c.push(0);\n }\n } // find difference in exponents\n\n\n var expDiff = Math.abs(e - newExp);\n var decimalIdx = 1; // push decimal index over by expDiff times\n\n while (expDiff > 0) {\n decimalIdx++;\n expDiff--;\n } // if all coefficient values are zero after the decimal point and precision is unset, don't add a decimal value.\n // otherwise concat with the rest of the coefficients\n\n\n var decimals = c.slice(decimalIdx).join('');\n var decimalVal = isNumber(precision) && decimals.length || decimals.match(/[1-9]/) ? '.' + decimals : '';\n var str = c.slice(0, decimalIdx).join('') + decimalVal + 'e' + (e >= 0 ? '+' : '') + newExp.toString();\n return rounded.sign + str;\n}\n/**\n * Format a number with fixed notation.\n * @param {number | string} value\n * @param {number} [precision=undefined] Optional number of decimals after the\n * decimal point. null by default.\n */\n\nexport function toFixed(value, precision) {\n if (isNaN(value) || !isFinite(value)) {\n return String(value);\n }\n\n var splitValue = splitNumber(value);\n var rounded = typeof precision === 'number' ? roundDigits(splitValue, splitValue.exponent + 1 + precision) : splitValue;\n var c = rounded.coefficients;\n var p = rounded.exponent + 1; // exponent may have changed\n // append zeros if needed\n\n var pp = p + (precision || 0);\n\n if (c.length < pp) {\n c = c.concat(zeros(pp - c.length));\n } // prepend zeros if needed\n\n\n if (p < 0) {\n c = zeros(-p + 1).concat(c);\n p = 1;\n } // insert a dot if needed\n\n\n if (p < c.length) {\n c.splice(p, 0, p === 0 ? '0.' : '.');\n }\n\n return rounded.sign + c.join('');\n}\n/**\n * Format a number in exponential notation. Like '1.23e+5', '2.3e+0', '3.500e-3'\n * @param {number | string} value\n * @param {number} [precision] Number of digits in formatted output.\n * If not provided, the maximum available digits\n * is used.\n */\n\nexport function toExponential(value, precision) {\n if (isNaN(value) || !isFinite(value)) {\n return String(value);\n } // round if needed, else create a clone\n\n\n var split = splitNumber(value);\n var rounded = precision ? roundDigits(split, precision) : split;\n var c = rounded.coefficients;\n var e = rounded.exponent; // append zeros if needed\n\n if (c.length < precision) {\n c = c.concat(zeros(precision - c.length));\n } // format as `C.CCCe+EEE` or `C.CCCe-EEE`\n\n\n var first = c.shift();\n return rounded.sign + first + (c.length > 0 ? '.' + c.join('') : '') + 'e' + (e >= 0 ? '+' : '') + e;\n}\n/**\n * Format a number with a certain precision\n * @param {number | string} value\n * @param {number} [precision=undefined] Optional number of digits.\n * @param {{lowerExp: number | undefined, upperExp: number | undefined}} [options]\n * By default:\n * lowerExp = -3 (incl)\n * upper = +5 (excl)\n * @return {string}\n */\n\nexport function toPrecision(value, precision, options) {\n if (isNaN(value) || !isFinite(value)) {\n return String(value);\n } // determine lower and upper bound for exponential notation.\n\n\n var lowerExp = options && options.lowerExp !== undefined ? options.lowerExp : -3;\n var upperExp = options && options.upperExp !== undefined ? options.upperExp : 5;\n var split = splitNumber(value);\n var rounded = precision ? roundDigits(split, precision) : split;\n\n if (rounded.exponent < lowerExp || rounded.exponent >= upperExp) {\n // exponential notation\n return toExponential(value, precision);\n } else {\n var c = rounded.coefficients;\n var e = rounded.exponent; // append trailing zeros\n\n if (c.length < precision) {\n c = c.concat(zeros(precision - c.length));\n } // append trailing zeros\n // TODO: simplify the next statement\n\n\n c = c.concat(zeros(e - c.length + 1 + (c.length < precision ? precision - c.length : 0))); // prepend zeros\n\n c = zeros(-e).concat(c);\n var dot = e > 0 ? e : 0;\n\n if (dot < c.length - 1) {\n c.splice(dot + 1, 0, '.');\n }\n\n return rounded.sign + c.join('');\n }\n}\n/**\n * Round the number of digits of a number *\n * @param {SplitValue} split A value split with .splitNumber(value)\n * @param {number} precision A positive integer\n * @return {SplitValue}\n * Returns an object containing sign, coefficients, and exponent\n * with rounded digits\n */\n\nexport function roundDigits(split, precision) {\n // create a clone\n var rounded = {\n sign: split.sign,\n coefficients: split.coefficients,\n exponent: split.exponent\n };\n var c = rounded.coefficients; // prepend zeros if needed\n\n while (precision <= 0) {\n c.unshift(0);\n rounded.exponent++;\n precision++;\n }\n\n if (c.length > precision) {\n var removed = c.splice(precision, c.length - precision);\n\n if (removed[0] >= 5) {\n var i = precision - 1;\n c[i]++;\n\n while (c[i] === 10) {\n c.pop();\n\n if (i === 0) {\n c.unshift(0);\n rounded.exponent++;\n i++;\n }\n\n i--;\n c[i]++;\n }\n }\n }\n\n return rounded;\n}\n/**\n * Create an array filled with zeros.\n * @param {number} length\n * @return {Array}\n */\n\nfunction zeros(length) {\n var arr = [];\n\n for (var i = 0; i < length; i++) {\n arr.push(0);\n }\n\n return arr;\n}\n/**\n * Count the number of significant digits of a number.\n *\n * For example:\n * 2.34 returns 3\n * 0.0034 returns 2\n * 120.5e+30 returns 4\n *\n * @param {number} value\n * @return {number} digits Number of significant digits\n */\n\n\nexport function digits(value) {\n return value.toExponential().replace(/e.*$/, '') // remove exponential notation\n .replace(/^0\\.?0*|\\./, '') // remove decimal point and leading zeros\n .length;\n}\n/**\n * Minimum number added to one that makes the result different than one\n */\n\nexport var DBL_EPSILON = Number.EPSILON || 2.2204460492503130808472633361816E-16;\n/**\n * Compares two floating point numbers.\n * @param {number} x First value to compare\n * @param {number} y Second value to compare\n * @param {number} [epsilon] The maximum relative difference between x and y\n * If epsilon is undefined or null, the function will\n * test whether x and y are exactly equal.\n * @return {boolean} whether the two numbers are nearly equal\n*/\n\nexport function nearlyEqual(x, y, epsilon) {\n // if epsilon is null or undefined, test whether x and y are exactly equal\n if (epsilon === null || epsilon === undefined) {\n return x === y;\n }\n\n if (x === y) {\n return true;\n } // NaN\n\n\n if (isNaN(x) || isNaN(y)) {\n return false;\n } // at this point x and y should be finite\n\n\n if (isFinite(x) && isFinite(y)) {\n // check numbers are very close, needed when comparing numbers near zero\n var diff = Math.abs(x - y);\n\n if (diff < DBL_EPSILON) {\n return true;\n } else {\n // use relative error\n return diff <= Math.max(Math.abs(x), Math.abs(y)) * epsilon;\n }\n } // Infinite and Number or negative Infinite and positive Infinite cases\n\n\n return false;\n}\n/**\n * Calculate the hyperbolic arccos of a number\n * @param {number} x\n * @return {number}\n */\n\nexport var acosh = Math.acosh || function (x) {\n return Math.log(Math.sqrt(x * x - 1) + x);\n};\nexport var asinh = Math.asinh || function (x) {\n return Math.log(Math.sqrt(x * x + 1) + x);\n};\n/**\n * Calculate the hyperbolic arctangent of a number\n * @param {number} x\n * @return {number}\n */\n\nexport var atanh = Math.atanh || function (x) {\n return Math.log((1 + x) / (1 - x)) / 2;\n};\n/**\n * Calculate the hyperbolic cosine of a number\n * @param {number} x\n * @returns {number}\n */\n\nexport var cosh = Math.cosh || function (x) {\n return (Math.exp(x) + Math.exp(-x)) / 2;\n};\n/**\n * Calculate the hyperbolic sine of a number\n * @param {number} x\n * @returns {number}\n */\n\nexport var sinh = Math.sinh || function (x) {\n return (Math.exp(x) - Math.exp(-x)) / 2;\n};\n/**\n * Calculate the hyperbolic tangent of a number\n * @param {number} x\n * @returns {number}\n */\n\nexport var tanh = Math.tanh || function (x) {\n var e = Math.exp(2 * x);\n return (e - 1) / (e + 1);\n};","/**\n * Convert a BigNumber to a formatted string representation.\n *\n * Syntax:\n *\n * format(value)\n * format(value, options)\n * format(value, precision)\n * format(value, fn)\n *\n * Where:\n *\n * {number} value The value to be formatted\n * {Object} options An object with formatting options. Available options:\n * {string} notation\n * Number notation. Choose from:\n * 'fixed' Always use regular number notation.\n * For example '123.40' and '14000000'\n * 'exponential' Always use exponential notation.\n * For example '1.234e+2' and '1.4e+7'\n * 'auto' (default) Regular number notation for numbers\n * having an absolute value between\n * `lower` and `upper` bounds, and uses\n * exponential notation elsewhere.\n * Lower bound is included, upper bound\n * is excluded.\n * For example '123.4' and '1.4e7'.\n * {number} precision A number between 0 and 16 to round\n * the digits of the number.\n * In case of notations 'exponential',\n * 'engineering', and 'auto',\n * `precision` defines the total\n * number of significant digits returned.\n * In case of notation 'fixed',\n * `precision` defines the number of\n * significant digits after the decimal\n * point.\n * `precision` is undefined by default.\n * {number} lowerExp Exponent determining the lower boundary\n * for formatting a value with an exponent\n * when `notation='auto`.\n * Default value is `-3`.\n * {number} upperExp Exponent determining the upper boundary\n * for formatting a value with an exponent\n * when `notation='auto`.\n * Default value is `5`.\n * {Function} fn A custom formatting function. Can be used to override the\n * built-in notations. Function `fn` is called with `value` as\n * parameter and must return a string. Is useful for example to\n * format all values inside a matrix in a particular way.\n *\n * Examples:\n *\n * format(6.4) // '6.4'\n * format(1240000) // '1.24e6'\n * format(1/3) // '0.3333333333333333'\n * format(1/3, 3) // '0.333'\n * format(21385, 2) // '21000'\n * format(12e8, {notation: 'fixed'}) // returns '1200000000'\n * format(2.3, {notation: 'fixed', precision: 4}) // returns '2.3000'\n * format(52.8, {notation: 'exponential'}) // returns '5.28e+1'\n * format(12400, {notation: 'engineering'}) // returns '12.400e+3'\n *\n * @param {BigNumber} value\n * @param {Object | Function | number} [options]\n * @return {string} str The formatted value\n */\nexport function format(value, options) {\n if (typeof options === 'function') {\n // handle format(value, fn)\n return options(value);\n } // handle special cases\n\n\n if (!value.isFinite()) {\n return value.isNaN() ? 'NaN' : value.gt(0) ? 'Infinity' : '-Infinity';\n } // default values for options\n\n\n var notation = 'auto';\n var precision;\n\n if (options !== undefined) {\n // determine notation from options\n if (options.notation) {\n notation = options.notation;\n } // determine precision from options\n\n\n if (typeof options === 'number') {\n precision = options;\n } else if (options.precision) {\n precision = options.precision;\n }\n } // handle the various notations\n\n\n switch (notation) {\n case 'fixed':\n return toFixed(value, precision);\n\n case 'exponential':\n return toExponential(value, precision);\n\n case 'engineering':\n return toEngineering(value, precision);\n\n case 'auto':\n {\n // determine lower and upper bound for exponential notation.\n // TODO: implement support for upper and lower to be BigNumbers themselves\n var lowerExp = options && options.lowerExp !== undefined ? options.lowerExp : -3;\n var upperExp = options && options.upperExp !== undefined ? options.upperExp : 5; // handle special case zero\n\n if (value.isZero()) return '0'; // determine whether or not to output exponential notation\n\n var str;\n var rounded = value.toSignificantDigits(precision);\n var exp = rounded.e;\n\n if (exp >= lowerExp && exp < upperExp) {\n // normal number notation\n str = rounded.toFixed();\n } else {\n // exponential notation\n str = toExponential(value, precision);\n } // remove trailing zeros after the decimal point\n\n\n return str.replace(/((\\.\\d*?)(0+))($|e)/, function () {\n var digits = arguments[2];\n var e = arguments[4];\n return digits !== '.' ? digits + e : e;\n });\n }\n\n default:\n throw new Error('Unknown notation \"' + notation + '\". ' + 'Choose \"auto\", \"exponential\", or \"fixed\".');\n }\n}\n/**\n * Format a BigNumber in engineering notation. Like '1.23e+6', '2.3e+0', '3.500e-3'\n * @param {BigNumber | string} value\n * @param {number} [precision] Optional number of significant figures to return.\n */\n\nexport function toEngineering(value, precision) {\n // find nearest lower multiple of 3 for exponent\n var e = value.e;\n var newExp = e % 3 === 0 ? e : e < 0 ? e - 3 - e % 3 : e - e % 3; // find difference in exponents, and calculate the value without exponent\n\n var valueWithoutExp = value.mul(Math.pow(10, -newExp));\n var valueStr = valueWithoutExp.toPrecision(precision);\n\n if (valueStr.indexOf('e') !== -1) {\n valueStr = valueWithoutExp.toString();\n }\n\n return valueStr + 'e' + (e >= 0 ? '+' : '') + newExp.toString();\n}\n/**\n * Format a number in exponential notation. Like '1.23e+5', '2.3e+0', '3.500e-3'\n * @param {BigNumber} value\n * @param {number} [precision] Number of digits in formatted output.\n * If not provided, the maximum available digits\n * is used.\n * @returns {string} str\n */\n\nexport function toExponential(value, precision) {\n if (precision !== undefined) {\n return value.toExponential(precision - 1); // Note the offset of one\n } else {\n return value.toExponential();\n }\n}\n/**\n * Format a number with fixed notation.\n * @param {BigNumber} value\n * @param {number} [precision=undefined] Optional number of decimals after the\n * decimal point. Undefined by default.\n */\n\nexport function toFixed(value, precision) {\n return value.toFixed(precision);\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nimport { isBigNumber, isString, typeOf } from './is';\nimport { format as formatNumber } from './number';\nimport { format as formatBigNumber } from './bignumber/formatter';\n/**\n * Check if a text ends with a certain string.\n * @param {string} text\n * @param {string} search\n */\n\nexport function endsWith(text, search) {\n var start = text.length - search.length;\n var end = text.length;\n return text.substring(start, end) === search;\n}\n/**\n * Format a value of any type into a string.\n *\n * Usage:\n * math.format(value)\n * math.format(value, precision)\n *\n * When value is a function:\n *\n * - When the function has a property `syntax`, it returns this\n * syntax description.\n * - In other cases, a string `'function'` is returned.\n *\n * When `value` is an Object:\n *\n * - When the object contains a property `format` being a function, this\n * function is invoked as `value.format(options)` and the result is returned.\n * - When the object has its own `toString` method, this method is invoked\n * and the result is returned.\n * - In other cases the function will loop over all object properties and\n * return JSON object notation like '{\"a\": 2, \"b\": 3}'.\n *\n * Example usage:\n * math.format(2/7) // '0.2857142857142857'\n * math.format(math.pi, 3) // '3.14'\n * math.format(new Complex(2, 3)) // '2 + 3i'\n * math.format('hello') // '\"hello\"'\n *\n * @param {*} value Value to be stringified\n * @param {Object | number | Function} [options] Formatting options. See\n * lib/utils/number:format for a\n * description of the available\n * options.\n * @return {string} str\n */\n\nexport function format(value, options) {\n if (typeof value === 'number') {\n return formatNumber(value, options);\n }\n\n if (isBigNumber(value)) {\n return formatBigNumber(value, options);\n } // note: we use unsafe duck-typing here to check for Fractions, this is\n // ok here since we're only invoking toString or concatenating its values\n\n\n if (looksLikeFraction(value)) {\n if (!options || options.fraction !== 'decimal') {\n // output as ratio, like '1/3'\n return value.s * value.n + '/' + value.d;\n } else {\n // output as decimal, like '0.(3)'\n return value.toString();\n }\n }\n\n if (Array.isArray(value)) {\n return formatArray(value, options);\n }\n\n if (isString(value)) {\n return '\"' + value + '\"';\n }\n\n if (typeof value === 'function') {\n return value.syntax ? String(value.syntax) : 'function';\n }\n\n if (value && _typeof(value) === 'object') {\n if (typeof value.format === 'function') {\n return value.format(options);\n } else if (value && value.toString(options) !== {}.toString()) {\n // this object has a non-native toString method, use that one\n return value.toString(options);\n } else {\n var entries = Object.keys(value).map(function (key) {\n return '\"' + key + '\": ' + format(value[key], options);\n });\n return '{' + entries.join(', ') + '}';\n }\n }\n\n return String(value);\n}\n/**\n * Stringify a value into a string enclosed in double quotes.\n * Unescaped double quotes and backslashes inside the value are escaped.\n * @param {*} value\n * @return {string}\n */\n\nexport function stringify(value) {\n var text = String(value);\n var escaped = '';\n var i = 0;\n\n while (i < text.length) {\n var c = text.charAt(i);\n\n if (c === '\\\\') {\n escaped += c;\n i++;\n c = text.charAt(i);\n\n if (c === '' || '\"\\\\/bfnrtu'.indexOf(c) === -1) {\n escaped += '\\\\'; // no valid escape character -> escape it\n }\n\n escaped += c;\n } else if (c === '\"') {\n escaped += '\\\\\"';\n } else {\n escaped += c;\n }\n\n i++;\n }\n\n return '\"' + escaped + '\"';\n}\n/**\n * Escape special HTML characters\n * @param {*} value\n * @return {string}\n */\n\nexport function escape(value) {\n var text = String(value);\n text = text.replace(/&/g, '&amp;').replace(/\"/g, '&quot;').replace(/'/g, '&#39;').replace(/</g, '&lt;').replace(/>/g, '&gt;');\n return text;\n}\n/**\n * Recursively format an n-dimensional matrix\n * Example output: \"[[1, 2], [3, 4]]\"\n * @param {Array} array\n * @param {Object | number | Function} [options] Formatting options. See\n * lib/utils/number:format for a\n * description of the available\n * options.\n * @returns {string} str\n */\n\nfunction formatArray(array, options) {\n if (Array.isArray(array)) {\n var str = '[';\n var len = array.length;\n\n for (var i = 0; i < len; i++) {\n if (i !== 0) {\n str += ', ';\n }\n\n str += formatArray(array[i], options);\n }\n\n str += ']';\n return str;\n } else {\n return format(array, options);\n }\n}\n/**\n * Check whether a value looks like a Fraction (unsafe duck-type check)\n * @param {*} value\n * @return {boolean}\n */\n\n\nfunction looksLikeFraction(value) {\n return value && _typeof(value) === 'object' && typeof value.s === 'number' && typeof value.n === 'number' && typeof value.d === 'number' || false;\n}\n/**\n * Compare two strings\n * @param {string} x\n * @param {string} y\n * @returns {number}\n */\n\n\nexport function compareText(x, y) {\n // we don't want to convert numbers to string, only accept string input\n if (!isString(x)) {\n throw new TypeError('Unexpected type of argument in function compareText ' + '(expected: string or Array or Matrix, actual: ' + typeOf(x) + ', index: 0)');\n }\n\n if (!isString(y)) {\n throw new TypeError('Unexpected type of argument in function compareText ' + '(expected: string or Array or Matrix, actual: ' + typeOf(y) + ', index: 1)');\n }\n\n return x === y ? 0 : x > y ? 1 : -1;\n}","/**\n * Create a range error with the message:\n * 'Dimension mismatch (<actual size> != <expected size>)'\n * @param {number | number[]} actual The actual size\n * @param {number | number[]} expected The expected size\n * @param {string} [relation='!='] Optional relation between actual\n * and expected size: '!=', '<', etc.\n * @extends RangeError\n */\nexport function DimensionError(actual, expected, relation) {\n if (!(this instanceof DimensionError)) {\n throw new SyntaxError('Constructor must be called with the new operator');\n }\n\n this.actual = actual;\n this.expected = expected;\n this.relation = relation;\n this.message = 'Dimension mismatch (' + (Array.isArray(actual) ? '[' + actual.join(', ') + ']' : actual) + ' ' + (this.relation || '!=') + ' ' + (Array.isArray(expected) ? '[' + expected.join(', ') + ']' : expected) + ')';\n this.stack = new Error().stack;\n}\nDimensionError.prototype = new RangeError();\nDimensionError.prototype.constructor = RangeError;\nDimensionError.prototype.name = 'DimensionError';\nDimensionError.prototype.isDimensionError = true;","/**\n * Create a range error with the message:\n * 'Index out of range (index < min)'\n * 'Index out of range (index < max)'\n *\n * @param {number} index The actual index\n * @param {number} [min=0] Minimum index (included)\n * @param {number} [max] Maximum index (excluded)\n * @extends RangeError\n */\nexport function IndexError(index, min, max) {\n if (!(this instanceof IndexError)) {\n throw new SyntaxError('Constructor must be called with the new operator');\n }\n\n this.index = index;\n\n if (arguments.length < 3) {\n this.min = 0;\n this.max = min;\n } else {\n this.min = min;\n this.max = max;\n }\n\n if (this.min !== undefined && this.index < this.min) {\n this.message = 'Index out of range (' + this.index + ' < ' + this.min + ')';\n } else if (this.max !== undefined && this.index >= this.max) {\n this.message = 'Index out of range (' + this.index + ' > ' + (this.max - 1) + ')';\n } else {\n this.message = 'Index out of range (' + this.index + ')';\n }\n\n this.stack = new Error().stack;\n}\nIndexError.prototype = new RangeError();\nIndexError.prototype.constructor = RangeError;\nIndexError.prototype.name = 'IndexError';\nIndexError.prototype.isIndexError = true;","import { isInteger } from './number';\nimport { isNumber } from './is';\nimport { format } from './string';\nimport { DimensionError } from '../error/DimensionError';\nimport { IndexError } from '../error/IndexError';\n/**\n * Calculate the size of a multi dimensional array.\n * This function checks the size of the first entry, it does not validate\n * whether all dimensions match. (use function `validate` for that)\n * @param {Array} x\n * @Return {Number[]} size\n */\n\nexport function arraySize(x) {\n var s = [];\n\n while (Array.isArray(x)) {\n s.push(x.length);\n x = x[0];\n }\n\n return s;\n}\n/**\n * Recursively validate whether each element in a multi dimensional array\n * has a size corresponding to the provided size array.\n * @param {Array} array Array to be validated\n * @param {number[]} size Array with the size of each dimension\n * @param {number} dim Current dimension\n * @throws DimensionError\n * @private\n */\n\nfunction _validate(array, size, dim) {\n var i;\n var len = array.length;\n\n if (len !== size[dim]) {\n throw new DimensionError(len, size[dim]);\n }\n\n if (dim < size.length - 1) {\n // recursively validate each child array\n var dimNext = dim + 1;\n\n for (i = 0; i < len; i++) {\n var child = array[i];\n\n if (!Array.isArray(child)) {\n throw new DimensionError(size.length - 1, size.length, '<');\n }\n\n _validate(array[i], size, dimNext);\n }\n } else {\n // last dimension. none of the childs may be an array\n for (i = 0; i < len; i++) {\n if (Array.isArray(array[i])) {\n throw new DimensionError(size.length + 1, size.length, '>');\n }\n }\n }\n}\n/**\n * Validate whether each element in a multi dimensional array has\n * a size corresponding to the provided size array.\n * @param {Array} array Array to be validated\n * @param {number[]} size Array with the size of each dimension\n * @throws DimensionError\n */\n\n\nexport function validate(array, size) {\n var isScalar = size.length === 0;\n\n if (isScalar) {\n // scalar\n if (Array.isArray(array)) {\n throw new DimensionError(array.length, 0);\n }\n } else {\n // array\n _validate(array, size, 0);\n }\n}\n/**\n * Test whether index is an integer number with index >= 0 and index < length\n * when length is provided\n * @param {number} index Zero-based index\n * @param {number} [length] Length of the array\n */\n\nexport function validateIndex(index, length) {\n if (!isNumber(index) || !isInteger(index)) {\n throw new TypeError('Index must be an integer (value: ' + index + ')');\n }\n\n if (index < 0 || typeof length === 'number' && index >= length) {\n throw new IndexError(index, length);\n }\n}\n/**\n * Resize a multi dimensional array. The resized array is returned.\n * @param {Array} array Array to be resized\n * @param {Array.<number>} size Array with the size of each dimension\n * @param {*} [defaultValue=0] Value to be filled in in new entries,\n * zero by default. Specify for example `null`,\n * to clearly see entries that are not explicitly\n * set.\n * @return {Array} array The resized array\n */\n\nexport function resize(array, size, defaultValue) {\n // TODO: add support for scalars, having size=[] ?\n // check the type of the arguments\n if (!Array.isArray(array) || !Array.isArray(size)) {\n throw new TypeError('Array expected');\n }\n\n if (size.length === 0) {\n throw new Error('Resizing to scalar is not supported');\n } // check whether size contains positive integers\n\n\n size.forEach(function (value) {\n if (!isNumber(value) || !isInteger(value) || value < 0) {\n throw new TypeError('Invalid size, must contain positive integers ' + '(size: ' + format(size) + ')');\n }\n }); // recursively resize the array\n\n var _defaultValue = defaultValue !== undefined ? defaultValue : 0;\n\n _resize(array, size, 0, _defaultValue);\n\n return array;\n}\n/**\n * Recursively resize a multi dimensional array\n * @param {Array} array Array to be resized\n * @param {number[]} size Array with the size of each dimension\n * @param {number} dim Current dimension\n * @param {*} [defaultValue] Value to be filled in in new entries,\n * undefined by default.\n * @private\n */\n\nfunction _resize(array, size, dim, defaultValue) {\n var i;\n var elem;\n var oldLen = array.length;\n var newLen = size[dim];\n var minLen = Math.min(oldLen, newLen); // apply new length\n\n array.length = newLen;\n\n if (dim < size.length - 1) {\n // non-last dimension\n var dimNext = dim + 1; // resize existing child arrays\n\n for (i = 0; i < minLen; i++) {\n // resize child array\n elem = array[i];\n\n if (!Array.isArray(elem)) {\n elem = [elem]; // add a dimension\n\n array[i] = elem;\n }\n\n _resize(elem, size, dimNext, defaultValue);\n } // create new child arrays\n\n\n for (i = minLen; i < newLen; i++) {\n // get child array\n elem = [];\n array[i] = elem; // resize new child array\n\n _resize(elem, size, dimNext, defaultValue);\n }\n } else {\n // last dimension\n // remove dimensions of existing values\n for (i = 0; i < minLen; i++) {\n while (Array.isArray(array[i])) {\n array[i] = array[i][0];\n }\n } // fill new elements with the default value\n\n\n for (i = minLen; i < newLen; i++) {\n array[i] = defaultValue;\n }\n }\n}\n/**\n * Re-shape a multi dimensional array to fit the specified dimensions\n * @param {Array} array Array to be reshaped\n * @param {Array.<number>} sizes List of sizes for each dimension\n * @returns {Array} Array whose data has been formatted to fit the\n * specified dimensions\n *\n * @throws {DimensionError} If the product of the new dimension sizes does\n * not equal that of the old ones\n */\n\n\nexport function reshape(array, sizes) {\n var flatArray = flatten(array);\n var newArray;\n\n function product(arr) {\n return arr.reduce(function (prev, curr) {\n return prev * curr;\n });\n }\n\n if (!Array.isArray(array) || !Array.isArray(sizes)) {\n throw new TypeError('Array expected');\n }\n\n if (sizes.length === 0) {\n throw new DimensionError(0, product(arraySize(array)), '!=');\n }\n\n var totalSize = 1;\n\n for (var sizeIndex = 0; sizeIndex < sizes.length; sizeIndex++) {\n totalSize *= sizes[sizeIndex];\n }\n\n if (flatArray.length !== totalSize) {\n throw new DimensionError(product(sizes), product(arraySize(array)), '!=');\n }\n\n try {\n newArray = _reshape(flatArray, sizes);\n } catch (e) {\n if (e instanceof DimensionError) {\n throw new DimensionError(product(sizes), product(arraySize(array)), '!=');\n }\n\n throw e;\n }\n\n return newArray;\n}\n/**\n * Iteratively re-shape a multi dimensional array to fit the specified dimensions\n * @param {Array} array Array to be reshaped\n * @param {Array.<number>} sizes List of sizes for each dimension\n * @returns {Array} Array whose data has been formatted to fit the\n * specified dimensions\n */\n\nfunction _reshape(array, sizes) {\n // testing if there are enough elements for the requested shape\n var tmpArray = array;\n var tmpArray2; // for each dimensions starting by the last one and ignoring the first one\n\n for (var sizeIndex = sizes.length - 1; sizeIndex > 0; sizeIndex--) {\n var size = sizes[sizeIndex];\n tmpArray2 = []; // aggregate the elements of the current tmpArray in elements of the requested size\n\n var length = tmpArray.length / size;\n\n for (var i = 0; i < length; i++) {\n tmpArray2.push(tmpArray.slice(i * size, (i + 1) * size));\n } // set it as the new tmpArray for the next loop turn or for return\n\n\n tmpArray = tmpArray2;\n }\n\n return tmpArray;\n}\n/**\n * Squeeze a multi dimensional array\n * @param {Array} array\n * @param {Array} [size]\n * @returns {Array} returns the array itself\n */\n\n\nexport function squeeze(array, size) {\n var s = size || arraySize(array); // squeeze outer dimensions\n\n while (Array.isArray(array) && array.length === 1) {\n array = array[0];\n s.shift();\n } // find the first dimension to be squeezed\n\n\n var dims = s.length;\n\n while (s[dims - 1] === 1) {\n dims--;\n } // squeeze inner dimensions\n\n\n if (dims < s.length) {\n array = _squeeze(array, dims, 0);\n s.length = dims;\n }\n\n return array;\n}\n/**\n * Recursively squeeze a multi dimensional array\n * @param {Array} array\n * @param {number} dims Required number of dimensions\n * @param {number} dim Current dimension\n * @returns {Array | *} Returns the squeezed array\n * @private\n */\n\nfunction _squeeze(array, dims, dim) {\n var i, ii;\n\n if (dim < dims) {\n var next = dim + 1;\n\n for (i = 0, ii = array.length; i < ii; i++) {\n array[i] = _squeeze(array[i], dims, next);\n }\n } else {\n while (Array.isArray(array)) {\n array = array[0];\n }\n }\n\n return array;\n}\n/**\n * Unsqueeze a multi dimensional array: add dimensions when missing\n *\n * Paramter `size` will be mutated to match the new, unqueezed matrix size.\n *\n * @param {Array} array\n * @param {number} dims Desired number of dimensions of the array\n * @param {number} [outer] Number of outer dimensions to be added\n * @param {Array} [size] Current size of array.\n * @returns {Array} returns the array itself\n * @private\n */\n\n\nexport function unsqueeze(array, dims, outer, size) {\n var s = size || arraySize(array); // unsqueeze outer dimensions\n\n if (outer) {\n for (var i = 0; i < outer; i++) {\n array = [array];\n s.unshift(1);\n }\n } // unsqueeze inner dimensions\n\n\n array = _unsqueeze(array, dims, 0);\n\n while (s.length < dims) {\n s.push(1);\n }\n\n return array;\n}\n/**\n * Recursively unsqueeze a multi dimensional array\n * @param {Array} array\n * @param {number} dims Required number of dimensions\n * @param {number} dim Current dimension\n * @returns {Array | *} Returns the squeezed array\n * @private\n */\n\nfunction _unsqueeze(array, dims, dim) {\n var i, ii;\n\n if (Array.isArray(array)) {\n var next = dim + 1;\n\n for (i = 0, ii = array.length; i < ii; i++) {\n array[i] = _unsqueeze(array[i], dims, next);\n }\n } else {\n for (var d = dim; d < dims; d++) {\n array = [array];\n }\n }\n\n return array;\n}\n/**\n * Flatten a multi dimensional array, put all elements in a one dimensional\n * array\n * @param {Array} array A multi dimensional array\n * @return {Array} The flattened array (1 dimensional)\n */\n\n\nexport function flatten(array) {\n if (!Array.isArray(array)) {\n // if not an array, return as is\n return array;\n }\n\n var flat = [];\n array.forEach(function callback(value) {\n if (Array.isArray(value)) {\n value.forEach(callback); // traverse through sub-arrays recursively\n } else {\n flat.push(value);\n }\n });\n return flat;\n}\n/**\n * A safe map\n * @param {Array} array\n * @param {function} callback\n */\n\nexport function map(array, callback) {\n return Array.prototype.map.call(array, callback);\n}\n/**\n * A safe forEach\n * @param {Array} array\n * @param {function} callback\n */\n\nexport function forEach(array, callback) {\n Array.prototype.forEach.call(array, callback);\n}\n/**\n * A safe filter\n * @param {Array} array\n * @param {function} callback\n */\n\nexport function filter(array, callback) {\n if (arraySize(array).length !== 1) {\n throw new Error('Only one dimensional matrices supported');\n }\n\n return Array.prototype.filter.call(array, callback);\n}\n/**\n * Filter values in a callback given a regular expression\n * @param {Array} array\n * @param {RegExp} regexp\n * @return {Array} Returns the filtered array\n * @private\n */\n\nexport function filterRegExp(array, regexp) {\n if (arraySize(array).length !== 1) {\n throw new Error('Only one dimensional matrices supported');\n }\n\n return Array.prototype.filter.call(array, function (entry) {\n return regexp.test(entry);\n });\n}\n/**\n * A safe join\n * @param {Array} array\n * @param {string} separator\n */\n\nexport function join(array, separator) {\n return Array.prototype.join.call(array, separator);\n}\n/**\n * Assign a numeric identifier to every element of a sorted array\n * @param {Array} a An array\n * @return {Array} An array of objects containing the original value and its identifier\n */\n\nexport function identify(a) {\n if (!Array.isArray(a)) {\n throw new TypeError('Array input expected');\n }\n\n if (a.length === 0) {\n return a;\n }\n\n var b = [];\n var count = 0;\n b[0] = {\n value: a[0],\n identifier: 0\n };\n\n for (var i = 1; i < a.length; i++) {\n if (a[i] === a[i - 1]) {\n count++;\n } else {\n count = 0;\n }\n\n b.push({\n value: a[i],\n identifier: count\n });\n }\n\n return b;\n}\n/**\n * Remove the numeric identifier from the elements\n * @param {array} a An array\n * @return {array} An array of values without identifiers\n */\n\nexport function generalize(a) {\n if (!Array.isArray(a)) {\n throw new TypeError('Array input expected');\n }\n\n if (a.length === 0) {\n return a;\n }\n\n var b = [];\n\n for (var i = 0; i < a.length; i++) {\n b.push(a[i].value);\n }\n\n return b;\n}\n/**\n * Check the datatype of a given object\n * This is a low level implementation that should only be used by\n * parent Matrix classes such as SparseMatrix or DenseMatrix\n * This method does not validate Array Matrix shape\n * @param {Array} array\n * @param {function} typeOf Callback function to use to determine the type of a value\n * @return string\n */\n\nexport function getArrayDataType(array, typeOf) {\n var type; // to hold type info\n\n var length = 0; // to hold length value to ensure it has consistent sizes\n\n for (var i = 0; i < array.length; i++) {\n var item = array[i];\n var isArray = Array.isArray(item); // Saving the target matrix row size\n\n if (i === 0 && isArray) {\n length = item.length;\n } // If the current item is an array but the length does not equal the targetVectorSize\n\n\n if (isArray && item.length !== length) {\n return undefined;\n }\n\n var itemType = isArray ? getArrayDataType(item, typeOf) // recurse into a nested array\n : typeOf(item);\n\n if (type === undefined) {\n type = itemType; // first item\n } else if (type !== itemType) {\n return 'mixed';\n } else {// we're good, everything has the same type so far\n }\n }\n\n return type;\n}\n/**\n * Return the last item from an array\n * @param array\n * @returns {*}\n */\n\nexport function last(array) {\n return array[array.length - 1];\n}\n/**\n * Get all but the last element of array.\n */\n\nexport function initial(array) {\n return array.slice(0, array.length - 1);\n}\n/**\n * Test whether an array or string contains an item\n * @param {Array | string} array\n * @param {*} item\n * @return {boolean}\n */\n\nexport function contains(array, item) {\n return array.indexOf(item) !== -1;\n}","import { contains } from './array';\nimport { pickShallow } from './object';\n/**\n * Create a factory function, which can be used to inject dependencies.\n *\n * The created functions are memoized, a consecutive call of the factory\n * with the exact same inputs will return the same function instance.\n * The memoized cache is exposed on `factory.cache` and can be cleared\n * if needed.\n *\n * Example:\n *\n * const name = 'log'\n * const dependencies = ['config', 'typed', 'divideScalar', 'Complex']\n *\n * export const createLog = factory(name, dependencies, ({ typed, config, divideScalar, Complex }) => {\n * // ... create the function log here and return it\n * }\n *\n * @param {string} name Name of the function to be created\n * @param {string[]} dependencies The names of all required dependencies\n * @param {function} create Callback function called with an object with all dependencies\n * @param {Object} [meta] Optional object with meta information that will be attached\n * to the created factory function as property `meta`.\n * @returns {function}\n */\n\nexport function factory(name, dependencies, create, meta) {\n function assertAndCreate(scope) {\n // we only pass the requested dependencies to the factory function\n // to prevent functions to rely on dependencies that are not explicitly\n // requested.\n var deps = pickShallow(scope, dependencies.map(stripOptionalNotation));\n assertDependencies(name, dependencies, scope);\n return create(deps);\n }\n\n assertAndCreate.isFactory = true;\n assertAndCreate.fn = name;\n assertAndCreate.dependencies = dependencies.slice().sort();\n\n if (meta) {\n assertAndCreate.meta = meta;\n }\n\n return assertAndCreate;\n}\n/**\n * Sort all factories such that when loading in order, the dependencies are resolved.\n *\n * @param {Array} factories\n * @returns {Array} Returns a new array with the sorted factories.\n */\n\nexport function sortFactories(factories) {\n var factoriesByName = {};\n factories.forEach(function (factory) {\n factoriesByName[factory.fn] = factory;\n });\n\n function containsDependency(factory, dependency) {\n // TODO: detect circular references\n if (isFactory(factory)) {\n if (contains(factory.dependencies, dependency.fn || dependency.name)) {\n return true;\n }\n\n if (factory.dependencies.some(function (d) {\n return containsDependency(factoriesByName[d], dependency);\n })) {\n return true;\n }\n }\n\n return false;\n }\n\n var sorted = [];\n\n function addFactory(factory) {\n var index = 0;\n\n while (index < sorted.length && !containsDependency(sorted[index], factory)) {\n index++;\n }\n\n sorted.splice(index, 0, factory);\n } // sort regular factory functions\n\n\n factories.filter(isFactory).forEach(addFactory); // sort legacy factory functions AFTER the regular factory functions\n\n factories.filter(function (factory) {\n return !isFactory(factory);\n }).forEach(addFactory);\n return sorted;\n} // TODO: comment or cleanup if unused in the end\n\nexport function create(factories) {\n var scope = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n sortFactories(factories).forEach(function (factory) {\n return factory(scope);\n });\n return scope;\n}\n/**\n * Test whether an object is a factory. This is the case when it has\n * properties name, dependencies, and a function create.\n * @param {*} obj\n * @returns {boolean}\n */\n\nexport function isFactory(obj) {\n return typeof obj === 'function' && typeof obj.fn === 'string' && Array.isArray(obj.dependencies);\n}\n/**\n * Assert that all dependencies of a list with dependencies are available in the provided scope.\n *\n * Will throw an exception when there are dependencies missing.\n *\n * @param {string} name Name for the function to be created. Used to generate a useful error message\n * @param {string[]} dependencies\n * @param {Object} scope\n */\n\nexport function assertDependencies(name, dependencies, scope) {\n var allDefined = dependencies.filter(function (dependency) {\n return !isOptionalDependency(dependency);\n }) // filter optionals\n .every(function (dependency) {\n return scope[dependency] !== undefined;\n });\n\n if (!allDefined) {\n var missingDependencies = dependencies.filter(function (dependency) {\n return scope[dependency] === undefined;\n }); // TODO: create a custom error class for this, a MathjsError or something like that\n\n throw new Error(\"Cannot create function \\\"\".concat(name, \"\\\", \") + \"some dependencies are missing: \".concat(missingDependencies.map(function (d) {\n return \"\\\"\".concat(d, \"\\\"\");\n }).join(', '), \".\"));\n }\n}\nexport function isOptionalDependency(dependency) {\n return dependency && dependency[0] === '?';\n}\nexport function stripOptionalNotation(dependency) {\n return dependency && dependency[0] === '?' ? dependency.slice(1) : dependency;\n}","/**\n * Create a typed-function which checks the types of the arguments and\n * can match them against multiple provided signatures. The typed-function\n * automatically converts inputs in order to find a matching signature.\n * Typed functions throw informative errors in case of wrong input arguments.\n *\n * See the library [typed-function](https://github.com/josdejong/typed-function)\n * for detailed documentation.\n *\n * Syntax:\n *\n * math.typed(name, signatures) : function\n * math.typed(signatures) : function\n *\n * Examples:\n *\n * // create a typed function with multiple types per argument (type union)\n * const fn2 = typed({\n * 'number | boolean': function (b) {\n * return 'b is a number or boolean'\n * },\n * 'string, number | boolean': function (a, b) {\n * return 'a is a string, b is a number or boolean'\n * }\n * })\n *\n * // create a typed function with an any type argument\n * const log = typed({\n * 'string, any': function (event, data) {\n * console.log('event: ' + event + ', data: ' + JSON.stringify(data))\n * }\n * })\n *\n * @param {string} [name] Optional name for the typed-function\n * @param {Object<string, function>} signatures Object with one or multiple function signatures\n * @returns {function} The created typed-function.\n */\nimport { isAccessorNode, isArray, isArrayNode, isAssignmentNode, isBigNumber, isBlockNode, isBoolean, isChain, isComplex, isConditionalNode, isConstantNode, isDate, isDenseMatrix, isFraction, isFunction, isFunctionAssignmentNode, isFunctionNode, isHelp, isIndex, isIndexNode, isMatrix, isNode, isNull, isNumber, isObject, isObjectNode, isOperatorNode, isParenthesisNode, isRange, isRangeNode, isRegExp, isResultSet, isSparseMatrix, isString, isSymbolNode, isUndefined, isUnit } from '../../utils/is';\nimport typedFunction from 'typed-function';\nimport { digits } from '../../utils/number';\nimport { factory } from '../../utils/factory'; // returns a new instance of typed-function\n\nvar _createTyped2 = function _createTyped() {\n // initially, return the original instance of typed-function\n // consecutively, return a new instance from typed.create.\n _createTyped2 = typedFunction.create;\n return typedFunction;\n};\n\nvar dependencies = ['?BigNumber', '?Complex', '?DenseMatrix', '?Fraction'];\n/**\n * Factory function for creating a new typed instance\n * @param {Object} dependencies Object with data types like Complex and BigNumber\n * @returns {Function}\n */\n\nexport var createTyped = /* #__PURE__ */factory('typed', dependencies, function createTyped(_ref) {\n var BigNumber = _ref.BigNumber,\n Complex = _ref.Complex,\n DenseMatrix = _ref.DenseMatrix,\n Fraction = _ref.Fraction;\n\n // TODO: typed-function must be able to silently ignore signatures with unknown data types\n // get a new instance of typed-function\n var typed = _createTyped2(); // define all types. The order of the types determines in which order function\n // arguments are type-checked (so for performance it's important to put the\n // most used types first).\n\n\n typed.types = [{\n name: 'number',\n test: isNumber\n }, {\n name: 'Complex',\n test: isComplex\n }, {\n name: 'BigNumber',\n test: isBigNumber\n }, {\n name: 'Fraction',\n test: isFraction\n }, {\n name: 'Unit',\n test: isUnit\n }, {\n name: 'string',\n test: isString\n }, {\n name: 'Chain',\n test: isChain\n }, {\n name: 'Array',\n test: isArray\n }, {\n name: 'Matrix',\n test: isMatrix\n }, {\n name: 'DenseMatrix',\n test: isDenseMatrix\n }, {\n name: 'SparseMatrix',\n test: isSparseMatrix\n }, {\n name: 'Range',\n test: isRange\n }, {\n name: 'Index',\n test: isIndex\n }, {\n name: 'boolean',\n test: isBoolean\n }, {\n name: 'ResultSet',\n test: isResultSet\n }, {\n name: 'Help',\n test: isHelp\n }, {\n name: 'function',\n test: isFunction\n }, {\n name: 'Date',\n test: isDate\n }, {\n name: 'RegExp',\n test: isRegExp\n }, {\n name: 'null',\n test: isNull\n }, {\n name: 'undefined',\n test: isUndefined\n }, {\n name: 'AccessorNode',\n test: isAccessorNode\n }, {\n name: 'ArrayNode',\n test: isArrayNode\n }, {\n name: 'AssignmentNode',\n test: isAssignmentNode\n }, {\n name: 'BlockNode',\n test: isBlockNode\n }, {\n name: 'ConditionalNode',\n test: isConditionalNode\n }, {\n name: 'ConstantNode',\n test: isConstantNode\n }, {\n name: 'FunctionNode',\n test: isFunctionNode\n }, {\n name: 'FunctionAssignmentNode',\n test: isFunctionAssignmentNode\n }, {\n name: 'IndexNode',\n test: isIndexNode\n }, {\n name: 'Node',\n test: isNode\n }, {\n name: 'ObjectNode',\n test: isObjectNode\n }, {\n name: 'OperatorNode',\n test: isOperatorNode\n }, {\n name: 'ParenthesisNode',\n test: isParenthesisNode\n }, {\n name: 'RangeNode',\n test: isRangeNode\n }, {\n name: 'SymbolNode',\n test: isSymbolNode\n }, {\n name: 'Object',\n test: isObject\n } // order 'Object' last, it matches on other classes too\n ];\n typed.conversions = [{\n from: 'number',\n to: 'BigNumber',\n convert: function convert(x) {\n if (!BigNumber) {\n throwNoBignumber(x);\n } // note: conversion from number to BigNumber can fail if x has >15 digits\n\n\n if (digits(x) > 15) {\n throw new TypeError('Cannot implicitly convert a number with >15 significant digits to BigNumber ' + '(value: ' + x + '). ' + 'Use function bignumber(x) to convert to BigNumber.');\n }\n\n return new BigNumber(x);\n }\n }, {\n from: 'number',\n to: 'Complex',\n convert: function convert(x) {\n if (!Complex) {\n throwNoComplex(x);\n }\n\n return new Complex(x, 0);\n }\n }, {\n from: 'number',\n to: 'string',\n convert: function convert(x) {\n return x + '';\n }\n }, {\n from: 'BigNumber',\n to: 'Complex',\n convert: function convert(x) {\n if (!Complex) {\n throwNoComplex(x);\n }\n\n return new Complex(x.toNumber(), 0);\n }\n }, {\n from: 'Fraction',\n to: 'BigNumber',\n convert: function convert(x) {\n throw new TypeError('Cannot implicitly convert a Fraction to BigNumber or vice versa. ' + 'Use function bignumber(x) to convert to BigNumber or fraction(x) to convert to Fraction.');\n }\n }, {\n from: 'Fraction',\n to: 'Complex',\n convert: function convert(x) {\n if (!Complex) {\n throwNoComplex(x);\n }\n\n return new Complex(x.valueOf(), 0);\n }\n }, {\n from: 'number',\n to: 'Fraction',\n convert: function convert(x) {\n if (!Fraction) {\n throwNoFraction(x);\n }\n\n var f = new Fraction(x);\n\n if (f.valueOf() !== x) {\n throw new TypeError('Cannot implicitly convert a number to a Fraction when there will be a loss of precision ' + '(value: ' + x + '). ' + 'Use function fraction(x) to convert to Fraction.');\n }\n\n return f;\n }\n }, {\n // FIXME: add conversion from Fraction to number, for example for `sqrt(fraction(1,3))`\n // from: 'Fraction',\n // to: 'number',\n // convert: function (x) {\n // return x.valueOf()\n // }\n // }, {\n from: 'string',\n to: 'number',\n convert: function convert(x) {\n var n = Number(x);\n\n if (isNaN(n)) {\n throw new Error('Cannot convert \"' + x + '\" to a number');\n }\n\n return n;\n }\n }, {\n from: 'string',\n to: 'BigNumber',\n convert: function convert(x) {\n if (!BigNumber) {\n throwNoBignumber(x);\n }\n\n try {\n return new BigNumber(x);\n } catch (err) {\n throw new Error('Cannot convert \"' + x + '\" to BigNumber');\n }\n }\n }, {\n from: 'string',\n to: 'Fraction',\n convert: function convert(x) {\n if (!Fraction) {\n throwNoFraction(x);\n }\n\n try {\n return new Fraction(x);\n } catch (err) {\n throw new Error('Cannot convert \"' + x + '\" to Fraction');\n }\n }\n }, {\n from: 'string',\n to: 'Complex',\n convert: function convert(x) {\n if (!Complex) {\n throwNoComplex(x);\n }\n\n try {\n return new Complex(x);\n } catch (err) {\n throw new Error('Cannot convert \"' + x + '\" to Complex');\n }\n }\n }, {\n from: 'boolean',\n to: 'number',\n convert: function convert(x) {\n return +x;\n }\n }, {\n from: 'boolean',\n to: 'BigNumber',\n convert: function convert(x) {\n if (!BigNumber) {\n throwNoBignumber(x);\n }\n\n return new BigNumber(+x);\n }\n }, {\n from: 'boolean',\n to: 'Fraction',\n convert: function convert(x) {\n if (!Fraction) {\n throwNoFraction(x);\n }\n\n return new Fraction(+x);\n }\n }, {\n from: 'boolean',\n to: 'string',\n convert: function convert(x) {\n return String(x);\n }\n }, {\n from: 'Array',\n to: 'Matrix',\n convert: function convert(array) {\n if (!DenseMatrix) {\n throwNoMatrix();\n }\n\n return new DenseMatrix(array);\n }\n }, {\n from: 'Matrix',\n to: 'Array',\n convert: function convert(matrix) {\n return matrix.valueOf();\n }\n }];\n return typed;\n});\n\nfunction throwNoBignumber(x) {\n throw new Error(\"Cannot convert value \".concat(x, \" into a BigNumber: no class 'BigNumber' provided\"));\n}\n\nfunction throwNoComplex(x) {\n throw new Error(\"Cannot convert value \".concat(x, \" into a Complex number: no class 'Complex' provided\"));\n}\n\nfunction throwNoMatrix() {\n throw new Error('Cannot convert array into a Matrix: no class \\'DenseMatrix\\' provided');\n}\n\nfunction throwNoFraction(x) {\n throw new Error(\"Cannot convert value \".concat(x, \" into a Fraction, no class 'Fraction' provided.\"));\n}","/*!\r\n * decimal.js v10.6.0\r\n * An arbitrary-precision Decimal type for JavaScript.\r\n * https://github.com/MikeMcl/decimal.js\r\n * Copyright (c) 2025 Michael Mclaughlin <M8ch88l@gmail.com>\r\n * MIT Licence\r\n */\r\n\r\n\r\n// ----------------------------------- EDITABLE DEFAULTS ------------------------------------ //\r\n\r\n\r\n // The maximum exponent magnitude.\r\n // The limit on the value of `toExpNeg`, `toExpPos`, `minE` and `maxE`.\r\nvar EXP_LIMIT = 9e15, // 0 to 9e15\r\n\r\n // The limit on the value of `precision`, and on the value of the first argument to\r\n // `toDecimalPlaces`, `toExponential`, `toFixed`, `toPrecision` and `toSignificantDigits`.\r\n MAX_DIGITS = 1e9, // 0 to 1e9\r\n\r\n // Base conversion alphabet.\r\n NUMERALS = '0123456789abcdef',\r\n\r\n // The natural logarithm of 10 (1025 digits).\r\n LN10 = '2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058',\r\n\r\n // Pi (1025 digits).\r\n PI = '3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789',\r\n\r\n\r\n // The initial configuration properties of the Decimal constructor.\r\n DEFAULTS = {\r\n\r\n // These values must be integers within the stated ranges (inclusive).\r\n // Most of these values can be changed at run-time using the `Decimal.config` method.\r\n\r\n // The maximum number of significant digits of the result of a calculation or base conversion.\r\n // E.g. `Decimal.config({ precision: 20 });`\r\n precision: 20, // 1 to MAX_DIGITS\r\n\r\n // The rounding mode used when rounding to `precision`.\r\n //\r\n // ROUND_UP 0 Away from zero.\r\n // ROUND_DOWN 1 Towards zero.\r\n // ROUND_CEIL 2 Towards +Infinity.\r\n // ROUND_FLOOR 3 Towards -Infinity.\r\n // ROUND_HALF_UP 4 Towards nearest neighbour. If equidistant, up.\r\n // ROUND_HALF_DOWN 5 Towards nearest neighbour. If equidistant, down.\r\n // ROUND_HALF_EVEN 6 Towards nearest neighbour. If equidistant, towards even neighbour.\r\n // ROUND_HALF_CEIL 7 Towards nearest neighbour. If equidistant, towards +Infinity.\r\n // ROUND_HALF_FLOOR 8 Towards nearest neighbour. If equidistant, towards -Infinity.\r\n //\r\n // E.g.\r\n // `Decimal.rounding = 4;`\r\n // `Decimal.rounding = Decimal.ROUND_HALF_UP;`\r\n rounding: 4, // 0 to 8\r\n\r\n // The modulo mode used when calculating the modulus: a mod n.\r\n // The quotient (q = a / n) is calculated according to the corresponding rounding mode.\r\n // The remainder (r) is calculated as: r = a - n * q.\r\n //\r\n // UP 0 The remainder is positive if the dividend is negative, else is negative.\r\n // DOWN 1 The remainder has the same sign as the dividend (JavaScript %).\r\n // FLOOR 3 The remainder has the same sign as the divisor (Python %).\r\n // HALF_EVEN 6 The IEEE 754 remainder function.\r\n // EUCLID 9 Euclidian division. q = sign(n) * floor(a / abs(n)). Always positive.\r\n //\r\n // Truncated division (1), floored division (3), the IEEE 754 remainder (6), and Euclidian\r\n // division (9) are commonly used for the modulus operation. The other rounding modes can also\r\n // be used, but they may not give useful results.\r\n modulo: 1, // 0 to 9\r\n\r\n // The exponent value at and beneath which `toString` returns exponential notation.\r\n // JavaScript numbers: -7\r\n toExpNeg: -7, // 0 to -EXP_LIMIT\r\n\r\n // The exponent value at and above which `toString` returns exponential notation.\r\n // JavaScript numbers: 21\r\n toExpPos: 21, // 0 to EXP_LIMIT\r\n\r\n // The minimum exponent value, beneath which underflow to zero occurs.\r\n // JavaScript numbers: -324 (5e-324)\r\n minE: -EXP_LIMIT, // -1 to -EXP_LIMIT\r\n\r\n // The maximum exponent value, above which overflow to Infinity occurs.\r\n // JavaScript numbers: 308 (1.7976931348623157e+308)\r\n maxE: EXP_LIMIT, // 1 to EXP_LIMIT\r\n\r\n // Whether to use cryptographically-secure random number generation, if available.\r\n crypto: false // true/false\r\n },\r\n\r\n\r\n// ----------------------------------- END OF EDITABLE DEFAULTS ------------------------------- //\r\n\r\n\r\n inexact, quadrant,\r\n external = true,\r\n\r\n decimalError = '[DecimalError] ',\r\n invalidArgument = decimalError + 'Invalid argument: ',\r\n precisionLimitExceeded = decimalError + 'Precision limit exceeded',\r\n cryptoUnavailable = decimalError + 'crypto unavailable',\r\n tag = '[object Decimal]',\r\n\r\n mathfloor = Math.floor,\r\n mathpow = Math.pow,\r\n\r\n isBinary = /^0b([01]+(\\.[01]*)?|\\.[01]+)(p[+-]?\\d+)?$/i,\r\n isHex = /^0x([0-9a-f]+(\\.[0-9a-f]*)?|\\.[0-9a-f]+)(p[+-]?\\d+)?$/i,\r\n isOctal = /^0o([0-7]+(\\.[0-7]*)?|\\.[0-7]+)(p[+-]?\\d+)?$/i,\r\n isDecimal = /^(\\d+(\\.\\d*)?|\\.\\d+)(e[+-]?\\d+)?$/i,\r\n\r\n BASE = 1e7,\r\n LOG_BASE = 7,\r\n MAX_SAFE_INTEGER = 9007199254740991,\r\n\r\n LN10_PRECISION = LN10.length - 1,\r\n PI_PRECISION = PI.length - 1,\r\n\r\n // Decimal.prototype object\r\n P = { toStringTag: tag };\r\n\r\n\r\n// Decimal prototype methods\r\n\r\n\r\n/*\r\n * absoluteValue abs\r\n * ceil\r\n * clampedTo clamp\r\n * comparedTo cmp\r\n * cosine cos\r\n * cubeRoot cbrt\r\n * decimalPlaces dp\r\n * dividedBy div\r\n * dividedToIntegerBy divToInt\r\n * equals eq\r\n * floor\r\n * greaterThan gt\r\n * greaterThanOrEqualTo gte\r\n * hyperbolicCosine cosh\r\n * hyperbolicSine sinh\r\n * hyperbolicTangent tanh\r\n * inverseCosine acos\r\n * inverseHyperbolicCosine acosh\r\n * inverseHyperbolicSine asinh\r\n * inverseHyperbolicTangent atanh\r\n * inverseSine asin\r\n * inverseTangent atan\r\n * isFinite\r\n * isInteger isInt\r\n * isNaN\r\n * isNegative isNeg\r\n * isPositive isPos\r\n * isZero\r\n * lessThan lt\r\n * lessThanOrEqualTo lte\r\n * logarithm log\r\n * [maximum] [max]\r\n * [minimum] [min]\r\n * minus sub\r\n * modulo mod\r\n * naturalExponential exp\r\n * naturalLogarithm ln\r\n * negated neg\r\n * plus add\r\n * precision sd\r\n * round\r\n * sine sin\r\n * squareRoot sqrt\r\n * tangent tan\r\n * times mul\r\n * toBinary\r\n * toDecimalPlaces toDP\r\n * toExponential\r\n * toFixed\r\n * toFraction\r\n * toHexadecimal toHex\r\n * toNearest\r\n * toNumber\r\n * toOctal\r\n * toPower pow\r\n * toPrecision\r\n * toSignificantDigits toSD\r\n * toString\r\n * truncated trunc\r\n * valueOf toJSON\r\n */\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the absolute value of this Decimal.\r\n *\r\n */\r\nP.absoluteValue = P.abs = function () {\r\n var x = new this.constructor(this);\r\n if (x.s < 0) x.s = 1;\r\n return finalise(x);\r\n};\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the value of this Decimal rounded to a whole number in the\r\n * direction of positive Infinity.\r\n *\r\n */\r\nP.ceil = function () {\r\n return finalise(new this.constructor(this), this.e + 1, 2);\r\n};\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the value of this Decimal clamped to the range\r\n * delineated by `min` and `max`.\r\n *\r\n * min {number|string|bigint|Decimal}\r\n * max {number|string|bigint|Decimal}\r\n *\r\n */\r\nP.clampedTo = P.clamp = function (min, max) {\r\n var k,\r\n x = this,\r\n Ctor = x.constructor;\r\n min = new Ctor(min);\r\n max = new Ctor(max);\r\n if (!min.s || !max.s) return new Ctor(NaN);\r\n if (min.gt(max)) throw Error(invalidArgument + max);\r\n k = x.cmp(min);\r\n return k < 0 ? min : x.cmp(max) > 0 ? max : new Ctor(x);\r\n};\r\n\r\n\r\n/*\r\n * Return\r\n * 1 if the value of this Decimal is greater than the value of `y`,\r\n * -1 if the value of this Decimal is less than the value of `y`,\r\n * 0 if they have the same value,\r\n * NaN if the value of either Decimal is NaN.\r\n *\r\n */\r\nP.comparedTo = P.cmp = function (y) {\r\n var i, j, xdL, ydL,\r\n x = this,\r\n xd = x.d,\r\n yd = (y = new x.constructor(y)).d,\r\n xs = x.s,\r\n ys = y.s;\r\n\r\n // Either NaN or ±Infinity?\r\n if (!xd || !yd) {\r\n return !xs || !ys ? NaN : xs !== ys ? xs : xd === yd ? 0 : !xd ^ xs < 0 ? 1 : -1;\r\n }\r\n\r\n // Either zero?\r\n if (!xd[0] || !yd[0]) return xd[0] ? xs : yd[0] ? -ys : 0;\r\n\r\n // Signs differ?\r\n if (xs !== ys) return xs;\r\n\r\n // Compare exponents.\r\n if (x.e !== y.e) return x.e > y.e ^ xs < 0 ? 1 : -1;\r\n\r\n xdL = xd.length;\r\n ydL = yd.length;\r\n\r\n // Compare digit by digit.\r\n for (i = 0, j = xdL < ydL ? xdL : ydL; i < j; ++i) {\r\n if (xd[i] !== yd[i]) return xd[i] > yd[i] ^ xs < 0 ? 1 : -1;\r\n }\r\n\r\n // Compare lengths.\r\n return xdL === ydL ? 0 : xdL > ydL ^ xs < 0 ? 1 : -1;\r\n};\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the cosine of the value in radians of this Decimal.\r\n *\r\n * Domain: [-Infinity, Infinity]\r\n * Range: [-1, 1]\r\n *\r\n * cos(0) = 1\r\n * cos(-0) = 1\r\n * cos(Infinity) = NaN\r\n * cos(-Infinity) = NaN\r\n * cos(NaN) = NaN\r\n *\r\n */\r\nP.cosine = P.cos = function () {\r\n var pr, rm,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (!x.d) return new Ctor(NaN);\r\n\r\n // cos(0) = cos(-0) = 1\r\n if (!x.d[0]) return new Ctor(1);\r\n\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n Ctor.precision = pr + Math.max(x.e, x.sd()) + LOG_BASE;\r\n Ctor.rounding = 1;\r\n\r\n x = cosine(Ctor, toLessThanHalfPi(Ctor, x));\r\n\r\n Ctor.precision = pr;\r\n Ctor.rounding = rm;\r\n\r\n return finalise(quadrant == 2 || quadrant == 3 ? x.neg() : x, pr, rm, true);\r\n};\r\n\r\n\r\n/*\r\n *\r\n * Return a new Decimal whose value is the cube root of the value of this Decimal, rounded to\r\n * `precision` significant digits using rounding mode `rounding`.\r\n *\r\n * cbrt(0) = 0\r\n * cbrt(-0) = -0\r\n * cbrt(1) = 1\r\n * cbrt(-1) = -1\r\n * cbrt(N) = N\r\n * cbrt(-I) = -I\r\n * cbrt(I) = I\r\n *\r\n * Math.cbrt(x) = (x < 0 ? -Math.pow(-x, 1/3) : Math.pow(x, 1/3))\r\n *\r\n */\r\nP.cubeRoot = P.cbrt = function () {\r\n var e, m, n, r, rep, s, sd, t, t3, t3plusx,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (!x.isFinite() || x.isZero()) return new Ctor(x);\r\n external = false;\r\n\r\n // Initial estimate.\r\n s = x.s * mathpow(x.s * x, 1 / 3);\r\n\r\n // Math.cbrt underflow/overflow?\r\n // Pass x to Math.pow as integer, then adjust the exponent of the result.\r\n if (!s || Math.abs(s) == 1 / 0) {\r\n n = digitsToString(x.d);\r\n e = x.e;\r\n\r\n // Adjust n exponent so it is a multiple of 3 away from x exponent.\r\n if (s = (e - n.length + 1) % 3) n += (s == 1 || s == -2 ? '0' : '00');\r\n s = mathpow(n, 1 / 3);\r\n\r\n // Rarely, e may be one less than the result exponent value.\r\n e = mathfloor((e + 1) / 3) - (e % 3 == (e < 0 ? -1 : 2));\r\n\r\n if (s == 1 / 0) {\r\n n = '5e' + e;\r\n } else {\r\n n = s.toExponential();\r\n n = n.slice(0, n.indexOf('e') + 1) + e;\r\n }\r\n\r\n r = new Ctor(n);\r\n r.s = x.s;\r\n } else {\r\n r = new Ctor(s.toString());\r\n }\r\n\r\n sd = (e = Ctor.precision) + 3;\r\n\r\n // Halley's method.\r\n // TODO? Compare Newton's method.\r\n for (;;) {\r\n t = r;\r\n t3 = t.times(t).times(t);\r\n t3plusx = t3.plus(x);\r\n r = divide(t3plusx.plus(x).times(t), t3plusx.plus(t3), sd + 2, 1);\r\n\r\n // TODO? Replace with for-loop and checkRoundingDigits.\r\n if (digitsToString(t.d).slice(0, sd) === (n = digitsToString(r.d)).slice(0, sd)) {\r\n n = n.slice(sd - 3, sd + 1);\r\n\r\n // The 4th rounding digit may be in error by -1 so if the 4 rounding digits are 9999 or 4999\r\n // , i.e. approaching a rounding boundary, continue the iteration.\r\n if (n == '9999' || !rep && n == '4999') {\r\n\r\n // On the first iteration only, check to see if rounding up gives the exact result as the\r\n // nines may infinitely repeat.\r\n if (!rep) {\r\n finalise(t, e + 1, 0);\r\n\r\n if (t.times(t).times(t).eq(x)) {\r\n r = t;\r\n break;\r\n }\r\n }\r\n\r\n sd += 4;\r\n rep = 1;\r\n } else {\r\n\r\n // If the rounding digits are null, 0{0,4} or 50{0,3}, check for an exact result.\r\n // If not, then there are further digits and m will be truthy.\r\n if (!+n || !+n.slice(1) && n.charAt(0) == '5') {\r\n\r\n // Truncate to the first rounding digit.\r\n finalise(r, e + 1, 1);\r\n m = !r.times(r).times(r).eq(x);\r\n }\r\n\r\n break;\r\n }\r\n }\r\n }\r\n\r\n external = true;\r\n\r\n return finalise(r, e, Ctor.rounding, m);\r\n};\r\n\r\n\r\n/*\r\n * Return the number of decimal places of the value of this Decimal.\r\n *\r\n */\r\nP.decimalPlaces = P.dp = function () {\r\n var w,\r\n d = this.d,\r\n n = NaN;\r\n\r\n if (d) {\r\n w = d.length - 1;\r\n n = (w - mathfloor(this.e / LOG_BASE)) * LOG_BASE;\r\n\r\n // Subtract the number of trailing zeros of the last word.\r\n w = d[w];\r\n if (w) for (; w % 10 == 0; w /= 10) n--;\r\n if (n < 0) n = 0;\r\n }\r\n\r\n return n;\r\n};\r\n\r\n\r\n/*\r\n * n / 0 = I\r\n * n / N = N\r\n * n / I = 0\r\n * 0 / n = 0\r\n * 0 / 0 = N\r\n * 0 / N = N\r\n * 0 / I = 0\r\n * N / n = N\r\n * N / 0 = N\r\n * N / N = N\r\n * N / I = N\r\n * I / n = I\r\n * I / 0 = I\r\n * I / N = N\r\n * I / I = N\r\n *\r\n * Return a new Decimal whose value is the value of this Decimal divided by `y`, rounded to\r\n * `precision` significant digits using rounding mode `rounding`.\r\n *\r\n */\r\nP.dividedBy = P.div = function (y) {\r\n return divide(this, new this.constructor(y));\r\n};\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the integer part of dividing the value of this Decimal\r\n * by the value of `y`, rounded to `precision` significant digits using rounding mode `rounding`.\r\n *\r\n */\r\nP.dividedToIntegerBy = P.divToInt = function (y) {\r\n var x = this,\r\n Ctor = x.constructor;\r\n return finalise(divide(x, new Ctor(y), 0, 1, 1), Ctor.precision, Ctor.rounding);\r\n};\r\n\r\n\r\n/*\r\n * Return true if the value of this Decimal is equal to the value of `y`, otherwise return false.\r\n *\r\n */\r\nP.equals = P.eq = function (y) {\r\n return this.cmp(y) === 0;\r\n};\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the value of this Decimal rounded to a whole number in the\r\n * direction of negative Infinity.\r\n *\r\n */\r\nP.floor = function () {\r\n return finalise(new this.constructor(this), this.e + 1, 3);\r\n};\r\n\r\n\r\n/*\r\n * Return true if the value of this Decimal is greater than the value of `y`, otherwise return\r\n * false.\r\n *\r\n */\r\nP.greaterThan = P.gt = function (y) {\r\n return this.cmp(y) > 0;\r\n};\r\n\r\n\r\n/*\r\n * Return true if the value of this Decimal is greater than or equal to the value of `y`,\r\n * otherwise return false.\r\n *\r\n */\r\nP.greaterThanOrEqualTo = P.gte = function (y) {\r\n var k = this.cmp(y);\r\n return k == 1 || k === 0;\r\n};\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the hyperbolic cosine of the value in radians of this\r\n * Decimal.\r\n *\r\n * Domain: [-Infinity, Infinity]\r\n * Range: [1, Infinity]\r\n *\r\n * cosh(x) = 1 + x^2/2! + x^4/4! + x^6/6! + ...\r\n *\r\n * cosh(0) = 1\r\n * cosh(-0) = 1\r\n * cosh(Infinity) = Infinity\r\n * cosh(-Infinity) = Infinity\r\n * cosh(NaN) = NaN\r\n *\r\n * x time taken (ms) result\r\n * 1000 9 9.8503555700852349694e+433\r\n * 10000 25 4.4034091128314607936e+4342\r\n * 100000 171 1.4033316802130615897e+43429\r\n * 1000000 3817 1.5166076984010437725e+434294\r\n * 10000000 abandoned after 2 minute wait\r\n *\r\n * TODO? Compare performance of cosh(x) = 0.5 * (exp(x) + exp(-x))\r\n *\r\n */\r\nP.hyperbolicCosine = P.cosh = function () {\r\n var k, n, pr, rm, len,\r\n x = this,\r\n Ctor = x.constructor,\r\n one = new Ctor(1);\r\n\r\n if (!x.isFinite()) return new Ctor(x.s ? 1 / 0 : NaN);\r\n if (x.isZero()) return one;\r\n\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n Ctor.precision = pr + Math.max(x.e, x.sd()) + 4;\r\n Ctor.rounding = 1;\r\n len = x.d.length;\r\n\r\n // Argument reduction: cos(4x) = 1 - 8cos^2(x) + 8cos^4(x) + 1\r\n // i.e. cos(x) = 1 - cos^2(x/4)(8 - 8cos^2(x/4))\r\n\r\n // Estimate the optimum number of times to use the argument reduction.\r\n // TODO? Estimation reused from cosine() and may not be optimal here.\r\n if (len < 32) {\r\n k = Math.ceil(len / 3);\r\n n = (1 / tinyPow(4, k)).toString();\r\n } else {\r\n k = 16;\r\n n = '2.3283064365386962890625e-10';\r\n }\r\n\r\n x = taylorSeries(Ctor, 1, x.times(n), new Ctor(1), true);\r\n\r\n // Reverse argument reduction\r\n var cosh2_x,\r\n i = k,\r\n d8 = new Ctor(8);\r\n for (; i--;) {\r\n cosh2_x = x.times(x);\r\n x = one.minus(cosh2_x.times(d8.minus(cosh2_x.times(d8))));\r\n }\r\n\r\n return finalise(x, Ctor.precision = pr, Ctor.rounding = rm, true);\r\n};\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the hyperbolic sine of the value in radians of this\r\n * Decimal.\r\n *\r\n * Domain: [-Infinity, Infinity]\r\n * Range: [-Infinity, Infinity]\r\n *\r\n * sinh(x) = x + x^3/3! + x^5/5! + x^7/7! + ...\r\n *\r\n * sinh(0) = 0\r\n * sinh(-0) = -0\r\n * sinh(Infinity) = Infinity\r\n * sinh(-Infinity) = -Infinity\r\n * sinh(NaN) = NaN\r\n *\r\n * x time taken (ms)\r\n * 10 2 ms\r\n * 100 5 ms\r\n * 1000 14 ms\r\n * 10000 82 ms\r\n * 100000 886 ms 1.4033316802130615897e+43429\r\n * 200000 2613 ms\r\n * 300000 5407 ms\r\n * 400000 8824 ms\r\n * 500000 13026 ms 8.7080643612718084129e+217146\r\n * 1000000 48543 ms\r\n *\r\n * TODO? Compare performance of sinh(x) = 0.5 * (exp(x) - exp(-x))\r\n *\r\n */\r\nP.hyperbolicSine = P.sinh = function () {\r\n var k, pr, rm, len,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (!x.isFinite() || x.isZero()) return new Ctor(x);\r\n\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n Ctor.precision = pr + Math.max(x.e, x.sd()) + 4;\r\n Ctor.rounding = 1;\r\n len = x.d.length;\r\n\r\n if (len < 3) {\r\n x = taylorSeries(Ctor, 2, x, x, true);\r\n } else {\r\n\r\n // Alternative argument reduction: sinh(3x) = sinh(x)(3 + 4sinh^2(x))\r\n // i.e. sinh(x) = sinh(x/3)(3 + 4sinh^2(x/3))\r\n // 3 multiplications and 1 addition\r\n\r\n // Argument reduction: sinh(5x) = sinh(x)(5 + sinh^2(x)(20 + 16sinh^2(x)))\r\n // i.e. sinh(x) = sinh(x/5)(5 + sinh^2(x/5)(20 + 16sinh^2(x/5)))\r\n // 4 multiplications and 2 additions\r\n\r\n // Estimate the optimum number of times to use the argument reduction.\r\n k = 1.4 * Math.sqrt(len);\r\n k = k > 16 ? 16 : k | 0;\r\n\r\n x = x.times(1 / tinyPow(5, k));\r\n x = taylorSeries(Ctor, 2, x, x, true);\r\n\r\n // Reverse argument reduction\r\n var sinh2_x,\r\n d5 = new Ctor(5),\r\n d16 = new Ctor(16),\r\n d20 = new Ctor(20);\r\n for (; k--;) {\r\n sinh2_x = x.times(x);\r\n x = x.times(d5.plus(sinh2_x.times(d16.times(sinh2_x).plus(d20))));\r\n }\r\n }\r\n\r\n Ctor.precision = pr;\r\n Ctor.rounding = rm;\r\n\r\n return finalise(x, pr, rm, true);\r\n};\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the hyperbolic tangent of the value in radians of this\r\n * Decimal.\r\n *\r\n * Domain: [-Infinity, Infinity]\r\n * Range: [-1, 1]\r\n *\r\n * tanh(x) = sinh(x) / cosh(x)\r\n *\r\n * tanh(0) = 0\r\n * tanh(-0) = -0\r\n * tanh(Infinity) = 1\r\n * tanh(-Infinity) = -1\r\n * tanh(NaN) = NaN\r\n *\r\n */\r\nP.hyperbolicTangent = P.tanh = function () {\r\n var pr, rm,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (!x.isFinite()) return new Ctor(x.s);\r\n if (x.isZero()) return new Ctor(x);\r\n\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n Ctor.precision = pr + 7;\r\n Ctor.rounding = 1;\r\n\r\n return divide(x.sinh(), x.cosh(), Ctor.precision = pr, Ctor.rounding = rm);\r\n};\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the arccosine (inverse cosine) in radians of the value of\r\n * this Decimal.\r\n *\r\n * Domain: [-1, 1]\r\n * Range: [0, pi]\r\n *\r\n * acos(x) = pi/2 - asin(x)\r\n *\r\n * acos(0) = pi/2\r\n * acos(-0) = pi/2\r\n * acos(1) = 0\r\n * acos(-1) = pi\r\n * acos(1/2) = pi/3\r\n * acos(-1/2) = 2*pi/3\r\n * acos(|x| > 1) = NaN\r\n * acos(NaN) = NaN\r\n *\r\n */\r\nP.inverseCosine = P.acos = function () {\r\n var x = this,\r\n Ctor = x.constructor,\r\n k = x.abs().cmp(1),\r\n pr = Ctor.precision,\r\n rm = Ctor.rounding;\r\n\r\n if (k !== -1) {\r\n return k === 0\r\n // |x| is 1\r\n ? x.isNeg() ? getPi(Ctor, pr, rm) : new Ctor(0)\r\n // |x| > 1 or x is NaN\r\n : new Ctor(NaN);\r\n }\r\n\r\n if (x.isZero()) return getPi(Ctor, pr + 4, rm).times(0.5);\r\n\r\n // TODO? Special case acos(0.5) = pi/3 and acos(-0.5) = 2*pi/3\r\n\r\n Ctor.precision = pr + 6;\r\n Ctor.rounding = 1;\r\n\r\n // See https://github.com/MikeMcl/decimal.js/pull/217\r\n x = new Ctor(1).minus(x).div(x.plus(1)).sqrt().atan();\r\n\r\n Ctor.precision = pr;\r\n Ctor.rounding = rm;\r\n\r\n return x.times(2);\r\n};\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the inverse of the hyperbolic cosine in radians of the\r\n * value of this Decimal.\r\n *\r\n * Domain: [1, Infinity]\r\n * Range: [0, Infinity]\r\n *\r\n * acosh(x) = ln(x + sqrt(x^2 - 1))\r\n *\r\n * acosh(x < 1) = NaN\r\n * acosh(NaN) = NaN\r\n * acosh(Infinity) = Infinity\r\n * acosh(-Infinity) = NaN\r\n * acosh(0) = NaN\r\n * acosh(-0) = NaN\r\n * acosh(1) = 0\r\n * acosh(-1) = NaN\r\n *\r\n */\r\nP.inverseHyperbolicCosine = P.acosh = function () {\r\n var pr, rm,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (x.lte(1)) return new Ctor(x.eq(1) ? 0 : NaN);\r\n if (!x.isFinite()) return new Ctor(x);\r\n\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n Ctor.precision = pr + Math.max(Math.abs(x.e), x.sd()) + 4;\r\n Ctor.rounding = 1;\r\n external = false;\r\n\r\n x = x.times(x).minus(1).sqrt().plus(x);\r\n\r\n external = true;\r\n Ctor.precision = pr;\r\n Ctor.rounding = rm;\r\n\r\n return x.ln();\r\n};\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the inverse of the hyperbolic sine in radians of the value\r\n * of this Decimal.\r\n *\r\n * Domain: [-Infinity, Infinity]\r\n * Range: [-Infinity, Infinity]\r\n *\r\n * asinh(x) = ln(x + sqrt(x^2 + 1))\r\n *\r\n * asinh(NaN) = NaN\r\n * asinh(Infinity) = Infinity\r\n * asinh(-Infinity) = -Infinity\r\n * asinh(0) = 0\r\n * asinh(-0) = -0\r\n *\r\n */\r\nP.inverseHyperbolicSine = P.asinh = function () {\r\n var pr, rm,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (!x.isFinite() || x.isZero()) return new Ctor(x);\r\n\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n Ctor.precision = pr + 2 * Math.max(Math.abs(x.e), x.sd()) + 6;\r\n Ctor.rounding = 1;\r\n external = false;\r\n\r\n x = x.times(x).plus(1).sqrt().plus(x);\r\n\r\n external = true;\r\n Ctor.precision = pr;\r\n Ctor.rounding = rm;\r\n\r\n return x.ln();\r\n};\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the inverse of the hyperbolic tangent in radians of the\r\n * value of this Decimal.\r\n *\r\n * Domain: [-1, 1]\r\n * Range: [-Infinity, Infinity]\r\n *\r\n * atanh(x) = 0.5 * ln((1 + x) / (1 - x))\r\n *\r\n * atanh(|x| > 1) = NaN\r\n * atanh(NaN) = NaN\r\n * atanh(Infinity) = NaN\r\n * atanh(-Infinity) = NaN\r\n * atanh(0) = 0\r\n * atanh(-0) = -0\r\n * atanh(1) = Infinity\r\n * atanh(-1) = -Infinity\r\n *\r\n */\r\nP.inverseHyperbolicTangent = P.atanh = function () {\r\n var pr, rm, wpr, xsd,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (!x.isFinite()) return new Ctor(NaN);\r\n if (x.e >= 0) return new Ctor(x.abs().eq(1) ? x.s / 0 : x.isZero() ? x : NaN);\r\n\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n xsd = x.sd();\r\n\r\n if (Math.max(xsd, pr) < 2 * -x.e - 1) return finalise(new Ctor(x), pr, rm, true);\r\n\r\n Ctor.precision = wpr = xsd - x.e;\r\n\r\n x = divide(x.plus(1), new Ctor(1).minus(x), wpr + pr, 1);\r\n\r\n Ctor.precision = pr + 4;\r\n Ctor.rounding = 1;\r\n\r\n x = x.ln();\r\n\r\n Ctor.precision = pr;\r\n Ctor.rounding = rm;\r\n\r\n return x.times(0.5);\r\n};\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the arcsine (inverse sine) in radians of the value of this\r\n * Decimal.\r\n *\r\n * Domain: [-Infinity, Infinity]\r\n * Range: [-pi/2, pi/2]\r\n *\r\n * asin(x) = 2*atan(x/(1 + sqrt(1 - x^2)))\r\n *\r\n * asin(0) = 0\r\n * asin(-0) = -0\r\n * asin(1/2) = pi/6\r\n * asin(-1/2) = -pi/6\r\n * asin(1) = pi/2\r\n * asin(-1) = -pi/2\r\n * asin(|x| > 1) = NaN\r\n * asin(NaN) = NaN\r\n *\r\n * TODO? Compare performance of Taylor series.\r\n *\r\n */\r\nP.inverseSine = P.asin = function () {\r\n var halfPi, k,\r\n pr, rm,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (x.isZero()) return new Ctor(x);\r\n\r\n k = x.abs().cmp(1);\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n\r\n if (k !== -1) {\r\n\r\n // |x| is 1\r\n if (k === 0) {\r\n halfPi = getPi(Ctor, pr + 4, rm).times(0.5);\r\n halfPi.s = x.s;\r\n return halfPi;\r\n }\r\n\r\n // |x| > 1 or x is NaN\r\n return new Ctor(NaN);\r\n }\r\n\r\n // TODO? Special case asin(1/2) = pi/6 and asin(-1/2) = -pi/6\r\n\r\n Ctor.precision = pr + 6;\r\n Ctor.rounding = 1;\r\n\r\n x = x.div(new Ctor(1).minus(x.times(x)).sqrt().plus(1)).atan();\r\n\r\n Ctor.precision = pr;\r\n Ctor.rounding = rm;\r\n\r\n return x.times(2);\r\n};\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the arctangent (inverse tangent) in radians of the value\r\n * of this Decimal.\r\n *\r\n * Domain: [-Infinity, Infinity]\r\n * Range: [-pi/2, pi/2]\r\n *\r\n * atan(x) = x - x^3/3 + x^5/5 - x^7/7 + ...\r\n *\r\n * atan(0) = 0\r\n * atan(-0) = -0\r\n * atan(1) = pi/4\r\n * atan(-1) = -pi/4\r\n * atan(Infinity) = pi/2\r\n * atan(-Infinity) = -pi/2\r\n * atan(NaN) = NaN\r\n *\r\n */\r\nP.inverseTangent = P.atan = function () {\r\n var i, j, k, n, px, t, r, wpr, x2,\r\n x = this,\r\n Ctor = x.constructor,\r\n pr = Ctor.precision,\r\n rm = Ctor.rounding;\r\n\r\n if (!x.isFinite()) {\r\n if (!x.s) return new Ctor(NaN);\r\n if (pr + 4 <= PI_PRECISION) {\r\n r = getPi(Ctor, pr + 4, rm).times(0.5);\r\n r.s = x.s;\r\n return r;\r\n }\r\n } else if (x.isZero()) {\r\n return new Ctor(x);\r\n } else if (x.abs().eq(1) && pr + 4 <= PI_PRECISION) {\r\n r = getPi(Ctor, pr + 4, rm).times(0.25);\r\n r.s = x.s;\r\n return r;\r\n }\r\n\r\n Ctor.precision = wpr = pr + 10;\r\n Ctor.rounding = 1;\r\n\r\n // TODO? if (x >= 1 && pr <= PI_PRECISION) atan(x) = halfPi * x.s - atan(1 / x);\r\n\r\n // Argument reduction\r\n // Ensure |x| < 0.42\r\n // atan(x) = 2 * atan(x / (1 + sqrt(1 + x^2)))\r\n\r\n k = Math.min(28, wpr / LOG_BASE + 2 | 0);\r\n\r\n for (i = k; i; --i) x = x.div(x.times(x).plus(1).sqrt().plus(1));\r\n\r\n external = false;\r\n\r\n j = Math.ceil(wpr / LOG_BASE);\r\n n = 1;\r\n x2 = x.times(x);\r\n r = new Ctor(x);\r\n px = x;\r\n\r\n // atan(x) = x - x^3/3 + x^5/5 - x^7/7 + ...\r\n for (; i !== -1;) {\r\n px = px.times(x2);\r\n t = r.minus(px.div(n += 2));\r\n\r\n px = px.times(x2);\r\n r = t.plus(px.div(n += 2));\r\n\r\n if (r.d[j] !== void 0) for (i = j; r.d[i] === t.d[i] && i--;);\r\n }\r\n\r\n if (k) r = r.times(2 << (k - 1));\r\n\r\n external = true;\r\n\r\n return finalise(r, Ctor.precision = pr, Ctor.rounding = rm, true);\r\n};\r\n\r\n\r\n/*\r\n * Return true if the value of this Decimal is a finite number, otherwise return false.\r\n *\r\n */\r\nP.isFinite = function () {\r\n return !!this.d;\r\n};\r\n\r\n\r\n/*\r\n * Return true if the value of this Decimal is an integer, otherwise return false.\r\n *\r\n */\r\nP.isInteger = P.isInt = function () {\r\n return !!this.d && mathfloor(this.e / LOG_BASE) > this.d.length - 2;\r\n};\r\n\r\n\r\n/*\r\n * Return true if the value of this Decimal is NaN, otherwise return false.\r\n *\r\n */\r\nP.isNaN = function () {\r\n return !this.s;\r\n};\r\n\r\n\r\n/*\r\n * Return true if the value of this Decimal is negative, otherwise return false.\r\n *\r\n */\r\nP.isNegative = P.isNeg = function () {\r\n return this.s < 0;\r\n};\r\n\r\n\r\n/*\r\n * Return true if the value of this Decimal is positive, otherwise return false.\r\n *\r\n */\r\nP.isPositive = P.isPos = function () {\r\n return this.s > 0;\r\n};\r\n\r\n\r\n/*\r\n * Return true if the value of this Decimal is 0 or -0, otherwise return false.\r\n *\r\n */\r\nP.isZero = function () {\r\n return !!this.d && this.d[0] === 0;\r\n};\r\n\r\n\r\n/*\r\n * Return true if the value of this Decimal is less than `y`, otherwise return false.\r\n *\r\n */\r\nP.lessThan = P.lt = function (y) {\r\n return this.cmp(y) < 0;\r\n};\r\n\r\n\r\n/*\r\n * Return true if the value of this Decimal is less than or equal to `y`, otherwise return false.\r\n *\r\n */\r\nP.lessThanOrEqualTo = P.lte = function (y) {\r\n return this.cmp(y) < 1;\r\n};\r\n\r\n\r\n/*\r\n * Return the logarithm of the value of this Decimal to the specified base, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * If no base is specified, return log[10](arg).\r\n *\r\n * log[base](arg) = ln(arg) / ln(base)\r\n *\r\n * The result will always be correctly rounded if the base of the log is 10, and 'almost always'\r\n * otherwise:\r\n *\r\n * Depending on the rounding mode, the result may be incorrectly rounded if the first fifteen\r\n * rounding digits are [49]99999999999999 or [50]00000000000000. In that case, the maximum error\r\n * between the result and the correctly rounded result will be one ulp (unit in the last place).\r\n *\r\n * log[-b](a) = NaN\r\n * log[0](a) = NaN\r\n * log[1](a) = NaN\r\n * log[NaN](a) = NaN\r\n * log[Infinity](a) = NaN\r\n * log[b](0) = -Infinity\r\n * log[b](-0) = -Infinity\r\n * log[b](-a) = NaN\r\n * log[b](1) = 0\r\n * log[b](Infinity) = Infinity\r\n * log[b](NaN) = NaN\r\n *\r\n * [base] {number|string|bigint|Decimal} The base of the logarithm.\r\n *\r\n */\r\nP.logarithm = P.log = function (base) {\r\n var isBase10, d, denominator, k, inf, num, sd, r,\r\n arg = this,\r\n Ctor = arg.constructor,\r\n pr = Ctor.precision,\r\n rm = Ctor.rounding,\r\n guard = 5;\r\n\r\n // Default base is 10.\r\n if (base == null) {\r\n base = new Ctor(10);\r\n isBase10 = true;\r\n } else {\r\n base = new Ctor(base);\r\n d = base.d;\r\n\r\n // Return NaN if base is negative, or non-finite, or is 0 or 1.\r\n if (base.s < 0 || !d || !d[0] || base.eq(1)) return new Ctor(NaN);\r\n\r\n isBase10 = base.eq(10);\r\n }\r\n\r\n d = arg.d;\r\n\r\n // Is arg negative, non-finite, 0 or 1?\r\n if (arg.s < 0 || !d || !d[0] || arg.eq(1)) {\r\n return new Ctor(d && !d[0] ? -1 / 0 : arg.s != 1 ? NaN : d ? 0 : 1 / 0);\r\n }\r\n\r\n // The result will have a non-terminating decimal expansion if base is 10 and arg is not an\r\n // integer power of 10.\r\n if (isBase10) {\r\n if (d.length > 1) {\r\n inf = true;\r\n } else {\r\n for (k = d[0]; k % 10 === 0;) k /= 10;\r\n inf = k !== 1;\r\n }\r\n }\r\n\r\n external = false;\r\n sd = pr + guard;\r\n num = naturalLogarithm(arg, sd);\r\n denominator = isBase10 ? getLn10(Ctor, sd + 10) : naturalLogarithm(base, sd);\r\n\r\n // The result will have 5 rounding digits.\r\n r = divide(num, denominator, sd, 1);\r\n\r\n // If at a rounding boundary, i.e. the result's rounding digits are [49]9999 or [50]0000,\r\n // calculate 10 further digits.\r\n //\r\n // If the result is known to have an infinite decimal expansion, repeat this until it is clear\r\n // that the result is above or below the boundary. Otherwise, if after calculating the 10\r\n // further digits, the last 14 are nines, round up and assume the result is exact.\r\n // Also assume the result is exact if the last 14 are zero.\r\n //\r\n // Example of a result that will be incorrectly rounded:\r\n // log[1048576](4503599627370502) = 2.60000000000000009610279511444746...\r\n // The above result correctly rounded using ROUND_CEIL to 1 decimal place should be 2.7, but it\r\n // will be given as 2.6 as there are 15 zeros immediately after the requested decimal place, so\r\n // the exact result would be assumed to be 2.6, which rounded using ROUND_CEIL to 1 decimal\r\n // place is still 2.6.\r\n if (checkRoundingDigits(r.d, k = pr, rm)) {\r\n\r\n do {\r\n sd += 10;\r\n num = naturalLogarithm(arg, sd);\r\n denominator = isBase10 ? getLn10(Ctor, sd + 10) : naturalLogarithm(base, sd);\r\n r = divide(num, denominator, sd, 1);\r\n\r\n if (!inf) {\r\n\r\n // Check for 14 nines from the 2nd rounding digit, as the first may be 4.\r\n if (+digitsToString(r.d).slice(k + 1, k + 15) + 1 == 1e14) {\r\n r = finalise(r, pr + 1, 0);\r\n }\r\n\r\n break;\r\n }\r\n } while (checkRoundingDigits(r.d, k += 10, rm));\r\n }\r\n\r\n external = true;\r\n\r\n return finalise(r, pr, rm);\r\n};\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the maximum of the arguments and the value of this Decimal.\r\n *\r\n * arguments {number|string|bigint|Decimal}\r\n *\r\nP.max = function () {\r\n Array.prototype.push.call(arguments, this);\r\n return maxOrMin(this.constructor, arguments, -1);\r\n};\r\n */\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the minimum of the arguments and the value of this Decimal.\r\n *\r\n * arguments {number|string|bigint|Decimal}\r\n *\r\nP.min = function () {\r\n Array.prototype.push.call(arguments, this);\r\n return maxOrMin(this.constructor, arguments, 1);\r\n};\r\n */\r\n\r\n\r\n/*\r\n * n - 0 = n\r\n * n - N = N\r\n * n - I = -I\r\n * 0 - n = -n\r\n * 0 - 0 = 0\r\n * 0 - N = N\r\n * 0 - I = -I\r\n * N - n = N\r\n * N - 0 = N\r\n * N - N = N\r\n * N - I = N\r\n * I - n = I\r\n * I - 0 = I\r\n * I - N = N\r\n * I - I = N\r\n *\r\n * Return a new Decimal whose value is the value of this Decimal minus `y`, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n */\r\nP.minus = P.sub = function (y) {\r\n var d, e, i, j, k, len, pr, rm, xd, xe, xLTy, yd,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n y = new Ctor(y);\r\n\r\n // If either is not finite...\r\n if (!x.d || !y.d) {\r\n\r\n // Return NaN if either is NaN.\r\n if (!x.s || !y.s) y = new Ctor(NaN);\r\n\r\n // Return y negated if x is finite and y is ±Infinity.\r\n else if (x.d) y.s = -y.s;\r\n\r\n // Return x if y is finite and x is ±Infinity.\r\n // Return x if both are ±Infinity with different signs.\r\n // Return NaN if both are ±Infinity with the same sign.\r\n else y = new Ctor(y.d || x.s !== y.s ? x : NaN);\r\n\r\n return y;\r\n }\r\n\r\n // If signs differ...\r\n if (x.s != y.s) {\r\n y.s = -y.s;\r\n return x.plus(y);\r\n }\r\n\r\n xd = x.d;\r\n yd = y.d;\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n\r\n // If either is zero...\r\n if (!xd[0] || !yd[0]) {\r\n\r\n // Return y negated if x is zero and y is non-zero.\r\n if (yd[0]) y.s = -y.s;\r\n\r\n // Return x if y is zero and x is non-zero.\r\n else if (xd[0]) y = new Ctor(x);\r\n\r\n // Return zero if both are zero.\r\n // From IEEE 754 (2008) 6.3: 0 - 0 = -0 - -0 = -0 when rounding to -Infinity.\r\n else return new Ctor(rm === 3 ? -0 : 0);\r\n\r\n return external ? finalise(y, pr, rm) : y;\r\n }\r\n\r\n // x and y are finite, non-zero numbers with the same sign.\r\n\r\n // Calculate base 1e7 exponents.\r\n e = mathfloor(y.e / LOG_BASE);\r\n xe = mathfloor(x.e / LOG_BASE);\r\n\r\n xd = xd.slice();\r\n k = xe - e;\r\n\r\n // If base 1e7 exponents differ...\r\n if (k) {\r\n xLTy = k < 0;\r\n\r\n if (xLTy) {\r\n d = xd;\r\n k = -k;\r\n len = yd.length;\r\n } else {\r\n d = yd;\r\n e = xe;\r\n len = xd.length;\r\n }\r\n\r\n // Numbers with massively different exponents would result in a very high number of\r\n // zeros needing to be prepended, but this can be avoided while still ensuring correct\r\n // rounding by limiting the number of zeros to `Math.ceil(pr / LOG_BASE) + 2`.\r\n i = Math.max(Math.ceil(pr / LOG_BASE), len) + 2;\r\n\r\n if (k > i) {\r\n k = i;\r\n d.length = 1;\r\n }\r\n\r\n // Prepend zeros to equalise exponents.\r\n d.reverse();\r\n for (i = k; i--;) d.push(0);\r\n d.reverse();\r\n\r\n // Base 1e7 exponents equal.\r\n } else {\r\n\r\n // Check digits to determine which is the bigger number.\r\n\r\n i = xd.length;\r\n len = yd.length;\r\n xLTy = i < len;\r\n if (xLTy) len = i;\r\n\r\n for (i = 0; i < len; i++) {\r\n if (xd[i] != yd[i]) {\r\n xLTy = xd[i] < yd[i];\r\n break;\r\n }\r\n }\r\n\r\n k = 0;\r\n }\r\n\r\n if (xLTy) {\r\n d = xd;\r\n xd = yd;\r\n yd = d;\r\n y.s = -y.s;\r\n }\r\n\r\n len = xd.length;\r\n\r\n // Append zeros to `xd` if shorter.\r\n // Don't add zeros to `yd` if shorter as subtraction only needs to start at `yd` length.\r\n for (i = yd.length - len; i > 0; --i) xd[len++] = 0;\r\n\r\n // Subtract yd from xd.\r\n for (i = yd.length; i > k;) {\r\n\r\n if (xd[--i] < yd[i]) {\r\n for (j = i; j && xd[--j] === 0;) xd[j] = BASE - 1;\r\n --xd[j];\r\n xd[i] += BASE;\r\n }\r\n\r\n xd[i] -= yd[i];\r\n }\r\n\r\n // Remove trailing zeros.\r\n for (; xd[--len] === 0;) xd.pop();\r\n\r\n // Remove leading zeros and adjust exponent accordingly.\r\n for (; xd[0] === 0; xd.shift()) --e;\r\n\r\n // Zero?\r\n if (!xd[0]) return new Ctor(rm === 3 ? -0 : 0);\r\n\r\n y.d = xd;\r\n y.e = getBase10Exponent(xd, e);\r\n\r\n return external ? finalise(y, pr, rm) : y;\r\n};\r\n\r\n\r\n/*\r\n * n % 0 = N\r\n * n % N = N\r\n * n % I = n\r\n * 0 % n = 0\r\n * -0 % n = -0\r\n * 0 % 0 = N\r\n * 0 % N = N\r\n * 0 % I = 0\r\n * N % n = N\r\n * N % 0 = N\r\n * N % N = N\r\n * N % I = N\r\n * I % n = N\r\n * I % 0 = N\r\n * I % N = N\r\n * I % I = N\r\n *\r\n * Return a new Decimal whose value is the value of this Decimal modulo `y`, rounded to\r\n * `precision` significant digits using rounding mode `rounding`.\r\n *\r\n * The result depends on the modulo mode.\r\n *\r\n */\r\nP.modulo = P.mod = function (y) {\r\n var q,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n y = new Ctor(y);\r\n\r\n // Return NaN if x is ±Infinity or NaN, or y is NaN or ±0.\r\n if (!x.d || !y.s || y.d && !y.d[0]) return new Ctor(NaN);\r\n\r\n // Return x if y is ±Infinity or x is ±0.\r\n if (!y.d || x.d && !x.d[0]) {\r\n return finalise(new Ctor(x), Ctor.precision, Ctor.rounding);\r\n }\r\n\r\n // Prevent rounding of intermediate calculations.\r\n external = false;\r\n\r\n if (Ctor.modulo == 9) {\r\n\r\n // Euclidian division: q = sign(y) * floor(x / abs(y))\r\n // result = x - q * y where 0 <= result < abs(y)\r\n q = divide(x, y.abs(), 0, 3, 1);\r\n q.s *= y.s;\r\n } else {\r\n q = divide(x, y, 0, Ctor.modulo, 1);\r\n }\r\n\r\n q = q.times(y);\r\n\r\n external = true;\r\n\r\n return x.minus(q);\r\n};\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the natural exponential of the value of this Decimal,\r\n * i.e. the base e raised to the power the value of this Decimal, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n */\r\nP.naturalExponential = P.exp = function () {\r\n return naturalExponential(this);\r\n};\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the natural logarithm of the value of this Decimal,\r\n * rounded to `precision` significant digits using rounding mode `rounding`.\r\n *\r\n */\r\nP.naturalLogarithm = P.ln = function () {\r\n return naturalLogarithm(this);\r\n};\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the value of this Decimal negated, i.e. as if multiplied by\r\n * -1.\r\n *\r\n */\r\nP.negated = P.neg = function () {\r\n var x = new this.constructor(this);\r\n x.s = -x.s;\r\n return finalise(x);\r\n};\r\n\r\n\r\n/*\r\n * n + 0 = n\r\n * n + N = N\r\n * n + I = I\r\n * 0 + n = n\r\n * 0 + 0 = 0\r\n * 0 + N = N\r\n * 0 + I = I\r\n * N + n = N\r\n * N + 0 = N\r\n * N + N = N\r\n * N + I = N\r\n * I + n = I\r\n * I + 0 = I\r\n * I + N = N\r\n * I + I = I\r\n *\r\n * Return a new Decimal whose value is the value of this Decimal plus `y`, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n */\r\nP.plus = P.add = function (y) {\r\n var carry, d, e, i, k, len, pr, rm, xd, yd,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n y = new Ctor(y);\r\n\r\n // If either is not finite...\r\n if (!x.d || !y.d) {\r\n\r\n // Return NaN if either is NaN.\r\n if (!x.s || !y.s) y = new Ctor(NaN);\r\n\r\n // Return x if y is finite and x is ±Infinity.\r\n // Return x if both are ±Infinity with the same sign.\r\n // Return NaN if both are ±Infinity with different signs.\r\n // Return y if x is finite and y is ±Infinity.\r\n else if (!x.d) y = new Ctor(y.d || x.s === y.s ? x : NaN);\r\n\r\n return y;\r\n }\r\n\r\n // If signs differ...\r\n if (x.s != y.s) {\r\n y.s = -y.s;\r\n return x.minus(y);\r\n }\r\n\r\n xd = x.d;\r\n yd = y.d;\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n\r\n // If either is zero...\r\n if (!xd[0] || !yd[0]) {\r\n\r\n // Return x if y is zero.\r\n // Return y if y is non-zero.\r\n if (!yd[0]) y = new Ctor(x);\r\n\r\n return external ? finalise(y, pr, rm) : y;\r\n }\r\n\r\n // x and y are finite, non-zero numbers with the same sign.\r\n\r\n // Calculate base 1e7 exponents.\r\n k = mathfloor(x.e / LOG_BASE);\r\n e = mathfloor(y.e / LOG_BASE);\r\n\r\n xd = xd.slice();\r\n i = k - e;\r\n\r\n // If base 1e7 exponents differ...\r\n if (i) {\r\n\r\n if (i < 0) {\r\n d = xd;\r\n i = -i;\r\n len = yd.length;\r\n } else {\r\n d = yd;\r\n e = k;\r\n len = xd.length;\r\n }\r\n\r\n // Limit number of zeros prepended to max(ceil(pr / LOG_BASE), len) + 1.\r\n k = Math.ceil(pr / LOG_BASE);\r\n len = k > len ? k + 1 : len + 1;\r\n\r\n if (i > len) {\r\n i = len;\r\n d.length = 1;\r\n }\r\n\r\n // Prepend zeros to equalise exponents. Note: Faster to use reverse then do unshifts.\r\n d.reverse();\r\n for (; i--;) d.push(0);\r\n d.reverse();\r\n }\r\n\r\n len = xd.length;\r\n i = yd.length;\r\n\r\n // If yd is longer than xd, swap xd and yd so xd points to the longer array.\r\n if (len - i < 0) {\r\n i = len;\r\n d = yd;\r\n yd = xd;\r\n xd = d;\r\n }\r\n\r\n // Only start adding at yd.length - 1 as the further digits of xd can be left as they are.\r\n for (carry = 0; i;) {\r\n carry = (xd[--i] = xd[i] + yd[i] + carry) / BASE | 0;\r\n xd[i] %= BASE;\r\n }\r\n\r\n if (carry) {\r\n xd.unshift(carry);\r\n ++e;\r\n }\r\n\r\n // Remove trailing zeros.\r\n // No need to check for zero, as +x + +y != 0 && -x + -y != 0\r\n for (len = xd.length; xd[--len] == 0;) xd.pop();\r\n\r\n y.d = xd;\r\n y.e = getBase10Exponent(xd, e);\r\n\r\n return external ? finalise(y, pr, rm) : y;\r\n};\r\n\r\n\r\n/*\r\n * Return the number of significant digits of the value of this Decimal.\r\n *\r\n * [z] {boolean|number} Whether to count integer-part trailing zeros: true, false, 1 or 0.\r\n *\r\n */\r\nP.precision = P.sd = function (z) {\r\n var k,\r\n x = this;\r\n\r\n if (z !== void 0 && z !== !!z && z !== 1 && z !== 0) throw Error(invalidArgument + z);\r\n\r\n if (x.d) {\r\n k = getPrecision(x.d);\r\n if (z && x.e + 1 > k) k = x.e + 1;\r\n } else {\r\n k = NaN;\r\n }\r\n\r\n return k;\r\n};\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the value of this Decimal rounded to a whole number using\r\n * rounding mode `rounding`.\r\n *\r\n */\r\nP.round = function () {\r\n var x = this,\r\n Ctor = x.constructor;\r\n\r\n return finalise(new Ctor(x), x.e + 1, Ctor.rounding);\r\n};\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the sine of the value in radians of this Decimal.\r\n *\r\n * Domain: [-Infinity, Infinity]\r\n * Range: [-1, 1]\r\n *\r\n * sin(x) = x - x^3/3! + x^5/5! - ...\r\n *\r\n * sin(0) = 0\r\n * sin(-0) = -0\r\n * sin(Infinity) = NaN\r\n * sin(-Infinity) = NaN\r\n * sin(NaN) = NaN\r\n *\r\n */\r\nP.sine = P.sin = function () {\r\n var pr, rm,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (!x.isFinite()) return new Ctor(NaN);\r\n if (x.isZero()) return new Ctor(x);\r\n\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n Ctor.precision = pr + Math.max(x.e, x.sd()) + LOG_BASE;\r\n Ctor.rounding = 1;\r\n\r\n x = sine(Ctor, toLessThanHalfPi(Ctor, x));\r\n\r\n Ctor.precision = pr;\r\n Ctor.rounding = rm;\r\n\r\n return finalise(quadrant > 2 ? x.neg() : x, pr, rm, true);\r\n};\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the square root of this Decimal, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * sqrt(-n) = N\r\n * sqrt(N) = N\r\n * sqrt(-I) = N\r\n * sqrt(I) = I\r\n * sqrt(0) = 0\r\n * sqrt(-0) = -0\r\n *\r\n */\r\nP.squareRoot = P.sqrt = function () {\r\n var m, n, sd, r, rep, t,\r\n x = this,\r\n d = x.d,\r\n e = x.e,\r\n s = x.s,\r\n Ctor = x.constructor;\r\n\r\n // Negative/NaN/Infinity/zero?\r\n if (s !== 1 || !d || !d[0]) {\r\n return new Ctor(!s || s < 0 && (!d || d[0]) ? NaN : d ? x : 1 / 0);\r\n }\r\n\r\n external = false;\r\n\r\n // Initial estimate.\r\n s = Math.sqrt(+x);\r\n\r\n // Math.sqrt underflow/overflow?\r\n // Pass x to Math.sqrt as integer, then adjust the exponent of the result.\r\n if (s == 0 || s == 1 / 0) {\r\n n = digitsToString(d);\r\n\r\n if ((n.length + e) % 2 == 0) n += '0';\r\n s = Math.sqrt(n);\r\n e = mathfloor((e + 1) / 2) - (e < 0 || e % 2);\r\n\r\n if (s == 1 / 0) {\r\n n = '5e' + e;\r\n } else {\r\n n = s.toExponential();\r\n n = n.slice(0, n.indexOf('e') + 1) + e;\r\n }\r\n\r\n r = new Ctor(n);\r\n } else {\r\n r = new Ctor(s.toString());\r\n }\r\n\r\n sd = (e = Ctor.precision) + 3;\r\n\r\n // Newton-Raphson iteration.\r\n for (;;) {\r\n t = r;\r\n r = t.plus(divide(x, t, sd + 2, 1)).times(0.5);\r\n\r\n // TODO? Replace with for-loop and checkRoundingDigits.\r\n if (digitsToString(t.d).slice(0, sd) === (n = digitsToString(r.d)).slice(0, sd)) {\r\n n = n.slice(sd - 3, sd + 1);\r\n\r\n // The 4th rounding digit may be in error by -1 so if the 4 rounding digits are 9999 or\r\n // 4999, i.e. approaching a rounding boundary, continue the iteration.\r\n if (n == '9999' || !rep && n == '4999') {\r\n\r\n // On the first iteration only, check to see if rounding up gives the exact result as the\r\n // nines may infinitely repeat.\r\n if (!rep) {\r\n finalise(t, e + 1, 0);\r\n\r\n if (t.times(t).eq(x)) {\r\n r = t;\r\n break;\r\n }\r\n }\r\n\r\n sd += 4;\r\n rep = 1;\r\n } else {\r\n\r\n // If the rounding digits are null, 0{0,4} or 50{0,3}, check for an exact result.\r\n // If not, then there are further digits and m will be truthy.\r\n if (!+n || !+n.slice(1) && n.charAt(0) == '5') {\r\n\r\n // Truncate to the first rounding digit.\r\n finalise(r, e + 1, 1);\r\n m = !r.times(r).eq(x);\r\n }\r\n\r\n break;\r\n }\r\n }\r\n }\r\n\r\n external = true;\r\n\r\n return finalise(r, e, Ctor.rounding, m);\r\n};\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the tangent of the value in radians of this Decimal.\r\n *\r\n * Domain: [-Infinity, Infinity]\r\n * Range: [-Infinity, Infinity]\r\n *\r\n * tan(0) = 0\r\n * tan(-0) = -0\r\n * tan(Infinity) = NaN\r\n * tan(-Infinity) = NaN\r\n * tan(NaN) = NaN\r\n *\r\n */\r\nP.tangent = P.tan = function () {\r\n var pr, rm,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (!x.isFinite()) return new Ctor(NaN);\r\n if (x.isZero()) return new Ctor(x);\r\n\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n Ctor.precision = pr + 10;\r\n Ctor.rounding = 1;\r\n\r\n x = x.sin();\r\n x.s = 1;\r\n x = divide(x, new Ctor(1).minus(x.times(x)).sqrt(), pr + 10, 0);\r\n\r\n Ctor.precision = pr;\r\n Ctor.rounding = rm;\r\n\r\n return finalise(quadrant == 2 || quadrant == 4 ? x.neg() : x, pr, rm, true);\r\n};\r\n\r\n\r\n/*\r\n * n * 0 = 0\r\n * n * N = N\r\n * n * I = I\r\n * 0 * n = 0\r\n * 0 * 0 = 0\r\n * 0 * N = N\r\n * 0 * I = N\r\n * N * n = N\r\n * N * 0 = N\r\n * N * N = N\r\n * N * I = N\r\n * I * n = I\r\n * I * 0 = N\r\n * I * N = N\r\n * I * I = I\r\n *\r\n * Return a new Decimal whose value is this Decimal times `y`, rounded to `precision` significant\r\n * digits using rounding mode `rounding`.\r\n *\r\n */\r\nP.times = P.mul = function (y) {\r\n var carry, e, i, k, r, rL, t, xdL, ydL,\r\n x = this,\r\n Ctor = x.constructor,\r\n xd = x.d,\r\n yd = (y = new Ctor(y)).d;\r\n\r\n y.s *= x.s;\r\n\r\n // If either is NaN, ±Infinity or ±0...\r\n if (!xd || !xd[0] || !yd || !yd[0]) {\r\n\r\n return new Ctor(!y.s || xd && !xd[0] && !yd || yd && !yd[0] && !xd\r\n\r\n // Return NaN if either is NaN.\r\n // Return NaN if x is ±0 and y is ±Infinity, or y is ±0 and x is ±Infinity.\r\n ? NaN\r\n\r\n // Return ±Infinity if either is ±Infinity.\r\n // Return ±0 if either is ±0.\r\n : !xd || !yd ? y.s / 0 : y.s * 0);\r\n }\r\n\r\n e = mathfloor(x.e / LOG_BASE) + mathfloor(y.e / LOG_BASE);\r\n xdL = xd.length;\r\n ydL = yd.length;\r\n\r\n // Ensure xd points to the longer array.\r\n if (xdL < ydL) {\r\n r = xd;\r\n xd = yd;\r\n yd = r;\r\n rL = xdL;\r\n xdL = ydL;\r\n ydL = rL;\r\n }\r\n\r\n // Initialise the result array with zeros.\r\n r = [];\r\n rL = xdL + ydL;\r\n for (i = rL; i--;) r.push(0);\r\n\r\n // Multiply!\r\n for (i = ydL; --i >= 0;) {\r\n carry = 0;\r\n for (k = xdL + i; k > i;) {\r\n t = r[k] + yd[i] * xd[k - i - 1] + carry;\r\n r[k--] = t % BASE | 0;\r\n carry = t / BASE | 0;\r\n }\r\n\r\n r[k] = (r[k] + carry) % BASE | 0;\r\n }\r\n\r\n // Remove trailing zeros.\r\n for (; !r[--rL];) r.pop();\r\n\r\n if (carry) ++e;\r\n else r.shift();\r\n\r\n y.d = r;\r\n y.e = getBase10Exponent(r, e);\r\n\r\n return external ? finalise(y, Ctor.precision, Ctor.rounding) : y;\r\n};\r\n\r\n\r\n/*\r\n * Return a string representing the value of this Decimal in base 2, round to `sd` significant\r\n * digits using rounding mode `rm`.\r\n *\r\n * If the optional `sd` argument is present then return binary exponential notation.\r\n *\r\n * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n */\r\nP.toBinary = function (sd, rm) {\r\n return toStringBinary(this, 2, sd, rm);\r\n};\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the value of this Decimal rounded to a maximum of `dp`\r\n * decimal places using rounding mode `rm` or `rounding` if `rm` is omitted.\r\n *\r\n * If `dp` is omitted, return a new Decimal whose value is the value of this Decimal.\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX_DIGITS inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n */\r\nP.toDecimalPlaces = P.toDP = function (dp, rm) {\r\n var x = this,\r\n Ctor = x.constructor;\r\n\r\n x = new Ctor(x);\r\n if (dp === void 0) return x;\r\n\r\n checkInt32(dp, 0, MAX_DIGITS);\r\n\r\n if (rm === void 0) rm = Ctor.rounding;\r\n else checkInt32(rm, 0, 8);\r\n\r\n return finalise(x, dp + x.e + 1, rm);\r\n};\r\n\r\n\r\n/*\r\n * Return a string representing the value of this Decimal in exponential notation rounded to\r\n * `dp` fixed decimal places using rounding mode `rounding`.\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX_DIGITS inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n */\r\nP.toExponential = function (dp, rm) {\r\n var str,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (dp === void 0) {\r\n str = finiteToString(x, true);\r\n } else {\r\n checkInt32(dp, 0, MAX_DIGITS);\r\n\r\n if (rm === void 0) rm = Ctor.rounding;\r\n else checkInt32(rm, 0, 8);\r\n\r\n x = finalise(new Ctor(x), dp + 1, rm);\r\n str = finiteToString(x, true, dp + 1);\r\n }\r\n\r\n return x.isNeg() && !x.isZero() ? '-' + str : str;\r\n};\r\n\r\n\r\n/*\r\n * Return a string representing the value of this Decimal in normal (fixed-point) notation to\r\n * `dp` fixed decimal places and rounded using rounding mode `rm` or `rounding` if `rm` is\r\n * omitted.\r\n *\r\n * As with JavaScript numbers, (-0).toFixed(0) is '0', but e.g. (-0.00001).toFixed(0) is '-0'.\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX_DIGITS inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * (-0).toFixed(0) is '0', but (-0.1).toFixed(0) is '-0'.\r\n * (-0).toFixed(1) is '0.0', but (-0.01).toFixed(1) is '-0.0'.\r\n * (-0).toFixed(3) is '0.000'.\r\n * (-0.5).toFixed(0) is '-0'.\r\n *\r\n */\r\nP.toFixed = function (dp, rm) {\r\n var str, y,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (dp === void 0) {\r\n str = finiteToString(x);\r\n } else {\r\n checkInt32(dp, 0, MAX_DIGITS);\r\n\r\n if (rm === void 0) rm = Ctor.rounding;\r\n else checkInt32(rm, 0, 8);\r\n\r\n y = finalise(new Ctor(x), dp + x.e + 1, rm);\r\n str = finiteToString(y, false, dp + y.e + 1);\r\n }\r\n\r\n // To determine whether to add the minus sign look at the value before it was rounded,\r\n // i.e. look at `x` rather than `y`.\r\n return x.isNeg() && !x.isZero() ? '-' + str : str;\r\n};\r\n\r\n\r\n/*\r\n * Return an array representing the value of this Decimal as a simple fraction with an integer\r\n * numerator and an integer denominator.\r\n *\r\n * The denominator will be a positive non-zero value less than or equal to the specified maximum\r\n * denominator. If a maximum denominator is not specified, the denominator will be the lowest\r\n * value necessary to represent the number exactly.\r\n *\r\n * [maxD] {number|string|bigint|Decimal} Maximum denominator. Integer >= 1 and < Infinity.\r\n *\r\n */\r\nP.toFraction = function (maxD) {\r\n var d, d0, d1, d2, e, k, n, n0, n1, pr, q, r,\r\n x = this,\r\n xd = x.d,\r\n Ctor = x.constructor;\r\n\r\n if (!xd) return new Ctor(x);\r\n\r\n n1 = d0 = new Ctor(1);\r\n d1 = n0 = new Ctor(0);\r\n\r\n d = new Ctor(d1);\r\n e = d.e = getPrecision(xd) - x.e - 1;\r\n k = e % LOG_BASE;\r\n d.d[0] = mathpow(10, k < 0 ? LOG_BASE + k : k);\r\n\r\n if (maxD == null) {\r\n\r\n // d is 10**e, the minimum max-denominator needed.\r\n maxD = e > 0 ? d : n1;\r\n } else {\r\n n = new Ctor(maxD);\r\n if (!n.isInt() || n.lt(n1)) throw Error(invalidArgument + n);\r\n maxD = n.gt(d) ? (e > 0 ? d : n1) : n;\r\n }\r\n\r\n external = false;\r\n n = new Ctor(digitsToString(xd));\r\n pr = Ctor.precision;\r\n Ctor.precision = e = xd.length * LOG_BASE * 2;\r\n\r\n for (;;) {\r\n q = divide(n, d, 0, 1, 1);\r\n d2 = d0.plus(q.times(d1));\r\n if (d2.cmp(maxD) == 1) break;\r\n d0 = d1;\r\n d1 = d2;\r\n d2 = n1;\r\n n1 = n0.plus(q.times(d2));\r\n n0 = d2;\r\n d2 = d;\r\n d = n.minus(q.times(d2));\r\n n = d2;\r\n }\r\n\r\n d2 = divide(maxD.minus(d0), d1, 0, 1, 1);\r\n n0 = n0.plus(d2.times(n1));\r\n d0 = d0.plus(d2.times(d1));\r\n n0.s = n1.s = x.s;\r\n\r\n // Determine which fraction is closer to x, n0/d0 or n1/d1?\r\n r = divide(n1, d1, e, 1).minus(x).abs().cmp(divide(n0, d0, e, 1).minus(x).abs()) < 1\r\n ? [n1, d1] : [n0, d0];\r\n\r\n Ctor.precision = pr;\r\n external = true;\r\n\r\n return r;\r\n};\r\n\r\n\r\n/*\r\n * Return a string representing the value of this Decimal in base 16, round to `sd` significant\r\n * digits using rounding mode `rm`.\r\n *\r\n * If the optional `sd` argument is present then return binary exponential notation.\r\n *\r\n * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n */\r\nP.toHexadecimal = P.toHex = function (sd, rm) {\r\n return toStringBinary(this, 16, sd, rm);\r\n};\r\n\r\n\r\n/*\r\n * Returns a new Decimal whose value is the nearest multiple of `y` in the direction of rounding\r\n * mode `rm`, or `Decimal.rounding` if `rm` is omitted, to the value of this Decimal.\r\n *\r\n * The return value will always have the same sign as this Decimal, unless either this Decimal\r\n * or `y` is NaN, in which case the return value will be also be NaN.\r\n *\r\n * The return value is not affected by the value of `precision`.\r\n *\r\n * y {number|string|bigint|Decimal} The magnitude to round to a multiple of.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * 'toNearest() rounding mode not an integer: {rm}'\r\n * 'toNearest() rounding mode out of range: {rm}'\r\n *\r\n */\r\nP.toNearest = function (y, rm) {\r\n var x = this,\r\n Ctor = x.constructor;\r\n\r\n x = new Ctor(x);\r\n\r\n if (y == null) {\r\n\r\n // If x is not finite, return x.\r\n if (!x.d) return x;\r\n\r\n y = new Ctor(1);\r\n rm = Ctor.rounding;\r\n } else {\r\n y = new Ctor(y);\r\n if (rm === void 0) {\r\n rm = Ctor.rounding;\r\n } else {\r\n checkInt32(rm, 0, 8);\r\n }\r\n\r\n // If x is not finite, return x if y is not NaN, else NaN.\r\n if (!x.d) return y.s ? x : y;\r\n\r\n // If y is not finite, return Infinity with the sign of x if y is Infinity, else NaN.\r\n if (!y.d) {\r\n if (y.s) y.s = x.s;\r\n return y;\r\n }\r\n }\r\n\r\n // If y is not zero, calculate the nearest multiple of y to x.\r\n if (y.d[0]) {\r\n external = false;\r\n x = divide(x, y, 0, rm, 1).times(y);\r\n external = true;\r\n finalise(x);\r\n\r\n // If y is zero, return zero with the sign of x.\r\n } else {\r\n y.s = x.s;\r\n x = y;\r\n }\r\n\r\n return x;\r\n};\r\n\r\n\r\n/*\r\n * Return the value of this Decimal converted to a number primitive.\r\n * Zero keeps its sign.\r\n *\r\n */\r\nP.toNumber = function () {\r\n return +this;\r\n};\r\n\r\n\r\n/*\r\n * Return a string representing the value of this Decimal in base 8, round to `sd` significant\r\n * digits using rounding mode `rm`.\r\n *\r\n * If the optional `sd` argument is present then return binary exponential notation.\r\n *\r\n * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n */\r\nP.toOctal = function (sd, rm) {\r\n return toStringBinary(this, 8, sd, rm);\r\n};\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the value of this Decimal raised to the power `y`, rounded\r\n * to `precision` significant digits using rounding mode `rounding`.\r\n *\r\n * ECMAScript compliant.\r\n *\r\n * pow(x, NaN) = NaN\r\n * pow(x, ±0) = 1\r\n\r\n * pow(NaN, non-zero) = NaN\r\n * pow(abs(x) > 1, +Infinity) = +Infinity\r\n * pow(abs(x) > 1, -Infinity) = +0\r\n * pow(abs(x) == 1, ±Infinity) = NaN\r\n * pow(abs(x) < 1, +Infinity) = +0\r\n * pow(abs(x) < 1, -Infinity) = +Infinity\r\n * pow(+Infinity, y > 0) = +Infinity\r\n * pow(+Infinity, y < 0) = +0\r\n * pow(-Infinity, odd integer > 0) = -Infinity\r\n * pow(-Infinity, even integer > 0) = +Infinity\r\n * pow(-Infinity, odd integer < 0) = -0\r\n * pow(-Infinity, even integer < 0) = +0\r\n * pow(+0, y > 0) = +0\r\n * pow(+0, y < 0) = +Infinity\r\n * pow(-0, odd integer > 0) = -0\r\n * pow(-0, even integer > 0) = +0\r\n * pow(-0, odd integer < 0) = -Infinity\r\n * pow(-0, even integer < 0) = +Infinity\r\n * pow(finite x < 0, finite non-integer) = NaN\r\n *\r\n * For non-integer or very large exponents pow(x, y) is calculated using\r\n *\r\n * x^y = exp(y*ln(x))\r\n *\r\n * Assuming the first 15 rounding digits are each equally likely to be any digit 0-9, the\r\n * probability of an incorrectly rounded result\r\n * P([49]9{14} | [50]0{14}) = 2 * 0.2 * 10^-14 = 4e-15 = 1/2.5e+14\r\n * i.e. 1 in 250,000,000,000,000\r\n *\r\n * If a result is incorrectly rounded the maximum error will be 1 ulp (unit in last place).\r\n *\r\n * y {number|string|bigint|Decimal} The power to which to raise this Decimal.\r\n *\r\n */\r\nP.toPower = P.pow = function (y) {\r\n var e, k, pr, r, rm, s,\r\n x = this,\r\n Ctor = x.constructor,\r\n yn = +(y = new Ctor(y));\r\n\r\n // Either ±Infinity, NaN or ±0?\r\n if (!x.d || !y.d || !x.d[0] || !y.d[0]) return new Ctor(mathpow(+x, yn));\r\n\r\n x = new Ctor(x);\r\n\r\n if (x.eq(1)) return x;\r\n\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n\r\n if (y.eq(1)) return finalise(x, pr, rm);\r\n\r\n // y exponent\r\n e = mathfloor(y.e / LOG_BASE);\r\n\r\n // If y is a small integer use the 'exponentiation by squaring' algorithm.\r\n if (e >= y.d.length - 1 && (k = yn < 0 ? -yn : yn) <= MAX_SAFE_INTEGER) {\r\n r = intPow(Ctor, x, k, pr);\r\n return y.s < 0 ? new Ctor(1).div(r) : finalise(r, pr, rm);\r\n }\r\n\r\n s = x.s;\r\n\r\n // if x is negative\r\n if (s < 0) {\r\n\r\n // if y is not an integer\r\n if (e < y.d.length - 1) return new Ctor(NaN);\r\n\r\n // Result is positive if x is negative and the last digit of integer y is even.\r\n if ((y.d[e] & 1) == 0) s = 1;\r\n\r\n // if x.eq(-1)\r\n if (x.e == 0 && x.d[0] == 1 && x.d.length == 1) {\r\n x.s = s;\r\n return x;\r\n }\r\n }\r\n\r\n // Estimate result exponent.\r\n // x^y = 10^e, where e = y * log10(x)\r\n // log10(x) = log10(x_significand) + x_exponent\r\n // log10(x_significand) = ln(x_significand) / ln(10)\r\n k = mathpow(+x, yn);\r\n e = k == 0 || !isFinite(k)\r\n ? mathfloor(yn * (Math.log('0.' + digitsToString(x.d)) / Math.LN10 + x.e + 1))\r\n : new Ctor(k + '').e;\r\n\r\n // Exponent estimate may be incorrect e.g. x: 0.999999999999999999, y: 2.29, e: 0, r.e: -1.\r\n\r\n // Overflow/underflow?\r\n if (e > Ctor.maxE + 1 || e < Ctor.minE - 1) return new Ctor(e > 0 ? s / 0 : 0);\r\n\r\n external = false;\r\n Ctor.rounding = x.s = 1;\r\n\r\n // Estimate the extra guard digits needed to ensure five correct rounding digits from\r\n // naturalLogarithm(x). Example of failure without these extra digits (precision: 10):\r\n // new Decimal(2.32456).pow('2087987436534566.46411')\r\n // should be 1.162377823e+764914905173815, but is 1.162355823e+764914905173815\r\n k = Math.min(12, (e + '').length);\r\n\r\n // r = x^y = exp(y*ln(x))\r\n r = naturalExponential(y.times(naturalLogarithm(x, pr + k)), pr);\r\n\r\n // r may be Infinity, e.g. (0.9999999999999999).pow(-1e+40)\r\n if (r.d) {\r\n\r\n // Truncate to the required precision plus five rounding digits.\r\n r = finalise(r, pr + 5, 1);\r\n\r\n // If the rounding digits are [49]9999 or [50]0000 increase the precision by 10 and recalculate\r\n // the result.\r\n if (checkRoundingDigits(r.d, pr, rm)) {\r\n e = pr + 10;\r\n\r\n // Truncate to the increased precision plus five rounding digits.\r\n r = finalise(naturalExponential(y.times(naturalLogarithm(x, e + k)), e), e + 5, 1);\r\n\r\n // Check for 14 nines from the 2nd rounding digit (the first rounding digit may be 4 or 9).\r\n if (+digitsToString(r.d).slice(pr + 1, pr + 15) + 1 == 1e14) {\r\n r = finalise(r, pr + 1, 0);\r\n }\r\n }\r\n }\r\n\r\n r.s = s;\r\n external = true;\r\n Ctor.rounding = rm;\r\n\r\n return finalise(r, pr, rm);\r\n};\r\n\r\n\r\n/*\r\n * Return a string representing the value of this Decimal rounded to `sd` significant digits\r\n * using rounding mode `rounding`.\r\n *\r\n * Return exponential notation if `sd` is less than the number of digits necessary to represent\r\n * the integer part of the value in normal notation.\r\n *\r\n * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n */\r\nP.toPrecision = function (sd, rm) {\r\n var str,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (sd === void 0) {\r\n str = finiteToString(x, x.e <= Ctor.toExpNeg || x.e >= Ctor.toExpPos);\r\n } else {\r\n checkInt32(sd, 1, MAX_DIGITS);\r\n\r\n if (rm === void 0) rm = Ctor.rounding;\r\n else checkInt32(rm, 0, 8);\r\n\r\n x = finalise(new Ctor(x), sd, rm);\r\n str = finiteToString(x, sd <= x.e || x.e <= Ctor.toExpNeg, sd);\r\n }\r\n\r\n return x.isNeg() && !x.isZero() ? '-' + str : str;\r\n};\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the value of this Decimal rounded to a maximum of `sd`\r\n * significant digits using rounding mode `rm`, or to `precision` and `rounding` respectively if\r\n * omitted.\r\n *\r\n * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * 'toSD() digits out of range: {sd}'\r\n * 'toSD() digits not an integer: {sd}'\r\n * 'toSD() rounding mode not an integer: {rm}'\r\n * 'toSD() rounding mode out of range: {rm}'\r\n *\r\n */\r\nP.toSignificantDigits = P.toSD = function (sd, rm) {\r\n var x = this,\r\n Ctor = x.constructor;\r\n\r\n if (sd === void 0) {\r\n sd = Ctor.precision;\r\n rm = Ctor.rounding;\r\n } else {\r\n checkInt32(sd, 1, MAX_DIGITS);\r\n\r\n if (rm === void 0) rm = Ctor.rounding;\r\n else checkInt32(rm, 0, 8);\r\n }\r\n\r\n return finalise(new Ctor(x), sd, rm);\r\n};\r\n\r\n\r\n/*\r\n * Return a string representing the value of this Decimal.\r\n *\r\n * Return exponential notation if this Decimal has a positive exponent equal to or greater than\r\n * `toExpPos`, or a negative exponent equal to or less than `toExpNeg`.\r\n *\r\n */\r\nP.toString = function () {\r\n var x = this,\r\n Ctor = x.constructor,\r\n str = finiteToString(x, x.e <= Ctor.toExpNeg || x.e >= Ctor.toExpPos);\r\n\r\n return x.isNeg() && !x.isZero() ? '-' + str : str;\r\n};\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the value of this Decimal truncated to a whole number.\r\n *\r\n */\r\nP.truncated = P.trunc = function () {\r\n return finalise(new this.constructor(this), this.e + 1, 1);\r\n};\r\n\r\n\r\n/*\r\n * Return a string representing the value of this Decimal.\r\n * Unlike `toString`, negative zero will include the minus sign.\r\n *\r\n */\r\nP.valueOf = P.toJSON = function () {\r\n var x = this,\r\n Ctor = x.constructor,\r\n str = finiteToString(x, x.e <= Ctor.toExpNeg || x.e >= Ctor.toExpPos);\r\n\r\n return x.isNeg() ? '-' + str : str;\r\n};\r\n\r\n\r\n// Helper functions for Decimal.prototype (P) and/or Decimal methods, and their callers.\r\n\r\n\r\n/*\r\n * digitsToString P.cubeRoot, P.logarithm, P.squareRoot, P.toFraction, P.toPower,\r\n * finiteToString, naturalExponential, naturalLogarithm\r\n * checkInt32 P.toDecimalPlaces, P.toExponential, P.toFixed, P.toNearest,\r\n * P.toPrecision, P.toSignificantDigits, toStringBinary, random\r\n * checkRoundingDigits P.logarithm, P.toPower, naturalExponential, naturalLogarithm\r\n * convertBase toStringBinary, parseOther\r\n * cos P.cos\r\n * divide P.atanh, P.cubeRoot, P.dividedBy, P.dividedToIntegerBy,\r\n * P.logarithm, P.modulo, P.squareRoot, P.tan, P.tanh, P.toFraction,\r\n * P.toNearest, toStringBinary, naturalExponential, naturalLogarithm,\r\n * taylorSeries, atan2, parseOther\r\n * finalise P.absoluteValue, P.atan, P.atanh, P.ceil, P.cos, P.cosh,\r\n * P.cubeRoot, P.dividedToIntegerBy, P.floor, P.logarithm, P.minus,\r\n * P.modulo, P.negated, P.plus, P.round, P.sin, P.sinh, P.squareRoot,\r\n * P.tan, P.times, P.toDecimalPlaces, P.toExponential, P.toFixed,\r\n * P.toNearest, P.toPower, P.toPrecision, P.toSignificantDigits,\r\n * P.truncated, divide, getLn10, getPi, naturalExponential,\r\n * naturalLogarithm, ceil, floor, round, trunc\r\n * finiteToString P.toExponential, P.toFixed, P.toPrecision, P.toString, P.valueOf,\r\n * toStringBinary\r\n * getBase10Exponent P.minus, P.plus, P.times, parseOther\r\n * getLn10 P.logarithm, naturalLogarithm\r\n * getPi P.acos, P.asin, P.atan, toLessThanHalfPi, atan2\r\n * getPrecision P.precision, P.toFraction\r\n * getZeroString digitsToString, finiteToString\r\n * intPow P.toPower, parseOther\r\n * isOdd toLessThanHalfPi\r\n * maxOrMin max, min\r\n * naturalExponential P.naturalExponential, P.toPower\r\n * naturalLogarithm P.acosh, P.asinh, P.atanh, P.logarithm, P.naturalLogarithm,\r\n * P.toPower, naturalExponential\r\n * nonFiniteToString finiteToString, toStringBinary\r\n * parseDecimal Decimal\r\n * parseOther Decimal\r\n * sin P.sin\r\n * taylorSeries P.cosh, P.sinh, cos, sin\r\n * toLessThanHalfPi P.cos, P.sin\r\n * toStringBinary P.toBinary, P.toHexadecimal, P.toOctal\r\n * truncate intPow\r\n *\r\n * Throws: P.logarithm, P.precision, P.toFraction, checkInt32, getLn10, getPi,\r\n * naturalLogarithm, config, parseOther, random, Decimal\r\n */\r\n\r\n\r\nfunction digitsToString(d) {\r\n var i, k, ws,\r\n indexOfLastWord = d.length - 1,\r\n str = '',\r\n w = d[0];\r\n\r\n if (indexOfLastWord > 0) {\r\n str += w;\r\n for (i = 1; i < indexOfLastWord; i++) {\r\n ws = d[i] + '';\r\n k = LOG_BASE - ws.length;\r\n if (k) str += getZeroString(k);\r\n str += ws;\r\n }\r\n\r\n w = d[i];\r\n ws = w + '';\r\n k = LOG_BASE - ws.length;\r\n if (k) str += getZeroString(k);\r\n } else if (w === 0) {\r\n return '0';\r\n }\r\n\r\n // Remove trailing zeros of last w.\r\n for (; w % 10 === 0;) w /= 10;\r\n\r\n return str + w;\r\n}\r\n\r\n\r\nfunction checkInt32(i, min, max) {\r\n if (i !== ~~i || i < min || i > max) {\r\n throw Error(invalidArgument + i);\r\n }\r\n}\r\n\r\n\r\n/*\r\n * Check 5 rounding digits if `repeating` is null, 4 otherwise.\r\n * `repeating == null` if caller is `log` or `pow`,\r\n * `repeating != null` if caller is `naturalLogarithm` or `naturalExponential`.\r\n */\r\nfunction checkRoundingDigits(d, i, rm, repeating) {\r\n var di, k, r, rd;\r\n\r\n // Get the length of the first word of the array d.\r\n for (k = d[0]; k >= 10; k /= 10) --i;\r\n\r\n // Is the rounding digit in the first word of d?\r\n if (--i < 0) {\r\n i += LOG_BASE;\r\n di = 0;\r\n } else {\r\n di = Math.ceil((i + 1) / LOG_BASE);\r\n i %= LOG_BASE;\r\n }\r\n\r\n // i is the index (0 - 6) of the rounding digit.\r\n // E.g. if within the word 3487563 the first rounding digit is 5,\r\n // then i = 4, k = 1000, rd = 3487563 % 1000 = 563\r\n k = mathpow(10, LOG_BASE - i);\r\n rd = d[di] % k | 0;\r\n\r\n if (repeating == null) {\r\n if (i < 3) {\r\n if (i == 0) rd = rd / 100 | 0;\r\n else if (i == 1) rd = rd / 10 | 0;\r\n r = rm < 4 && rd == 99999 || rm > 3 && rd == 49999 || rd == 50000 || rd == 0;\r\n } else {\r\n r = (rm < 4 && rd + 1 == k || rm > 3 && rd + 1 == k / 2) &&\r\n (d[di + 1] / k / 100 | 0) == mathpow(10, i - 2) - 1 ||\r\n (rd == k / 2 || rd == 0) && (d[di + 1] / k / 100 | 0) == 0;\r\n }\r\n } else {\r\n if (i < 4) {\r\n if (i == 0) rd = rd / 1000 | 0;\r\n else if (i == 1) rd = rd / 100 | 0;\r\n else if (i == 2) rd = rd / 10 | 0;\r\n r = (repeating || rm < 4) && rd == 9999 || !repeating && rm > 3 && rd == 4999;\r\n } else {\r\n r = ((repeating || rm < 4) && rd + 1 == k ||\r\n (!repeating && rm > 3) && rd + 1 == k / 2) &&\r\n (d[di + 1] / k / 1000 | 0) == mathpow(10, i - 3) - 1;\r\n }\r\n }\r\n\r\n return r;\r\n}\r\n\r\n\r\n// Convert string of `baseIn` to an array of numbers of `baseOut`.\r\n// Eg. convertBase('255', 10, 16) returns [15, 15].\r\n// Eg. convertBase('ff', 16, 10) returns [2, 5, 5].\r\nfunction convertBase(str, baseIn, baseOut) {\r\n var j,\r\n arr = [0],\r\n arrL,\r\n i = 0,\r\n strL = str.length;\r\n\r\n for (; i < strL;) {\r\n for (arrL = arr.length; arrL--;) arr[arrL] *= baseIn;\r\n arr[0] += NUMERALS.indexOf(str.charAt(i++));\r\n for (j = 0; j < arr.length; j++) {\r\n if (arr[j] > baseOut - 1) {\r\n if (arr[j + 1] === void 0) arr[j + 1] = 0;\r\n arr[j + 1] += arr[j] / baseOut | 0;\r\n arr[j] %= baseOut;\r\n }\r\n }\r\n }\r\n\r\n return arr.reverse();\r\n}\r\n\r\n\r\n/*\r\n * cos(x) = 1 - x^2/2! + x^4/4! - ...\r\n * |x| < pi/2\r\n *\r\n */\r\nfunction cosine(Ctor, x) {\r\n var k, len, y;\r\n\r\n if (x.isZero()) return x;\r\n\r\n // Argument reduction: cos(4x) = 8*(cos^4(x) - cos^2(x)) + 1\r\n // i.e. cos(x) = 8*(cos^4(x/4) - cos^2(x/4)) + 1\r\n\r\n // Estimate the optimum number of times to use the argument reduction.\r\n len = x.d.length;\r\n if (len < 32) {\r\n k = Math.ceil(len / 3);\r\n y = (1 / tinyPow(4, k)).toString();\r\n } else {\r\n k = 16;\r\n y = '2.3283064365386962890625e-10';\r\n }\r\n\r\n Ctor.precision += k;\r\n\r\n x = taylorSeries(Ctor, 1, x.times(y), new Ctor(1));\r\n\r\n // Reverse argument reduction\r\n for (var i = k; i--;) {\r\n var cos2x = x.times(x);\r\n x = cos2x.times(cos2x).minus(cos2x).times(8).plus(1);\r\n }\r\n\r\n Ctor.precision -= k;\r\n\r\n return x;\r\n}\r\n\r\n\r\n/*\r\n * Perform division in the specified base.\r\n */\r\nvar divide = (function () {\r\n\r\n // Assumes non-zero x and k, and hence non-zero result.\r\n function multiplyInteger(x, k, base) {\r\n var temp,\r\n carry = 0,\r\n i = x.length;\r\n\r\n for (x = x.slice(); i--;) {\r\n temp = x[i] * k + carry;\r\n x[i] = temp % base | 0;\r\n carry = temp / base | 0;\r\n }\r\n\r\n if (carry) x.unshift(carry);\r\n\r\n return x;\r\n }\r\n\r\n function compare(a, b, aL, bL) {\r\n var i, r;\r\n\r\n if (aL != bL) {\r\n r = aL > bL ? 1 : -1;\r\n } else {\r\n for (i = r = 0; i < aL; i++) {\r\n if (a[i] != b[i]) {\r\n r = a[i] > b[i] ? 1 : -1;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n return r;\r\n }\r\n\r\n function subtract(a, b, aL, base) {\r\n var i = 0;\r\n\r\n // Subtract b from a.\r\n for (; aL--;) {\r\n a[aL] -= i;\r\n i = a[aL] < b[aL] ? 1 : 0;\r\n a[aL] = i * base + a[aL] - b[aL];\r\n }\r\n\r\n // Remove leading zeros.\r\n for (; !a[0] && a.length > 1;) a.shift();\r\n }\r\n\r\n return function (x, y, pr, rm, dp, base) {\r\n var cmp, e, i, k, logBase, more, prod, prodL, q, qd, rem, remL, rem0, sd, t, xi, xL, yd0,\r\n yL, yz,\r\n Ctor = x.constructor,\r\n sign = x.s == y.s ? 1 : -1,\r\n xd = x.d,\r\n yd = y.d;\r\n\r\n // Either NaN, Infinity or 0?\r\n if (!xd || !xd[0] || !yd || !yd[0]) {\r\n\r\n return new Ctor(// Return NaN if either NaN, or both Infinity or 0.\r\n !x.s || !y.s || (xd ? yd && xd[0] == yd[0] : !yd) ? NaN :\r\n\r\n // Return ±0 if x is 0 or y is ±Infinity, or return ±Infinity as y is 0.\r\n xd && xd[0] == 0 || !yd ? sign * 0 : sign / 0);\r\n }\r\n\r\n if (base) {\r\n logBase = 1;\r\n e = x.e - y.e;\r\n } else {\r\n base = BASE;\r\n logBase = LOG_BASE;\r\n e = mathfloor(x.e / logBase) - mathfloor(y.e / logBase);\r\n }\r\n\r\n yL = yd.length;\r\n xL = xd.length;\r\n q = new Ctor(sign);\r\n qd = q.d = [];\r\n\r\n // Result exponent may be one less than e.\r\n // The digit array of a Decimal from toStringBinary may have trailing zeros.\r\n for (i = 0; yd[i] == (xd[i] || 0); i++);\r\n\r\n if (yd[i] > (xd[i] || 0)) e--;\r\n\r\n if (pr == null) {\r\n sd = pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n } else if (dp) {\r\n sd = pr + (x.e - y.e) + 1;\r\n } else {\r\n sd = pr;\r\n }\r\n\r\n if (sd < 0) {\r\n qd.push(1);\r\n more = true;\r\n } else {\r\n\r\n // Convert precision in number of base 10 digits to base 1e7 digits.\r\n sd = sd / logBase + 2 | 0;\r\n i = 0;\r\n\r\n // divisor < 1e7\r\n if (yL == 1) {\r\n k = 0;\r\n yd = yd[0];\r\n sd++;\r\n\r\n // k is the carry.\r\n for (; (i < xL || k) && sd--; i++) {\r\n t = k * base + (xd[i] || 0);\r\n qd[i] = t / yd | 0;\r\n k = t % yd | 0;\r\n }\r\n\r\n more = k || i < xL;\r\n\r\n // divisor >= 1e7\r\n } else {\r\n\r\n // Normalise xd and yd so highest order digit of yd is >= base/2\r\n k = base / (yd[0] + 1) | 0;\r\n\r\n if (k > 1) {\r\n yd = multiplyInteger(yd, k, base);\r\n xd = multiplyInteger(xd, k, base);\r\n yL = yd.length;\r\n xL = xd.length;\r\n }\r\n\r\n xi = yL;\r\n rem = xd.slice(0, yL);\r\n remL = rem.length;\r\n\r\n // Add zeros to make remainder as long as divisor.\r\n for (; remL < yL;) rem[remL++] = 0;\r\n\r\n yz = yd.slice();\r\n yz.unshift(0);\r\n yd0 = yd[0];\r\n\r\n if (yd[1] >= base / 2) ++yd0;\r\n\r\n do {\r\n k = 0;\r\n\r\n // Compare divisor and remainder.\r\n cmp = compare(yd, rem, yL, remL);\r\n\r\n // If divisor < remainder.\r\n if (cmp < 0) {\r\n\r\n // Calculate trial digit, k.\r\n rem0 = rem[0];\r\n if (yL != remL) rem0 = rem0 * base + (rem[1] || 0);\r\n\r\n // k will be how many times the divisor goes into the current remainder.\r\n k = rem0 / yd0 | 0;\r\n\r\n // Algorithm:\r\n // 1. product = divisor * trial digit (k)\r\n // 2. if product > remainder: product -= divisor, k--\r\n // 3. remainder -= product\r\n // 4. if product was < remainder at 2:\r\n // 5. compare new remainder and divisor\r\n // 6. If remainder > divisor: remainder -= divisor, k++\r\n\r\n if (k > 1) {\r\n if (k >= base) k = base - 1;\r\n\r\n // product = divisor * trial digit.\r\n prod = multiplyInteger(yd, k, base);\r\n prodL = prod.length;\r\n remL = rem.length;\r\n\r\n // Compare product and remainder.\r\n cmp = compare(prod, rem, prodL, remL);\r\n\r\n // product > remainder.\r\n if (cmp == 1) {\r\n k--;\r\n\r\n // Subtract divisor from product.\r\n subtract(prod, yL < prodL ? yz : yd, prodL, base);\r\n }\r\n } else {\r\n\r\n // cmp is -1.\r\n // If k is 0, there is no need to compare yd and rem again below, so change cmp to 1\r\n // to avoid it. If k is 1 there is a need to compare yd and rem again below.\r\n if (k == 0) cmp = k = 1;\r\n prod = yd.slice();\r\n }\r\n\r\n prodL = prod.length;\r\n if (prodL < remL) prod.unshift(0);\r\n\r\n // Subtract product from remainder.\r\n subtract(rem, prod, remL, base);\r\n\r\n // If product was < previous remainder.\r\n if (cmp == -1) {\r\n remL = rem.length;\r\n\r\n // Compare divisor and new remainder.\r\n cmp = compare(yd, rem, yL, remL);\r\n\r\n // If divisor < new remainder, subtract divisor from remainder.\r\n if (cmp < 1) {\r\n k++;\r\n\r\n // Subtract divisor from remainder.\r\n subtract(rem, yL < remL ? yz : yd, remL, base);\r\n }\r\n }\r\n\r\n remL = rem.length;\r\n } else if (cmp === 0) {\r\n k++;\r\n rem = [0];\r\n } // if cmp === 1, k will be 0\r\n\r\n // Add the next digit, k, to the result array.\r\n qd[i++] = k;\r\n\r\n // Update the remainder.\r\n if (cmp && rem[0]) {\r\n rem[remL++] = xd[xi] || 0;\r\n } else {\r\n rem = [xd[xi]];\r\n remL = 1;\r\n }\r\n\r\n } while ((xi++ < xL || rem[0] !== void 0) && sd--);\r\n\r\n more = rem[0] !== void 0;\r\n }\r\n\r\n // Leading zero?\r\n if (!qd[0]) qd.shift();\r\n }\r\n\r\n // logBase is 1 when divide is being used for base conversion.\r\n if (logBase == 1) {\r\n q.e = e;\r\n inexact = more;\r\n } else {\r\n\r\n // To calculate q.e, first get the number of digits of qd[0].\r\n for (i = 1, k = qd[0]; k >= 10; k /= 10) i++;\r\n q.e = i + e * logBase - 1;\r\n\r\n finalise(q, dp ? pr + q.e + 1 : pr, rm, more);\r\n }\r\n\r\n return q;\r\n };\r\n})();\r\n\r\n\r\n/*\r\n * Round `x` to `sd` significant digits using rounding mode `rm`.\r\n * Check for over/under-flow.\r\n */\r\n function finalise(x, sd, rm, isTruncated) {\r\n var digits, i, j, k, rd, roundUp, w, xd, xdi,\r\n Ctor = x.constructor;\r\n\r\n // Don't round if sd is null or undefined.\r\n out: if (sd != null) {\r\n xd = x.d;\r\n\r\n // Infinity/NaN.\r\n if (!xd) return x;\r\n\r\n // rd: the rounding digit, i.e. the digit after the digit that may be rounded up.\r\n // w: the word of xd containing rd, a base 1e7 number.\r\n // xdi: the index of w within xd.\r\n // digits: the number of digits of w.\r\n // i: what would be the index of rd within w if all the numbers were 7 digits long (i.e. if\r\n // they had leading zeros)\r\n // j: if > 0, the actual index of rd within w (if < 0, rd is a leading zero).\r\n\r\n // Get the length of the first word of the digits array xd.\r\n for (digits = 1, k = xd[0]; k >= 10; k /= 10) digits++;\r\n i = sd - digits;\r\n\r\n // Is the rounding digit in the first word of xd?\r\n if (i < 0) {\r\n i += LOG_BASE;\r\n j = sd;\r\n w = xd[xdi = 0];\r\n\r\n // Get the rounding digit at index j of w.\r\n rd = w / mathpow(10, digits - j - 1) % 10 | 0;\r\n } else {\r\n xdi = Math.ceil((i + 1) / LOG_BASE);\r\n k = xd.length;\r\n if (xdi >= k) {\r\n if (isTruncated) {\r\n\r\n // Needed by `naturalExponential`, `naturalLogarithm` and `squareRoot`.\r\n for (; k++ <= xdi;) xd.push(0);\r\n w = rd = 0;\r\n digits = 1;\r\n i %= LOG_BASE;\r\n j = i - LOG_BASE + 1;\r\n } else {\r\n break out;\r\n }\r\n } else {\r\n w = k = xd[xdi];\r\n\r\n // Get the number of digits of w.\r\n for (digits = 1; k >= 10; k /= 10) digits++;\r\n\r\n // Get the index of rd within w.\r\n i %= LOG_BASE;\r\n\r\n // Get the index of rd within w, adjusted for leading zeros.\r\n // The number of leading zeros of w is given by LOG_BASE - digits.\r\n j = i - LOG_BASE + digits;\r\n\r\n // Get the rounding digit at index j of w.\r\n rd = j < 0 ? 0 : w / mathpow(10, digits - j - 1) % 10 | 0;\r\n }\r\n }\r\n\r\n // Are there any non-zero digits after the rounding digit?\r\n isTruncated = isTruncated || sd < 0 ||\r\n xd[xdi + 1] !== void 0 || (j < 0 ? w : w % mathpow(10, digits - j - 1));\r\n\r\n // The expression `w % mathpow(10, digits - j - 1)` returns all the digits of w to the right\r\n // of the digit at (left-to-right) index j, e.g. if w is 908714 and j is 2, the expression\r\n // will give 714.\r\n\r\n roundUp = rm < 4\r\n ? (rd || isTruncated) && (rm == 0 || rm == (x.s < 0 ? 3 : 2))\r\n : rd > 5 || rd == 5 && (rm == 4 || isTruncated || rm == 6 &&\r\n\r\n // Check whether the digit to the left of the rounding digit is odd.\r\n ((i > 0 ? j > 0 ? w / mathpow(10, digits - j) : 0 : xd[xdi - 1]) % 10) & 1 ||\r\n rm == (x.s < 0 ? 8 : 7));\r\n\r\n if (sd < 1 || !xd[0]) {\r\n xd.length = 0;\r\n if (roundUp) {\r\n\r\n // Convert sd to decimal places.\r\n sd -= x.e + 1;\r\n\r\n // 1, 0.1, 0.01, 0.001, 0.0001 etc.\r\n xd[0] = mathpow(10, (LOG_BASE - sd % LOG_BASE) % LOG_BASE);\r\n x.e = -sd || 0;\r\n } else {\r\n\r\n // Zero.\r\n xd[0] = x.e = 0;\r\n }\r\n\r\n return x;\r\n }\r\n\r\n // Remove excess digits.\r\n if (i == 0) {\r\n xd.length = xdi;\r\n k = 1;\r\n xdi--;\r\n } else {\r\n xd.length = xdi + 1;\r\n k = mathpow(10, LOG_BASE - i);\r\n\r\n // E.g. 56700 becomes 56000 if 7 is the rounding digit.\r\n // j > 0 means i > number of leading zeros of w.\r\n xd[xdi] = j > 0 ? (w / mathpow(10, digits - j) % mathpow(10, j) | 0) * k : 0;\r\n }\r\n\r\n if (roundUp) {\r\n for (;;) {\r\n\r\n // Is the digit to be rounded up in the first word of xd?\r\n if (xdi == 0) {\r\n\r\n // i will be the length of xd[0] before k is added.\r\n for (i = 1, j = xd[0]; j >= 10; j /= 10) i++;\r\n j = xd[0] += k;\r\n for (k = 1; j >= 10; j /= 10) k++;\r\n\r\n // if i != k the length has increased.\r\n if (i != k) {\r\n x.e++;\r\n if (xd[0] == BASE) xd[0] = 1;\r\n }\r\n\r\n break;\r\n } else {\r\n xd[xdi] += k;\r\n if (xd[xdi] != BASE) break;\r\n xd[xdi--] = 0;\r\n k = 1;\r\n }\r\n }\r\n }\r\n\r\n // Remove trailing zeros.\r\n for (i = xd.length; xd[--i] === 0;) xd.pop();\r\n }\r\n\r\n if (external) {\r\n\r\n // Overflow?\r\n if (x.e > Ctor.maxE) {\r\n\r\n // Infinity.\r\n x.d = null;\r\n x.e = NaN;\r\n\r\n // Underflow?\r\n } else if (x.e < Ctor.minE) {\r\n\r\n // Zero.\r\n x.e = 0;\r\n x.d = [0];\r\n // Ctor.underflow = true;\r\n } // else Ctor.underflow = false;\r\n }\r\n\r\n return x;\r\n}\r\n\r\n\r\nfunction finiteToString(x, isExp, sd) {\r\n if (!x.isFinite()) return nonFiniteToString(x);\r\n var k,\r\n e = x.e,\r\n str = digitsToString(x.d),\r\n len = str.length;\r\n\r\n if (isExp) {\r\n if (sd && (k = sd - len) > 0) {\r\n str = str.charAt(0) + '.' + str.slice(1) + getZeroString(k);\r\n } else if (len > 1) {\r\n str = str.charAt(0) + '.' + str.slice(1);\r\n }\r\n\r\n str = str + (x.e < 0 ? 'e' : 'e+') + x.e;\r\n } else if (e < 0) {\r\n str = '0.' + getZeroString(-e - 1) + str;\r\n if (sd && (k = sd - len) > 0) str += getZeroString(k);\r\n } else if (e >= len) {\r\n str += getZeroString(e + 1 - len);\r\n if (sd && (k = sd - e - 1) > 0) str = str + '.' + getZeroString(k);\r\n } else {\r\n if ((k = e + 1) < len) str = str.slice(0, k) + '.' + str.slice(k);\r\n if (sd && (k = sd - len) > 0) {\r\n if (e + 1 === len) str += '.';\r\n str += getZeroString(k);\r\n }\r\n }\r\n\r\n return str;\r\n}\r\n\r\n\r\n// Calculate the base 10 exponent from the base 1e7 exponent.\r\nfunction getBase10Exponent(digits, e) {\r\n var w = digits[0];\r\n\r\n // Add the number of digits of the first word of the digits array.\r\n for ( e *= LOG_BASE; w >= 10; w /= 10) e++;\r\n return e;\r\n}\r\n\r\n\r\nfunction getLn10(Ctor, sd, pr) {\r\n if (sd > LN10_PRECISION) {\r\n\r\n // Reset global state in case the exception is caught.\r\n external = true;\r\n if (pr) Ctor.precision = pr;\r\n throw Error(precisionLimitExceeded);\r\n }\r\n return finalise(new Ctor(LN10), sd, 1, true);\r\n}\r\n\r\n\r\nfunction getPi(Ctor, sd, rm) {\r\n if (sd > PI_PRECISION) throw Error(precisionLimitExceeded);\r\n return finalise(new Ctor(PI), sd, rm, true);\r\n}\r\n\r\n\r\nfunction getPrecision(digits) {\r\n var w = digits.length - 1,\r\n len = w * LOG_BASE + 1;\r\n\r\n w = digits[w];\r\n\r\n // If non-zero...\r\n if (w) {\r\n\r\n // Subtract the number of trailing zeros of the last word.\r\n for (; w % 10 == 0; w /= 10) len--;\r\n\r\n // Add the number of digits of the first word.\r\n for (w = digits[0]; w >= 10; w /= 10) len++;\r\n }\r\n\r\n return len;\r\n}\r\n\r\n\r\nfunction getZeroString(k) {\r\n var zs = '';\r\n for (; k--;) zs += '0';\r\n return zs;\r\n}\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the value of Decimal `x` to the power `n`, where `n` is an\r\n * integer of type number.\r\n *\r\n * Implements 'exponentiation by squaring'. Called by `pow` and `parseOther`.\r\n *\r\n */\r\nfunction intPow(Ctor, x, n, pr) {\r\n var isTruncated,\r\n r = new Ctor(1),\r\n\r\n // Max n of 9007199254740991 takes 53 loop iterations.\r\n // Maximum digits array length; leaves [28, 34] guard digits.\r\n k = Math.ceil(pr / LOG_BASE + 4);\r\n\r\n external = false;\r\n\r\n for (;;) {\r\n if (n % 2) {\r\n r = r.times(x);\r\n if (truncate(r.d, k)) isTruncated = true;\r\n }\r\n\r\n n = mathfloor(n / 2);\r\n if (n === 0) {\r\n\r\n // To ensure correct rounding when r.d is truncated, increment the last word if it is zero.\r\n n = r.d.length - 1;\r\n if (isTruncated && r.d[n] === 0) ++r.d[n];\r\n break;\r\n }\r\n\r\n x = x.times(x);\r\n truncate(x.d, k);\r\n }\r\n\r\n external = true;\r\n\r\n return r;\r\n}\r\n\r\n\r\nfunction isOdd(n) {\r\n return n.d[n.d.length - 1] & 1;\r\n}\r\n\r\n\r\n/*\r\n * Handle `max` (`n` is -1) and `min` (`n` is 1).\r\n */\r\nfunction maxOrMin(Ctor, args, n) {\r\n var k, y,\r\n x = new Ctor(args[0]),\r\n i = 0;\r\n\r\n for (; ++i < args.length;) {\r\n y = new Ctor(args[i]);\r\n\r\n // NaN?\r\n if (!y.s) {\r\n x = y;\r\n break;\r\n }\r\n\r\n k = x.cmp(y);\r\n\r\n if (k === n || k === 0 && x.s === n) {\r\n x = y;\r\n }\r\n }\r\n\r\n return x;\r\n}\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the natural exponential of `x` rounded to `sd` significant\r\n * digits.\r\n *\r\n * Taylor/Maclaurin series.\r\n *\r\n * exp(x) = x^0/0! + x^1/1! + x^2/2! + x^3/3! + ...\r\n *\r\n * Argument reduction:\r\n * Repeat x = x / 32, k += 5, until |x| < 0.1\r\n * exp(x) = exp(x / 2^k)^(2^k)\r\n *\r\n * Previously, the argument was initially reduced by\r\n * exp(x) = exp(r) * 10^k where r = x - k * ln10, k = floor(x / ln10)\r\n * to first put r in the range [0, ln10], before dividing by 32 until |x| < 0.1, but this was\r\n * found to be slower than just dividing repeatedly by 32 as above.\r\n *\r\n * Max integer argument: exp('20723265836946413') = 6.3e+9000000000000000\r\n * Min integer argument: exp('-20723265836946411') = 1.2e-9000000000000000\r\n * (Math object integer min/max: Math.exp(709) = 8.2e+307, Math.exp(-745) = 5e-324)\r\n *\r\n * exp(Infinity) = Infinity\r\n * exp(-Infinity) = 0\r\n * exp(NaN) = NaN\r\n * exp(±0) = 1\r\n *\r\n * exp(x) is non-terminating for any finite, non-zero x.\r\n *\r\n * The result will always be correctly rounded.\r\n *\r\n */\r\nfunction naturalExponential(x, sd) {\r\n var denominator, guard, j, pow, sum, t, wpr,\r\n rep = 0,\r\n i = 0,\r\n k = 0,\r\n Ctor = x.constructor,\r\n rm = Ctor.rounding,\r\n pr = Ctor.precision;\r\n\r\n // 0/NaN/Infinity?\r\n if (!x.d || !x.d[0] || x.e > 17) {\r\n\r\n return new Ctor(x.d\r\n ? !x.d[0] ? 1 : x.s < 0 ? 0 : 1 / 0\r\n : x.s ? x.s < 0 ? 0 : x : 0 / 0);\r\n }\r\n\r\n if (sd == null) {\r\n external = false;\r\n wpr = pr;\r\n } else {\r\n wpr = sd;\r\n }\r\n\r\n t = new Ctor(0.03125);\r\n\r\n // while abs(x) >= 0.1\r\n while (x.e > -2) {\r\n\r\n // x = x / 2^5\r\n x = x.times(t);\r\n k += 5;\r\n }\r\n\r\n // Use 2 * log10(2^k) + 5 (empirically derived) to estimate the increase in precision\r\n // necessary to ensure the first 4 rounding digits are correct.\r\n guard = Math.log(mathpow(2, k)) / Math.LN10 * 2 + 5 | 0;\r\n wpr += guard;\r\n denominator = pow = sum = new Ctor(1);\r\n Ctor.precision = wpr;\r\n\r\n for (;;) {\r\n pow = finalise(pow.times(x), wpr, 1);\r\n denominator = denominator.times(++i);\r\n t = sum.plus(divide(pow, denominator, wpr, 1));\r\n\r\n if (digitsToString(t.d).slice(0, wpr) === digitsToString(sum.d).slice(0, wpr)) {\r\n j = k;\r\n while (j--) sum = finalise(sum.times(sum), wpr, 1);\r\n\r\n // Check to see if the first 4 rounding digits are [49]999.\r\n // If so, repeat the summation with a higher precision, otherwise\r\n // e.g. with precision: 18, rounding: 1\r\n // exp(18.404272462595034083567793919843761) = 98372560.1229999999 (should be 98372560.123)\r\n // `wpr - guard` is the index of first rounding digit.\r\n if (sd == null) {\r\n\r\n if (rep < 3 && checkRoundingDigits(sum.d, wpr - guard, rm, rep)) {\r\n Ctor.precision = wpr += 10;\r\n denominator = pow = t = new Ctor(1);\r\n i = 0;\r\n rep++;\r\n } else {\r\n return finalise(sum, Ctor.precision = pr, rm, external = true);\r\n }\r\n } else {\r\n Ctor.precision = pr;\r\n return sum;\r\n }\r\n }\r\n\r\n sum = t;\r\n }\r\n}\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the natural logarithm of `x` rounded to `sd` significant\r\n * digits.\r\n *\r\n * ln(-n) = NaN\r\n * ln(0) = -Infinity\r\n * ln(-0) = -Infinity\r\n * ln(1) = 0\r\n * ln(Infinity) = Infinity\r\n * ln(-Infinity) = NaN\r\n * ln(NaN) = NaN\r\n *\r\n * ln(n) (n != 1) is non-terminating.\r\n *\r\n */\r\nfunction naturalLogarithm(y, sd) {\r\n var c, c0, denominator, e, numerator, rep, sum, t, wpr, x1, x2,\r\n n = 1,\r\n guard = 10,\r\n x = y,\r\n xd = x.d,\r\n Ctor = x.constructor,\r\n rm = Ctor.rounding,\r\n pr = Ctor.precision;\r\n\r\n // Is x negative or Infinity, NaN, 0 or 1?\r\n if (x.s < 0 || !xd || !xd[0] || !x.e && xd[0] == 1 && xd.length == 1) {\r\n return new Ctor(xd && !xd[0] ? -1 / 0 : x.s != 1 ? NaN : xd ? 0 : x);\r\n }\r\n\r\n if (sd == null) {\r\n external = false;\r\n wpr = pr;\r\n } else {\r\n wpr = sd;\r\n }\r\n\r\n Ctor.precision = wpr += guard;\r\n c = digitsToString(xd);\r\n c0 = c.charAt(0);\r\n\r\n if (Math.abs(e = x.e) < 1.5e15) {\r\n\r\n // Argument reduction.\r\n // The series converges faster the closer the argument is to 1, so using\r\n // ln(a^b) = b * ln(a), ln(a) = ln(a^b) / b\r\n // multiply the argument by itself until the leading digits of the significand are 7, 8, 9,\r\n // 10, 11, 12 or 13, recording the number of multiplications so the sum of the series can\r\n // later be divided by this number, then separate out the power of 10 using\r\n // ln(a*10^b) = ln(a) + b*ln(10).\r\n\r\n // max n is 21 (gives 0.9, 1.0 or 1.1) (9e15 / 21 = 4.2e14).\r\n //while (c0 < 9 && c0 != 1 || c0 == 1 && c.charAt(1) > 1) {\r\n // max n is 6 (gives 0.7 - 1.3)\r\n while (c0 < 7 && c0 != 1 || c0 == 1 && c.charAt(1) > 3) {\r\n x = x.times(y);\r\n c = digitsToString(x.d);\r\n c0 = c.charAt(0);\r\n n++;\r\n }\r\n\r\n e = x.e;\r\n\r\n if (c0 > 1) {\r\n x = new Ctor('0.' + c);\r\n e++;\r\n } else {\r\n x = new Ctor(c0 + '.' + c.slice(1));\r\n }\r\n } else {\r\n\r\n // The argument reduction method above may result in overflow if the argument y is a massive\r\n // number with exponent >= 1500000000000000 (9e15 / 6 = 1.5e15), so instead recall this\r\n // function using ln(x*10^e) = ln(x) + e*ln(10).\r\n t = getLn10(Ctor, wpr + 2, pr).times(e + '');\r\n x = naturalLogarithm(new Ctor(c0 + '.' + c.slice(1)), wpr - guard).plus(t);\r\n Ctor.precision = pr;\r\n\r\n return sd == null ? finalise(x, pr, rm, external = true) : x;\r\n }\r\n\r\n // x1 is x reduced to a value near 1.\r\n x1 = x;\r\n\r\n // Taylor series.\r\n // ln(y) = ln((1 + x)/(1 - x)) = 2(x + x^3/3 + x^5/5 + x^7/7 + ...)\r\n // where x = (y - 1)/(y + 1) (|x| < 1)\r\n sum = numerator = x = divide(x.minus(1), x.plus(1), wpr, 1);\r\n x2 = finalise(x.times(x), wpr, 1);\r\n denominator = 3;\r\n\r\n for (;;) {\r\n numerator = finalise(numerator.times(x2), wpr, 1);\r\n t = sum.plus(divide(numerator, new Ctor(denominator), wpr, 1));\r\n\r\n if (digitsToString(t.d).slice(0, wpr) === digitsToString(sum.d).slice(0, wpr)) {\r\n sum = sum.times(2);\r\n\r\n // Reverse the argument reduction. Check that e is not 0 because, besides preventing an\r\n // unnecessary calculation, -0 + 0 = +0 and to ensure correct rounding -0 needs to stay -0.\r\n if (e !== 0) sum = sum.plus(getLn10(Ctor, wpr + 2, pr).times(e + ''));\r\n sum = divide(sum, new Ctor(n), wpr, 1);\r\n\r\n // Is rm > 3 and the first 4 rounding digits 4999, or rm < 4 (or the summation has\r\n // been repeated previously) and the first 4 rounding digits 9999?\r\n // If so, restart the summation with a higher precision, otherwise\r\n // e.g. with precision: 12, rounding: 1\r\n // ln(135520028.6126091714265381533) = 18.7246299999 when it should be 18.72463.\r\n // `wpr - guard` is the index of first rounding digit.\r\n if (sd == null) {\r\n if (checkRoundingDigits(sum.d, wpr - guard, rm, rep)) {\r\n Ctor.precision = wpr += guard;\r\n t = numerator = x = divide(x1.minus(1), x1.plus(1), wpr, 1);\r\n x2 = finalise(x.times(x), wpr, 1);\r\n denominator = rep = 1;\r\n } else {\r\n return finalise(sum, Ctor.precision = pr, rm, external = true);\r\n }\r\n } else {\r\n Ctor.precision = pr;\r\n return sum;\r\n }\r\n }\r\n\r\n sum = t;\r\n denominator += 2;\r\n }\r\n}\r\n\r\n\r\n// ±Infinity, NaN.\r\nfunction nonFiniteToString(x) {\r\n // Unsigned.\r\n return String(x.s * x.s / 0);\r\n}\r\n\r\n\r\n/*\r\n * Parse the value of a new Decimal `x` from string `str`.\r\n */\r\nfunction parseDecimal(x, str) {\r\n var e, i, len;\r\n\r\n // TODO BigInt str: no need to check for decimal point, exponential form or leading zeros.\r\n // Decimal point?\r\n if ((e = str.indexOf('.')) > -1) str = str.replace('.', '');\r\n\r\n // Exponential form?\r\n if ((i = str.search(/e/i)) > 0) {\r\n\r\n // Determine exponent.\r\n if (e < 0) e = i;\r\n e += +str.slice(i + 1);\r\n str = str.substring(0, i);\r\n } else if (e < 0) {\r\n\r\n // Integer.\r\n e = str.length;\r\n }\r\n\r\n // Determine leading zeros.\r\n for (i = 0; str.charCodeAt(i) === 48; i++);\r\n\r\n // Determine trailing zeros.\r\n for (len = str.length; str.charCodeAt(len - 1) === 48; --len);\r\n str = str.slice(i, len);\r\n\r\n if (str) {\r\n len -= i;\r\n x.e = e = e - i - 1;\r\n x.d = [];\r\n\r\n // Transform base\r\n\r\n // e is the base 10 exponent.\r\n // i is where to slice str to get the first word of the digits array.\r\n i = (e + 1) % LOG_BASE;\r\n if (e < 0) i += LOG_BASE;\r\n\r\n if (i < len) {\r\n if (i) x.d.push(+str.slice(0, i));\r\n for (len -= LOG_BASE; i < len;) x.d.push(+str.slice(i, i += LOG_BASE));\r\n str = str.slice(i);\r\n i = LOG_BASE - str.length;\r\n } else {\r\n i -= len;\r\n }\r\n\r\n for (; i--;) str += '0';\r\n x.d.push(+str);\r\n\r\n if (external) {\r\n\r\n // Overflow?\r\n if (x.e > x.constructor.maxE) {\r\n\r\n // Infinity.\r\n x.d = null;\r\n x.e = NaN;\r\n\r\n // Underflow?\r\n } else if (x.e < x.constructor.minE) {\r\n\r\n // Zero.\r\n x.e = 0;\r\n x.d = [0];\r\n // x.constructor.underflow = true;\r\n } // else x.constructor.underflow = false;\r\n }\r\n } else {\r\n\r\n // Zero.\r\n x.e = 0;\r\n x.d = [0];\r\n }\r\n\r\n return x;\r\n}\r\n\r\n\r\n/*\r\n * Parse the value of a new Decimal `x` from a string `str`, which is not a decimal value.\r\n */\r\nfunction parseOther(x, str) {\r\n var base, Ctor, divisor, i, isFloat, len, p, xd, xe;\r\n\r\n if (str.indexOf('_') > -1) {\r\n str = str.replace(/(\\d)_(?=\\d)/g, '$1');\r\n if (isDecimal.test(str)) return parseDecimal(x, str);\r\n } else if (str === 'Infinity' || str === 'NaN') {\r\n if (!+str) x.s = NaN;\r\n x.e = NaN;\r\n x.d = null;\r\n return x;\r\n }\r\n\r\n if (isHex.test(str)) {\r\n base = 16;\r\n str = str.toLowerCase();\r\n } else if (isBinary.test(str)) {\r\n base = 2;\r\n } else if (isOctal.test(str)) {\r\n base = 8;\r\n } else {\r\n throw Error(invalidArgument + str);\r\n }\r\n\r\n // Is there a binary exponent part?\r\n i = str.search(/p/i);\r\n\r\n if (i > 0) {\r\n p = +str.slice(i + 1);\r\n str = str.substring(2, i);\r\n } else {\r\n str = str.slice(2);\r\n }\r\n\r\n // Convert `str` as an integer then divide the result by `base` raised to a power such that the\r\n // fraction part will be restored.\r\n i = str.indexOf('.');\r\n isFloat = i >= 0;\r\n Ctor = x.constructor;\r\n\r\n if (isFloat) {\r\n str = str.replace('.', '');\r\n len = str.length;\r\n i = len - i;\r\n\r\n // log[10](16) = 1.2041... , log[10](88) = 1.9444....\r\n divisor = intPow(Ctor, new Ctor(base), i, i * 2);\r\n }\r\n\r\n xd = convertBase(str, base, BASE);\r\n xe = xd.length - 1;\r\n\r\n // Remove trailing zeros.\r\n for (i = xe; xd[i] === 0; --i) xd.pop();\r\n if (i < 0) return new Ctor(x.s * 0);\r\n x.e = getBase10Exponent(xd, xe);\r\n x.d = xd;\r\n external = false;\r\n\r\n // At what precision to perform the division to ensure exact conversion?\r\n // maxDecimalIntegerPartDigitCount = ceil(log[10](b) * otherBaseIntegerPartDigitCount)\r\n // log[10](2) = 0.30103, log[10](8) = 0.90309, log[10](16) = 1.20412\r\n // E.g. ceil(1.2 * 3) = 4, so up to 4 decimal digits are needed to represent 3 hex int digits.\r\n // maxDecimalFractionPartDigitCount = {Hex:4|Oct:3|Bin:1} * otherBaseFractionPartDigitCount\r\n // Therefore using 4 * the number of digits of str will always be enough.\r\n if (isFloat) x = divide(x, divisor, len * 4);\r\n\r\n // Multiply by the binary exponent part if present.\r\n if (p) x = x.times(Math.abs(p) < 54 ? mathpow(2, p) : Decimal.pow(2, p));\r\n external = true;\r\n\r\n return x;\r\n}\r\n\r\n\r\n/*\r\n * sin(x) = x - x^3/3! + x^5/5! - ...\r\n * |x| < pi/2\r\n *\r\n */\r\nfunction sine(Ctor, x) {\r\n var k,\r\n len = x.d.length;\r\n\r\n if (len < 3) {\r\n return x.isZero() ? x : taylorSeries(Ctor, 2, x, x);\r\n }\r\n\r\n // Argument reduction: sin(5x) = 16*sin^5(x) - 20*sin^3(x) + 5*sin(x)\r\n // i.e. sin(x) = 16*sin^5(x/5) - 20*sin^3(x/5) + 5*sin(x/5)\r\n // and sin(x) = sin(x/5)(5 + sin^2(x/5)(16sin^2(x/5) - 20))\r\n\r\n // Estimate the optimum number of times to use the argument reduction.\r\n k = 1.4 * Math.sqrt(len);\r\n k = k > 16 ? 16 : k | 0;\r\n\r\n x = x.times(1 / tinyPow(5, k));\r\n x = taylorSeries(Ctor, 2, x, x);\r\n\r\n // Reverse argument reduction\r\n var sin2_x,\r\n d5 = new Ctor(5),\r\n d16 = new Ctor(16),\r\n d20 = new Ctor(20);\r\n for (; k--;) {\r\n sin2_x = x.times(x);\r\n x = x.times(d5.plus(sin2_x.times(d16.times(sin2_x).minus(d20))));\r\n }\r\n\r\n return x;\r\n}\r\n\r\n\r\n// Calculate Taylor series for `cos`, `cosh`, `sin` and `sinh`.\r\nfunction taylorSeries(Ctor, n, x, y, isHyperbolic) {\r\n var j, t, u, x2,\r\n i = 1,\r\n pr = Ctor.precision,\r\n k = Math.ceil(pr / LOG_BASE);\r\n\r\n external = false;\r\n x2 = x.times(x);\r\n u = new Ctor(y);\r\n\r\n for (;;) {\r\n t = divide(u.times(x2), new Ctor(n++ * n++), pr, 1);\r\n u = isHyperbolic ? y.plus(t) : y.minus(t);\r\n y = divide(t.times(x2), new Ctor(n++ * n++), pr, 1);\r\n t = u.plus(y);\r\n\r\n if (t.d[k] !== void 0) {\r\n for (j = k; t.d[j] === u.d[j] && j--;);\r\n if (j == -1) break;\r\n }\r\n\r\n j = u;\r\n u = y;\r\n y = t;\r\n t = j;\r\n i++;\r\n }\r\n\r\n external = true;\r\n t.d.length = k + 1;\r\n\r\n return t;\r\n}\r\n\r\n\r\n// Exponent e must be positive and non-zero.\r\nfunction tinyPow(b, e) {\r\n var n = b;\r\n while (--e) n *= b;\r\n return n;\r\n}\r\n\r\n\r\n// Return the absolute value of `x` reduced to less than or equal to half pi.\r\nfunction toLessThanHalfPi(Ctor, x) {\r\n var t,\r\n isNeg = x.s < 0,\r\n pi = getPi(Ctor, Ctor.precision, 1),\r\n halfPi = pi.times(0.5);\r\n\r\n x = x.abs();\r\n\r\n if (x.lte(halfPi)) {\r\n quadrant = isNeg ? 4 : 1;\r\n return x;\r\n }\r\n\r\n t = x.divToInt(pi);\r\n\r\n if (t.isZero()) {\r\n quadrant = isNeg ? 3 : 2;\r\n } else {\r\n x = x.minus(t.times(pi));\r\n\r\n // 0 <= x < pi\r\n if (x.lte(halfPi)) {\r\n quadrant = isOdd(t) ? (isNeg ? 2 : 3) : (isNeg ? 4 : 1);\r\n return x;\r\n }\r\n\r\n quadrant = isOdd(t) ? (isNeg ? 1 : 4) : (isNeg ? 3 : 2);\r\n }\r\n\r\n return x.minus(pi).abs();\r\n}\r\n\r\n\r\n/*\r\n * Return the value of Decimal `x` as a string in base `baseOut`.\r\n *\r\n * If the optional `sd` argument is present include a binary exponent suffix.\r\n */\r\nfunction toStringBinary(x, baseOut, sd, rm) {\r\n var base, e, i, k, len, roundUp, str, xd, y,\r\n Ctor = x.constructor,\r\n isExp = sd !== void 0;\r\n\r\n if (isExp) {\r\n checkInt32(sd, 1, MAX_DIGITS);\r\n if (rm === void 0) rm = Ctor.rounding;\r\n else checkInt32(rm, 0, 8);\r\n } else {\r\n sd = Ctor.precision;\r\n rm = Ctor.rounding;\r\n }\r\n\r\n if (!x.isFinite()) {\r\n str = nonFiniteToString(x);\r\n } else {\r\n str = finiteToString(x);\r\n i = str.indexOf('.');\r\n\r\n // Use exponential notation according to `toExpPos` and `toExpNeg`? No, but if required:\r\n // maxBinaryExponent = floor((decimalExponent + 1) * log[2](10))\r\n // minBinaryExponent = floor(decimalExponent * log[2](10))\r\n // log[2](10) = 3.321928094887362347870319429489390175864\r\n\r\n if (isExp) {\r\n base = 2;\r\n if (baseOut == 16) {\r\n sd = sd * 4 - 3;\r\n } else if (baseOut == 8) {\r\n sd = sd * 3 - 2;\r\n }\r\n } else {\r\n base = baseOut;\r\n }\r\n\r\n // Convert the number as an integer then divide the result by its base raised to a power such\r\n // that the fraction part will be restored.\r\n\r\n // Non-integer.\r\n if (i >= 0) {\r\n str = str.replace('.', '');\r\n y = new Ctor(1);\r\n y.e = str.length - i;\r\n y.d = convertBase(finiteToString(y), 10, base);\r\n y.e = y.d.length;\r\n }\r\n\r\n xd = convertBase(str, 10, base);\r\n e = len = xd.length;\r\n\r\n // Remove trailing zeros.\r\n for (; xd[--len] == 0;) xd.pop();\r\n\r\n if (!xd[0]) {\r\n str = isExp ? '0p+0' : '0';\r\n } else {\r\n if (i < 0) {\r\n e--;\r\n } else {\r\n x = new Ctor(x);\r\n x.d = xd;\r\n x.e = e;\r\n x = divide(x, y, sd, rm, 0, base);\r\n xd = x.d;\r\n e = x.e;\r\n roundUp = inexact;\r\n }\r\n\r\n // The rounding digit, i.e. the digit after the digit that may be rounded up.\r\n i = xd[sd];\r\n k = base / 2;\r\n roundUp = roundUp || xd[sd + 1] !== void 0;\r\n\r\n roundUp = rm < 4\r\n ? (i !== void 0 || roundUp) && (rm === 0 || rm === (x.s < 0 ? 3 : 2))\r\n : i > k || i === k && (rm === 4 || roundUp || rm === 6 && xd[sd - 1] & 1 ||\r\n rm === (x.s < 0 ? 8 : 7));\r\n\r\n xd.length = sd;\r\n\r\n if (roundUp) {\r\n\r\n // Rounding up may mean the previous digit has to be rounded up and so on.\r\n for (; ++xd[--sd] > base - 1;) {\r\n xd[sd] = 0;\r\n if (!sd) {\r\n ++e;\r\n xd.unshift(1);\r\n }\r\n }\r\n }\r\n\r\n // Determine trailing zeros.\r\n for (len = xd.length; !xd[len - 1]; --len);\r\n\r\n // E.g. [4, 11, 15] becomes 4bf.\r\n for (i = 0, str = ''; i < len; i++) str += NUMERALS.charAt(xd[i]);\r\n\r\n // Add binary exponent suffix?\r\n if (isExp) {\r\n if (len > 1) {\r\n if (baseOut == 16 || baseOut == 8) {\r\n i = baseOut == 16 ? 4 : 3;\r\n for (--len; len % i; len++) str += '0';\r\n xd = convertBase(str, base, baseOut);\r\n for (len = xd.length; !xd[len - 1]; --len);\r\n\r\n // xd[0] will always be be 1\r\n for (i = 1, str = '1.'; i < len; i++) str += NUMERALS.charAt(xd[i]);\r\n } else {\r\n str = str.charAt(0) + '.' + str.slice(1);\r\n }\r\n }\r\n\r\n str = str + (e < 0 ? 'p' : 'p+') + e;\r\n } else if (e < 0) {\r\n for (; ++e;) str = '0' + str;\r\n str = '0.' + str;\r\n } else {\r\n if (++e > len) for (e -= len; e-- ;) str += '0';\r\n else if (e < len) str = str.slice(0, e) + '.' + str.slice(e);\r\n }\r\n }\r\n\r\n str = (baseOut == 16 ? '0x' : baseOut == 2 ? '0b' : baseOut == 8 ? '0o' : '') + str;\r\n }\r\n\r\n return x.s < 0 ? '-' + str : str;\r\n}\r\n\r\n\r\n// Does not strip trailing zeros.\r\nfunction truncate(arr, len) {\r\n if (arr.length > len) {\r\n arr.length = len;\r\n return true;\r\n }\r\n}\r\n\r\n\r\n// Decimal methods\r\n\r\n\r\n/*\r\n * abs\r\n * acos\r\n * acosh\r\n * add\r\n * asin\r\n * asinh\r\n * atan\r\n * atanh\r\n * atan2\r\n * cbrt\r\n * ceil\r\n * clamp\r\n * clone\r\n * config\r\n * cos\r\n * cosh\r\n * div\r\n * exp\r\n * floor\r\n * hypot\r\n * ln\r\n * log\r\n * log2\r\n * log10\r\n * max\r\n * min\r\n * mod\r\n * mul\r\n * pow\r\n * random\r\n * round\r\n * set\r\n * sign\r\n * sin\r\n * sinh\r\n * sqrt\r\n * sub\r\n * sum\r\n * tan\r\n * tanh\r\n * trunc\r\n */\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the absolute value of `x`.\r\n *\r\n * x {number|string|bigint|Decimal}\r\n *\r\n */\r\nfunction abs(x) {\r\n return new this(x).abs();\r\n}\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the arccosine in radians of `x`.\r\n *\r\n * x {number|string|bigint|Decimal}\r\n *\r\n */\r\nfunction acos(x) {\r\n return new this(x).acos();\r\n}\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the inverse of the hyperbolic cosine of `x`, rounded to\r\n * `precision` significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|bigint|Decimal} A value in radians.\r\n *\r\n */\r\nfunction acosh(x) {\r\n return new this(x).acosh();\r\n}\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the sum of `x` and `y`, rounded to `precision` significant\r\n * digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|bigint|Decimal}\r\n * y {number|string|bigint|Decimal}\r\n *\r\n */\r\nfunction add(x, y) {\r\n return new this(x).plus(y);\r\n}\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the arcsine in radians of `x`, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|bigint|Decimal}\r\n *\r\n */\r\nfunction asin(x) {\r\n return new this(x).asin();\r\n}\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the inverse of the hyperbolic sine of `x`, rounded to\r\n * `precision` significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|bigint|Decimal} A value in radians.\r\n *\r\n */\r\nfunction asinh(x) {\r\n return new this(x).asinh();\r\n}\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the arctangent in radians of `x`, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|bigint|Decimal}\r\n *\r\n */\r\nfunction atan(x) {\r\n return new this(x).atan();\r\n}\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the inverse of the hyperbolic tangent of `x`, rounded to\r\n * `precision` significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|bigint|Decimal} A value in radians.\r\n *\r\n */\r\nfunction atanh(x) {\r\n return new this(x).atanh();\r\n}\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the arctangent in radians of `y/x` in the range -pi to pi\r\n * (inclusive), rounded to `precision` significant digits using rounding mode `rounding`.\r\n *\r\n * Domain: [-Infinity, Infinity]\r\n * Range: [-pi, pi]\r\n *\r\n * y {number|string|bigint|Decimal} The y-coordinate.\r\n * x {number|string|bigint|Decimal} The x-coordinate.\r\n *\r\n * atan2(±0, -0) = ±pi\r\n * atan2(±0, +0) = ±0\r\n * atan2(±0, -x) = ±pi for x > 0\r\n * atan2(±0, x) = ±0 for x > 0\r\n * atan2(-y, ±0) = -pi/2 for y > 0\r\n * atan2(y, ±0) = pi/2 for y > 0\r\n * atan2(±y, -Infinity) = ±pi for finite y > 0\r\n * atan2(±y, +Infinity) = ±0 for finite y > 0\r\n * atan2(±Infinity, x) = ±pi/2 for finite x\r\n * atan2(±Infinity, -Infinity) = ±3*pi/4\r\n * atan2(±Infinity, +Infinity) = ±pi/4\r\n * atan2(NaN, x) = NaN\r\n * atan2(y, NaN) = NaN\r\n *\r\n */\r\nfunction atan2(y, x) {\r\n y = new this(y);\r\n x = new this(x);\r\n var r,\r\n pr = this.precision,\r\n rm = this.rounding,\r\n wpr = pr + 4;\r\n\r\n // Either NaN\r\n if (!y.s || !x.s) {\r\n r = new this(NaN);\r\n\r\n // Both ±Infinity\r\n } else if (!y.d && !x.d) {\r\n r = getPi(this, wpr, 1).times(x.s > 0 ? 0.25 : 0.75);\r\n r.s = y.s;\r\n\r\n // x is ±Infinity or y is ±0\r\n } else if (!x.d || y.isZero()) {\r\n r = x.s < 0 ? getPi(this, pr, rm) : new this(0);\r\n r.s = y.s;\r\n\r\n // y is ±Infinity or x is ±0\r\n } else if (!y.d || x.isZero()) {\r\n r = getPi(this, wpr, 1).times(0.5);\r\n r.s = y.s;\r\n\r\n // Both non-zero and finite\r\n } else if (x.s < 0) {\r\n this.precision = wpr;\r\n this.rounding = 1;\r\n r = this.atan(divide(y, x, wpr, 1));\r\n x = getPi(this, wpr, 1);\r\n this.precision = pr;\r\n this.rounding = rm;\r\n r = y.s < 0 ? r.minus(x) : r.plus(x);\r\n } else {\r\n r = this.atan(divide(y, x, wpr, 1));\r\n }\r\n\r\n return r;\r\n}\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the cube root of `x`, rounded to `precision` significant\r\n * digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|bigint|Decimal}\r\n *\r\n */\r\nfunction cbrt(x) {\r\n return new this(x).cbrt();\r\n}\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is `x` rounded to an integer using `ROUND_CEIL`.\r\n *\r\n * x {number|string|bigint|Decimal}\r\n *\r\n */\r\nfunction ceil(x) {\r\n return finalise(x = new this(x), x.e + 1, 2);\r\n}\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is `x` clamped to the range delineated by `min` and `max`.\r\n *\r\n * x {number|string|bigint|Decimal}\r\n * min {number|string|bigint|Decimal}\r\n * max {number|string|bigint|Decimal}\r\n *\r\n */\r\nfunction clamp(x, min, max) {\r\n return new this(x).clamp(min, max);\r\n}\r\n\r\n\r\n/*\r\n * Configure global settings for a Decimal constructor.\r\n *\r\n * `obj` is an object with one or more of the following properties,\r\n *\r\n * precision {number}\r\n * rounding {number}\r\n * toExpNeg {number}\r\n * toExpPos {number}\r\n * maxE {number}\r\n * minE {number}\r\n * modulo {number}\r\n * crypto {boolean|number}\r\n * defaults {true}\r\n *\r\n * E.g. Decimal.config({ precision: 20, rounding: 4 })\r\n *\r\n */\r\nfunction config(obj) {\r\n if (!obj || typeof obj !== 'object') throw Error(decimalError + 'Object expected');\r\n var i, p, v,\r\n useDefaults = obj.defaults === true,\r\n ps = [\r\n 'precision', 1, MAX_DIGITS,\r\n 'rounding', 0, 8,\r\n 'toExpNeg', -EXP_LIMIT, 0,\r\n 'toExpPos', 0, EXP_LIMIT,\r\n 'maxE', 0, EXP_LIMIT,\r\n 'minE', -EXP_LIMIT, 0,\r\n 'modulo', 0, 9\r\n ];\r\n\r\n for (i = 0; i < ps.length; i += 3) {\r\n if (p = ps[i], useDefaults) this[p] = DEFAULTS[p];\r\n if ((v = obj[p]) !== void 0) {\r\n if (mathfloor(v) === v && v >= ps[i + 1] && v <= ps[i + 2]) this[p] = v;\r\n else throw Error(invalidArgument + p + ': ' + v);\r\n }\r\n }\r\n\r\n if (p = 'crypto', useDefaults) this[p] = DEFAULTS[p];\r\n if ((v = obj[p]) !== void 0) {\r\n if (v === true || v === false || v === 0 || v === 1) {\r\n if (v) {\r\n if (typeof crypto != 'undefined' && crypto &&\r\n (crypto.getRandomValues || crypto.randomBytes)) {\r\n this[p] = true;\r\n } else {\r\n throw Error(cryptoUnavailable);\r\n }\r\n } else {\r\n this[p] = false;\r\n }\r\n } else {\r\n throw Error(invalidArgument + p + ': ' + v);\r\n }\r\n }\r\n\r\n return this;\r\n}\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the cosine of `x`, rounded to `precision` significant\r\n * digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|bigint|Decimal} A value in radians.\r\n *\r\n */\r\nfunction cos(x) {\r\n return new this(x).cos();\r\n}\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the hyperbolic cosine of `x`, rounded to precision\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|bigint|Decimal} A value in radians.\r\n *\r\n */\r\nfunction cosh(x) {\r\n return new this(x).cosh();\r\n}\r\n\r\n\r\n/*\r\n * Create and return a Decimal constructor with the same configuration properties as this Decimal\r\n * constructor.\r\n *\r\n */\r\nfunction clone(obj) {\r\n var i, p, ps;\r\n\r\n /*\r\n * The Decimal constructor and exported function.\r\n * Return a new Decimal instance.\r\n *\r\n * v {number|string|bigint|Decimal} A numeric value.\r\n *\r\n */\r\n function Decimal(v) {\r\n var e, i, t,\r\n x = this;\r\n\r\n // Decimal called without new.\r\n if (!(x instanceof Decimal)) return new Decimal(v);\r\n\r\n // Retain a reference to this Decimal constructor, and shadow Decimal.prototype.constructor\r\n // which points to Object.\r\n x.constructor = Decimal;\r\n\r\n if (isDecimalInstance(v)) {\r\n x.s = v.s;\r\n\r\n if (external) {\r\n if (!v.d || v.e > Decimal.maxE) {\r\n\r\n // Infinity.\r\n x.e = NaN;\r\n x.d = null;\r\n } else if (v.e < Decimal.minE) {\r\n\r\n // Zero.\r\n x.e = 0;\r\n x.d = [0];\r\n } else {\r\n x.e = v.e;\r\n x.d = v.d.slice();\r\n }\r\n } else {\r\n x.e = v.e;\r\n x.d = v.d ? v.d.slice() : v.d;\r\n }\r\n\r\n return;\r\n }\r\n\r\n t = typeof v;\r\n\r\n if (t === 'number') {\r\n if (v === 0) {\r\n x.s = 1 / v < 0 ? -1 : 1;\r\n x.e = 0;\r\n x.d = [0];\r\n return;\r\n }\r\n\r\n if (v < 0) {\r\n v = -v;\r\n x.s = -1;\r\n } else {\r\n x.s = 1;\r\n }\r\n\r\n // Fast path for small integers.\r\n if (v === ~~v && v < 1e7) {\r\n for (e = 0, i = v; i >= 10; i /= 10) e++;\r\n\r\n if (external) {\r\n if (e > Decimal.maxE) {\r\n x.e = NaN;\r\n x.d = null;\r\n } else if (e < Decimal.minE) {\r\n x.e = 0;\r\n x.d = [0];\r\n } else {\r\n x.e = e;\r\n x.d = [v];\r\n }\r\n } else {\r\n x.e = e;\r\n x.d = [v];\r\n }\r\n\r\n return;\r\n }\r\n\r\n // Infinity or NaN?\r\n if (v * 0 !== 0) {\r\n if (!v) x.s = NaN;\r\n x.e = NaN;\r\n x.d = null;\r\n return;\r\n }\r\n\r\n return parseDecimal(x, v.toString());\r\n }\r\n\r\n if (t === 'string') {\r\n if ((i = v.charCodeAt(0)) === 45) { // minus sign\r\n v = v.slice(1);\r\n x.s = -1;\r\n } else {\r\n if (i === 43) v = v.slice(1); // plus sign\r\n x.s = 1;\r\n }\r\n\r\n return isDecimal.test(v) ? parseDecimal(x, v) : parseOther(x, v);\r\n }\r\n\r\n if (t === 'bigint') {\r\n if (v < 0) {\r\n v = -v;\r\n x.s = -1;\r\n } else {\r\n x.s = 1;\r\n }\r\n\r\n return parseDecimal(x, v.toString());\r\n }\r\n\r\n throw Error(invalidArgument + v);\r\n }\r\n\r\n Decimal.prototype = P;\r\n\r\n Decimal.ROUND_UP = 0;\r\n Decimal.ROUND_DOWN = 1;\r\n Decimal.ROUND_CEIL = 2;\r\n Decimal.ROUND_FLOOR = 3;\r\n Decimal.ROUND_HALF_UP = 4;\r\n Decimal.ROUND_HALF_DOWN = 5;\r\n Decimal.ROUND_HALF_EVEN = 6;\r\n Decimal.ROUND_HALF_CEIL = 7;\r\n Decimal.ROUND_HALF_FLOOR = 8;\r\n Decimal.EUCLID = 9;\r\n\r\n Decimal.config = Decimal.set = config;\r\n Decimal.clone = clone;\r\n Decimal.isDecimal = isDecimalInstance;\r\n\r\n Decimal.abs = abs;\r\n Decimal.acos = acos;\r\n Decimal.acosh = acosh; // ES6\r\n Decimal.add = add;\r\n Decimal.asin = asin;\r\n Decimal.asinh = asinh; // ES6\r\n Decimal.atan = atan;\r\n Decimal.atanh = atanh; // ES6\r\n Decimal.atan2 = atan2;\r\n Decimal.cbrt = cbrt; // ES6\r\n Decimal.ceil = ceil;\r\n Decimal.clamp = clamp;\r\n Decimal.cos = cos;\r\n Decimal.cosh = cosh; // ES6\r\n Decimal.div = div;\r\n Decimal.exp = exp;\r\n Decimal.floor = floor;\r\n Decimal.hypot = hypot; // ES6\r\n Decimal.ln = ln;\r\n Decimal.log = log;\r\n Decimal.log10 = log10; // ES6\r\n Decimal.log2 = log2; // ES6\r\n Decimal.max = max;\r\n Decimal.min = min;\r\n Decimal.mod = mod;\r\n Decimal.mul = mul;\r\n Decimal.pow = pow;\r\n Decimal.random = random;\r\n Decimal.round = round;\r\n Decimal.sign = sign; // ES6\r\n Decimal.sin = sin;\r\n Decimal.sinh = sinh; // ES6\r\n Decimal.sqrt = sqrt;\r\n Decimal.sub = sub;\r\n Decimal.sum = sum;\r\n Decimal.tan = tan;\r\n Decimal.tanh = tanh; // ES6\r\n Decimal.trunc = trunc; // ES6\r\n\r\n if (obj === void 0) obj = {};\r\n if (obj) {\r\n if (obj.defaults !== true) {\r\n ps = ['precision', 'rounding', 'toExpNeg', 'toExpPos', 'maxE', 'minE', 'modulo', 'crypto'];\r\n for (i = 0; i < ps.length;) if (!obj.hasOwnProperty(p = ps[i++])) obj[p] = this[p];\r\n }\r\n }\r\n\r\n Decimal.config(obj);\r\n\r\n return Decimal;\r\n}\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is `x` divided by `y`, rounded to `precision` significant\r\n * digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|bigint|Decimal}\r\n * y {number|string|bigint|Decimal}\r\n *\r\n */\r\nfunction div(x, y) {\r\n return new this(x).div(y);\r\n}\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the natural exponential of `x`, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|bigint|Decimal} The power to which to raise the base of the natural log.\r\n *\r\n */\r\nfunction exp(x) {\r\n return new this(x).exp();\r\n}\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is `x` round to an integer using `ROUND_FLOOR`.\r\n *\r\n * x {number|string|bigint|Decimal}\r\n *\r\n */\r\nfunction floor(x) {\r\n return finalise(x = new this(x), x.e + 1, 3);\r\n}\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the square root of the sum of the squares of the arguments,\r\n * rounded to `precision` significant digits using rounding mode `rounding`.\r\n *\r\n * hypot(a, b, ...) = sqrt(a^2 + b^2 + ...)\r\n *\r\n * arguments {number|string|bigint|Decimal}\r\n *\r\n */\r\nfunction hypot() {\r\n var i, n,\r\n t = new this(0);\r\n\r\n external = false;\r\n\r\n for (i = 0; i < arguments.length;) {\r\n n = new this(arguments[i++]);\r\n if (!n.d) {\r\n if (n.s) {\r\n external = true;\r\n return new this(1 / 0);\r\n }\r\n t = n;\r\n } else if (t.d) {\r\n t = t.plus(n.times(n));\r\n }\r\n }\r\n\r\n external = true;\r\n\r\n return t.sqrt();\r\n}\r\n\r\n\r\n/*\r\n * Return true if object is a Decimal instance (where Decimal is any Decimal constructor),\r\n * otherwise return false.\r\n *\r\n */\r\nfunction isDecimalInstance(obj) {\r\n return obj instanceof Decimal || obj && obj.toStringTag === tag || false;\r\n}\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the natural logarithm of `x`, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|bigint|Decimal}\r\n *\r\n */\r\nfunction ln(x) {\r\n return new this(x).ln();\r\n}\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the log of `x` to the base `y`, or to base 10 if no base\r\n * is specified, rounded to `precision` significant digits using rounding mode `rounding`.\r\n *\r\n * log[y](x)\r\n *\r\n * x {number|string|bigint|Decimal} The argument of the logarithm.\r\n * y {number|string|bigint|Decimal} The base of the logarithm.\r\n *\r\n */\r\nfunction log(x, y) {\r\n return new this(x).log(y);\r\n}\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the base 2 logarithm of `x`, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|bigint|Decimal}\r\n *\r\n */\r\nfunction log2(x) {\r\n return new this(x).log(2);\r\n}\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the base 10 logarithm of `x`, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|bigint|Decimal}\r\n *\r\n */\r\nfunction log10(x) {\r\n return new this(x).log(10);\r\n}\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the maximum of the arguments.\r\n *\r\n * arguments {number|string|bigint|Decimal}\r\n *\r\n */\r\nfunction max() {\r\n return maxOrMin(this, arguments, -1);\r\n}\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the minimum of the arguments.\r\n *\r\n * arguments {number|string|bigint|Decimal}\r\n *\r\n */\r\nfunction min() {\r\n return maxOrMin(this, arguments, 1);\r\n}\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is `x` modulo `y`, rounded to `precision` significant digits\r\n * using rounding mode `rounding`.\r\n *\r\n * x {number|string|bigint|Decimal}\r\n * y {number|string|bigint|Decimal}\r\n *\r\n */\r\nfunction mod(x, y) {\r\n return new this(x).mod(y);\r\n}\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is `x` multiplied by `y`, rounded to `precision` significant\r\n * digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|bigint|Decimal}\r\n * y {number|string|bigint|Decimal}\r\n *\r\n */\r\nfunction mul(x, y) {\r\n return new this(x).mul(y);\r\n}\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is `x` raised to the power `y`, rounded to precision\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|bigint|Decimal} The base.\r\n * y {number|string|bigint|Decimal} The exponent.\r\n *\r\n */\r\nfunction pow(x, y) {\r\n return new this(x).pow(y);\r\n}\r\n\r\n\r\n/*\r\n * Returns a new Decimal with a random value equal to or greater than 0 and less than 1, and with\r\n * `sd`, or `Decimal.precision` if `sd` is omitted, significant digits (or less if trailing zeros\r\n * are produced).\r\n *\r\n * [sd] {number} Significant digits. Integer, 0 to MAX_DIGITS inclusive.\r\n *\r\n */\r\nfunction random(sd) {\r\n var d, e, k, n,\r\n i = 0,\r\n r = new this(1),\r\n rd = [];\r\n\r\n if (sd === void 0) sd = this.precision;\r\n else checkInt32(sd, 1, MAX_DIGITS);\r\n\r\n k = Math.ceil(sd / LOG_BASE);\r\n\r\n if (!this.crypto) {\r\n for (; i < k;) rd[i++] = Math.random() * 1e7 | 0;\r\n\r\n // Browsers supporting crypto.getRandomValues.\r\n } else if (crypto.getRandomValues) {\r\n d = crypto.getRandomValues(new Uint32Array(k));\r\n\r\n for (; i < k;) {\r\n n = d[i];\r\n\r\n // 0 <= n < 4294967296\r\n // Probability n >= 4.29e9, is 4967296 / 4294967296 = 0.00116 (1 in 865).\r\n if (n >= 4.29e9) {\r\n d[i] = crypto.getRandomValues(new Uint32Array(1))[0];\r\n } else {\r\n\r\n // 0 <= n <= 4289999999\r\n // 0 <= (n % 1e7) <= 9999999\r\n rd[i++] = n % 1e7;\r\n }\r\n }\r\n\r\n // Node.js supporting crypto.randomBytes.\r\n } else if (crypto.randomBytes) {\r\n\r\n // buffer\r\n d = crypto.randomBytes(k *= 4);\r\n\r\n for (; i < k;) {\r\n\r\n // 0 <= n < 2147483648\r\n n = d[i] + (d[i + 1] << 8) + (d[i + 2] << 16) + ((d[i + 3] & 0x7f) << 24);\r\n\r\n // Probability n >= 2.14e9, is 7483648 / 2147483648 = 0.0035 (1 in 286).\r\n if (n >= 2.14e9) {\r\n crypto.randomBytes(4).copy(d, i);\r\n } else {\r\n\r\n // 0 <= n <= 2139999999\r\n // 0 <= (n % 1e7) <= 9999999\r\n rd.push(n % 1e7);\r\n i += 4;\r\n }\r\n }\r\n\r\n i = k / 4;\r\n } else {\r\n throw Error(cryptoUnavailable);\r\n }\r\n\r\n k = rd[--i];\r\n sd %= LOG_BASE;\r\n\r\n // Convert trailing digits to zeros according to sd.\r\n if (k && sd) {\r\n n = mathpow(10, LOG_BASE - sd);\r\n rd[i] = (k / n | 0) * n;\r\n }\r\n\r\n // Remove trailing words which are zero.\r\n for (; rd[i] === 0; i--) rd.pop();\r\n\r\n // Zero?\r\n if (i < 0) {\r\n e = 0;\r\n rd = [0];\r\n } else {\r\n e = -1;\r\n\r\n // Remove leading words which are zero and adjust exponent accordingly.\r\n for (; rd[0] === 0; e -= LOG_BASE) rd.shift();\r\n\r\n // Count the digits of the first word of rd to determine leading zeros.\r\n for (k = 1, n = rd[0]; n >= 10; n /= 10) k++;\r\n\r\n // Adjust the exponent for leading zeros of the first word of rd.\r\n if (k < LOG_BASE) e -= LOG_BASE - k;\r\n }\r\n\r\n r.e = e;\r\n r.d = rd;\r\n\r\n return r;\r\n}\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is `x` rounded to an integer using rounding mode `rounding`.\r\n *\r\n * To emulate `Math.round`, set rounding to 7 (ROUND_HALF_CEIL).\r\n *\r\n * x {number|string|bigint|Decimal}\r\n *\r\n */\r\nfunction round(x) {\r\n return finalise(x = new this(x), x.e + 1, this.rounding);\r\n}\r\n\r\n\r\n/*\r\n * Return\r\n * 1 if x > 0,\r\n * -1 if x < 0,\r\n * 0 if x is 0,\r\n * -0 if x is -0,\r\n * NaN otherwise\r\n *\r\n * x {number|string|bigint|Decimal}\r\n *\r\n */\r\nfunction sign(x) {\r\n x = new this(x);\r\n return x.d ? (x.d[0] ? x.s : 0 * x.s) : x.s || NaN;\r\n}\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the sine of `x`, rounded to `precision` significant digits\r\n * using rounding mode `rounding`.\r\n *\r\n * x {number|string|bigint|Decimal} A value in radians.\r\n *\r\n */\r\nfunction sin(x) {\r\n return new this(x).sin();\r\n}\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the hyperbolic sine of `x`, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|bigint|Decimal} A value in radians.\r\n *\r\n */\r\nfunction sinh(x) {\r\n return new this(x).sinh();\r\n}\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the square root of `x`, rounded to `precision` significant\r\n * digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|bigint|Decimal}\r\n *\r\n */\r\nfunction sqrt(x) {\r\n return new this(x).sqrt();\r\n}\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is `x` minus `y`, rounded to `precision` significant digits\r\n * using rounding mode `rounding`.\r\n *\r\n * x {number|string|bigint|Decimal}\r\n * y {number|string|bigint|Decimal}\r\n *\r\n */\r\nfunction sub(x, y) {\r\n return new this(x).sub(y);\r\n}\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the sum of the arguments, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * Only the result is rounded, not the intermediate calculations.\r\n *\r\n * arguments {number|string|bigint|Decimal}\r\n *\r\n */\r\nfunction sum() {\r\n var i = 0,\r\n args = arguments,\r\n x = new this(args[i]);\r\n\r\n external = false;\r\n for (; x.s && ++i < args.length;) x = x.plus(args[i]);\r\n external = true;\r\n\r\n return finalise(x, this.precision, this.rounding);\r\n}\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the tangent of `x`, rounded to `precision` significant\r\n * digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|bigint|Decimal} A value in radians.\r\n *\r\n */\r\nfunction tan(x) {\r\n return new this(x).tan();\r\n}\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is the hyperbolic tangent of `x`, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|bigint|Decimal} A value in radians.\r\n *\r\n */\r\nfunction tanh(x) {\r\n return new this(x).tanh();\r\n}\r\n\r\n\r\n/*\r\n * Return a new Decimal whose value is `x` truncated to an integer.\r\n *\r\n * x {number|string|bigint|Decimal}\r\n *\r\n */\r\nfunction trunc(x) {\r\n return finalise(x = new this(x), x.e + 1, 1);\r\n}\r\n\r\n\r\nP[Symbol.for('nodejs.util.inspect.custom')] = P.toString;\r\nP[Symbol.toStringTag] = 'Decimal';\r\n\r\n// Create and configure initial Decimal constructor.\r\nexport var Decimal = P.constructor = clone(DEFAULTS);\r\n\r\n// Create the internal constants from their string values.\r\nLN10 = new Decimal(LN10);\r\nPI = new Decimal(PI);\r\n\r\nexport default Decimal;\r\n","import Decimal from 'decimal.js';\nimport { factory } from '../../utils/factory';\nvar name = 'BigNumber';\nvar dependencies = ['?on', 'config'];\nexport var createBigNumberClass = /* #__PURE__ */factory(name, dependencies, function (_ref) {\n var on = _ref.on,\n config = _ref.config;\n var EUCLID = 9; // Use euclidian division for mod calculation\n\n var BigNumber = Decimal.clone({\n precision: config.precision,\n modulo: EUCLID\n });\n /**\n * Attach type information\n */\n\n BigNumber.prototype.type = 'BigNumber';\n BigNumber.prototype.isBigNumber = true;\n /**\n * Get a JSON representation of a BigNumber containing\n * type information\n * @returns {Object} Returns a JSON object structured as:\n * `{\"mathjs\": \"BigNumber\", \"value\": \"0.2\"}`\n */\n\n BigNumber.prototype.toJSON = function () {\n return {\n mathjs: 'BigNumber',\n value: this.toString()\n };\n };\n /**\n * Instantiate a BigNumber from a JSON object\n * @param {Object} json a JSON object structured as:\n * `{\"mathjs\": \"BigNumber\", \"value\": \"0.2\"}`\n * @return {BigNumber}\n */\n\n\n BigNumber.fromJSON = function (json) {\n return new BigNumber(json.value);\n };\n\n if (on) {\n // listen for changed in the configuration, automatically apply changed precision\n on('config', function (curr, prev) {\n if (curr.precision !== prev.precision) {\n BigNumber.config({\n precision: curr.precision\n });\n }\n });\n }\n\n return BigNumber;\n}, {\n isClass: true\n});","'use strict';\n\n/**\n *\n * This class allows the manipulation of complex numbers.\n * You can pass a complex number in different formats. Either as object, double, string or two integer parameters.\n *\n * Object form\n * { re: <real>, im: <imaginary> }\n * { arg: <angle>, abs: <radius> }\n * { phi: <angle>, r: <radius> }\n *\n * Array / Vector form\n * [ real, imaginary ]\n *\n * Double form\n * 99.3 - Single double value\n *\n * String form\n * '23.1337' - Simple real number\n * '15+3i' - a simple complex number\n * '3-i' - a simple complex number\n *\n * Example:\n *\n * const c = new Complex('99.3+8i');\n * c.mul({r: 3, i: 9}).div(4.9).sub(3, 2);\n *\n */\n\n\nconst cosh = Math.cosh || function (x) {\n return Math.abs(x) < 1e-9 ? 1 - x : (Math.exp(x) + Math.exp(-x)) * 0.5;\n};\n\nconst sinh = Math.sinh || function (x) {\n return Math.abs(x) < 1e-9 ? x : (Math.exp(x) - Math.exp(-x)) * 0.5;\n};\n\n/**\n * Calculates cos(x) - 1 using Taylor series if x is small (-¼π ≤ x ≤ ¼π).\n *\n * @param {number} x\n * @returns {number} cos(x) - 1\n */\nconst cosm1 = x => {\n // cos(x) - 1 = − 2sin^2(x / 2)\n const s = Math.sin(0.5 * x);\n return -2 * s * s;\n};\n\nconst hypot = function (x, y) {\n\n x = Math.abs(x);\n y = Math.abs(y);\n\n // Ensure `x` is the larger value\n if (x < y) [x, y] = [y, x];\n\n // If both are below the threshold, use straightforward Pythagoras\n if (x < 1e8) return Math.sqrt(x * x + y * y);\n\n // For larger values, scale to avoid overflow\n y /= x;\n return x * Math.sqrt(1 + y * y);\n};\n\nconst parser_exit = function () {\n throw SyntaxError('Invalid Param');\n};\n\n/**\n * Calculates log(sqrt(a^2+b^2)) in a way to avoid overflows\n *\n * @param {number} a\n * @param {number} b\n * @returns {number}\n */\nfunction logHypot(a, b) {\n\n const _a = Math.abs(a);\n const _b = Math.abs(b);\n\n if (a === 0) {\n return Math.log(_b);\n }\n\n if (b === 0) {\n return Math.log(_a);\n }\n\n if (_a < 3000 && _b < 3000) {\n return Math.log(a * a + b * b) * 0.5;\n }\n\n /* I got 4 ideas to compute this property without overflow:\n *\n * Testing 1000000 times with random samples for a,b ∈ [1, 1000000000] against a big decimal library to get an error estimate\n *\n * 1. Only eliminate the square root: (OVERALL ERROR: 3.9122483030951116e-11)\n\n Math.log(a * a + b * b) / 2\n\n *\n *\n * 2. Try to use the non-overflowing pythagoras: (OVERALL ERROR: 8.889760039210159e-10)\n\n const fn = function(a, b) {\n a = Math.abs(a);\n b = Math.abs(b);\n let t = Math.min(a, b);\n a = Math.max(a, b);\n t = t / a;\n\n return Math.log(a) + Math.log(1 + t * t) / 2;\n };\n\n * 3. Abuse the identity cos(atan(y/x) = x / sqrt(x^2+y^2): (OVERALL ERROR: 3.4780178737037204e-10)\n\n Math.log(a / Math.cos(Math.atan2(b, a)))\n\n * 4. Use 3. and apply log rules: (OVERALL ERROR: 1.2014087502620896e-9)\n\n Math.log(a) - Math.log(Math.cos(Math.atan2(b, a)))\n\n */\n\n a = a * 0.5;\n b = b * 0.5;\n\n return 0.5 * Math.log(a * a + b * b) + Math.LN2;\n}\n\nconst P = { 're': 0, 'im': 0 };\nconst parse = function (a, b) {\n\n const z = P;\n\n if (a === undefined || a === null) {\n z['re'] =\n z['im'] = 0;\n } else if (b !== undefined) {\n z['re'] = a;\n z['im'] = b;\n } else\n switch (typeof a) {\n\n case 'object':\n\n if ('im' in a && 're' in a) {\n z['re'] = a['re'];\n z['im'] = a['im'];\n } else if ('abs' in a && 'arg' in a) {\n if (!isFinite(a['abs']) && isFinite(a['arg'])) {\n return Complex['INFINITY'];\n }\n z['re'] = a['abs'] * Math.cos(a['arg']);\n z['im'] = a['abs'] * Math.sin(a['arg']);\n } else if ('r' in a && 'phi' in a) {\n if (!isFinite(a['r']) && isFinite(a['phi'])) {\n return Complex['INFINITY'];\n }\n z['re'] = a['r'] * Math.cos(a['phi']);\n z['im'] = a['r'] * Math.sin(a['phi']);\n } else if (a.length === 2) { // Quick array check\n z['re'] = a[0];\n z['im'] = a[1];\n } else {\n parser_exit();\n }\n break;\n\n case 'string':\n\n z['im'] = /* void */\n z['re'] = 0;\n\n const tokens = a.replace(/_/g, '')\n .match(/\\d+\\.?\\d*e[+-]?\\d+|\\d+\\.?\\d*|\\.\\d+|./g);\n let plus = 1;\n let minus = 0;\n\n if (tokens === null) {\n parser_exit();\n }\n\n for (let i = 0; i < tokens.length; i++) {\n\n const c = tokens[i];\n\n if (c === ' ' || c === '\\t' || c === '\\n') {\n /* void */\n } else if (c === '+') {\n plus++;\n } else if (c === '-') {\n minus++;\n } else if (c === 'i' || c === 'I') {\n\n if (plus + minus === 0) {\n parser_exit();\n }\n\n if (tokens[i + 1] !== ' ' && !isNaN(tokens[i + 1])) {\n z['im'] += parseFloat((minus % 2 ? '-' : '') + tokens[i + 1]);\n i++;\n } else {\n z['im'] += parseFloat((minus % 2 ? '-' : '') + '1');\n }\n plus = minus = 0;\n\n } else {\n\n if (plus + minus === 0 || isNaN(c)) {\n parser_exit();\n }\n\n if (tokens[i + 1] === 'i' || tokens[i + 1] === 'I') {\n z['im'] += parseFloat((minus % 2 ? '-' : '') + c);\n i++;\n } else {\n z['re'] += parseFloat((minus % 2 ? '-' : '') + c);\n }\n plus = minus = 0;\n }\n }\n\n // Still something on the stack\n if (plus + minus > 0) {\n parser_exit();\n }\n break;\n\n case 'number':\n z['im'] = 0;\n z['re'] = a;\n break;\n\n default:\n parser_exit();\n }\n\n if (isNaN(z['re']) || isNaN(z['im'])) {\n // If a calculation is NaN, we treat it as NaN and don't throw\n //parser_exit();\n }\n\n return z;\n};\n\n/**\n * @constructor\n * @returns {Complex}\n */\nfunction Complex(a, b) {\n\n if (!(this instanceof Complex)) {\n return new Complex(a, b);\n }\n\n const z = parse(a, b);\n\n this['re'] = z['re'];\n this['im'] = z['im'];\n}\n\nComplex.prototype = {\n\n 're': 0,\n 'im': 0,\n\n /**\n * Calculates the sign of a complex number, which is a normalized complex\n *\n * @returns {Complex}\n */\n 'sign': function () {\n\n const abs = hypot(this['re'], this['im']);\n\n return new Complex(\n this['re'] / abs,\n this['im'] / abs);\n },\n\n /**\n * Adds two complex numbers\n *\n * @returns {Complex}\n */\n 'add': function (a, b) {\n\n const z = parse(a, b);\n\n const tInfin = this['isInfinite']();\n const zInfin = !(isFinite(z['re']) && isFinite(z['im']));\n\n if (tInfin || zInfin) {\n\n if (tInfin && zInfin) {\n // Infinity + Infinity = NaN\n return Complex['NAN'];\n }\n // Infinity + z = Infinity { where z != Infinity }\n return Complex['INFINITY'];\n }\n\n return new Complex(\n this['re'] + z['re'],\n this['im'] + z['im']);\n },\n\n /**\n * Subtracts two complex numbers\n *\n * @returns {Complex}\n */\n 'sub': function (a, b) {\n\n const z = parse(a, b);\n\n const tInfin = this['isInfinite']();\n const zInfin = !(isFinite(z['re']) && isFinite(z['im']));\n\n if (tInfin || zInfin) {\n\n if (tInfin && zInfin) {\n // Infinity - Infinity = NaN\n return Complex['NAN'];\n }\n // Infinity - z = Infinity { where z != Infinity }\n return Complex['INFINITY'];\n }\n\n return new Complex(\n this['re'] - z['re'],\n this['im'] - z['im']);\n },\n\n /**\n * Multiplies two complex numbers\n *\n * @returns {Complex}\n */\n 'mul': function (a, b) {\n\n const z = parse(a, b);\n\n const tInfin = this['isInfinite']();\n const zInfin = !(isFinite(z['re']) && isFinite(z['im']));\n const tIsZero = this['re'] === 0 && this['im'] === 0;\n const zIsZero = z['re'] === 0 && z['im'] === 0;\n\n // Infinity * 0 = NaN\n if (tInfin && zIsZero || zInfin && tIsZero) {\n return Complex['NAN'];\n }\n\n // Infinity * z = Infinity { where z != 0 }\n if (tInfin || zInfin) {\n return Complex['INFINITY'];\n }\n\n // Shortcut for real values\n if (z['im'] === 0 && this['im'] === 0) {\n return new Complex(this['re'] * z['re'], 0);\n }\n\n return new Complex(\n this['re'] * z['re'] - this['im'] * z['im'],\n this['re'] * z['im'] + this['im'] * z['re']);\n },\n\n /**\n * Divides two complex numbers\n *\n * @returns {Complex}\n */\n 'div': function (a, b) {\n\n const z = parse(a, b);\n\n const tInfin = this['isInfinite']();\n const zInfin = !(isFinite(z['re']) && isFinite(z['im']));\n const tIsZero = this['re'] === 0 && this['im'] === 0;\n const zIsZero = z['re'] === 0 && z['im'] === 0;\n\n // 0 / 0 = NaN and Infinity / Infinity = NaN\n if (tIsZero && zIsZero || tInfin && zInfin) {\n return Complex['NAN'];\n }\n\n // Infinity / 0 = Infinity\n if (zIsZero || tInfin) {\n return Complex['INFINITY'];\n }\n\n // 0 / Infinity = 0\n if (tIsZero || zInfin) {\n return Complex['ZERO'];\n }\n\n if (0 === z['im']) {\n // Divisor is real\n return new Complex(this['re'] / z['re'], this['im'] / z['re']);\n }\n\n if (Math.abs(z['re']) < Math.abs(z['im'])) {\n\n const x = z['re'] / z['im'];\n const t = z['re'] * x + z['im'];\n\n return new Complex(\n (this['re'] * x + this['im']) / t,\n (this['im'] * x - this['re']) / t);\n\n } else {\n\n const x = z['im'] / z['re'];\n const t = z['im'] * x + z['re'];\n\n return new Complex(\n (this['re'] + this['im'] * x) / t,\n (this['im'] - this['re'] * x) / t);\n }\n },\n\n /**\n * Calculate the power of two complex numbers\n *\n * @returns {Complex}\n */\n 'pow': function (a, b) {\n\n const z = parse(a, b);\n\n const tIsZero = this['re'] === 0 && this['im'] === 0;\n const zIsZero = z['re'] === 0 && z['im'] === 0;\n\n if (zIsZero) {\n return Complex['ONE'];\n }\n\n // If the exponent is real\n if (z['im'] === 0) {\n\n if (this['im'] === 0 && this['re'] > 0) {\n\n return new Complex(Math.pow(this['re'], z['re']), 0);\n\n } else if (this['re'] === 0) { // If base is fully imaginary\n\n switch ((z['re'] % 4 + 4) % 4) {\n case 0:\n return new Complex(Math.pow(this['im'], z['re']), 0);\n case 1:\n return new Complex(0, Math.pow(this['im'], z['re']));\n case 2:\n return new Complex(-Math.pow(this['im'], z['re']), 0);\n case 3:\n return new Complex(0, -Math.pow(this['im'], z['re']));\n }\n }\n }\n\n /* I couldn't find a good formula, so here is a derivation and optimization\n *\n * z_1^z_2 = (a + bi)^(c + di)\n * = exp((c + di) * log(a + bi)\n * = pow(a^2 + b^2, (c + di) / 2) * exp(i(c + di)atan2(b, a))\n * =>...\n * Re = (pow(a^2 + b^2, c / 2) * exp(-d * atan2(b, a))) * cos(d * log(a^2 + b^2) / 2 + c * atan2(b, a))\n * Im = (pow(a^2 + b^2, c / 2) * exp(-d * atan2(b, a))) * sin(d * log(a^2 + b^2) / 2 + c * atan2(b, a))\n *\n * =>...\n * Re = exp(c * log(sqrt(a^2 + b^2)) - d * atan2(b, a)) * cos(d * log(sqrt(a^2 + b^2)) + c * atan2(b, a))\n * Im = exp(c * log(sqrt(a^2 + b^2)) - d * atan2(b, a)) * sin(d * log(sqrt(a^2 + b^2)) + c * atan2(b, a))\n *\n * =>\n * Re = exp(c * logsq2 - d * arg(z_1)) * cos(d * logsq2 + c * arg(z_1))\n * Im = exp(c * logsq2 - d * arg(z_1)) * sin(d * logsq2 + c * arg(z_1))\n *\n */\n\n if (tIsZero && z['re'] > 0) { // Same behavior as Wolframalpha, Zero if real part is zero\n return Complex['ZERO'];\n }\n\n const arg = Math.atan2(this['im'], this['re']);\n const loh = logHypot(this['re'], this['im']);\n\n let re = Math.exp(z['re'] * loh - z['im'] * arg);\n let im = z['im'] * loh + z['re'] * arg;\n return new Complex(\n re * Math.cos(im),\n re * Math.sin(im));\n },\n\n /**\n * Calculate the complex square root\n *\n * @returns {Complex}\n */\n 'sqrt': function () {\n\n const a = this['re'];\n const b = this['im'];\n\n if (b === 0) {\n // Real number case\n if (a >= 0) {\n return new Complex(Math.sqrt(a), 0);\n } else {\n return new Complex(0, Math.sqrt(-a));\n }\n }\n\n const r = hypot(a, b);\n\n let re = Math.sqrt(0.5 * (r + Math.abs(a))); // sqrt(2x) / 2 = sqrt(x / 2)\n let im = Math.abs(b) / (2 * re);\n\n if (a >= 0) {\n return new Complex(re, b < 0 ? -im : im);\n } else {\n return new Complex(im, b < 0 ? -re : re);\n }\n },\n\n /**\n * Calculate the complex exponent\n *\n * @returns {Complex}\n */\n 'exp': function () {\n\n const er = Math.exp(this['re']);\n\n if (this['im'] === 0) {\n return new Complex(er, 0);\n }\n return new Complex(\n er * Math.cos(this['im']),\n er * Math.sin(this['im']));\n },\n\n /**\n * Calculate the complex exponent and subtracts one.\n *\n * This may be more accurate than `Complex(x).exp().sub(1)` if\n * `x` is small.\n *\n * @returns {Complex}\n */\n 'expm1': function () {\n\n /**\n * exp(a + i*b) - 1\n = exp(a) * (cos(b) + j*sin(b)) - 1\n = expm1(a)*cos(b) + cosm1(b) + j*exp(a)*sin(b)\n */\n\n const a = this['re'];\n const b = this['im'];\n\n return new Complex(\n Math.expm1(a) * Math.cos(b) + cosm1(b),\n Math.exp(a) * Math.sin(b));\n },\n\n /**\n * Calculate the natural log\n *\n * @returns {Complex}\n */\n 'log': function () {\n\n const a = this['re'];\n const b = this['im'];\n\n if (b === 0 && a > 0) {\n return new Complex(Math.log(a), 0);\n }\n\n return new Complex(\n logHypot(a, b),\n Math.atan2(b, a));\n },\n\n /**\n * Calculate the magnitude of the complex number\n *\n * @returns {number}\n */\n 'abs': function () {\n\n return hypot(this['re'], this['im']);\n },\n\n /**\n * Calculate the angle of the complex number\n *\n * @returns {number}\n */\n 'arg': function () {\n\n return Math.atan2(this['im'], this['re']);\n },\n\n /**\n * Calculate the sine of the complex number\n *\n * @returns {Complex}\n */\n 'sin': function () {\n\n // sin(z) = ( e^iz - e^-iz ) / 2i \n // = sin(a)cosh(b) + i cos(a)sinh(b)\n\n const a = this['re'];\n const b = this['im'];\n\n return new Complex(\n Math.sin(a) * cosh(b),\n Math.cos(a) * sinh(b));\n },\n\n /**\n * Calculate the cosine\n *\n * @returns {Complex}\n */\n 'cos': function () {\n\n // cos(z) = ( e^iz + e^-iz ) / 2 \n // = cos(a)cosh(b) - i sin(a)sinh(b)\n\n const a = this['re'];\n const b = this['im'];\n\n return new Complex(\n Math.cos(a) * cosh(b),\n -Math.sin(a) * sinh(b));\n },\n\n /**\n * Calculate the tangent\n *\n * @returns {Complex}\n */\n 'tan': function () {\n\n // tan(z) = sin(z) / cos(z) \n // = ( e^iz - e^-iz ) / ( i( e^iz + e^-iz ) )\n // = ( e^2iz - 1 ) / i( e^2iz + 1 )\n // = ( sin(2a) + i sinh(2b) ) / ( cos(2a) + cosh(2b) )\n\n const a = 2 * this['re'];\n const b = 2 * this['im'];\n const d = Math.cos(a) + cosh(b);\n\n return new Complex(\n Math.sin(a) / d,\n sinh(b) / d);\n },\n\n /**\n * Calculate the cotangent\n *\n * @returns {Complex}\n */\n 'cot': function () {\n\n // cot(c) = i(e^(ci) + e^(-ci)) / (e^(ci) - e^(-ci))\n\n const a = 2 * this['re'];\n const b = 2 * this['im'];\n const d = Math.cos(a) - cosh(b);\n\n return new Complex(\n -Math.sin(a) / d,\n sinh(b) / d);\n },\n\n /**\n * Calculate the secant\n *\n * @returns {Complex}\n */\n 'sec': function () {\n\n // sec(c) = 2 / (e^(ci) + e^(-ci))\n\n const a = this['re'];\n const b = this['im'];\n const d = 0.5 * cosh(2 * b) + 0.5 * Math.cos(2 * a);\n\n return new Complex(\n Math.cos(a) * cosh(b) / d,\n Math.sin(a) * sinh(b) / d);\n },\n\n /**\n * Calculate the cosecans\n *\n * @returns {Complex}\n */\n 'csc': function () {\n\n // csc(c) = 2i / (e^(ci) - e^(-ci))\n\n const a = this['re'];\n const b = this['im'];\n const d = 0.5 * cosh(2 * b) - 0.5 * Math.cos(2 * a);\n\n return new Complex(\n Math.sin(a) * cosh(b) / d,\n -Math.cos(a) * sinh(b) / d);\n },\n\n /**\n * Calculate the complex arcus sinus\n *\n * @returns {Complex}\n */\n 'asin': function () {\n\n // asin(c) = -i * log(ci + sqrt(1 - c^2))\n\n const a = this['re'];\n const b = this['im'];\n\n const t1 = new Complex(\n b * b - a * a + 1,\n -2 * a * b)['sqrt']();\n\n const t2 = new Complex(\n t1['re'] - b,\n t1['im'] + a)['log']();\n\n return new Complex(t2['im'], -t2['re']);\n },\n\n /**\n * Calculate the complex arcus cosinus\n *\n * @returns {Complex}\n */\n 'acos': function () {\n\n // acos(c) = i * log(c - i * sqrt(1 - c^2))\n\n const a = this['re'];\n const b = this['im'];\n\n const t1 = new Complex(\n b * b - a * a + 1,\n -2 * a * b)['sqrt']();\n\n const t2 = new Complex(\n t1['re'] - b,\n t1['im'] + a)['log']();\n\n return new Complex(Math.PI / 2 - t2['im'], t2['re']);\n },\n\n /**\n * Calculate the complex arcus tangent\n *\n * @returns {Complex}\n */\n 'atan': function () {\n\n // atan(c) = i / 2 log((i + x) / (i - x))\n\n const a = this['re'];\n const b = this['im'];\n\n if (a === 0) {\n\n if (b === 1) {\n return new Complex(0, Infinity);\n }\n\n if (b === -1) {\n return new Complex(0, -Infinity);\n }\n }\n\n const d = a * a + (1.0 - b) * (1.0 - b);\n\n const t1 = new Complex(\n (1 - b * b - a * a) / d,\n -2 * a / d).log();\n\n return new Complex(-0.5 * t1['im'], 0.5 * t1['re']);\n },\n\n /**\n * Calculate the complex arcus cotangent\n *\n * @returns {Complex}\n */\n 'acot': function () {\n\n // acot(c) = i / 2 log((c - i) / (c + i))\n\n const a = this['re'];\n const b = this['im'];\n\n if (b === 0) {\n return new Complex(Math.atan2(1, a), 0);\n }\n\n const d = a * a + b * b;\n return (d !== 0)\n ? new Complex(\n a / d,\n -b / d).atan()\n : new Complex(\n (a !== 0) ? a / 0 : 0,\n (b !== 0) ? -b / 0 : 0).atan();\n },\n\n /**\n * Calculate the complex arcus secant\n *\n * @returns {Complex}\n */\n 'asec': function () {\n\n // asec(c) = -i * log(1 / c + sqrt(1 - i / c^2))\n\n const a = this['re'];\n const b = this['im'];\n\n if (a === 0 && b === 0) {\n return new Complex(0, Infinity);\n }\n\n const d = a * a + b * b;\n return (d !== 0)\n ? new Complex(\n a / d,\n -b / d).acos()\n : new Complex(\n (a !== 0) ? a / 0 : 0,\n (b !== 0) ? -b / 0 : 0).acos();\n },\n\n /**\n * Calculate the complex arcus cosecans\n *\n * @returns {Complex}\n */\n 'acsc': function () {\n\n // acsc(c) = -i * log(i / c + sqrt(1 - 1 / c^2))\n\n const a = this['re'];\n const b = this['im'];\n\n if (a === 0 && b === 0) {\n return new Complex(Math.PI / 2, Infinity);\n }\n\n const d = a * a + b * b;\n return (d !== 0)\n ? new Complex(\n a / d,\n -b / d).asin()\n : new Complex(\n (a !== 0) ? a / 0 : 0,\n (b !== 0) ? -b / 0 : 0).asin();\n },\n\n /**\n * Calculate the complex sinh\n *\n * @returns {Complex}\n */\n 'sinh': function () {\n\n // sinh(c) = (e^c - e^-c) / 2\n\n const a = this['re'];\n const b = this['im'];\n\n return new Complex(\n sinh(a) * Math.cos(b),\n cosh(a) * Math.sin(b));\n },\n\n /**\n * Calculate the complex cosh\n *\n * @returns {Complex}\n */\n 'cosh': function () {\n\n // cosh(c) = (e^c + e^-c) / 2\n\n const a = this['re'];\n const b = this['im'];\n\n return new Complex(\n cosh(a) * Math.cos(b),\n sinh(a) * Math.sin(b));\n },\n\n /**\n * Calculate the complex tanh\n *\n * @returns {Complex}\n */\n 'tanh': function () {\n\n // tanh(c) = (e^c - e^-c) / (e^c + e^-c)\n\n const a = 2 * this['re'];\n const b = 2 * this['im'];\n const d = cosh(a) + Math.cos(b);\n\n return new Complex(\n sinh(a) / d,\n Math.sin(b) / d);\n },\n\n /**\n * Calculate the complex coth\n *\n * @returns {Complex}\n */\n 'coth': function () {\n\n // coth(c) = (e^c + e^-c) / (e^c - e^-c)\n\n const a = 2 * this['re'];\n const b = 2 * this['im'];\n const d = cosh(a) - Math.cos(b);\n\n return new Complex(\n sinh(a) / d,\n -Math.sin(b) / d);\n },\n\n /**\n * Calculate the complex csch\n *\n * @returns {Complex}\n */\n 'csch': function () {\n\n // csch(c) = 2 / (e^c - e^-c)\n\n const a = this['re'];\n const b = this['im'];\n const d = Math.cos(2 * b) - cosh(2 * a);\n\n return new Complex(\n -2 * sinh(a) * Math.cos(b) / d,\n 2 * cosh(a) * Math.sin(b) / d);\n },\n\n /**\n * Calculate the complex sech\n *\n * @returns {Complex}\n */\n 'sech': function () {\n\n // sech(c) = 2 / (e^c + e^-c)\n\n const a = this['re'];\n const b = this['im'];\n const d = Math.cos(2 * b) + cosh(2 * a);\n\n return new Complex(\n 2 * cosh(a) * Math.cos(b) / d,\n -2 * sinh(a) * Math.sin(b) / d);\n },\n\n /**\n * Calculate the complex asinh\n *\n * @returns {Complex}\n */\n 'asinh': function () {\n\n // asinh(z) = log(z + sqrt(z^2 + 1))\n\n const a = this['re'];\n const b = this['im'];\n\n if (b === 0) {\n\n if (a === 0) {\n return new Complex(0, 0);\n }\n\n // Use |a| to keep asinh(-a) = -asinh(a) and avoid cancellation for large -a\n const x = Math.abs(a);\n const r = Math.log(x + Math.sqrt(x * x + 1));\n\n return new Complex(a < 0 ? -r : r, 0);\n }\n\n // z^2 + 1 = (a^2 - b^2 + 1) + i (2ab)\n const re2 = a * a - b * b + 1;\n const im2 = 2 * a * b;\n\n const t = new Complex(re2, im2)['sqrt'](); // sqrt(z^2 + 1)\n\n return new Complex(a + t['re'], b + t['im'])['log']();\n },\n\n /**\n * Calculate the complex acosh\n *\n * @returns {Complex}\n */\n 'acosh': function () {\n\n // acosh(z)= log(z + sqrt(z^2 - 1)) = log(z + sqrt(z - 1) * sqrt(z + 1))\n\n const a = this['re'];\n const b = this['im'];\n\n if (b === 0) {\n\n // z = a is real\n if (a > 1) {\n // acosh(a) = log(a + sqrt(a - 1) * sqrt(a + 1)), a > 1\n return new Complex(\n Math.log(a + Math.sqrt(a - 1) * Math.sqrt(a + 1)), 0);\n }\n\n if (a < -1) {\n // acosh(a) = log(-a + sqrt(a^2 - 1)) + i*pi, a < -1\n const t = Math.sqrt(a * a - 1);\n return new Complex(Math.log(-a + t), Math.PI);\n }\n\n // -1 <= a <= 1 : purely imaginary\n // acosh(a) = i * acos(a)\n return new Complex(0, Math.acos(a));\n }\n\n const t1 = new Complex(a - 1, b)['sqrt'](); // sqrt(z - 1)\n const t2 = new Complex(a + 1, b)['sqrt'](); // sqrt(z + 1)\n\n return new Complex(\n a + t1['re'] * t2['re'] - t1['im'] * t2['im'],\n b + t1['re'] * t2['im'] + t1['im'] * t2['re']\n )['log']();\n },\n\n /**\n * Calculate the complex atanh\n *\n * @returns {Complex}\n */\n 'atanh': function () {\n\n // atanh(z) = log((1 + z) / (1 - z)) / 2\n\n const a = this['re'];\n const b = this['im'];\n\n if (b === 0) {\n\n if (a === 0) {\n return new Complex(0, 0);\n }\n\n if (a === 1) {\n // limit x -> 1^- atanh(x) = +Infinity\n return new Complex(Infinity, 0);\n }\n\n if (a === -1) {\n // limit x -> -1^+ atanh(x) = -Infinity\n return new Complex(-Infinity, 0);\n }\n\n if (-1 < a && a < 1) {\n // Purely real\n return new Complex(\n 0.5 * Math.log((1 + a) / (1 - a)),\n 0\n );\n }\n\n if (a > 1) {\n // Our branch: Im(atanh(a)) = -π/2 for a > 1\n const t = (a + 1) / (a - 1); // > 0\n return new Complex(\n 0.5 * Math.log(t),\n -Math.PI / 2\n );\n }\n\n // a < -1: Im(atanh(a)) = +π/2\n const t = (1 + a) / (1 - a); // < 0\n return new Complex(\n 0.5 * Math.log(-t), // log((1 - a)/(1 + a))\n Math.PI / 2\n );\n }\n\n // Use atanh(z) = 0.5 * Log((1+z)/(1-z)) with principal Log.\n const oneMinus = 1 - a;\n const onePlus = 1 + a;\n const d = oneMinus * oneMinus + b * b; // |1 - z|^2\n\n if (d === 0) {\n // (1 - z) == 0 for finite z only at z = 1+0i, already handled above.\n // If we ever get here, just propagate infinities consistently:\n return new Complex(\n (a !== -1) ? (a / 0) : 0,\n (b !== 0) ? (b / 0) : 0\n );\n }\n\n // (1 + z) / (1 - z) with a single complex division\n const xr = (onePlus * oneMinus - b * b) / d;\n const xi = (b * oneMinus + onePlus * b) / d;\n\n // 0.5 * log(xr + i xi)\n return new Complex(\n logHypot(xr, xi) / 2,\n Math.atan2(xi, xr) / 2\n );\n },\n\n /**\n * Calculate the complex acoth\n *\n * @returns {Complex}\n */\n 'acoth': function () {\n\n // acoth(z) = log((z + 1) / (z - 1)) / 2 = atanh(1 / z)\n\n const a = this['re'];\n const b = this['im'];\n\n // z = 0 -> acoth(0) = i * π / 2 (log((1+0)/(1-0))/2 = log(-1)/2)\n if (a === 0 && b === 0) {\n return new Complex(0, Math.PI / 2);\n }\n\n const d = a * a + b * b;\n\n if (d !== 0) {\n // 1 / z = (a - i b) / (a^2 + b^2)\n return new Complex(a / d, -b / d)['atanh']();\n }\n\n // Fallback for weird infinities/NaNs: mirror other functions' style\n return new Complex(\n (a !== 0) ? a / 0 : 0,\n (b !== 0) ? -b / 0 : 0\n )['atanh']();\n },\n\n /**\n * Calculate the complex acsch\n *\n * @returns {Complex}\n */\n 'acsch': function () {\n\n // acsch(c) = log((1+sqrt(1+c^2))/c) = = asinh(1 / z)\n\n const a = this['re'];\n const b = this['im'];\n\n if (b === 0) {\n\n // z = a real\n if (a === 0) {\n // acsch(0) -> +/- Infinity, we keep your previous behavior\n return new Complex(Infinity, 0);\n }\n\n // acsch(a) = asinh(1/a) = log(1/a + sqrt(1/a^2 + 1))\n const inv = 1 / a;\n return new Complex(\n Math.log(inv + Math.sqrt(inv * inv + 1)),\n 0\n );\n }\n\n const d = a * a + b * b;\n\n if (d !== 0) {\n // 1/z = (a - i b) / (a^2 + b^2)\n return new Complex(a / d, -b / d)['asinh']();\n }\n\n // Handle 0 + 0i or infinities in the same spirit as your existing code\n return new Complex(\n (a !== 0) ? a / 0 : 0,\n (b !== 0) ? -b / 0 : 0)['asinh']();\n },\n\n /**\n * Calculate the complex asech\n *\n * @returns {Complex}\n */\n 'asech': function () {\n\n // asech(z) = acosh(1 / z)\n\n const a = this['re'];\n const b = this['im'];\n\n if (this['isZero']()) {\n // asech(0) = acosh(∞) -> ∞\n return Complex['INFINITY'];\n }\n\n const d = a * a + b * b;\n\n if (d !== 0) {\n // 1 / z = (a - i b) / (a^2 + b^2)\n return new Complex(a / d, -b / d)['acosh']();\n }\n\n // Fallback for weird infinities/NaNs\n return new Complex(\n (a !== 0) ? a / 0 : 0,\n (b !== 0) ? -b / 0 : 0)['acosh']();\n },\n\n /**\n * Calculate the complex inverse 1/z\n *\n * @returns {Complex}\n */\n 'inverse': function () {\n\n // 1 / 0 = Infinity and 1 / Infinity = 0\n if (this['isZero']()) {\n return Complex['INFINITY'];\n }\n\n if (this['isInfinite']()) {\n return Complex['ZERO'];\n }\n\n const a = this['re'];\n const b = this['im'];\n\n const d = a * a + b * b;\n\n return new Complex(a / d, -b / d);\n },\n\n /**\n * Returns the complex conjugate\n *\n * @returns {Complex}\n */\n 'conjugate': function () {\n\n return new Complex(this['re'], -this['im']);\n },\n\n /**\n * Gets the negated complex number\n *\n * @returns {Complex}\n */\n 'neg': function () {\n\n return new Complex(-this['re'], -this['im']);\n },\n\n /**\n * Ceils the actual complex number\n *\n * @returns {Complex}\n */\n 'ceil': function (places) {\n\n places = Math.pow(10, places || 0);\n\n return new Complex(\n Math.ceil(this['re'] * places) / places,\n Math.ceil(this['im'] * places) / places);\n },\n\n /**\n * Floors the actual complex number\n *\n * @returns {Complex}\n */\n 'floor': function (places) {\n\n places = Math.pow(10, places || 0);\n\n return new Complex(\n Math.floor(this['re'] * places) / places,\n Math.floor(this['im'] * places) / places);\n },\n\n /**\n * Ceils the actual complex number\n *\n * @returns {Complex}\n */\n 'round': function (places) {\n\n places = Math.pow(10, places || 0);\n\n return new Complex(\n Math.round(this['re'] * places) / places,\n Math.round(this['im'] * places) / places);\n },\n\n /**\n * Compares two complex numbers\n *\n * **Note:** new Complex(Infinity).equals(Infinity) === false\n *\n * @returns {boolean}\n */\n 'equals': function (a, b) {\n\n const z = parse(a, b);\n\n return Math.abs(z['re'] - this['re']) <= Complex['EPSILON'] &&\n Math.abs(z['im'] - this['im']) <= Complex['EPSILON'];\n },\n\n /**\n * Clones the actual object\n *\n * @returns {Complex}\n */\n 'clone': function () {\n\n return new Complex(this['re'], this['im']);\n },\n\n /**\n * Gets a string of the actual complex number\n *\n * @returns {string}\n */\n 'toString': function () {\n\n let a = this['re'];\n let b = this['im'];\n let ret = \"\";\n\n if (this['isNaN']()) {\n return 'NaN';\n }\n\n if (this['isInfinite']()) {\n return 'Infinity';\n }\n\n if (Math.abs(a) < Complex['EPSILON']) {\n a = 0;\n }\n\n if (Math.abs(b) < Complex['EPSILON']) {\n b = 0;\n }\n\n // If is real number\n if (b === 0) {\n return ret + a;\n }\n\n if (a !== 0) {\n ret += a;\n ret += \" \";\n if (b < 0) {\n b = -b;\n ret += \"-\";\n } else {\n ret += \"+\";\n }\n ret += \" \";\n } else if (b < 0) {\n b = -b;\n ret += \"-\";\n }\n\n if (1 !== b) { // b is the absolute imaginary part\n ret += b;\n }\n return ret + \"i\";\n },\n\n /**\n * Returns the actual number as a vector\n *\n * @returns {Array}\n */\n 'toVector': function () {\n\n return [this['re'], this['im']];\n },\n\n /**\n * Returns the actual real value of the current object\n *\n * @returns {number|null}\n */\n 'valueOf': function () {\n\n if (this['im'] === 0) {\n return this['re'];\n }\n return null;\n },\n\n /**\n * Determines whether a complex number is not on the Riemann sphere.\n *\n * @returns {boolean}\n */\n 'isNaN': function () {\n return isNaN(this['re']) || isNaN(this['im']);\n },\n\n /**\n * Determines whether or not a complex number is at the zero pole of the\n * Riemann sphere.\n *\n * @returns {boolean}\n */\n 'isZero': function () {\n return this['im'] === 0 && this['re'] === 0;\n },\n\n /**\n * Determines whether a complex number is not at the infinity pole of the\n * Riemann sphere.\n *\n * @returns {boolean}\n */\n 'isFinite': function () {\n return isFinite(this['re']) && isFinite(this['im']);\n },\n\n /**\n * Determines whether or not a complex number is at the infinity pole of the\n * Riemann sphere.\n *\n * @returns {boolean}\n */\n 'isInfinite': function () {\n return !this['isFinite']();\n }\n};\n\nComplex['ZERO'] = new Complex(0, 0);\nComplex['ONE'] = new Complex(1, 0);\nComplex['I'] = new Complex(0, 1);\nComplex['PI'] = new Complex(Math.PI, 0);\nComplex['E'] = new Complex(Math.E, 0);\nComplex['INFINITY'] = new Complex(Infinity, Infinity);\nComplex['NAN'] = new Complex(NaN, NaN);\nComplex['EPSILON'] = 1e-15;\nexport {\n Complex as default, Complex\n};\n","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nimport Complex from 'complex.js';\nimport { format } from '../../utils/number';\nimport { isNumber, isUnit } from '../../utils/is';\nimport { factory } from '../../utils/factory';\nvar name = 'Complex';\nvar dependencies = [];\nexport var createComplexClass = /* #__PURE__ */factory(name, dependencies, function () {\n /**\n * Attach type information\n */\n Complex.prototype.type = 'Complex';\n Complex.prototype.isComplex = true;\n /**\n * Get a JSON representation of the complex number\n * @returns {Object} Returns a JSON object structured as:\n * `{\"mathjs\": \"Complex\", \"re\": 2, \"im\": 3}`\n */\n\n Complex.prototype.toJSON = function () {\n return {\n mathjs: 'Complex',\n re: this.re,\n im: this.im\n };\n };\n /*\n * Return the value of the complex number in polar notation\n * The angle phi will be set in the interval of [-pi, pi].\n * @return {{r: number, phi: number}} Returns and object with properties r and phi.\n */\n\n\n Complex.prototype.toPolar = function () {\n return {\n r: this.abs(),\n phi: this.arg()\n };\n };\n /**\n * Get a string representation of the complex number,\n * with optional formatting options.\n * @param {Object | number | Function} [options] Formatting options. See\n * lib/utils/number:format for a\n * description of the available\n * options.\n * @return {string} str\n */\n\n\n Complex.prototype.format = function (options) {\n var str = '';\n var im = this.im;\n var re = this.re;\n var strRe = format(this.re, options);\n var strIm = format(this.im, options); // round either re or im when smaller than the configured precision\n\n var precision = isNumber(options) ? options : options ? options.precision : null;\n\n if (precision !== null) {\n var epsilon = Math.pow(10, -precision);\n\n if (Math.abs(re / im) < epsilon) {\n re = 0;\n }\n\n if (Math.abs(im / re) < epsilon) {\n im = 0;\n }\n }\n\n if (im === 0) {\n // real value\n str = strRe;\n } else if (re === 0) {\n // purely complex value\n if (im === 1) {\n str = 'i';\n } else if (im === -1) {\n str = '-i';\n } else {\n str = strIm + 'i';\n }\n } else {\n // complex value\n if (im < 0) {\n if (im === -1) {\n str = strRe + ' - i';\n } else {\n str = strRe + ' - ' + strIm.substring(1) + 'i';\n }\n } else {\n if (im === 1) {\n str = strRe + ' + i';\n } else {\n str = strRe + ' + ' + strIm + 'i';\n }\n }\n }\n\n return str;\n };\n /**\n * Create a complex number from polar coordinates\n *\n * Usage:\n *\n * Complex.fromPolar(r: number, phi: number) : Complex\n * Complex.fromPolar({r: number, phi: number}) : Complex\n *\n * @param {*} args...\n * @return {Complex}\n */\n\n\n Complex.fromPolar = function (args) {\n switch (arguments.length) {\n case 1:\n {\n var arg = arguments[0];\n\n if (_typeof(arg) === 'object') {\n return Complex(arg);\n } else {\n throw new TypeError('Input has to be an object with r and phi keys.');\n }\n }\n\n case 2:\n {\n var r = arguments[0];\n var phi = arguments[1];\n\n if (isNumber(r)) {\n if (isUnit(phi) && phi.hasBase('ANGLE')) {\n // convert unit to a number in radians\n phi = phi.toNumber('rad');\n }\n\n if (isNumber(phi)) {\n return new Complex({\n r: r,\n phi: phi\n });\n }\n\n throw new TypeError('Phi is not a number nor an angle unit.');\n } else {\n throw new TypeError('Radius r is not a number.');\n }\n }\n\n default:\n throw new SyntaxError('Wrong number of arguments in function fromPolar');\n }\n };\n\n Complex.prototype.valueOf = Complex.prototype.toString;\n /**\n * Create a Complex number from a JSON object\n * @param {Object} json A JSON Object structured as\n * {\"mathjs\": \"Complex\", \"re\": 2, \"im\": 3}\n * All properties are optional, default values\n * for `re` and `im` are 0.\n * @return {Complex} Returns a new Complex number\n */\n\n Complex.fromJSON = function (json) {\n return new Complex(json);\n };\n /**\n * Compare two complex numbers, `a` and `b`:\n *\n * - Returns 1 when the real part of `a` is larger than the real part of `b`\n * - Returns -1 when the real part of `a` is smaller than the real part of `b`\n * - Returns 1 when the real parts are equal\n * and the imaginary part of `a` is larger than the imaginary part of `b`\n * - Returns -1 when the real parts are equal\n * and the imaginary part of `a` is smaller than the imaginary part of `b`\n * - Returns 0 when both real and imaginary parts are equal.\n *\n * @params {Complex} a\n * @params {Complex} b\n * @returns {number} Returns the comparison result: -1, 0, or 1\n */\n\n\n Complex.compare = function (a, b) {\n if (a.re > b.re) {\n return 1;\n }\n\n if (a.re < b.re) {\n return -1;\n }\n\n if (a.im > b.im) {\n return 1;\n }\n\n if (a.im < b.im) {\n return -1;\n }\n\n return 0;\n };\n\n return Complex;\n}, {\n isClass: true\n});","/**\n * @license Fraction.js v4.3.7 31/08/2023\n * https://www.xarg.org/2014/03/rational-numbers-in-javascript/\n *\n * Copyright (c) 2023, Robert Eisele (robert@raw.org)\n * Dual licensed under the MIT or GPL Version 2 licenses.\n **/\n\n\n/**\n *\n * This class offers the possibility to calculate fractions.\n * You can pass a fraction in different formats. Either as array, as double, as string or as an integer.\n *\n * Array/Object form\n * [ 0 => <numerator>, 1 => <denominator> ]\n * [ n => <numerator>, d => <denominator> ]\n *\n * Integer form\n * - Single integer value\n *\n * Double form\n * - Single double value\n *\n * String form\n * 123.456 - a simple double\n * 123/456 - a string fraction\n * 123.'456' - a double with repeating decimal places\n * 123.(456) - synonym\n * 123.45'6' - a double with repeating last place\n * 123.45(6) - synonym\n *\n * Example:\n *\n * var f = new Fraction(\"9.4'31'\");\n * f.mul([-4, 3]).div(4.9);\n *\n */\n\n\n// Maximum search depth for cyclic rational numbers. 2000 should be more than enough.\n// Example: 1/7 = 0.(142857) has 6 repeating decimal places.\n// If MAX_CYCLE_LEN gets reduced, long cycles will not be detected and toString() only gets the first 10 digits\nvar MAX_CYCLE_LEN = 2000;\n\n// Parsed data to avoid calling \"new\" all the time\nvar P = {\n \"s\": 1,\n \"n\": 0,\n \"d\": 1\n};\n\nfunction assign(n, s) {\n\n if (isNaN(n = parseInt(n, 10))) {\n throw InvalidParameter();\n }\n return n * s;\n}\n\n// Creates a new Fraction internally without the need of the bulky constructor\nfunction newFraction(n, d) {\n\n if (d === 0) {\n throw DivisionByZero();\n }\n\n var f = Object.create(Fraction.prototype);\n f[\"s\"] = n < 0 ? -1 : 1;\n\n n = n < 0 ? -n : n;\n\n var a = gcd(n, d);\n\n f[\"n\"] = n / a;\n f[\"d\"] = d / a;\n return f;\n}\n\nfunction factorize(num) {\n\n var factors = {};\n\n var n = num;\n var i = 2;\n var s = 4;\n\n while (s <= n) {\n\n while (n % i === 0) {\n n/= i;\n factors[i] = (factors[i] || 0) + 1;\n }\n s+= 1 + 2 * i++;\n }\n\n if (n !== num) {\n if (n > 1)\n factors[n] = (factors[n] || 0) + 1;\n } else {\n factors[num] = (factors[num] || 0) + 1;\n }\n return factors;\n}\n\nvar parse = function(p1, p2) {\n\n var n = 0, d = 1, s = 1;\n var v = 0, w = 0, x = 0, y = 1, z = 1;\n\n var A = 0, B = 1;\n var C = 1, D = 1;\n\n var N = 10000000;\n var M;\n\n if (p1 === undefined || p1 === null) {\n /* void */\n } else if (p2 !== undefined) {\n n = p1;\n d = p2;\n s = n * d;\n\n if (n % 1 !== 0 || d % 1 !== 0) {\n throw NonIntegerParameter();\n }\n\n } else\n switch (typeof p1) {\n\n case \"object\":\n {\n if (\"d\" in p1 && \"n\" in p1) {\n n = p1[\"n\"];\n d = p1[\"d\"];\n if (\"s\" in p1)\n n*= p1[\"s\"];\n } else if (0 in p1) {\n n = p1[0];\n if (1 in p1)\n d = p1[1];\n } else {\n throw InvalidParameter();\n }\n s = n * d;\n break;\n }\n case \"number\":\n {\n if (p1 < 0) {\n s = p1;\n p1 = -p1;\n }\n\n if (p1 % 1 === 0) {\n n = p1;\n } else if (p1 > 0) { // check for != 0, scale would become NaN (log(0)), which converges really slow\n\n if (p1 >= 1) {\n z = Math.pow(10, Math.floor(1 + Math.log(p1) / Math.LN10));\n p1/= z;\n }\n\n // Using Farey Sequences\n // http://www.johndcook.com/blog/2010/10/20/best-rational-approximation/\n\n while (B <= N && D <= N) {\n M = (A + C) / (B + D);\n\n if (p1 === M) {\n if (B + D <= N) {\n n = A + C;\n d = B + D;\n } else if (D > B) {\n n = C;\n d = D;\n } else {\n n = A;\n d = B;\n }\n break;\n\n } else {\n\n if (p1 > M) {\n A+= C;\n B+= D;\n } else {\n C+= A;\n D+= B;\n }\n\n if (B > N) {\n n = C;\n d = D;\n } else {\n n = A;\n d = B;\n }\n }\n }\n n*= z;\n } else if (isNaN(p1) || isNaN(p2)) {\n d = n = NaN;\n }\n break;\n }\n case \"string\":\n {\n B = p1.match(/\\d+|./g);\n\n if (B === null)\n throw InvalidParameter();\n\n if (B[A] === '-') {// Check for minus sign at the beginning\n s = -1;\n A++;\n } else if (B[A] === '+') {// Check for plus sign at the beginning\n A++;\n }\n\n if (B.length === A + 1) { // Check if it's just a simple number \"1234\"\n w = assign(B[A++], s);\n } else if (B[A + 1] === '.' || B[A] === '.') { // Check if it's a decimal number\n\n if (B[A] !== '.') { // Handle 0.5 and .5\n v = assign(B[A++], s);\n }\n A++;\n\n // Check for decimal places\n if (A + 1 === B.length || B[A + 1] === '(' && B[A + 3] === ')' || B[A + 1] === \"'\" && B[A + 3] === \"'\") {\n w = assign(B[A], s);\n y = Math.pow(10, B[A].length);\n A++;\n }\n\n // Check for repeating places\n if (B[A] === '(' && B[A + 2] === ')' || B[A] === \"'\" && B[A + 2] === \"'\") {\n x = assign(B[A + 1], s);\n z = Math.pow(10, B[A + 1].length) - 1;\n A+= 3;\n }\n\n } else if (B[A + 1] === '/' || B[A + 1] === ':') { // Check for a simple fraction \"123/456\" or \"123:456\"\n w = assign(B[A], s);\n y = assign(B[A + 2], 1);\n A+= 3;\n } else if (B[A + 3] === '/' && B[A + 1] === ' ') { // Check for a complex fraction \"123 1/2\"\n v = assign(B[A], s);\n w = assign(B[A + 2], s);\n y = assign(B[A + 4], 1);\n A+= 5;\n }\n\n if (B.length <= A) { // Check for more tokens on the stack\n d = y * z;\n s = /* void */\n n = x + d * v + z * w;\n break;\n }\n\n /* Fall through on error */\n }\n default:\n throw InvalidParameter();\n }\n\n if (d === 0) {\n throw DivisionByZero();\n }\n\n P[\"s\"] = s < 0 ? -1 : 1;\n P[\"n\"] = Math.abs(n);\n P[\"d\"] = Math.abs(d);\n};\n\nfunction modpow(b, e, m) {\n\n var r = 1;\n for (; e > 0; b = (b * b) % m, e >>= 1) {\n\n if (e & 1) {\n r = (r * b) % m;\n }\n }\n return r;\n}\n\n\nfunction cycleLen(n, d) {\n\n for (; d % 2 === 0;\n d/= 2) {\n }\n\n for (; d % 5 === 0;\n d/= 5) {\n }\n\n if (d === 1) // Catch non-cyclic numbers\n return 0;\n\n // If we would like to compute really large numbers quicker, we could make use of Fermat's little theorem:\n // 10^(d-1) % d == 1\n // However, we don't need such large numbers and MAX_CYCLE_LEN should be the capstone,\n // as we want to translate the numbers to strings.\n\n var rem = 10 % d;\n var t = 1;\n\n for (; rem !== 1; t++) {\n rem = rem * 10 % d;\n\n if (t > MAX_CYCLE_LEN)\n return 0; // Returning 0 here means that we don't print it as a cyclic number. It's likely that the answer is `d-1`\n }\n return t;\n}\n\n\nfunction cycleStart(n, d, len) {\n\n var rem1 = 1;\n var rem2 = modpow(10, len, d);\n\n for (var t = 0; t < 300; t++) { // s < ~log10(Number.MAX_VALUE)\n // Solve 10^s == 10^(s+t) (mod d)\n\n if (rem1 === rem2)\n return t;\n\n rem1 = rem1 * 10 % d;\n rem2 = rem2 * 10 % d;\n }\n return 0;\n}\n\nfunction gcd(a, b) {\n\n if (!a)\n return b;\n if (!b)\n return a;\n\n while (1) {\n a%= b;\n if (!a)\n return b;\n b%= a;\n if (!b)\n return a;\n }\n};\n\n/**\n * Module constructor\n *\n * @constructor\n * @param {number|Fraction=} a\n * @param {number=} b\n */\nexport default function Fraction(a, b) {\n\n parse(a, b);\n\n if (this instanceof Fraction) {\n a = gcd(P[\"d\"], P[\"n\"]); // Abuse variable a\n this[\"s\"] = P[\"s\"];\n this[\"n\"] = P[\"n\"] / a;\n this[\"d\"] = P[\"d\"] / a;\n } else {\n return newFraction(P['s'] * P['n'], P['d']);\n }\n}\n\nvar DivisionByZero = function() { return new Error(\"Division by Zero\"); };\nvar InvalidParameter = function() { return new Error(\"Invalid argument\"); };\nvar NonIntegerParameter = function() { return new Error(\"Parameters must be integer\"); };\n\nFraction.prototype = {\n\n \"s\": 1,\n \"n\": 0,\n \"d\": 1,\n\n /**\n * Calculates the absolute value\n *\n * Ex: new Fraction(-4).abs() => 4\n **/\n \"abs\": function() {\n\n return newFraction(this[\"n\"], this[\"d\"]);\n },\n\n /**\n * Inverts the sign of the current fraction\n *\n * Ex: new Fraction(-4).neg() => 4\n **/\n \"neg\": function() {\n\n return newFraction(-this[\"s\"] * this[\"n\"], this[\"d\"]);\n },\n\n /**\n * Adds two rational numbers\n *\n * Ex: new Fraction({n: 2, d: 3}).add(\"14.9\") => 467 / 30\n **/\n \"add\": function(a, b) {\n\n parse(a, b);\n return newFraction(\n this[\"s\"] * this[\"n\"] * P[\"d\"] + P[\"s\"] * this[\"d\"] * P[\"n\"],\n this[\"d\"] * P[\"d\"]\n );\n },\n\n /**\n * Subtracts two rational numbers\n *\n * Ex: new Fraction({n: 2, d: 3}).add(\"14.9\") => -427 / 30\n **/\n \"sub\": function(a, b) {\n\n parse(a, b);\n return newFraction(\n this[\"s\"] * this[\"n\"] * P[\"d\"] - P[\"s\"] * this[\"d\"] * P[\"n\"],\n this[\"d\"] * P[\"d\"]\n );\n },\n\n /**\n * Multiplies two rational numbers\n *\n * Ex: new Fraction(\"-17.(345)\").mul(3) => 5776 / 111\n **/\n \"mul\": function(a, b) {\n\n parse(a, b);\n return newFraction(\n this[\"s\"] * P[\"s\"] * this[\"n\"] * P[\"n\"],\n this[\"d\"] * P[\"d\"]\n );\n },\n\n /**\n * Divides two rational numbers\n *\n * Ex: new Fraction(\"-17.(345)\").inverse().div(3)\n **/\n \"div\": function(a, b) {\n\n parse(a, b);\n return newFraction(\n this[\"s\"] * P[\"s\"] * this[\"n\"] * P[\"d\"],\n this[\"d\"] * P[\"n\"]\n );\n },\n\n /**\n * Clones the actual object\n *\n * Ex: new Fraction(\"-17.(345)\").clone()\n **/\n \"clone\": function() {\n return newFraction(this['s'] * this['n'], this['d']);\n },\n\n /**\n * Calculates the modulo of two rational numbers - a more precise fmod\n *\n * Ex: new Fraction('4.(3)').mod([7, 8]) => (13/3) % (7/8) = (5/6)\n **/\n \"mod\": function(a, b) {\n\n if (isNaN(this['n']) || isNaN(this['d'])) {\n return new Fraction(NaN);\n }\n\n if (a === undefined) {\n return newFraction(this[\"s\"] * this[\"n\"] % this[\"d\"], 1);\n }\n\n parse(a, b);\n if (0 === P[\"n\"] && 0 === this[\"d\"]) {\n throw DivisionByZero();\n }\n\n /*\n * First silly attempt, kinda slow\n *\n return that[\"sub\"]({\n \"n\": num[\"n\"] * Math.floor((this.n / this.d) / (num.n / num.d)),\n \"d\": num[\"d\"],\n \"s\": this[\"s\"]\n });*/\n\n /*\n * New attempt: a1 / b1 = a2 / b2 * q + r\n * => b2 * a1 = a2 * b1 * q + b1 * b2 * r\n * => (b2 * a1 % a2 * b1) / (b1 * b2)\n */\n return newFraction(\n this[\"s\"] * (P[\"d\"] * this[\"n\"]) % (P[\"n\"] * this[\"d\"]),\n P[\"d\"] * this[\"d\"]\n );\n },\n\n /**\n * Calculates the fractional gcd of two rational numbers\n *\n * Ex: new Fraction(5,8).gcd(3,7) => 1/56\n */\n \"gcd\": function(a, b) {\n\n parse(a, b);\n\n // gcd(a / b, c / d) = gcd(a, c) / lcm(b, d)\n\n return newFraction(gcd(P[\"n\"], this[\"n\"]) * gcd(P[\"d\"], this[\"d\"]), P[\"d\"] * this[\"d\"]);\n },\n\n /**\n * Calculates the fractional lcm of two rational numbers\n *\n * Ex: new Fraction(5,8).lcm(3,7) => 15\n */\n \"lcm\": function(a, b) {\n\n parse(a, b);\n\n // lcm(a / b, c / d) = lcm(a, c) / gcd(b, d)\n\n if (P[\"n\"] === 0 && this[\"n\"] === 0) {\n return newFraction(0, 1);\n }\n return newFraction(P[\"n\"] * this[\"n\"], gcd(P[\"n\"], this[\"n\"]) * gcd(P[\"d\"], this[\"d\"]));\n },\n\n /**\n * Calculates the ceil of a rational number\n *\n * Ex: new Fraction('4.(3)').ceil() => (5 / 1)\n **/\n \"ceil\": function(places) {\n\n places = Math.pow(10, places || 0);\n\n if (isNaN(this[\"n\"]) || isNaN(this[\"d\"])) {\n return new Fraction(NaN);\n }\n return newFraction(Math.ceil(places * this[\"s\"] * this[\"n\"] / this[\"d\"]), places);\n },\n\n /**\n * Calculates the floor of a rational number\n *\n * Ex: new Fraction('4.(3)').floor() => (4 / 1)\n **/\n \"floor\": function(places) {\n\n places = Math.pow(10, places || 0);\n\n if (isNaN(this[\"n\"]) || isNaN(this[\"d\"])) {\n return new Fraction(NaN);\n }\n return newFraction(Math.floor(places * this[\"s\"] * this[\"n\"] / this[\"d\"]), places);\n },\n\n /**\n * Rounds a rational number\n *\n * Ex: new Fraction('4.(3)').round() => (4 / 1)\n **/\n \"round\": function(places) {\n\n places = Math.pow(10, places || 0);\n\n if (isNaN(this[\"n\"]) || isNaN(this[\"d\"])) {\n return new Fraction(NaN);\n }\n return newFraction(Math.round(places * this[\"s\"] * this[\"n\"] / this[\"d\"]), places);\n },\n\n /**\n * Rounds a rational number to a multiple of another rational number\n *\n * Ex: new Fraction('0.9').roundTo(\"1/8\") => 7 / 8\n **/\n \"roundTo\": function(a, b) {\n\n /*\n k * x/y ≤ a/b < (k+1) * x/y\n ⇔ k ≤ a/b / (x/y) < (k+1)\n ⇔ k = floor(a/b * y/x)\n */\n\n parse(a, b);\n\n return newFraction(this['s'] * Math.round(this['n'] * P['d'] / (this['d'] * P['n'])) * P['n'], P['d']);\n },\n\n /**\n * Gets the inverse of the fraction, means numerator and denominator are exchanged\n *\n * Ex: new Fraction([-3, 4]).inverse() => -4 / 3\n **/\n \"inverse\": function() {\n\n return newFraction(this[\"s\"] * this[\"d\"], this[\"n\"]);\n },\n\n /**\n * Calculates the fraction to some rational exponent, if possible\n *\n * Ex: new Fraction(-1,2).pow(-3) => -8\n */\n \"pow\": function(a, b) {\n\n parse(a, b);\n\n // Trivial case when exp is an integer\n\n if (P['d'] === 1) {\n\n if (P['s'] < 0) {\n return newFraction(Math.pow(this['s'] * this[\"d\"], P['n']), Math.pow(this[\"n\"], P['n']));\n } else {\n return newFraction(Math.pow(this['s'] * this[\"n\"], P['n']), Math.pow(this[\"d\"], P['n']));\n }\n }\n\n // Negative roots become complex\n // (-a/b)^(c/d) = x\n // <=> (-1)^(c/d) * (a/b)^(c/d) = x\n // <=> (cos(pi) + i*sin(pi))^(c/d) * (a/b)^(c/d) = x # rotate 1 by 180°\n // <=> (cos(c*pi/d) + i*sin(c*pi/d)) * (a/b)^(c/d) = x # DeMoivre's formula in Q ( https://proofwiki.org/wiki/De_Moivre%27s_Formula/Rational_Index )\n // From which follows that only for c=0 the root is non-complex. c/d is a reduced fraction, so that sin(c/dpi)=0 occurs for d=1, which is handled by our trivial case.\n if (this['s'] < 0) return null;\n\n // Now prime factor n and d\n var N = factorize(this['n']);\n var D = factorize(this['d']);\n\n // Exponentiate and take root for n and d individually\n var n = 1;\n var d = 1;\n for (var k in N) {\n if (k === '1') continue;\n if (k === '0') {\n n = 0;\n break;\n }\n N[k]*= P['n'];\n\n if (N[k] % P['d'] === 0) {\n N[k]/= P['d'];\n } else return null;\n n*= Math.pow(k, N[k]);\n }\n\n for (var k in D) {\n if (k === '1') continue;\n D[k]*= P['n'];\n\n if (D[k] % P['d'] === 0) {\n D[k]/= P['d'];\n } else return null;\n d*= Math.pow(k, D[k]);\n }\n\n if (P['s'] < 0) {\n return newFraction(d, n);\n }\n return newFraction(n, d);\n },\n\n /**\n * Check if two rational numbers are the same\n *\n * Ex: new Fraction(19.6).equals([98, 5]);\n **/\n \"equals\": function(a, b) {\n\n parse(a, b);\n return this[\"s\"] * this[\"n\"] * P[\"d\"] === P[\"s\"] * P[\"n\"] * this[\"d\"]; // Same as compare() === 0\n },\n\n /**\n * Check if two rational numbers are the same\n *\n * Ex: new Fraction(19.6).equals([98, 5]);\n **/\n \"compare\": function(a, b) {\n\n parse(a, b);\n var t = (this[\"s\"] * this[\"n\"] * P[\"d\"] - P[\"s\"] * P[\"n\"] * this[\"d\"]);\n return (0 < t) - (t < 0);\n },\n\n \"simplify\": function(eps) {\n\n if (isNaN(this['n']) || isNaN(this['d'])) {\n return this;\n }\n\n eps = eps || 0.001;\n\n var thisABS = this['abs']();\n var cont = thisABS['toContinued']();\n\n for (var i = 1; i < cont.length; i++) {\n\n var s = newFraction(cont[i - 1], 1);\n for (var k = i - 2; k >= 0; k--) {\n s = s['inverse']()['add'](cont[k]);\n }\n\n if (Math.abs(s['sub'](thisABS).valueOf()) < eps) {\n return s['mul'](this['s']);\n }\n }\n return this;\n },\n\n /**\n * Check if two rational numbers are divisible\n *\n * Ex: new Fraction(19.6).divisible(1.5);\n */\n \"divisible\": function(a, b) {\n\n parse(a, b);\n return !(!(P[\"n\"] * this[\"d\"]) || ((this[\"n\"] * P[\"d\"]) % (P[\"n\"] * this[\"d\"])));\n },\n\n /**\n * Returns a decimal representation of the fraction\n *\n * Ex: new Fraction(\"100.'91823'\").valueOf() => 100.91823918239183\n **/\n 'valueOf': function() {\n\n return this[\"s\"] * this[\"n\"] / this[\"d\"];\n },\n\n /**\n * Returns a string-fraction representation of a Fraction object\n *\n * Ex: new Fraction(\"1.'3'\").toFraction(true) => \"4 1/3\"\n **/\n 'toFraction': function(excludeWhole) {\n\n var whole, str = \"\";\n var n = this[\"n\"];\n var d = this[\"d\"];\n if (this[\"s\"] < 0) {\n str+= '-';\n }\n\n if (d === 1) {\n str+= n;\n } else {\n\n if (excludeWhole && (whole = Math.floor(n / d)) > 0) {\n str+= whole;\n str+= \" \";\n n%= d;\n }\n\n str+= n;\n str+= '/';\n str+= d;\n }\n return str;\n },\n\n /**\n * Returns a latex representation of a Fraction object\n *\n * Ex: new Fraction(\"1.'3'\").toLatex() => \"\\frac{4}{3}\"\n **/\n 'toLatex': function(excludeWhole) {\n\n var whole, str = \"\";\n var n = this[\"n\"];\n var d = this[\"d\"];\n if (this[\"s\"] < 0) {\n str+= '-';\n }\n\n if (d === 1) {\n str+= n;\n } else {\n\n if (excludeWhole && (whole = Math.floor(n / d)) > 0) {\n str+= whole;\n n%= d;\n }\n\n str+= \"\\\\frac{\";\n str+= n;\n str+= '}{';\n str+= d;\n str+= '}';\n }\n return str;\n },\n\n /**\n * Returns an array of continued fraction elements\n *\n * Ex: new Fraction(\"7/8\").toContinued() => [0,1,7]\n */\n 'toContinued': function() {\n\n var t;\n var a = this['n'];\n var b = this['d'];\n var res = [];\n\n if (isNaN(a) || isNaN(b)) {\n return res;\n }\n\n do {\n res.push(Math.floor(a / b));\n t = a % b;\n a = b;\n b = t;\n } while (a !== 1);\n\n return res;\n },\n\n /**\n * Creates a string representation of a fraction with all digits\n *\n * Ex: new Fraction(\"100.'91823'\").toString() => \"100.(91823)\"\n **/\n 'toString': function(dec) {\n\n var N = this[\"n\"];\n var D = this[\"d\"];\n\n if (isNaN(N) || isNaN(D)) {\n return \"NaN\";\n }\n\n dec = dec || 15; // 15 = decimal places when no repetation\n\n var cycLen = cycleLen(N, D); // Cycle length\n var cycOff = cycleStart(N, D, cycLen); // Cycle start\n\n var str = this['s'] < 0 ? \"-\" : \"\";\n\n str+= N / D | 0;\n\n N%= D;\n N*= 10;\n\n if (N)\n str+= \".\";\n\n if (cycLen) {\n\n for (var i = cycOff; i--;) {\n str+= N / D | 0;\n N%= D;\n N*= 10;\n }\n str+= \"(\";\n for (var i = cycLen; i--;) {\n str+= N / D | 0;\n N%= D;\n N*= 10;\n }\n str+= \")\";\n } else {\n for (var i = dec; N && i--;) {\n str+= N / D | 0;\n N%= D;\n N*= 10;\n }\n }\n return str;\n }\n};\n","import Fraction from 'fraction.js';\nimport { factory } from '../../utils/factory';\nvar name = 'Fraction';\nvar dependencies = [];\nexport var createFractionClass = /* #__PURE__ */factory(name, dependencies, function () {\n /**\n * Attach type information\n */\n Fraction.prototype.type = 'Fraction';\n Fraction.prototype.isFraction = true;\n /**\n * Get a JSON representation of a Fraction containing type information\n * @returns {Object} Returns a JSON object structured as:\n * `{\"mathjs\": \"Fraction\", \"n\": 3, \"d\": 8}`\n */\n\n Fraction.prototype.toJSON = function () {\n return {\n mathjs: 'Fraction',\n n: this.s * this.n,\n d: this.d\n };\n };\n /**\n * Instantiate a Fraction from a JSON object\n * @param {Object} json a JSON object structured as:\n * `{\"mathjs\": \"Fraction\", \"n\": 3, \"d\": 8}`\n * @return {BigNumber}\n */\n\n\n Fraction.fromJSON = function (json) {\n return new Fraction(json);\n };\n\n return Fraction;\n}, {\n isClass: true\n});","import { factory } from '../../utils/factory';\nvar name = 'Matrix';\nvar dependencies = [];\nexport var createMatrixClass = /* #__PURE__ */factory(name, dependencies, function () {\n /**\n * @constructor Matrix\n *\n * A Matrix is a wrapper around an Array. A matrix can hold a multi dimensional\n * array. A matrix can be constructed as:\n *\n * let matrix = math.matrix(data)\n *\n * Matrix contains the functions to resize, get and set values, get the size,\n * clone the matrix and to convert the matrix to a vector, array, or scalar.\n * Furthermore, one can iterate over the matrix using map and forEach.\n * The internal Array of the Matrix can be accessed using the function valueOf.\n *\n * Example usage:\n *\n * let matrix = math.matrix([[1, 2], [3, 4]])\n * matix.size() // [2, 2]\n * matrix.resize([3, 2], 5)\n * matrix.valueOf() // [[1, 2], [3, 4], [5, 5]]\n * matrix.subset([1,2]) // 3 (indexes are zero-based)\n *\n */\n function Matrix() {\n if (!(this instanceof Matrix)) {\n throw new SyntaxError('Constructor must be called with the new operator');\n }\n }\n /**\n * Attach type information\n */\n\n\n Matrix.prototype.type = 'Matrix';\n Matrix.prototype.isMatrix = true;\n /**\n * Get the storage format used by the matrix.\n *\n * Usage:\n * const format = matrix.storage() // retrieve storage format\n *\n * @return {string} The storage format.\n */\n\n Matrix.prototype.storage = function () {\n // must be implemented by each of the Matrix implementations\n throw new Error('Cannot invoke storage on a Matrix interface');\n };\n /**\n * Get the datatype of the data stored in the matrix.\n *\n * Usage:\n * const format = matrix.datatype() // retrieve matrix datatype\n *\n * @return {string} The datatype.\n */\n\n\n Matrix.prototype.datatype = function () {\n // must be implemented by each of the Matrix implementations\n throw new Error('Cannot invoke datatype on a Matrix interface');\n };\n /**\n * Create a new Matrix With the type of the current matrix instance\n * @param {Array | Object} data\n * @param {string} [datatype]\n */\n\n\n Matrix.prototype.create = function (data, datatype) {\n throw new Error('Cannot invoke create on a Matrix interface');\n };\n /**\n * Get a subset of the matrix, or replace a subset of the matrix.\n *\n * Usage:\n * const subset = matrix.subset(index) // retrieve subset\n * const value = matrix.subset(index, replacement) // replace subset\n *\n * @param {Index} index\n * @param {Array | Matrix | *} [replacement]\n * @param {*} [defaultValue=0] Default value, filled in on new entries when\n * the matrix is resized. If not provided,\n * new matrix elements will be filled with zeros.\n */\n\n\n Matrix.prototype.subset = function (index, replacement, defaultValue) {\n // must be implemented by each of the Matrix implementations\n throw new Error('Cannot invoke subset on a Matrix interface');\n };\n /**\n * Get a single element from the matrix.\n * @param {number[]} index Zero-based index\n * @return {*} value\n */\n\n\n Matrix.prototype.get = function (index) {\n // must be implemented by each of the Matrix implementations\n throw new Error('Cannot invoke get on a Matrix interface');\n };\n /**\n * Replace a single element in the matrix.\n * @param {number[]} index Zero-based index\n * @param {*} value\n * @param {*} [defaultValue] Default value, filled in on new entries when\n * the matrix is resized. If not provided,\n * new matrix elements will be left undefined.\n * @return {Matrix} self\n */\n\n\n Matrix.prototype.set = function (index, value, defaultValue) {\n // must be implemented by each of the Matrix implementations\n throw new Error('Cannot invoke set on a Matrix interface');\n };\n /**\n * Resize the matrix to the given size. Returns a copy of the matrix when\n * `copy=true`, otherwise return the matrix itself (resize in place).\n *\n * @param {number[]} size The new size the matrix should have.\n * @param {*} [defaultValue=0] Default value, filled in on new entries.\n * If not provided, the matrix elements will\n * be filled with zeros.\n * @param {boolean} [copy] Return a resized copy of the matrix\n *\n * @return {Matrix} The resized matrix\n */\n\n\n Matrix.prototype.resize = function (size, defaultValue) {\n // must be implemented by each of the Matrix implementations\n throw new Error('Cannot invoke resize on a Matrix interface');\n };\n /**\n * Reshape the matrix to the given size. Returns a copy of the matrix when\n * `copy=true`, otherwise return the matrix itself (reshape in place).\n *\n * @param {number[]} size The new size the matrix should have.\n * @param {boolean} [copy] Return a reshaped copy of the matrix\n *\n * @return {Matrix} The reshaped matrix\n */\n\n\n Matrix.prototype.reshape = function (size, defaultValue) {\n // must be implemented by each of the Matrix implementations\n throw new Error('Cannot invoke reshape on a Matrix interface');\n };\n /**\n * Create a clone of the matrix\n * @return {Matrix} clone\n */\n\n\n Matrix.prototype.clone = function () {\n // must be implemented by each of the Matrix implementations\n throw new Error('Cannot invoke clone on a Matrix interface');\n };\n /**\n * Retrieve the size of the matrix.\n * @returns {number[]} size\n */\n\n\n Matrix.prototype.size = function () {\n // must be implemented by each of the Matrix implementations\n throw new Error('Cannot invoke size on a Matrix interface');\n };\n /**\n * Create a new matrix with the results of the callback function executed on\n * each entry of the matrix.\n * @param {Function} callback The callback function is invoked with three\n * parameters: the value of the element, the index\n * of the element, and the Matrix being traversed.\n * @param {boolean} [skipZeros] Invoke callback function for non-zero values only.\n *\n * @return {Matrix} matrix\n */\n\n\n Matrix.prototype.map = function (callback, skipZeros) {\n // must be implemented by each of the Matrix implementations\n throw new Error('Cannot invoke map on a Matrix interface');\n };\n /**\n * Execute a callback function on each entry of the matrix.\n * @param {Function} callback The callback function is invoked with three\n * parameters: the value of the element, the index\n * of the element, and the Matrix being traversed.\n */\n\n\n Matrix.prototype.forEach = function (callback) {\n // must be implemented by each of the Matrix implementations\n throw new Error('Cannot invoke forEach on a Matrix interface');\n };\n /**\n * Create an Array with a copy of the data of the Matrix\n * @returns {Array} array\n */\n\n\n Matrix.prototype.toArray = function () {\n // must be implemented by each of the Matrix implementations\n throw new Error('Cannot invoke toArray on a Matrix interface');\n };\n /**\n * Get the primitive value of the Matrix: a multidimensional array\n * @returns {Array} array\n */\n\n\n Matrix.prototype.valueOf = function () {\n // must be implemented by each of the Matrix implementations\n throw new Error('Cannot invoke valueOf on a Matrix interface');\n };\n /**\n * Get a string representation of the matrix, with optional formatting options.\n * @param {Object | number | Function} [options] Formatting options. See\n * lib/utils/number:format for a\n * description of the available\n * options.\n * @returns {string} str\n */\n\n\n Matrix.prototype.format = function (options) {\n // must be implemented by each of the Matrix implementations\n throw new Error('Cannot invoke format on a Matrix interface');\n };\n /**\n * Get a string representation of the matrix\n * @returns {string} str\n */\n\n\n Matrix.prototype.toString = function () {\n // must be implemented by each of the Matrix implementations\n throw new Error('Cannot invoke toString on a Matrix interface');\n };\n\n return Matrix;\n}, {\n isClass: true\n});","import { isArray, isBigNumber, isCollection, isIndex, isMatrix, isNumber, isString, typeOf } from '../../utils/is';\nimport { arraySize, getArrayDataType, reshape, resize, unsqueeze, validate, validateIndex } from '../../utils/array';\nimport { format } from '../../utils/string';\nimport { isInteger } from '../../utils/number';\nimport { clone, deepStrictEqual } from '../../utils/object';\nimport { DimensionError } from '../../error/DimensionError';\nimport { factory } from '../../utils/factory';\nvar name = 'DenseMatrix';\nvar dependencies = ['Matrix'];\nexport var createDenseMatrixClass = /* #__PURE__ */factory(name, dependencies, function (_ref) {\n var Matrix = _ref.Matrix;\n\n /**\n * Dense Matrix implementation. A regular, dense matrix, supporting multi-dimensional matrices. This is the default matrix type.\n * @class DenseMatrix\n */\n function DenseMatrix(data, datatype) {\n if (!(this instanceof DenseMatrix)) {\n throw new SyntaxError('Constructor must be called with the new operator');\n }\n\n if (datatype && !isString(datatype)) {\n throw new Error('Invalid datatype: ' + datatype);\n }\n\n if (isMatrix(data)) {\n // check data is a DenseMatrix\n if (data.type === 'DenseMatrix') {\n // clone data & size\n this._data = clone(data._data);\n this._size = clone(data._size);\n this._datatype = datatype || data._datatype;\n } else {\n // build data from existing matrix\n this._data = data.toArray();\n this._size = data.size();\n this._datatype = datatype || data._datatype;\n }\n } else if (data && isArray(data.data) && isArray(data.size)) {\n // initialize fields from JSON representation\n this._data = data.data;\n this._size = data.size; // verify the dimensions of the array\n\n validate(this._data, this._size);\n this._datatype = datatype || data.datatype;\n } else if (isArray(data)) {\n // replace nested Matrices with Arrays\n this._data = preprocess(data); // get the dimensions of the array\n\n this._size = arraySize(this._data); // verify the dimensions of the array, TODO: compute size while processing array\n\n validate(this._data, this._size); // data type unknown\n\n this._datatype = datatype;\n } else if (data) {\n // unsupported type\n throw new TypeError('Unsupported type of data (' + typeOf(data) + ')');\n } else {\n // nothing provided\n this._data = [];\n this._size = [0];\n this._datatype = datatype;\n }\n }\n\n DenseMatrix.prototype = new Matrix();\n /**\n * Create a new DenseMatrix\n */\n\n DenseMatrix.prototype.createDenseMatrix = function (data, datatype) {\n return new DenseMatrix(data, datatype);\n };\n /**\n * Attach type information\n */\n\n\n DenseMatrix.prototype.type = 'DenseMatrix';\n DenseMatrix.prototype.isDenseMatrix = true;\n /**\n * Get the matrix type\n *\n * Usage:\n * const matrixType = matrix.getDataType() // retrieves the matrix type\n *\n * @memberOf DenseMatrix\n * @return {string} type information; if multiple types are found from the Matrix, it will return \"mixed\"\n */\n\n DenseMatrix.prototype.getDataType = function () {\n return getArrayDataType(this._data, typeOf);\n };\n /**\n * Get the storage format used by the matrix.\n *\n * Usage:\n * const format = matrix.storage() // retrieve storage format\n *\n * @memberof DenseMatrix\n * @return {string} The storage format.\n */\n\n\n DenseMatrix.prototype.storage = function () {\n return 'dense';\n };\n /**\n * Get the datatype of the data stored in the matrix.\n *\n * Usage:\n * const format = matrix.datatype() // retrieve matrix datatype\n *\n * @memberof DenseMatrix\n * @return {string} The datatype.\n */\n\n\n DenseMatrix.prototype.datatype = function () {\n return this._datatype;\n };\n /**\n * Create a new DenseMatrix\n * @memberof DenseMatrix\n * @param {Array} data\n * @param {string} [datatype]\n */\n\n\n DenseMatrix.prototype.create = function (data, datatype) {\n return new DenseMatrix(data, datatype);\n };\n /**\n * Get a subset of the matrix, or replace a subset of the matrix.\n *\n * Usage:\n * const subset = matrix.subset(index) // retrieve subset\n * const value = matrix.subset(index, replacement) // replace subset\n *\n * @memberof DenseMatrix\n * @param {Index} index\n * @param {Array | Matrix | *} [replacement]\n * @param {*} [defaultValue=0] Default value, filled in on new entries when\n * the matrix is resized. If not provided,\n * new matrix elements will be filled with zeros.\n */\n\n\n DenseMatrix.prototype.subset = function (index, replacement, defaultValue) {\n switch (arguments.length) {\n case 1:\n return _get(this, index);\n // intentional fall through\n\n case 2:\n case 3:\n return _set(this, index, replacement, defaultValue);\n\n default:\n throw new SyntaxError('Wrong number of arguments');\n }\n };\n /**\n * Get a single element from the matrix.\n * @memberof DenseMatrix\n * @param {number[]} index Zero-based index\n * @return {*} value\n */\n\n\n DenseMatrix.prototype.get = function (index) {\n if (!isArray(index)) {\n throw new TypeError('Array expected');\n }\n\n if (index.length !== this._size.length) {\n throw new DimensionError(index.length, this._size.length);\n } // check index\n\n\n for (var x = 0; x < index.length; x++) {\n validateIndex(index[x], this._size[x]);\n }\n\n var data = this._data;\n\n for (var i = 0, ii = index.length; i < ii; i++) {\n var indexI = index[i];\n validateIndex(indexI, data.length);\n data = data[indexI];\n }\n\n return data;\n };\n /**\n * Replace a single element in the matrix.\n * @memberof DenseMatrix\n * @param {number[]} index Zero-based index\n * @param {*} value\n * @param {*} [defaultValue] Default value, filled in on new entries when\n * the matrix is resized. If not provided,\n * new matrix elements will be left undefined.\n * @return {DenseMatrix} self\n */\n\n\n DenseMatrix.prototype.set = function (index, value, defaultValue) {\n if (!isArray(index)) {\n throw new TypeError('Array expected');\n }\n\n if (index.length < this._size.length) {\n throw new DimensionError(index.length, this._size.length, '<');\n }\n\n var i, ii, indexI; // enlarge matrix when needed\n\n var size = index.map(function (i) {\n return i + 1;\n });\n\n _fit(this, size, defaultValue); // traverse over the dimensions\n\n\n var data = this._data;\n\n for (i = 0, ii = index.length - 1; i < ii; i++) {\n indexI = index[i];\n validateIndex(indexI, data.length);\n data = data[indexI];\n } // set new value\n\n\n indexI = index[index.length - 1];\n validateIndex(indexI, data.length);\n data[indexI] = value;\n return this;\n };\n /**\n * Get a submatrix of this matrix\n * @memberof DenseMatrix\n * @param {DenseMatrix} matrix\n * @param {Index} index Zero-based index\n * @private\n */\n\n\n function _get(matrix, index) {\n if (!isIndex(index)) {\n throw new TypeError('Invalid index');\n }\n\n var isScalar = index.isScalar();\n\n if (isScalar) {\n // return a scalar\n return matrix.get(index.min());\n } else {\n // validate dimensions\n var size = index.size();\n\n if (size.length !== matrix._size.length) {\n throw new DimensionError(size.length, matrix._size.length);\n } // validate if any of the ranges in the index is out of range\n\n\n var min = index.min();\n var max = index.max();\n\n for (var i = 0, ii = matrix._size.length; i < ii; i++) {\n validateIndex(min[i], matrix._size[i]);\n validateIndex(max[i], matrix._size[i]);\n } // retrieve submatrix\n // TODO: more efficient when creating an empty matrix and setting _data and _size manually\n\n\n return new DenseMatrix(_getSubmatrix(matrix._data, index, size.length, 0), matrix._datatype);\n }\n }\n /**\n * Recursively get a submatrix of a multi dimensional matrix.\n * Index is not checked for correct number or length of dimensions.\n * @memberof DenseMatrix\n * @param {Array} data\n * @param {Index} index\n * @param {number} dims Total number of dimensions\n * @param {number} dim Current dimension\n * @return {Array} submatrix\n * @private\n */\n\n\n function _getSubmatrix(data, index, dims, dim) {\n var last = dim === dims - 1;\n var range = index.dimension(dim);\n\n if (last) {\n return range.map(function (i) {\n validateIndex(i, data.length);\n return data[i];\n }).valueOf();\n } else {\n return range.map(function (i) {\n validateIndex(i, data.length);\n var child = data[i];\n return _getSubmatrix(child, index, dims, dim + 1);\n }).valueOf();\n }\n }\n /**\n * Replace a submatrix in this matrix\n * Indexes are zero-based.\n * @memberof DenseMatrix\n * @param {DenseMatrix} matrix\n * @param {Index} index\n * @param {DenseMatrix | Array | *} submatrix\n * @param {*} defaultValue Default value, filled in on new entries when\n * the matrix is resized.\n * @return {DenseMatrix} matrix\n * @private\n */\n\n\n function _set(matrix, index, submatrix, defaultValue) {\n if (!index || index.isIndex !== true) {\n throw new TypeError('Invalid index');\n } // get index size and check whether the index contains a single value\n\n\n var iSize = index.size();\n var isScalar = index.isScalar(); // calculate the size of the submatrix, and convert it into an Array if needed\n\n var sSize;\n\n if (isMatrix(submatrix)) {\n sSize = submatrix.size();\n submatrix = submatrix.valueOf();\n } else {\n sSize = arraySize(submatrix);\n }\n\n if (isScalar) {\n // set a scalar\n // check whether submatrix is a scalar\n if (sSize.length !== 0) {\n throw new TypeError('Scalar expected');\n }\n\n matrix.set(index.min(), submatrix, defaultValue);\n } else {\n // set a submatrix\n // validate dimensions\n if (iSize.length < matrix._size.length) {\n throw new DimensionError(iSize.length, matrix._size.length, '<');\n }\n\n if (sSize.length < iSize.length) {\n // calculate number of missing outer dimensions\n var i = 0;\n var outer = 0;\n\n while (iSize[i] === 1 && sSize[i] === 1) {\n i++;\n }\n\n while (iSize[i] === 1) {\n outer++;\n i++;\n } // unsqueeze both outer and inner dimensions\n\n\n submatrix = unsqueeze(submatrix, iSize.length, outer, sSize);\n } // check whether the size of the submatrix matches the index size\n\n\n if (!deepStrictEqual(iSize, sSize)) {\n throw new DimensionError(iSize, sSize, '>');\n } // enlarge matrix when needed\n\n\n var size = index.max().map(function (i) {\n return i + 1;\n });\n\n _fit(matrix, size, defaultValue); // insert the sub matrix\n\n\n var dims = iSize.length;\n var dim = 0;\n\n _setSubmatrix(matrix._data, index, submatrix, dims, dim);\n }\n\n return matrix;\n }\n /**\n * Replace a submatrix of a multi dimensional matrix.\n * @memberof DenseMatrix\n * @param {Array} data\n * @param {Index} index\n * @param {Array} submatrix\n * @param {number} dims Total number of dimensions\n * @param {number} dim\n * @private\n */\n\n\n function _setSubmatrix(data, index, submatrix, dims, dim) {\n var last = dim === dims - 1;\n var range = index.dimension(dim);\n\n if (last) {\n range.forEach(function (dataIndex, subIndex) {\n validateIndex(dataIndex);\n data[dataIndex] = submatrix[subIndex[0]];\n });\n } else {\n range.forEach(function (dataIndex, subIndex) {\n validateIndex(dataIndex);\n\n _setSubmatrix(data[dataIndex], index, submatrix[subIndex[0]], dims, dim + 1);\n });\n }\n }\n /**\n * Resize the matrix to the given size. Returns a copy of the matrix when\n * `copy=true`, otherwise return the matrix itself (resize in place).\n *\n * @memberof DenseMatrix\n * @param {number[] || Matrix} size The new size the matrix should have.\n * @param {*} [defaultValue=0] Default value, filled in on new entries.\n * If not provided, the matrix elements will\n * be filled with zeros.\n * @param {boolean} [copy] Return a resized copy of the matrix\n *\n * @return {Matrix} The resized matrix\n */\n\n\n DenseMatrix.prototype.resize = function (size, defaultValue, copy) {\n // validate arguments\n if (!isCollection(size)) {\n throw new TypeError('Array or Matrix expected');\n } // SparseMatrix input is always 2d, flatten this into 1d if it's indeed a vector\n\n\n var sizeArray = size.valueOf().map(function (value) {\n return Array.isArray(value) && value.length === 1 ? value[0] : value;\n }); // matrix to resize\n\n var m = copy ? this.clone() : this; // resize matrix\n\n return _resize(m, sizeArray, defaultValue);\n };\n\n function _resize(matrix, size, defaultValue) {\n // check size\n if (size.length === 0) {\n // first value in matrix\n var v = matrix._data; // go deep\n\n while (isArray(v)) {\n v = v[0];\n }\n\n return v;\n } // resize matrix\n\n\n matrix._size = size.slice(0); // copy the array\n\n matrix._data = resize(matrix._data, matrix._size, defaultValue); // return matrix\n\n return matrix;\n }\n /**\n * Reshape the matrix to the given size. Returns a copy of the matrix when\n * `copy=true`, otherwise return the matrix itself (reshape in place).\n *\n * NOTE: This might be better suited to copy by default, instead of modifying\n * in place. For now, it operates in place to remain consistent with\n * resize().\n *\n * @memberof DenseMatrix\n * @param {number[]} size The new size the matrix should have.\n * @param {boolean} [copy] Return a reshaped copy of the matrix\n *\n * @return {Matrix} The reshaped matrix\n */\n\n\n DenseMatrix.prototype.reshape = function (size, copy) {\n var m = copy ? this.clone() : this;\n m._data = reshape(m._data, size);\n m._size = size.slice(0);\n return m;\n };\n /**\n * Enlarge the matrix when it is smaller than given size.\n * If the matrix is larger or equal sized, nothing is done.\n * @memberof DenseMatrix\n * @param {DenseMatrix} matrix The matrix to be resized\n * @param {number[]} size\n * @param {*} defaultValue Default value, filled in on new entries.\n * @private\n */\n\n\n function _fit(matrix, size, defaultValue) {\n var // copy the array\n newSize = matrix._size.slice(0);\n\n var changed = false; // add dimensions when needed\n\n while (newSize.length < size.length) {\n newSize.push(0);\n changed = true;\n } // enlarge size when needed\n\n\n for (var i = 0, ii = size.length; i < ii; i++) {\n if (size[i] > newSize[i]) {\n newSize[i] = size[i];\n changed = true;\n }\n }\n\n if (changed) {\n // resize only when size is changed\n _resize(matrix, newSize, defaultValue);\n }\n }\n /**\n * Create a clone of the matrix\n * @memberof DenseMatrix\n * @return {DenseMatrix} clone\n */\n\n\n DenseMatrix.prototype.clone = function () {\n var m = new DenseMatrix({\n data: clone(this._data),\n size: clone(this._size),\n datatype: this._datatype\n });\n return m;\n };\n /**\n * Retrieve the size of the matrix.\n * @memberof DenseMatrix\n * @returns {number[]} size\n */\n\n\n DenseMatrix.prototype.size = function () {\n return this._size.slice(0); // return a clone of _size\n };\n /**\n * Create a new matrix with the results of the callback function executed on\n * each entry of the matrix.\n * @memberof DenseMatrix\n * @param {Function} callback The callback function is invoked with three\n * parameters: the value of the element, the index\n * of the element, and the Matrix being traversed.\n *\n * @return {DenseMatrix} matrix\n */\n\n\n DenseMatrix.prototype.map = function (callback) {\n // matrix instance\n var me = this;\n\n var recurse = function recurse(value, index) {\n if (isArray(value)) {\n return value.map(function (child, i) {\n return recurse(child, index.concat(i));\n });\n } else {\n return callback(value, index, me);\n }\n }; // determine the new datatype when the original matrix has datatype defined\n // TODO: should be done in matrix constructor instead\n\n\n var data = recurse(this._data, []);\n var datatype = this._datatype !== undefined ? getArrayDataType(data, typeOf) : undefined;\n return new DenseMatrix(data, datatype);\n };\n /**\n * Execute a callback function on each entry of the matrix.\n * @memberof DenseMatrix\n * @param {Function} callback The callback function is invoked with three\n * parameters: the value of the element, the index\n * of the element, and the Matrix being traversed.\n */\n\n\n DenseMatrix.prototype.forEach = function (callback) {\n // matrix instance\n var me = this;\n\n var recurse = function recurse(value, index) {\n if (isArray(value)) {\n value.forEach(function (child, i) {\n recurse(child, index.concat(i));\n });\n } else {\n callback(value, index, me);\n }\n };\n\n recurse(this._data, []);\n };\n /**\n * Create an Array with a copy of the data of the DenseMatrix\n * @memberof DenseMatrix\n * @returns {Array} array\n */\n\n\n DenseMatrix.prototype.toArray = function () {\n return clone(this._data);\n };\n /**\n * Get the primitive value of the DenseMatrix: a multidimensional array\n * @memberof DenseMatrix\n * @returns {Array} array\n */\n\n\n DenseMatrix.prototype.valueOf = function () {\n return this._data;\n };\n /**\n * Get a string representation of the matrix, with optional formatting options.\n * @memberof DenseMatrix\n * @param {Object | number | Function} [options] Formatting options. See\n * lib/utils/number:format for a\n * description of the available\n * options.\n * @returns {string} str\n */\n\n\n DenseMatrix.prototype.format = function (options) {\n return format(this._data, options);\n };\n /**\n * Get a string representation of the matrix\n * @memberof DenseMatrix\n * @returns {string} str\n */\n\n\n DenseMatrix.prototype.toString = function () {\n return format(this._data);\n };\n /**\n * Get a JSON representation of the matrix\n * @memberof DenseMatrix\n * @returns {Object}\n */\n\n\n DenseMatrix.prototype.toJSON = function () {\n return {\n mathjs: 'DenseMatrix',\n data: this._data,\n size: this._size,\n datatype: this._datatype\n };\n };\n /**\n * Get the kth Matrix diagonal.\n *\n * @memberof DenseMatrix\n * @param {number | BigNumber} [k=0] The kth diagonal where the vector will retrieved.\n *\n * @returns {Matrix} The matrix with the diagonal values.\n */\n\n\n DenseMatrix.prototype.diagonal = function (k) {\n // validate k if any\n if (k) {\n // convert BigNumber to a number\n if (isBigNumber(k)) {\n k = k.toNumber();\n } // is must be an integer\n\n\n if (!isNumber(k) || !isInteger(k)) {\n throw new TypeError('The parameter k must be an integer number');\n }\n } else {\n // default value\n k = 0;\n }\n\n var kSuper = k > 0 ? k : 0;\n var kSub = k < 0 ? -k : 0; // rows & columns\n\n var rows = this._size[0];\n var columns = this._size[1]; // number diagonal values\n\n var n = Math.min(rows - kSub, columns - kSuper); // x is a matrix get diagonal from matrix\n\n var data = []; // loop rows\n\n for (var i = 0; i < n; i++) {\n data[i] = this._data[i + kSub][i + kSuper];\n } // create DenseMatrix\n\n\n return new DenseMatrix({\n data: data,\n size: [n],\n datatype: this._datatype\n });\n };\n /**\n * Create a diagonal matrix.\n *\n * @memberof DenseMatrix\n * @param {Array} size The matrix size.\n * @param {number | Matrix | Array } value The values for the diagonal.\n * @param {number | BigNumber} [k=0] The kth diagonal where the vector will be filled in.\n * @param {number} [defaultValue] The default value for non-diagonal\n * @param {string} [datatype] The datatype for the diagonal\n *\n * @returns {DenseMatrix}\n */\n\n\n DenseMatrix.diagonal = function (size, value, k, defaultValue) {\n if (!isArray(size)) {\n throw new TypeError('Array expected, size parameter');\n }\n\n if (size.length !== 2) {\n throw new Error('Only two dimensions matrix are supported');\n } // map size & validate\n\n\n size = size.map(function (s) {\n // check it is a big number\n if (isBigNumber(s)) {\n // convert it\n s = s.toNumber();\n } // validate arguments\n\n\n if (!isNumber(s) || !isInteger(s) || s < 1) {\n throw new Error('Size values must be positive integers');\n }\n\n return s;\n }); // validate k if any\n\n if (k) {\n // convert BigNumber to a number\n if (isBigNumber(k)) {\n k = k.toNumber();\n } // is must be an integer\n\n\n if (!isNumber(k) || !isInteger(k)) {\n throw new TypeError('The parameter k must be an integer number');\n }\n } else {\n // default value\n k = 0;\n }\n\n var kSuper = k > 0 ? k : 0;\n var kSub = k < 0 ? -k : 0; // rows and columns\n\n var rows = size[0];\n var columns = size[1]; // number of non-zero items\n\n var n = Math.min(rows - kSub, columns - kSuper); // value extraction function\n\n var _value; // check value\n\n\n if (isArray(value)) {\n // validate array\n if (value.length !== n) {\n // number of values in array must be n\n throw new Error('Invalid value array length');\n } // define function\n\n\n _value = function _value(i) {\n // return value @ i\n return value[i];\n };\n } else if (isMatrix(value)) {\n // matrix size\n var ms = value.size(); // validate matrix\n\n if (ms.length !== 1 || ms[0] !== n) {\n // number of values in array must be n\n throw new Error('Invalid matrix length');\n } // define function\n\n\n _value = function _value(i) {\n // return value @ i\n return value.get([i]);\n };\n } else {\n // define function\n _value = function _value() {\n // return value\n return value;\n };\n } // discover default value if needed\n\n\n if (!defaultValue) {\n // check first value in array\n defaultValue = isBigNumber(_value(0)) ? _value(0).mul(0) // trick to create a BigNumber with value zero\n : 0;\n } // empty array\n\n\n var data = []; // check we need to resize array\n\n if (size.length > 0) {\n // resize array\n data = resize(data, size, defaultValue); // fill diagonal\n\n for (var d = 0; d < n; d++) {\n data[d + kSub][d + kSuper] = _value(d);\n }\n } // create DenseMatrix\n\n\n return new DenseMatrix({\n data: data,\n size: [rows, columns]\n });\n };\n /**\n * Generate a matrix from a JSON object\n * @memberof DenseMatrix\n * @param {Object} json An object structured like\n * `{\"mathjs\": \"DenseMatrix\", data: [], size: []}`,\n * where mathjs is optional\n * @returns {DenseMatrix}\n */\n\n\n DenseMatrix.fromJSON = function (json) {\n return new DenseMatrix(json);\n };\n /**\n * Swap rows i and j in Matrix.\n *\n * @memberof DenseMatrix\n * @param {number} i Matrix row index 1\n * @param {number} j Matrix row index 2\n *\n * @return {Matrix} The matrix reference\n */\n\n\n DenseMatrix.prototype.swapRows = function (i, j) {\n // check index\n if (!isNumber(i) || !isInteger(i) || !isNumber(j) || !isInteger(j)) {\n throw new Error('Row index must be positive integers');\n } // check dimensions\n\n\n if (this._size.length !== 2) {\n throw new Error('Only two dimensional matrix is supported');\n } // validate index\n\n\n validateIndex(i, this._size[0]);\n validateIndex(j, this._size[0]); // swap rows\n\n DenseMatrix._swapRows(i, j, this._data); // return current instance\n\n\n return this;\n };\n /**\n * Swap rows i and j in Dense Matrix data structure.\n *\n * @param {number} i Matrix row index 1\n * @param {number} j Matrix row index 2\n * @param {Array} data Matrix data\n */\n\n\n DenseMatrix._swapRows = function (i, j, data) {\n // swap values i <-> j\n var vi = data[i];\n data[i] = data[j];\n data[j] = vi;\n };\n /**\n * Preprocess data, which can be an Array or DenseMatrix with nested Arrays and\n * Matrices. Replaces all nested Matrices with Arrays\n * @memberof DenseMatrix\n * @param {Array} data\n * @return {Array} data\n */\n\n\n function preprocess(data) {\n for (var i = 0, ii = data.length; i < ii; i++) {\n var elem = data[i];\n\n if (isArray(elem)) {\n data[i] = preprocess(elem);\n } else if (elem && elem.isMatrix === true) {\n data[i] = preprocess(elem.valueOf());\n }\n }\n\n return data;\n }\n\n return DenseMatrix;\n}, {\n isClass: true\n});","import { isCollection, isMatrix } from './is';\nimport { IndexError } from '../error/IndexError';\nimport { arraySize } from './array';\n/**\n * Test whether an array contains collections\n * @param {Array} array\n * @returns {boolean} Returns true when the array contains one or multiple\n * collections (Arrays or Matrices). Returns false otherwise.\n */\n\nexport function containsCollections(array) {\n for (var i = 0; i < array.length; i++) {\n if (isCollection(array[i])) {\n return true;\n }\n }\n\n return false;\n}\n/**\n * Recursively loop over all elements in a given multi dimensional array\n * and invoke the callback on each of the elements.\n * @param {Array | Matrix} array\n * @param {Function} callback The callback method is invoked with one\n * parameter: the current element in the array\n */\n\nexport function deepForEach(array, callback) {\n if (isMatrix(array)) {\n array = array.valueOf();\n }\n\n for (var i = 0, ii = array.length; i < ii; i++) {\n var value = array[i];\n\n if (Array.isArray(value)) {\n deepForEach(value, callback);\n } else {\n callback(value);\n }\n }\n}\n/**\n * Execute the callback function element wise for each element in array and any\n * nested array\n * Returns an array with the results\n * @param {Array | Matrix} array\n * @param {Function} callback The callback is called with two parameters:\n * value1 and value2, which contain the current\n * element of both arrays.\n * @param {boolean} [skipZeros] Invoke callback function for non-zero values only.\n *\n * @return {Array | Matrix} res\n */\n\nexport function deepMap(array, callback, skipZeros) {\n if (array && typeof array.map === 'function') {\n // TODO: replace array.map with a for loop to improve performance\n return array.map(function (x) {\n return deepMap(x, callback, skipZeros);\n });\n } else {\n return callback(array);\n }\n}\n/**\n * Reduce a given matrix or array to a new matrix or\n * array with one less dimension, applying the given\n * callback in the selected dimension.\n * @param {Array | Matrix} mat\n * @param {number} dim\n * @param {Function} callback\n * @return {Array | Matrix} res\n */\n\nexport function reduce(mat, dim, callback) {\n var size = Array.isArray(mat) ? arraySize(mat) : mat.size();\n\n if (dim < 0 || dim >= size.length) {\n // TODO: would be more clear when throwing a DimensionError here\n throw new IndexError(dim, size.length);\n }\n\n if (isMatrix(mat)) {\n return mat.create(_reduce(mat.valueOf(), dim, callback));\n } else {\n return _reduce(mat, dim, callback);\n }\n}\n/**\n * Recursively reduce a matrix\n * @param {Array} mat\n * @param {number} dim\n * @param {Function} callback\n * @returns {Array} ret\n * @private\n */\n\nfunction _reduce(mat, dim, callback) {\n var i, ret, val, tran;\n\n if (dim <= 0) {\n if (!Array.isArray(mat[0])) {\n val = mat[0];\n\n for (i = 1; i < mat.length; i++) {\n val = callback(val, mat[i]);\n }\n\n return val;\n } else {\n tran = _switch(mat);\n ret = [];\n\n for (i = 0; i < tran.length; i++) {\n ret[i] = _reduce(tran[i], dim - 1, callback);\n }\n\n return ret;\n }\n } else {\n ret = [];\n\n for (i = 0; i < mat.length; i++) {\n ret[i] = _reduce(mat[i], dim - 1, callback);\n }\n\n return ret;\n }\n}\n/**\n * Transpose a matrix\n * @param {Array} mat\n * @returns {Array} ret\n * @private\n */\n\n\nfunction _switch(mat) {\n var I = mat.length;\n var J = mat[0].length;\n var i, j;\n var ret = [];\n\n for (j = 0; j < J; j++) {\n var tmp = [];\n\n for (i = 0; i < I; i++) {\n tmp.push(mat[i][j]);\n }\n\n ret.push(tmp);\n }\n\n return ret;\n} // TODO: document function scatter\n\n\nexport function scatter(a, j, w, x, u, mark, cindex, f, inverse, update, value) {\n // a arrays\n var avalues = a._values;\n var aindex = a._index;\n var aptr = a._ptr; // vars\n\n var k, k0, k1, i; // check we need to process values (pattern matrix)\n\n if (x) {\n // values in j\n for (k0 = aptr[j], k1 = aptr[j + 1], k = k0; k < k1; k++) {\n // row\n i = aindex[k]; // check value exists in current j\n\n if (w[i] !== mark) {\n // i is new entry in j\n w[i] = mark; // add i to pattern of C\n\n cindex.push(i); // x(i) = A, check we need to call function this time\n\n if (update) {\n // copy value to workspace calling callback function\n x[i] = inverse ? f(avalues[k], value) : f(value, avalues[k]); // function was called on current row\n\n u[i] = mark;\n } else {\n // copy value to workspace\n x[i] = avalues[k];\n }\n } else {\n // i exists in C already\n x[i] = inverse ? f(avalues[k], x[i]) : f(x[i], avalues[k]); // function was called on current row\n\n u[i] = mark;\n }\n }\n } else {\n // values in j\n for (k0 = aptr[j], k1 = aptr[j + 1], k = k0; k < k1; k++) {\n // row\n i = aindex[k]; // check value exists in current j\n\n if (w[i] !== mark) {\n // i is new entry in j\n w[i] = mark; // add i to pattern of C\n\n cindex.push(i);\n } else {\n // indicate function was called on current row\n u[i] = mark;\n }\n }\n }\n}","import { factory } from '../utils/factory';\nimport { deepMap } from '../utils/collection';\nvar name = 'number';\nvar dependencies = ['typed'];\nexport var createNumber = /* #__PURE__ */factory(name, dependencies, function (_ref) {\n var typed = _ref.typed;\n\n /**\n * Create a number or convert a string, boolean, or unit to a number.\n * When value is a matrix, all elements will be converted to number.\n *\n * Syntax:\n *\n * math.number(value)\n * math.number(unit, valuelessUnit)\n *\n * Examples:\n *\n * math.number(2) // returns number 2\n * math.number('7.2') // returns number 7.2\n * math.number(true) // returns number 1\n * math.number([true, false, true, true]) // returns [1, 0, 1, 1]\n * math.number(math.unit('52cm'), 'm') // returns 0.52\n *\n * See also:\n *\n * bignumber, boolean, complex, index, matrix, string, unit\n *\n * @param {string | number | BigNumber | Fraction | boolean | Array | Matrix | Unit | null} [value] Value to be converted\n * @param {Unit | string} [valuelessUnit] A valueless unit, used to convert a unit to a number\n * @return {number | Array | Matrix} The created number\n */\n var number = typed('number', {\n '': function _() {\n return 0;\n },\n number: function number(x) {\n return x;\n },\n string: function string(x) {\n if (x === 'NaN') return NaN;\n var num = Number(x);\n\n if (isNaN(num)) {\n throw new SyntaxError('String \"' + x + '\" is no valid number');\n }\n\n if (['0b', '0o', '0x'].includes(x.substring(0, 2))) {\n if (num > Math.pow(2, 32) - 1) {\n throw new SyntaxError(\"String \\\"\".concat(x, \"\\\" is out of range\"));\n }\n\n if (num & 0x80000000) {\n num = -1 * ~(num - 1);\n }\n }\n\n return num;\n },\n BigNumber: function BigNumber(x) {\n return x.toNumber();\n },\n Fraction: function Fraction(x) {\n return x.valueOf();\n },\n Unit: function Unit(x) {\n throw new Error('Second argument with valueless unit expected');\n },\n \"null\": function _null(x) {\n return 0;\n },\n 'Unit, string | Unit': function UnitStringUnit(unit, valuelessUnit) {\n return unit.toNumber(valuelessUnit);\n },\n 'Array | Matrix': function ArrayMatrix(x) {\n return deepMap(x, this);\n }\n }); // reviver function to parse a JSON object like:\n //\n // {\"mathjs\":\"number\",\"value\":\"2.3\"}\n //\n // into a number 2.3\n\n number.fromJSON = function (json) {\n return parseFloat(json.value);\n };\n\n return number;\n});","import { factory } from '../../../utils/factory';\nimport { deepMap } from '../../../utils/collection';\nvar name = 'fraction';\nvar dependencies = ['typed', 'Fraction'];\nexport var createFraction = /* #__PURE__ */factory(name, dependencies, function (_ref) {\n var typed = _ref.typed,\n Fraction = _ref.Fraction;\n\n /**\n * Create a fraction convert a value to a fraction.\n *\n * Syntax:\n * math.fraction(numerator, denominator)\n * math.fraction({n: numerator, d: denominator})\n * math.fraction(matrix: Array | Matrix) Turn all matrix entries\n * into fractions\n *\n * Examples:\n *\n * math.fraction(1, 3)\n * math.fraction('2/3')\n * math.fraction({n: 2, d: 3})\n * math.fraction([0.2, 0.25, 1.25])\n *\n * See also:\n *\n * bignumber, number, string, unit\n *\n * @param {number | string | Fraction | BigNumber | Array | Matrix} [args]\n * Arguments specifying the numerator and denominator of\n * the fraction\n * @return {Fraction | Array | Matrix} Returns a fraction\n */\n return typed('fraction', {\n number: function number(x) {\n if (!isFinite(x) || isNaN(x)) {\n throw new Error(x + ' cannot be represented as a fraction');\n }\n\n return new Fraction(x);\n },\n string: function string(x) {\n return new Fraction(x);\n },\n 'number, number': function numberNumber(numerator, denominator) {\n return new Fraction(numerator, denominator);\n },\n \"null\": function _null(x) {\n return new Fraction(0);\n },\n BigNumber: function BigNumber(x) {\n return new Fraction(x.toString());\n },\n Fraction: function Fraction(x) {\n return x; // fractions are immutable\n },\n Object: function Object(x) {\n return new Fraction(x);\n },\n 'Array | Matrix': function ArrayMatrix(x) {\n return deepMap(x, this);\n }\n });\n});","/**\n * THIS FILE IS AUTO-GENERATED\n * DON'T MAKE CHANGES HERE\n */\nimport { config } from './configReadonly';\nimport { createResultSet, createComplexClass, createRangeClass, createFalse, createNull, createTrue, createBigNumberClass, createMatrixClass, createReplacer, createI, createLN10, createLOG10E, createNaN, createPi, createSQRT1_2 // eslint-disable-line camelcase\n, createTau, createEfimovFactor, createFineStructure, createSackurTetrode, createWeakMixingAngle, createFractionClass, createE, createInfinity, createLOG2E, createVersion, createDenseMatrixClass, createPhi, createTyped, createIsInteger, createIsNumeric, createIsPositive, createIsNaN, createEqualScalar, createNumber, createBoolean, createComplex, createSplitUnit, createUnaryPlus, createApply, createCube, createExpm1, createLog10, createMultiplyScalar, createSign, createSquare, createBitNot, createArg, createIm, createNot, createFilter, createForEach, createMap, createErf, createFormat, createOct, createPrint, createIsPrime, createAcos, createAcot, createAcsc, createAsec, createAsin, createAtan, createAtanh, createCosh, createCoth, createCsch, createSech, createSinh, createTanh, createCombinations, createPickRandom, createRandomInt, createLN2, createClone, createHasNumericValue, createTypeOf, createString, createFraction, createUnaryMinus, createAddScalar, createExp, createLog2, createSqrt, createConj, createGetMatrixDataType, createMode, createBin, createAcosh, createAcsch, createAsinh, createCos, createCsc, createSin, createCombinationsWithRep, createRandom, createSQRT2, createIsNegative, createSparseMatrixClass, createMatrix, createCbrt, createGcd, createMod, createNthRoot, createXgcd, createBitAnd, createBitXor, createOr, createConcat, createDiag, createIdentity, createOnes, createReshape, createSize, createSubset, createZeros, createHex, createRound, createLeftShift, createRightLogShift, createCompare, createCompareText, createSmaller, createLarger, createUnequal, createImmutableDenseMatrixClass, createFibonacciHeapClass, createSparse, createAcoth, createAtan2, createSec, createAdd, createDot, createComposition, createIsZero, createAbs, createFloor, createMultiply, createDotMultiply, createRe, createFlatten, createResize, createSqueeze, createTo, createPow, createDotPow, createRightArithShift, createCompareNatural, createEqualText, createLargerEq, createPartitionSelect, createIndexClass, createAsech, createTan, createSetDifference, createSetIntersect, createSetMultiplicity, createSetSize, createTrace, createQuantileSeq, createGamma, createBignumber, createLcm, createBitOr, createKron, createTranspose, createNumeric, createAnd, createSmallerEq, createSort, createMin, createCot, createSetDistinct, createSetPowerset, createIndex, createSum, createFactorial, createPermutations, createCeil, createSubtract, createCross, createRange, createRow, createProd, createEqual, createMax, createSetCartesian, createSetSymDifference, createFix, createColumn, createCtranspose, createDeepEqual, createSetIsSubset, createXor, createDivideScalar, createNthRoots, createLsolve, createLsolveAll, createSpaClass, createSetUnion, createLup, createSlu, createDet, createDistance, createStirlingS2, createCatalan, createDiff, createLog, createDotDivide, createUsolveAll, createHypot, createQr, createInv, createExpm, createDivide, createMean, createVariance, createKldivergence, createBellNumbers, createLog1p, createUnitClass, createCreateUnit, createEigs, createIntersect, createStd, createAtomicMass, createBohrMagneton, createBoltzmann, createConductanceQuantum, createDeuteronMass, createElectronMass, createFaraday, createFirstRadiation, createGravitationConstant, createHartreeEnergy, createKlitzing, createMagneticConstant, createMolarMass, createMolarPlanckConstant, createNeutronMass, createPlanckCharge, createPlanckLength, createPlanckTemperature, createProtonMass, createReducedPlanckConstant, createSecondRadiation, createStefanBoltzmann, createVacuumImpedance, createUsolve, createNorm, createLusolve, createSqrtm, createMultinomial, createAvogadro, createClassicalElectronRadius, createElectricConstant, createFermiCoupling, createGravity, createLoschmidt, createMolarMassC12, createNuclearMagneton, createPlanckMass, createQuantumOfCirculation, createSpeedOfLight, createWienDisplacement, createRotationMatrix, createMedian, createBohrRadius, createElementaryCharge, createInverseConductanceQuantum, createMolarVolume, createPlanckTime, createThomsonCrossSection, createRotate, createMad, createCoulomb, createMagneticFluxQuantum, createRydberg, createUnitFunction, createGasConstant, createPlanckConstant } from '../factoriesAny';\nexport var ResultSet = /* #__PURE__ */createResultSet({});\nexport var Complex = /* #__PURE__ */createComplexClass({});\nexport var Range = /* #__PURE__ */createRangeClass({});\nexport var _false = /* #__PURE__ */createFalse({});\nexport var _null = /* #__PURE__ */createNull({});\nexport var _true = /* #__PURE__ */createTrue({});\nexport var BigNumber = /* #__PURE__ */createBigNumberClass({\n config: config\n});\nexport var Matrix = /* #__PURE__ */createMatrixClass({});\nexport var replacer = /* #__PURE__ */createReplacer({});\nexport var i = /* #__PURE__ */createI({\n Complex: Complex\n});\nexport var LN10 = /* #__PURE__ */createLN10({\n BigNumber: BigNumber,\n config: config\n});\nexport var LOG10E = /* #__PURE__ */createLOG10E({\n BigNumber: BigNumber,\n config: config\n});\nexport var _NaN = /* #__PURE__ */createNaN({\n BigNumber: BigNumber,\n config: config\n});\nexport var pi = /* #__PURE__ */createPi({\n BigNumber: BigNumber,\n config: config\n});\nexport var SQRT1_2 = /* #__PURE__ */createSQRT1_2({\n BigNumber: BigNumber,\n config: config\n});\nexport var tau = /* #__PURE__ */createTau({\n BigNumber: BigNumber,\n config: config\n});\nexport var efimovFactor = /* #__PURE__ */createEfimovFactor({\n BigNumber: BigNumber,\n config: config\n});\nexport var fineStructure = /* #__PURE__ */createFineStructure({\n BigNumber: BigNumber,\n config: config\n});\nexport var sackurTetrode = /* #__PURE__ */createSackurTetrode({\n BigNumber: BigNumber,\n config: config\n});\nexport var weakMixingAngle = /* #__PURE__ */createWeakMixingAngle({\n BigNumber: BigNumber,\n config: config\n});\nexport var Fraction = /* #__PURE__ */createFractionClass({});\nexport var e = /* #__PURE__ */createE({\n BigNumber: BigNumber,\n config: config\n});\nexport var _Infinity = /* #__PURE__ */createInfinity({\n BigNumber: BigNumber,\n config: config\n});\nexport var LOG2E = /* #__PURE__ */createLOG2E({\n BigNumber: BigNumber,\n config: config\n});\nexport var version = /* #__PURE__ */createVersion({});\nexport var DenseMatrix = /* #__PURE__ */createDenseMatrixClass({\n Matrix: Matrix\n});\nexport var phi = /* #__PURE__ */createPhi({\n BigNumber: BigNumber,\n config: config\n});\nexport var typed = /* #__PURE__ */createTyped({\n BigNumber: BigNumber,\n Complex: Complex,\n DenseMatrix: DenseMatrix,\n Fraction: Fraction\n});\nexport var isInteger = /* #__PURE__ */createIsInteger({\n typed: typed\n});\nexport var isNumeric = /* #__PURE__ */createIsNumeric({\n typed: typed\n});\nexport var isPositive = /* #__PURE__ */createIsPositive({\n typed: typed\n});\nexport var isNaN = /* #__PURE__ */createIsNaN({\n typed: typed\n});\nexport var equalScalar = /* #__PURE__ */createEqualScalar({\n config: config,\n typed: typed\n});\nexport var number = /* #__PURE__ */createNumber({\n typed: typed\n});\n\nvar _boolean = /* #__PURE__ */createBoolean({\n typed: typed\n});\n\nexport { _boolean as boolean };\nexport var complex = /* #__PURE__ */createComplex({\n Complex: Complex,\n typed: typed\n});\nexport var splitUnit = /* #__PURE__ */createSplitUnit({\n typed: typed\n});\nexport var unaryPlus = /* #__PURE__ */createUnaryPlus({\n BigNumber: BigNumber,\n config: config,\n typed: typed\n});\nexport var apply = /* #__PURE__ */createApply({\n isInteger: isInteger,\n typed: typed\n});\nexport var cube = /* #__PURE__ */createCube({\n typed: typed\n});\nexport var expm1 = /* #__PURE__ */createExpm1({\n Complex: Complex,\n typed: typed\n});\nexport var log10 = /* #__PURE__ */createLog10({\n Complex: Complex,\n config: config,\n typed: typed\n});\nexport var multiplyScalar = /* #__PURE__ */createMultiplyScalar({\n typed: typed\n});\nexport var sign = /* #__PURE__ */createSign({\n BigNumber: BigNumber,\n Fraction: Fraction,\n complex: complex,\n typed: typed\n});\nexport var square = /* #__PURE__ */createSquare({\n typed: typed\n});\nexport var bitNot = /* #__PURE__ */createBitNot({\n typed: typed\n});\nexport var arg = /* #__PURE__ */createArg({\n typed: typed\n});\nexport var im = /* #__PURE__ */createIm({\n typed: typed\n});\nexport var not = /* #__PURE__ */createNot({\n typed: typed\n});\nexport var filter = /* #__PURE__ */createFilter({\n typed: typed\n});\nexport var forEach = /* #__PURE__ */createForEach({\n typed: typed\n});\nexport var map = /* #__PURE__ */createMap({\n typed: typed\n});\nexport var erf = /* #__PURE__ */createErf({\n typed: typed\n});\nexport var format = /* #__PURE__ */createFormat({\n typed: typed\n});\nexport var oct = /* #__PURE__ */createOct({\n typed: typed\n});\nexport var print = /* #__PURE__ */createPrint({\n typed: typed\n});\nexport var isPrime = /* #__PURE__ */createIsPrime({\n typed: typed\n});\nexport var acos = /* #__PURE__ */createAcos({\n Complex: Complex,\n config: config,\n typed: typed\n});\nexport var acot = /* #__PURE__ */createAcot({\n BigNumber: BigNumber,\n typed: typed\n});\nexport var acsc = /* #__PURE__ */createAcsc({\n BigNumber: BigNumber,\n Complex: Complex,\n config: config,\n typed: typed\n});\nexport var asec = /* #__PURE__ */createAsec({\n BigNumber: BigNumber,\n Complex: Complex,\n config: config,\n typed: typed\n});\nexport var asin = /* #__PURE__ */createAsin({\n Complex: Complex,\n config: config,\n typed: typed\n});\nexport var atan = /* #__PURE__ */createAtan({\n typed: typed\n});\nexport var atanh = /* #__PURE__ */createAtanh({\n Complex: Complex,\n config: config,\n typed: typed\n});\nexport var cosh = /* #__PURE__ */createCosh({\n typed: typed\n});\nexport var coth = /* #__PURE__ */createCoth({\n BigNumber: BigNumber,\n typed: typed\n});\nexport var csch = /* #__PURE__ */createCsch({\n BigNumber: BigNumber,\n typed: typed\n});\nexport var sech = /* #__PURE__ */createSech({\n BigNumber: BigNumber,\n typed: typed\n});\nexport var sinh = /* #__PURE__ */createSinh({\n typed: typed\n});\nexport var tanh = /* #__PURE__ */createTanh({\n typed: typed\n});\nexport var combinations = /* #__PURE__ */createCombinations({\n typed: typed\n});\nexport var pickRandom = /* #__PURE__ */createPickRandom({\n config: config,\n typed: typed\n});\nexport var randomInt = /* #__PURE__ */createRandomInt({\n config: config,\n typed: typed\n});\nexport var LN2 = /* #__PURE__ */createLN2({\n BigNumber: BigNumber,\n config: config\n});\nexport var clone = /* #__PURE__ */createClone({\n typed: typed\n});\nexport var hasNumericValue = /* #__PURE__ */createHasNumericValue({\n isNumeric: isNumeric,\n typed: typed\n});\nexport var typeOf = /* #__PURE__ */createTypeOf({\n typed: typed\n});\nexport var string = /* #__PURE__ */createString({\n typed: typed\n});\nexport var fraction = /* #__PURE__ */createFraction({\n Fraction: Fraction,\n typed: typed\n});\nexport var unaryMinus = /* #__PURE__ */createUnaryMinus({\n typed: typed\n});\nexport var addScalar = /* #__PURE__ */createAddScalar({\n typed: typed\n});\nexport var exp = /* #__PURE__ */createExp({\n typed: typed\n});\nexport var log2 = /* #__PURE__ */createLog2({\n Complex: Complex,\n config: config,\n typed: typed\n});\nexport var sqrt = /* #__PURE__ */createSqrt({\n Complex: Complex,\n config: config,\n typed: typed\n});\nexport var conj = /* #__PURE__ */createConj({\n typed: typed\n});\nexport var getMatrixDataType = /* #__PURE__ */createGetMatrixDataType({\n typed: typed\n});\nexport var mode = /* #__PURE__ */createMode({\n isNaN: isNaN,\n isNumeric: isNumeric,\n typed: typed\n});\nexport var bin = /* #__PURE__ */createBin({\n typed: typed\n});\nexport var acosh = /* #__PURE__ */createAcosh({\n Complex: Complex,\n config: config,\n typed: typed\n});\nexport var acsch = /* #__PURE__ */createAcsch({\n BigNumber: BigNumber,\n typed: typed\n});\nexport var asinh = /* #__PURE__ */createAsinh({\n typed: typed\n});\nexport var cos = /* #__PURE__ */createCos({\n typed: typed\n});\nexport var csc = /* #__PURE__ */createCsc({\n BigNumber: BigNumber,\n typed: typed\n});\nexport var sin = /* #__PURE__ */createSin({\n typed: typed\n});\nexport var combinationsWithRep = /* #__PURE__ */createCombinationsWithRep({\n typed: typed\n});\nexport var random = /* #__PURE__ */createRandom({\n config: config,\n typed: typed\n});\nexport var SQRT2 = /* #__PURE__ */createSQRT2({\n BigNumber: BigNumber,\n config: config\n});\nexport var isNegative = /* #__PURE__ */createIsNegative({\n typed: typed\n});\nexport var SparseMatrix = /* #__PURE__ */createSparseMatrixClass({\n Matrix: Matrix,\n equalScalar: equalScalar,\n typed: typed\n});\nexport var matrix = /* #__PURE__ */createMatrix({\n DenseMatrix: DenseMatrix,\n Matrix: Matrix,\n SparseMatrix: SparseMatrix,\n typed: typed\n});\nexport var cbrt = /* #__PURE__ */createCbrt({\n BigNumber: BigNumber,\n Complex: Complex,\n Fraction: Fraction,\n config: config,\n isNegative: isNegative,\n matrix: matrix,\n typed: typed,\n unaryMinus: unaryMinus\n});\nexport var gcd = /* #__PURE__ */createGcd({\n BigNumber: BigNumber,\n DenseMatrix: DenseMatrix,\n equalScalar: equalScalar,\n matrix: matrix,\n typed: typed\n});\nexport var mod = /* #__PURE__ */createMod({\n DenseMatrix: DenseMatrix,\n equalScalar: equalScalar,\n matrix: matrix,\n typed: typed\n});\nexport var nthRoot = /* #__PURE__ */createNthRoot({\n BigNumber: BigNumber,\n equalScalar: equalScalar,\n matrix: matrix,\n typed: typed\n});\nexport var xgcd = /* #__PURE__ */createXgcd({\n BigNumber: BigNumber,\n config: config,\n matrix: matrix,\n typed: typed\n});\nexport var bitAnd = /* #__PURE__ */createBitAnd({\n equalScalar: equalScalar,\n matrix: matrix,\n typed: typed\n});\nexport var bitXor = /* #__PURE__ */createBitXor({\n DenseMatrix: DenseMatrix,\n matrix: matrix,\n typed: typed\n});\nexport var or = /* #__PURE__ */createOr({\n DenseMatrix: DenseMatrix,\n equalScalar: equalScalar,\n matrix: matrix,\n typed: typed\n});\nexport var concat = /* #__PURE__ */createConcat({\n isInteger: isInteger,\n matrix: matrix,\n typed: typed\n});\nexport var diag = /* #__PURE__ */createDiag({\n DenseMatrix: DenseMatrix,\n SparseMatrix: SparseMatrix,\n matrix: matrix,\n typed: typed\n});\nexport var identity = /* #__PURE__ */createIdentity({\n BigNumber: BigNumber,\n DenseMatrix: DenseMatrix,\n SparseMatrix: SparseMatrix,\n config: config,\n matrix: matrix,\n typed: typed\n});\nexport var ones = /* #__PURE__ */createOnes({\n BigNumber: BigNumber,\n config: config,\n matrix: matrix,\n typed: typed\n});\nexport var reshape = /* #__PURE__ */createReshape({\n isInteger: isInteger,\n matrix: matrix,\n typed: typed\n});\nexport var size = /* #__PURE__ */createSize({\n matrix: matrix,\n config: config,\n typed: typed\n});\nexport var subset = /* #__PURE__ */createSubset({\n matrix: matrix,\n typed: typed\n});\nexport var zeros = /* #__PURE__ */createZeros({\n BigNumber: BigNumber,\n config: config,\n matrix: matrix,\n typed: typed\n});\nexport var hex = /* #__PURE__ */createHex({\n typed: typed\n});\nexport var round = /* #__PURE__ */createRound({\n BigNumber: BigNumber,\n DenseMatrix: DenseMatrix,\n equalScalar: equalScalar,\n matrix: matrix,\n typed: typed,\n zeros: zeros\n});\nexport var leftShift = /* #__PURE__ */createLeftShift({\n DenseMatrix: DenseMatrix,\n equalScalar: equalScalar,\n matrix: matrix,\n typed: typed,\n zeros: zeros\n});\nexport var rightLogShift = /* #__PURE__ */createRightLogShift({\n DenseMatrix: DenseMatrix,\n equalScalar: equalScalar,\n matrix: matrix,\n typed: typed,\n zeros: zeros\n});\nexport var compare = /* #__PURE__ */createCompare({\n BigNumber: BigNumber,\n DenseMatrix: DenseMatrix,\n Fraction: Fraction,\n config: config,\n equalScalar: equalScalar,\n matrix: matrix,\n typed: typed\n});\nexport var compareText = /* #__PURE__ */createCompareText({\n matrix: matrix,\n typed: typed\n});\nexport var smaller = /* #__PURE__ */createSmaller({\n DenseMatrix: DenseMatrix,\n config: config,\n matrix: matrix,\n typed: typed\n});\nexport var larger = /* #__PURE__ */createLarger({\n DenseMatrix: DenseMatrix,\n config: config,\n matrix: matrix,\n typed: typed\n});\nexport var unequal = /* #__PURE__ */createUnequal({\n DenseMatrix: DenseMatrix,\n config: config,\n equalScalar: equalScalar,\n matrix: matrix,\n typed: typed\n});\nexport var ImmutableDenseMatrix = /* #__PURE__ */createImmutableDenseMatrixClass({\n DenseMatrix: DenseMatrix,\n smaller: smaller\n});\nexport var FibonacciHeap = /* #__PURE__ */createFibonacciHeapClass({\n larger: larger,\n smaller: smaller\n});\nexport var sparse = /* #__PURE__ */createSparse({\n SparseMatrix: SparseMatrix,\n typed: typed\n});\nexport var acoth = /* #__PURE__ */createAcoth({\n BigNumber: BigNumber,\n Complex: Complex,\n config: config,\n typed: typed\n});\nexport var atan2 = /* #__PURE__ */createAtan2({\n BigNumber: BigNumber,\n DenseMatrix: DenseMatrix,\n equalScalar: equalScalar,\n matrix: matrix,\n typed: typed\n});\nexport var sec = /* #__PURE__ */createSec({\n BigNumber: BigNumber,\n typed: typed\n});\nexport var add = /* #__PURE__ */createAdd({\n DenseMatrix: DenseMatrix,\n SparseMatrix: SparseMatrix,\n addScalar: addScalar,\n equalScalar: equalScalar,\n matrix: matrix,\n typed: typed\n});\nexport var dot = /* #__PURE__ */createDot({\n addScalar: addScalar,\n conj: conj,\n multiplyScalar: multiplyScalar,\n size: size,\n typed: typed\n});\nexport var composition = /* #__PURE__ */createComposition({\n addScalar: addScalar,\n combinations: combinations,\n isInteger: isInteger,\n isNegative: isNegative,\n isPositive: isPositive,\n larger: larger,\n typed: typed\n});\nexport var isZero = /* #__PURE__ */createIsZero({\n typed: typed\n});\nexport var abs = /* #__PURE__ */createAbs({\n typed: typed\n});\nexport var floor = /* #__PURE__ */createFloor({\n config: config,\n equalScalar: equalScalar,\n matrix: matrix,\n round: round,\n typed: typed\n});\nexport var multiply = /* #__PURE__ */createMultiply({\n addScalar: addScalar,\n dot: dot,\n equalScalar: equalScalar,\n matrix: matrix,\n multiplyScalar: multiplyScalar,\n typed: typed\n});\nexport var dotMultiply = /* #__PURE__ */createDotMultiply({\n equalScalar: equalScalar,\n matrix: matrix,\n multiplyScalar: multiplyScalar,\n typed: typed\n});\nexport var re = /* #__PURE__ */createRe({\n typed: typed\n});\nexport var flatten = /* #__PURE__ */createFlatten({\n matrix: matrix,\n typed: typed\n});\nexport var resize = /* #__PURE__ */createResize({\n config: config,\n matrix: matrix\n});\nexport var squeeze = /* #__PURE__ */createSqueeze({\n matrix: matrix,\n typed: typed\n});\nexport var to = /* #__PURE__ */createTo({\n matrix: matrix,\n typed: typed\n});\nexport var pow = /* #__PURE__ */createPow({\n Complex: Complex,\n config: config,\n fraction: fraction,\n identity: identity,\n matrix: matrix,\n multiply: multiply,\n number: number,\n typed: typed\n});\nexport var dotPow = /* #__PURE__ */createDotPow({\n DenseMatrix: DenseMatrix,\n equalScalar: equalScalar,\n matrix: matrix,\n pow: pow,\n typed: typed\n});\nexport var rightArithShift = /* #__PURE__ */createRightArithShift({\n DenseMatrix: DenseMatrix,\n equalScalar: equalScalar,\n matrix: matrix,\n typed: typed,\n zeros: zeros\n});\nexport var compareNatural = /* #__PURE__ */createCompareNatural({\n compare: compare,\n typed: typed\n});\nexport var equalText = /* #__PURE__ */createEqualText({\n compareText: compareText,\n isZero: isZero,\n typed: typed\n});\nexport var largerEq = /* #__PURE__ */createLargerEq({\n DenseMatrix: DenseMatrix,\n config: config,\n matrix: matrix,\n typed: typed\n});\nexport var partitionSelect = /* #__PURE__ */createPartitionSelect({\n compare: compare,\n isNaN: isNaN,\n isNumeric: isNumeric,\n typed: typed\n});\nexport var Index = /* #__PURE__ */createIndexClass({\n ImmutableDenseMatrix: ImmutableDenseMatrix\n});\nexport var asech = /* #__PURE__ */createAsech({\n BigNumber: BigNumber,\n Complex: Complex,\n config: config,\n typed: typed\n});\nexport var tan = /* #__PURE__ */createTan({\n typed: typed\n});\nexport var setDifference = /* #__PURE__ */createSetDifference({\n DenseMatrix: DenseMatrix,\n Index: Index,\n compareNatural: compareNatural,\n size: size,\n subset: subset,\n typed: typed\n});\nexport var setIntersect = /* #__PURE__ */createSetIntersect({\n DenseMatrix: DenseMatrix,\n Index: Index,\n compareNatural: compareNatural,\n size: size,\n subset: subset,\n typed: typed\n});\nexport var setMultiplicity = /* #__PURE__ */createSetMultiplicity({\n Index: Index,\n compareNatural: compareNatural,\n size: size,\n subset: subset,\n typed: typed\n});\nexport var setSize = /* #__PURE__ */createSetSize({\n compareNatural: compareNatural,\n typed: typed\n});\nexport var trace = /* #__PURE__ */createTrace({\n add: add,\n matrix: matrix,\n typed: typed\n});\nexport var quantileSeq = /* #__PURE__ */createQuantileSeq({\n add: add,\n compare: compare,\n multiply: multiply,\n partitionSelect: partitionSelect,\n typed: typed\n});\nexport var gamma = /* #__PURE__ */createGamma({\n BigNumber: BigNumber,\n Complex: Complex,\n config: config,\n multiplyScalar: multiplyScalar,\n pow: pow,\n typed: typed\n});\nexport var bignumber = /* #__PURE__ */createBignumber({\n BigNumber: BigNumber,\n typed: typed\n});\nexport var lcm = /* #__PURE__ */createLcm({\n equalScalar: equalScalar,\n matrix: matrix,\n typed: typed\n});\nexport var bitOr = /* #__PURE__ */createBitOr({\n DenseMatrix: DenseMatrix,\n equalScalar: equalScalar,\n matrix: matrix,\n typed: typed\n});\nexport var kron = /* #__PURE__ */createKron({\n matrix: matrix,\n multiplyScalar: multiplyScalar,\n typed: typed\n});\nexport var transpose = /* #__PURE__ */createTranspose({\n matrix: matrix,\n typed: typed\n});\nexport var numeric = /* #__PURE__ */createNumeric({\n bignumber: bignumber,\n fraction: fraction,\n number: number\n});\nexport var and = /* #__PURE__ */createAnd({\n equalScalar: equalScalar,\n matrix: matrix,\n not: not,\n typed: typed,\n zeros: zeros\n});\nexport var smallerEq = /* #__PURE__ */createSmallerEq({\n DenseMatrix: DenseMatrix,\n config: config,\n matrix: matrix,\n typed: typed\n});\nexport var sort = /* #__PURE__ */createSort({\n compare: compare,\n compareNatural: compareNatural,\n matrix: matrix,\n typed: typed\n});\nexport var min = /* #__PURE__ */createMin({\n config: config,\n numeric: numeric,\n smaller: smaller,\n typed: typed\n});\nexport var cot = /* #__PURE__ */createCot({\n BigNumber: BigNumber,\n typed: typed\n});\nexport var setDistinct = /* #__PURE__ */createSetDistinct({\n DenseMatrix: DenseMatrix,\n Index: Index,\n compareNatural: compareNatural,\n size: size,\n subset: subset,\n typed: typed\n});\nexport var setPowerset = /* #__PURE__ */createSetPowerset({\n Index: Index,\n compareNatural: compareNatural,\n size: size,\n subset: subset,\n typed: typed\n});\nexport var index = /* #__PURE__ */createIndex({\n Index: Index,\n typed: typed\n});\nexport var sum = /* #__PURE__ */createSum({\n add: add,\n config: config,\n numeric: numeric,\n typed: typed\n});\nexport var factorial = /* #__PURE__ */createFactorial({\n gamma: gamma,\n typed: typed\n});\nexport var permutations = /* #__PURE__ */createPermutations({\n factorial: factorial,\n typed: typed\n});\nexport var ceil = /* #__PURE__ */createCeil({\n config: config,\n equalScalar: equalScalar,\n matrix: matrix,\n round: round,\n typed: typed\n});\nexport var subtract = /* #__PURE__ */createSubtract({\n DenseMatrix: DenseMatrix,\n addScalar: addScalar,\n equalScalar: equalScalar,\n matrix: matrix,\n typed: typed,\n unaryMinus: unaryMinus\n});\nexport var cross = /* #__PURE__ */createCross({\n matrix: matrix,\n multiply: multiply,\n subtract: subtract,\n typed: typed\n});\nexport var range = /* #__PURE__ */createRange({\n bignumber: bignumber,\n matrix: matrix,\n config: config,\n larger: larger,\n largerEq: largerEq,\n smaller: smaller,\n smallerEq: smallerEq,\n typed: typed\n});\nexport var row = /* #__PURE__ */createRow({\n Index: Index,\n matrix: matrix,\n range: range,\n typed: typed\n});\nexport var prod = /* #__PURE__ */createProd({\n config: config,\n multiplyScalar: multiplyScalar,\n numeric: numeric,\n typed: typed\n});\nexport var equal = /* #__PURE__ */createEqual({\n DenseMatrix: DenseMatrix,\n equalScalar: equalScalar,\n matrix: matrix,\n typed: typed\n});\nexport var max = /* #__PURE__ */createMax({\n config: config,\n larger: larger,\n numeric: numeric,\n typed: typed\n});\nexport var setCartesian = /* #__PURE__ */createSetCartesian({\n DenseMatrix: DenseMatrix,\n Index: Index,\n compareNatural: compareNatural,\n size: size,\n subset: subset,\n typed: typed\n});\nexport var setSymDifference = /* #__PURE__ */createSetSymDifference({\n Index: Index,\n concat: concat,\n setDifference: setDifference,\n size: size,\n subset: subset,\n typed: typed\n});\nexport var fix = /* #__PURE__ */createFix({\n Complex: Complex,\n ceil: ceil,\n floor: floor,\n matrix: matrix,\n typed: typed\n});\nexport var column = /* #__PURE__ */createColumn({\n Index: Index,\n matrix: matrix,\n range: range,\n typed: typed\n});\nexport var ctranspose = /* #__PURE__ */createCtranspose({\n conj: conj,\n transpose: transpose,\n typed: typed\n});\nexport var deepEqual = /* #__PURE__ */createDeepEqual({\n equal: equal,\n typed: typed\n});\nexport var setIsSubset = /* #__PURE__ */createSetIsSubset({\n Index: Index,\n compareNatural: compareNatural,\n size: size,\n subset: subset,\n typed: typed\n});\nexport var xor = /* #__PURE__ */createXor({\n DenseMatrix: DenseMatrix,\n matrix: matrix,\n typed: typed\n});\nexport var divideScalar = /* #__PURE__ */createDivideScalar({\n numeric: numeric,\n typed: typed\n});\nexport var nthRoots = /* #__PURE__ */createNthRoots({\n Complex: Complex,\n config: config,\n divideScalar: divideScalar,\n typed: typed\n});\nexport var lsolve = /* #__PURE__ */createLsolve({\n DenseMatrix: DenseMatrix,\n divideScalar: divideScalar,\n equalScalar: equalScalar,\n matrix: matrix,\n multiplyScalar: multiplyScalar,\n subtract: subtract,\n typed: typed\n});\nexport var lsolveAll = /* #__PURE__ */createLsolveAll({\n DenseMatrix: DenseMatrix,\n divideScalar: divideScalar,\n equalScalar: equalScalar,\n matrix: matrix,\n multiplyScalar: multiplyScalar,\n subtract: subtract,\n typed: typed\n});\nexport var Spa = /* #__PURE__ */createSpaClass({\n FibonacciHeap: FibonacciHeap,\n addScalar: addScalar,\n equalScalar: equalScalar\n});\nexport var setUnion = /* #__PURE__ */createSetUnion({\n Index: Index,\n concat: concat,\n setIntersect: setIntersect,\n setSymDifference: setSymDifference,\n size: size,\n subset: subset,\n typed: typed\n});\nexport var lup = /* #__PURE__ */createLup({\n DenseMatrix: DenseMatrix,\n Spa: Spa,\n SparseMatrix: SparseMatrix,\n abs: abs,\n addScalar: addScalar,\n divideScalar: divideScalar,\n equalScalar: equalScalar,\n larger: larger,\n matrix: matrix,\n multiplyScalar: multiplyScalar,\n subtract: subtract,\n typed: typed,\n unaryMinus: unaryMinus\n});\nexport var slu = /* #__PURE__ */createSlu({\n SparseMatrix: SparseMatrix,\n abs: abs,\n add: add,\n divideScalar: divideScalar,\n larger: larger,\n largerEq: largerEq,\n multiply: multiply,\n subtract: subtract,\n transpose: transpose,\n typed: typed\n});\nexport var det = /* #__PURE__ */createDet({\n lup: lup,\n matrix: matrix,\n multiply: multiply,\n subtract: subtract,\n typed: typed,\n unaryMinus: unaryMinus\n});\nexport var distance = /* #__PURE__ */createDistance({\n abs: abs,\n addScalar: addScalar,\n divideScalar: divideScalar,\n multiplyScalar: multiplyScalar,\n sqrt: sqrt,\n subtract: subtract,\n typed: typed,\n unaryMinus: unaryMinus\n});\nexport var stirlingS2 = /* #__PURE__ */createStirlingS2({\n addScalar: addScalar,\n combinations: combinations,\n divideScalar: divideScalar,\n factorial: factorial,\n isInteger: isInteger,\n isNegative: isNegative,\n larger: larger,\n multiplyScalar: multiplyScalar,\n pow: pow,\n subtract: subtract,\n typed: typed\n});\nexport var catalan = /* #__PURE__ */createCatalan({\n addScalar: addScalar,\n combinations: combinations,\n divideScalar: divideScalar,\n isInteger: isInteger,\n isNegative: isNegative,\n multiplyScalar: multiplyScalar,\n typed: typed\n});\nexport var diff = /* #__PURE__ */createDiff({\n matrix: matrix,\n number: number,\n subtract: subtract,\n typed: typed\n});\nexport var log = /* #__PURE__ */createLog({\n Complex: Complex,\n config: config,\n divideScalar: divideScalar,\n typed: typed\n});\nexport var dotDivide = /* #__PURE__ */createDotDivide({\n DenseMatrix: DenseMatrix,\n divideScalar: divideScalar,\n equalScalar: equalScalar,\n matrix: matrix,\n typed: typed\n});\nexport var usolveAll = /* #__PURE__ */createUsolveAll({\n DenseMatrix: DenseMatrix,\n divideScalar: divideScalar,\n equalScalar: equalScalar,\n matrix: matrix,\n multiplyScalar: multiplyScalar,\n subtract: subtract,\n typed: typed\n});\nexport var hypot = /* #__PURE__ */createHypot({\n abs: abs,\n addScalar: addScalar,\n divideScalar: divideScalar,\n isPositive: isPositive,\n multiplyScalar: multiplyScalar,\n smaller: smaller,\n sqrt: sqrt,\n typed: typed\n});\nexport var qr = /* #__PURE__ */createQr({\n addScalar: addScalar,\n complex: complex,\n conj: conj,\n divideScalar: divideScalar,\n equal: equal,\n identity: identity,\n isZero: isZero,\n matrix: matrix,\n multiplyScalar: multiplyScalar,\n sign: sign,\n sqrt: sqrt,\n subtract: subtract,\n typed: typed,\n unaryMinus: unaryMinus,\n zeros: zeros\n});\nexport var inv = /* #__PURE__ */createInv({\n abs: abs,\n addScalar: addScalar,\n det: det,\n divideScalar: divideScalar,\n identity: identity,\n matrix: matrix,\n multiply: multiply,\n typed: typed,\n unaryMinus: unaryMinus\n});\nexport var expm = /* #__PURE__ */createExpm({\n abs: abs,\n add: add,\n identity: identity,\n inv: inv,\n multiply: multiply,\n typed: typed\n});\nexport var divide = /* #__PURE__ */createDivide({\n divideScalar: divideScalar,\n equalScalar: equalScalar,\n inv: inv,\n matrix: matrix,\n multiply: multiply,\n typed: typed\n});\nexport var mean = /* #__PURE__ */createMean({\n add: add,\n divide: divide,\n typed: typed\n});\nexport var variance = /* #__PURE__ */createVariance({\n add: add,\n apply: apply,\n divide: divide,\n isNaN: isNaN,\n multiply: multiply,\n subtract: subtract,\n typed: typed\n});\nexport var kldivergence = /* #__PURE__ */createKldivergence({\n divide: divide,\n dotDivide: dotDivide,\n isNumeric: isNumeric,\n log: log,\n matrix: matrix,\n multiply: multiply,\n sum: sum,\n typed: typed\n});\nexport var bellNumbers = /* #__PURE__ */createBellNumbers({\n addScalar: addScalar,\n isInteger: isInteger,\n isNegative: isNegative,\n stirlingS2: stirlingS2,\n typed: typed\n});\nexport var log1p = /* #__PURE__ */createLog1p({\n Complex: Complex,\n config: config,\n divideScalar: divideScalar,\n log: log,\n typed: typed\n});\nexport var Unit = /* #__PURE__ */createUnitClass({\n BigNumber: BigNumber,\n Complex: Complex,\n Fraction: Fraction,\n abs: abs,\n addScalar: addScalar,\n config: config,\n divideScalar: divideScalar,\n equal: equal,\n fix: fix,\n format: format,\n isNumeric: isNumeric,\n multiplyScalar: multiplyScalar,\n number: number,\n pow: pow,\n round: round,\n subtract: subtract\n});\nexport var createUnit = /* #__PURE__ */createCreateUnit({\n Unit: Unit,\n typed: typed\n});\nexport var eigs = /* #__PURE__ */createEigs({\n abs: abs,\n add: add,\n addScalar: addScalar,\n atan: atan,\n bignumber: bignumber,\n config: config,\n cos: cos,\n equal: equal,\n inv: inv,\n matrix: matrix,\n multiply: multiply,\n multiplyScalar: multiplyScalar,\n sin: sin,\n subtract: subtract,\n typed: typed\n});\nexport var intersect = /* #__PURE__ */createIntersect({\n abs: abs,\n add: add,\n addScalar: addScalar,\n config: config,\n divideScalar: divideScalar,\n equalScalar: equalScalar,\n matrix: matrix,\n multiply: multiply,\n multiplyScalar: multiplyScalar,\n smaller: smaller,\n subtract: subtract,\n typed: typed\n});\nexport var std = /* #__PURE__ */createStd({\n sqrt: sqrt,\n typed: typed,\n variance: variance\n});\nexport var atomicMass = /* #__PURE__ */createAtomicMass({\n BigNumber: BigNumber,\n Unit: Unit,\n config: config\n});\nexport var bohrMagneton = /* #__PURE__ */createBohrMagneton({\n BigNumber: BigNumber,\n Unit: Unit,\n config: config\n});\nexport var boltzmann = /* #__PURE__ */createBoltzmann({\n BigNumber: BigNumber,\n Unit: Unit,\n config: config\n});\nexport var conductanceQuantum = /* #__PURE__ */createConductanceQuantum({\n BigNumber: BigNumber,\n Unit: Unit,\n config: config\n});\nexport var deuteronMass = /* #__PURE__ */createDeuteronMass({\n BigNumber: BigNumber,\n Unit: Unit,\n config: config\n});\nexport var electronMass = /* #__PURE__ */createElectronMass({\n BigNumber: BigNumber,\n Unit: Unit,\n config: config\n});\nexport var faraday = /* #__PURE__ */createFaraday({\n BigNumber: BigNumber,\n Unit: Unit,\n config: config\n});\nexport var firstRadiation = /* #__PURE__ */createFirstRadiation({\n BigNumber: BigNumber,\n Unit: Unit,\n config: config\n});\nexport var gravitationConstant = /* #__PURE__ */createGravitationConstant({\n BigNumber: BigNumber,\n Unit: Unit,\n config: config\n});\nexport var hartreeEnergy = /* #__PURE__ */createHartreeEnergy({\n BigNumber: BigNumber,\n Unit: Unit,\n config: config\n});\nexport var klitzing = /* #__PURE__ */createKlitzing({\n BigNumber: BigNumber,\n Unit: Unit,\n config: config\n});\nexport var magneticConstant = /* #__PURE__ */createMagneticConstant({\n BigNumber: BigNumber,\n Unit: Unit,\n config: config\n});\nexport var molarMass = /* #__PURE__ */createMolarMass({\n BigNumber: BigNumber,\n Unit: Unit,\n config: config\n});\nexport var molarPlanckConstant = /* #__PURE__ */createMolarPlanckConstant({\n BigNumber: BigNumber,\n Unit: Unit,\n config: config\n});\nexport var neutronMass = /* #__PURE__ */createNeutronMass({\n BigNumber: BigNumber,\n Unit: Unit,\n config: config\n});\nexport var planckCharge = /* #__PURE__ */createPlanckCharge({\n BigNumber: BigNumber,\n Unit: Unit,\n config: config\n});\nexport var planckLength = /* #__PURE__ */createPlanckLength({\n BigNumber: BigNumber,\n Unit: Unit,\n config: config\n});\nexport var planckTemperature = /* #__PURE__ */createPlanckTemperature({\n BigNumber: BigNumber,\n Unit: Unit,\n config: config\n});\nexport var protonMass = /* #__PURE__ */createProtonMass({\n BigNumber: BigNumber,\n Unit: Unit,\n config: config\n});\nexport var reducedPlanckConstant = /* #__PURE__ */createReducedPlanckConstant({\n BigNumber: BigNumber,\n Unit: Unit,\n config: config\n});\nexport var secondRadiation = /* #__PURE__ */createSecondRadiation({\n BigNumber: BigNumber,\n Unit: Unit,\n config: config\n});\nexport var stefanBoltzmann = /* #__PURE__ */createStefanBoltzmann({\n BigNumber: BigNumber,\n Unit: Unit,\n config: config\n});\nexport var vacuumImpedance = /* #__PURE__ */createVacuumImpedance({\n BigNumber: BigNumber,\n Unit: Unit,\n config: config\n});\nexport var usolve = /* #__PURE__ */createUsolve({\n DenseMatrix: DenseMatrix,\n divideScalar: divideScalar,\n equalScalar: equalScalar,\n matrix: matrix,\n multiplyScalar: multiplyScalar,\n subtract: subtract,\n typed: typed\n});\nexport var norm = /* #__PURE__ */createNorm({\n abs: abs,\n add: add,\n conj: conj,\n ctranspose: ctranspose,\n eigs: eigs,\n equalScalar: equalScalar,\n larger: larger,\n matrix: matrix,\n multiply: multiply,\n pow: pow,\n smaller: smaller,\n sqrt: sqrt,\n typed: typed\n});\nexport var lusolve = /* #__PURE__ */createLusolve({\n DenseMatrix: DenseMatrix,\n lsolve: lsolve,\n lup: lup,\n matrix: matrix,\n slu: slu,\n typed: typed,\n usolve: usolve\n});\nexport var sqrtm = /* #__PURE__ */createSqrtm({\n abs: abs,\n add: add,\n identity: identity,\n inv: inv,\n max: max,\n multiply: multiply,\n size: size,\n sqrt: sqrt,\n subtract: subtract,\n typed: typed\n});\nexport var multinomial = /* #__PURE__ */createMultinomial({\n add: add,\n divide: divide,\n factorial: factorial,\n isInteger: isInteger,\n isPositive: isPositive,\n multiply: multiply,\n typed: typed\n});\nexport var avogadro = /* #__PURE__ */createAvogadro({\n BigNumber: BigNumber,\n Unit: Unit,\n config: config\n});\nexport var classicalElectronRadius = /* #__PURE__ */createClassicalElectronRadius({\n BigNumber: BigNumber,\n Unit: Unit,\n config: config\n});\nexport var electricConstant = /* #__PURE__ */createElectricConstant({\n BigNumber: BigNumber,\n Unit: Unit,\n config: config\n});\nexport var fermiCoupling = /* #__PURE__ */createFermiCoupling({\n BigNumber: BigNumber,\n Unit: Unit,\n config: config\n});\nexport var gravity = /* #__PURE__ */createGravity({\n BigNumber: BigNumber,\n Unit: Unit,\n config: config\n});\nexport var loschmidt = /* #__PURE__ */createLoschmidt({\n BigNumber: BigNumber,\n Unit: Unit,\n config: config\n});\nexport var molarMassC12 = /* #__PURE__ */createMolarMassC12({\n BigNumber: BigNumber,\n Unit: Unit,\n config: config\n});\nexport var nuclearMagneton = /* #__PURE__ */createNuclearMagneton({\n BigNumber: BigNumber,\n Unit: Unit,\n config: config\n});\nexport var planckMass = /* #__PURE__ */createPlanckMass({\n BigNumber: BigNumber,\n Unit: Unit,\n config: config\n});\nexport var quantumOfCirculation = /* #__PURE__ */createQuantumOfCirculation({\n BigNumber: BigNumber,\n Unit: Unit,\n config: config\n});\nexport var speedOfLight = /* #__PURE__ */createSpeedOfLight({\n BigNumber: BigNumber,\n Unit: Unit,\n config: config\n});\nexport var wienDisplacement = /* #__PURE__ */createWienDisplacement({\n BigNumber: BigNumber,\n Unit: Unit,\n config: config\n});\nexport var rotationMatrix = /* #__PURE__ */createRotationMatrix({\n BigNumber: BigNumber,\n DenseMatrix: DenseMatrix,\n SparseMatrix: SparseMatrix,\n addScalar: addScalar,\n config: config,\n cos: cos,\n matrix: matrix,\n multiplyScalar: multiplyScalar,\n norm: norm,\n sin: sin,\n typed: typed,\n unaryMinus: unaryMinus\n});\nexport var median = /* #__PURE__ */createMedian({\n add: add,\n compare: compare,\n divide: divide,\n partitionSelect: partitionSelect,\n typed: typed\n});\nexport var bohrRadius = /* #__PURE__ */createBohrRadius({\n BigNumber: BigNumber,\n Unit: Unit,\n config: config\n});\nexport var elementaryCharge = /* #__PURE__ */createElementaryCharge({\n BigNumber: BigNumber,\n Unit: Unit,\n config: config\n});\nexport var inverseConductanceQuantum = /* #__PURE__ */createInverseConductanceQuantum({\n BigNumber: BigNumber,\n Unit: Unit,\n config: config\n});\nexport var molarVolume = /* #__PURE__ */createMolarVolume({\n BigNumber: BigNumber,\n Unit: Unit,\n config: config\n});\nexport var planckTime = /* #__PURE__ */createPlanckTime({\n BigNumber: BigNumber,\n Unit: Unit,\n config: config\n});\nexport var thomsonCrossSection = /* #__PURE__ */createThomsonCrossSection({\n BigNumber: BigNumber,\n Unit: Unit,\n config: config\n});\nexport var rotate = /* #__PURE__ */createRotate({\n multiply: multiply,\n rotationMatrix: rotationMatrix,\n typed: typed\n});\nexport var mad = /* #__PURE__ */createMad({\n abs: abs,\n map: map,\n median: median,\n subtract: subtract,\n typed: typed\n});\nexport var coulomb = /* #__PURE__ */createCoulomb({\n BigNumber: BigNumber,\n Unit: Unit,\n config: config\n});\nexport var magneticFluxQuantum = /* #__PURE__ */createMagneticFluxQuantum({\n BigNumber: BigNumber,\n Unit: Unit,\n config: config\n});\nexport var rydberg = /* #__PURE__ */createRydberg({\n BigNumber: BigNumber,\n Unit: Unit,\n config: config\n});\nexport var unit = /* #__PURE__ */createUnitFunction({\n Unit: Unit,\n typed: typed\n});\nexport var gasConstant = /* #__PURE__ */createGasConstant({\n BigNumber: BigNumber,\n Unit: Unit,\n config: config\n});\nexport var planckConstant = /* #__PURE__ */createPlanckConstant({\n BigNumber: BigNumber,\n Unit: Unit,\n config: config\n});","import e from \"react\";\nimport t from \"prop-types\";\nimport { styled as n } from \"@mui/material/styles\";\nimport { jsx as r } from \"react/jsx-runtime\";\nimport { isFinite as i } from \"lodash-es\";\nimport a from \"@mui/material/IconButton\";\nimport o from \"@mui/material/TextField\";\nimport s from \"@mui/material/InputAdornment\";\nimport c from \"@mui/icons-material/Remove\";\nimport l from \"@mui/icons-material/Add\";\nimport * as u from \"mathjs\";\n//#region src/number-text-field-custom.tsx\nvar d = n(o)(() => ({\n\t\"& input[type=number]\": { MozAppearance: \"textfield\" },\n\t\"& input[type=number]::-webkit-outer-spin-button\": {\n\t\tWebkitAppearance: \"none\",\n\t\tmargin: 0\n\t},\n\t\"& input[type=number]::-webkit-inner-spin-button\": {\n\t\tWebkitAppearance: \"none\",\n\t\tmargin: 0\n\t}\n})), f = n(a)(() => ({ padding: \"2px\" })), p = (e, t) => {\n\tif (!i(e) && !i(t)) return 0;\n\tif (!i(e) && i(t)) return t;\n\tif (i(e)) return e;\n}, m = class extends e.Component {\n\tstatic propTypes = {\n\t\tclassName: t.string,\n\t\tcustomValues: t.array,\n\t\tdisabled: t.bool,\n\t\terror: t.bool,\n\t\tinputClassName: t.string,\n\t\thelperText: t.string,\n\t\tonChange: t.func.isRequired,\n\t\tonlyIntegersAllowed: t.bool,\n\t\tvalue: t.any,\n\t\tmin: t.number,\n\t\tmax: t.number,\n\t\tstep: t.number,\n\t\tlabel: t.string,\n\t\tdisableUnderline: t.bool,\n\t\ttextAlign: t.string,\n\t\tvariant: t.string,\n\t\ttype: t.string\n\t};\n\tstatic defaultProps = {\n\t\tstep: 1,\n\t\tcustomValues: [],\n\t\ttextAlign: \"center\",\n\t\tvariant: \"standard\",\n\t\tonlyIntegersAllowed: !1\n\t};\n\tconstructor(e) {\n\t\tsuper(e);\n\t\tlet { value: t, currentIndex: n } = this.normalizeValueAndIndex(e.customValues, e.value);\n\t\tthis.state = {\n\t\t\tvalue: t,\n\t\t\tcurrentIndex: n\n\t\t}, t !== e.value && this.props.onChange({}, t), this.onChange = this.onChange.bind(this);\n\t}\n\tUNSAFE_componentWillReceiveProps(e) {\n\t\tlet { value: t, currentIndex: n } = this.normalizeValueAndIndex(e.customValues, e.value, e.min, e.max);\n\t\tthis.setState({\n\t\t\tvalue: t,\n\t\t\tcurrentIndex: n\n\t\t});\n\t}\n\tclamp(e, t = this.props.min, n = this.props.max) {\n\t\tlet { customValues: r } = this.props;\n\t\treturn (r || []).length > 0 ? e : i(e) ? (i(n) && (e = Math.min(e, n)), i(t) && (e = Math.max(e, t)), e) : p(t, n);\n\t}\n\tnormalizeValueAndIndex = (e, t, n, r) => {\n\t\tlet { type: i } = this.props, a = this.clamp(t, n, r), o = (e || []).findIndex((e) => e === a);\n\t\tif ((e || []).length > 0 && o === -1) {\n\t\t\tlet t = i === \"text\" ? this.getClosestFractionValue(e, a) : this.getClosestValue(e, a);\n\t\t\treturn {\n\t\t\t\tvalue: t.value,\n\t\t\t\tcurrentIndex: t.index\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\tvalue: a,\n\t\t\tcurrentIndex: o\n\t\t};\n\t};\n\tgetClosestValue = (e, t) => e.reduce((e, n, r) => Math.abs(n - t) < Math.abs(e.value - t) ? {\n\t\tvalue: n,\n\t\tindex: r\n\t} : e, {\n\t\tvalue: e[0],\n\t\tindex: 0\n\t});\n\tgetClosestFractionValue = (e, t) => e.reduce((e, n, r) => Math.abs(u.number(u.fraction(n)) - u.number(u.fraction(t))) < Math.abs(u.number(u.fraction(e.value)) - u.number(u.fraction(t))) ? {\n\t\tvalue: n,\n\t\tindex: r\n\t} : e, {\n\t\tvalue: e[0],\n\t\tindex: 0\n\t});\n\tgetValidFraction = (e) => {\n\t\tif (this.isPositiveInteger(e.trim())) return e.trim();\n\t\tif (e.trim() === \"\" || e.trim().split(\"/\").length !== 2) return !1;\n\t\tlet [t, n] = e.trim().split(\"/\");\n\t\treturn isNaN(t) || isNaN(n) || (t = parseFloat(t), n = parseFloat(n), !Number.isInteger(t) || !Number.isInteger(n)) || t < 0 || n < 1 ? !1 : t + \"/\" + n;\n\t};\n\tisPositiveInteger = (e) => e >>> 0 === parseFloat(e);\n\tonBlur = (e) => {\n\t\tlet { customValues: t, onlyIntegersAllowed: n, type: r } = this.props, { value: i } = e.target;\n\t\tr === \"text\" && (i = this.getValidFraction(i) || this.props.value);\n\t\tlet a = n ? Math.round(parseFloat(i)) : parseFloat(i);\n\t\tr === \"text\" && (a = i.trim());\n\t\tlet { value: o, currentIndex: s } = this.normalizeValueAndIndex(t, a);\n\t\tthis.setState({\n\t\t\tvalue: o.toString(),\n\t\t\tcurrentIndex: s\n\t\t}, () => this.props.onChange(e, o));\n\t};\n\tonChange(e) {\n\t\tlet { type: t } = this.props, { value: n } = e.target;\n\t\tt !== \"text\" && typeof n == \"string\" && n.trim() === \"\" || this.setState({ value: n });\n\t}\n\tchangeValue(e, t = 1, n = !1) {\n\t\te.preventDefault();\n\t\tlet { customValues: r, step: i, onlyIntegersAllowed: a, onChange: o } = this.props, { currentIndex: s, value: c } = this.state, l = s + t * 1, u;\n\t\tif (r.length > 0) {\n\t\t\tif (l < 0 || l >= r.length) return;\n\t\t\tu = r[l];\n\t\t} else {\n\t\t\tlet e = ((a ? parseInt(c) : parseFloat(c)) * 1e4 + i * t * 1e4) / 1e4;\n\t\t\tu = this.clamp(e);\n\t\t}\n\t\tthis.setState({\n\t\t\tvalue: u.toString(),\n\t\t\tcurrentIndex: l\n\t\t}, () => {\n\t\t\tn && o(e, u);\n\t\t});\n\t}\n\trender() {\n\t\tlet { className: e, label: t, disabled: n, error: a, min: o, max: u, customValues: p, inputClassName: m, disableUnderline: h, helperText: g, variant: _, textAlign: v, type: y = \"number\" } = this.props, { value: b } = this.state, x = e, S = !1, C = !1;\n\t\treturn p.length > 0 ? (S = b === p[0], C = b === p[p.length - 1]) : i(o) && i(u) && (S = b === o, C = b === u), /* @__PURE__ */ r(d, {\n\t\t\tvariant: _,\n\t\t\tinputRef: (e) => this.inputRef = e,\n\t\t\tdisabled: n,\n\t\t\tlabel: t,\n\t\t\tvalue: b,\n\t\t\terror: a,\n\t\t\thelperText: g,\n\t\t\tonChange: this.onChange,\n\t\t\tonBlur: this.onBlur,\n\t\t\tonKeyPress: (e) => {\n\t\t\t\te.key === \"Enter\" && this.inputRef && this.inputRef.blur();\n\t\t\t},\n\t\t\tonKeyDown: (e) => {\n\t\t\t\te.key === \"ArrowUp\" && this.changeValue(e), e.key === \"ArrowDown\" && this.changeValue(e, -1);\n\t\t\t},\n\t\t\ttitle: \"\",\n\t\t\ttype: y,\n\t\t\tclassName: x,\n\t\t\tInputProps: {\n\t\t\t\tclassName: m,\n\t\t\t\tdisableUnderline: h,\n\t\t\t\tstartAdornment: /* @__PURE__ */ r(s, {\n\t\t\t\t\tposition: \"start\",\n\t\t\t\t\tchildren: /* @__PURE__ */ r(f, {\n\t\t\t\t\t\tdisabled: n || S,\n\t\t\t\t\t\tonClick: (e) => this.changeValue(e, -1, !0),\n\t\t\t\t\t\tsize: \"large\",\n\t\t\t\t\t\tchildren: /* @__PURE__ */ r(c, { fontSize: \"small\" })\n\t\t\t\t\t})\n\t\t\t\t}),\n\t\t\t\tendAdornment: /* @__PURE__ */ r(s, {\n\t\t\t\t\tposition: \"end\",\n\t\t\t\t\tchildren: /* @__PURE__ */ r(f, {\n\t\t\t\t\t\tdisabled: n || C,\n\t\t\t\t\t\tonClick: (e) => this.changeValue(e, 1, !0),\n\t\t\t\t\t\tsize: \"large\",\n\t\t\t\t\t\tchildren: /* @__PURE__ */ r(l, { fontSize: \"small\" })\n\t\t\t\t\t})\n\t\t\t\t})\n\t\t\t},\n\t\t\tinputProps: {\n\t\t\t\tstyle: { textAlign: v },\n\t\t\t\tmin: o,\n\t\t\t\tmax: u\n\t\t\t}\n\t\t});\n\t}\n};\n//#endregion\nexport { m as default };\n","import e from \"./radio-with-label.js\";\nimport t from \"react\";\nimport n from \"prop-types\";\nimport { styled as r } from \"@mui/material/styles\";\nimport { jsx as i } from \"react/jsx-runtime\";\nimport * as a from \"@pie-lib/render-ui\";\nimport { InputContainer as o } from \"@pie-lib/render-ui\";\n//#region src/two-choice.tsx\nfunction s(e) {\n\treturn typeof e == \"function\" || typeof e == \"object\" && !!e && typeof e.$$typeof == \"symbol\";\n}\nfunction c(e, t) {\n\treturn !e || s(e) ? e : s(e.default) ? e.default : t && s(e[t]) ? e[t] : t && s(e[t]?.default) ? e[t].default : e;\n}\nvar l = c(o, \"InputContainer\") || c(f.InputContainer, \"InputContainer\"), u = a, d = u.default, f = d && typeof d == \"object\" ? d : u, p = r(\"div\")(({ theme: e, direction: t }) => ({\n\tdisplay: \"flex\",\n\tflexWrap: \"wrap\",\n\tpaddingLeft: 0,\n\tmarginTop: e.spacing(1),\n\t...t === \"vertical\" && { flexDirection: \"column\" }\n})), m = class extends t.Component {\n\tstatic propTypes = {\n\t\theader: n.string.isRequired,\n\t\tclassName: n.string,\n\t\tcustomLabel: n.func,\n\t\topts: n.array.isRequired,\n\t\tvalue: n.string,\n\t\tonChange: n.func.isRequired,\n\t\tdirection: n.oneOf([\"horizontal\", \"vertical\"])\n\t};\n\thandleChange = (e) => {\n\t\tthis.props.onChange(e.currentTarget.value);\n\t};\n\trender() {\n\t\tlet { header: t, className: n, customLabel: r, opts: a, value: o, direction: s } = this.props, c = a.map((e) => typeof e == \"string\" ? {\n\t\t\tlabel: e,\n\t\t\tvalue: e\n\t\t} : e), u = r || e;\n\t\treturn /* @__PURE__ */ i(l, {\n\t\t\tlabel: t,\n\t\t\tclassName: n,\n\t\t\tchildren: /* @__PURE__ */ i(p, {\n\t\t\t\tdirection: s,\n\t\t\t\tchildren: c.map((e, t) => /* @__PURE__ */ i(u, {\n\t\t\t\t\tvalue: e.value,\n\t\t\t\t\tchecked: e.value === o,\n\t\t\t\t\tonChange: this.handleChange,\n\t\t\t\t\tlabel: e.label\n\t\t\t\t}, t))\n\t\t\t})\n\t\t});\n\t}\n}, h = n.shape({\n\tlabel: n.string,\n\tvalue: n.string\n}), g = class extends t.Component {\n\tstatic propTypes = {\n\t\theader: n.string.isRequired,\n\t\tvalue: n.string.isRequired,\n\t\tonChange: n.func.isRequired,\n\t\tone: n.oneOfType([h, n.string]),\n\t\ttwo: n.oneOfType([h, n.string]),\n\t\tclassName: n.string,\n\t\tcustomLabel: n.func\n\t};\n\trender() {\n\t\tlet { one: e, two: t, header: n, className: r, customLabel: a, value: o, onChange: s } = this.props;\n\t\treturn /* @__PURE__ */ i(m, {\n\t\t\tcustomLabel: a,\n\t\t\theader: n,\n\t\t\tclassName: r,\n\t\t\topts: [e, t],\n\t\t\tvalue: o,\n\t\t\tonChange: s\n\t\t});\n\t}\n};\n//#endregion\nexport { m as NChoice, g as default };\n","//#region \\0rolldown/runtime.js\nvar e = Object.defineProperty, t = (t, n) => {\n\tlet r = {};\n\tfor (var i in t) e(r, i, {\n\t\tget: t[i],\n\t\tenumerable: !0\n\t});\n\treturn n || e(r, Symbol.toStringTag, { value: \"Module\" }), r;\n};\n//#endregion\nexport { t as __exportAll };\n","import e from \"../tabs/index.js\";\nimport t from \"react\";\nimport n from \"prop-types\";\nimport { styled as r } from \"@mui/material/styles\";\nimport { jsx as i, jsxs as a } from \"react/jsx-runtime\";\n//#region src/layout/layout-contents.tsx\nvar o = r(\"div\")(() => ({\n\tdisplay: \"flex\",\n\tflexDirection: \"column\",\n\tposition: \"relative\"\n})), s = r(\"div\")(() => ({\n\tdisplay: \"flex\",\n\tjustifyContent: \"space-between\"\n})), c = r(\"div\")(({ theme: e }) => ({ padding: `${e.spacing(2)} 0` })), l = r(\"div\")(() => ({ flex: \"1\" })), u = r(\"div\")(({ theme: e }) => ({ marginLeft: e.spacing(2) })), d = class extends t.Component {\n\tstatic propTypes = {\n\t\tmode: n.oneOf([\"tabbed\", \"inline\"]),\n\t\tsecondary: n.oneOfType([n.arrayOf(n.node), n.node]),\n\t\tchildren: n.oneOfType([n.arrayOf(n.node), n.node]),\n\t\tdimensions: n.object\n\t};\n\tgetConfiguration = () => {\n\t\tlet { secondary: e } = this.props;\n\t\treturn e?.props?.configuration || e?.props?.children?.props?.configuration || void 0;\n\t};\n\trender() {\n\t\tlet { mode: t, secondary: n, children: r, dimensions: d } = this.props, { minHeight: f, minWidth: p, maxHeight: m, maxWidth: h } = d || {}, g = this.getConfiguration(), _ = Object.entries(g || {}).some(([, e]) => !!e?.settings);\n\t\tif (!_) try {\n\t\t\t_ = JSON.stringify(g)?.match(/settings\":true/)?.length;\n\t\t} catch (e) {\n\t\t\tconsole.log(e.toString());\n\t\t}\n\t\treturn /* @__PURE__ */ a(o, {\n\t\t\tstyle: {\n\t\t\t\tminHeight: f,\n\t\t\t\tminWidth: p,\n\t\t\t\tmaxHeight: m,\n\t\t\t\tmaxWidth: h\n\t\t\t},\n\t\t\tchildren: [\n\t\t\t\tt === \"inline\" && /* @__PURE__ */ a(s, { children: [/* @__PURE__ */ i(l, {\n\t\t\t\t\tclassName: \"design-container\",\n\t\t\t\t\tchildren: r\n\t\t\t\t}), _ && /* @__PURE__ */ i(u, {\n\t\t\t\t\tclassName: \"settings-container\",\n\t\t\t\t\tchildren: n\n\t\t\t\t})] }),\n\t\t\t\tt === \"tabbed\" && _ && /* @__PURE__ */ a(e, {\n\t\t\t\t\tonChange: this.onTabsChange,\n\t\t\t\t\tcontentClassName: \"content-container\",\n\t\t\t\t\tindicatorColor: \"primary\",\n\t\t\t\t\tchildren: [/* @__PURE__ */ i(c, {\n\t\t\t\t\t\ttitle: \"Design\",\n\t\t\t\t\t\tclassName: \"design-container\",\n\t\t\t\t\t\tchildren: r\n\t\t\t\t\t}), /* @__PURE__ */ i(c, {\n\t\t\t\t\t\ttitle: \"Settings\",\n\t\t\t\t\t\tclassName: \"settings-container\",\n\t\t\t\t\t\tchildren: n\n\t\t\t\t\t})]\n\t\t\t\t}),\n\t\t\t\tt === \"tabbed\" && !_ && /* @__PURE__ */ i(c, {\n\t\t\t\t\tclassName: \"design-container\",\n\t\t\t\t\tchildren: r\n\t\t\t\t})\n\t\t\t]\n\t\t});\n\t}\n};\n//#endregion\nexport { d as default };\n","//#region ../../../node_modules/.bun/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/extends.js\nfunction e() {\n\treturn e = Object.assign ? Object.assign.bind() : function(e) {\n\t\tfor (var t = 1; t < arguments.length; t++) {\n\t\t\tvar n = arguments[t];\n\t\t\tfor (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);\n\t\t}\n\t\treturn e;\n\t}, e.apply(null, arguments);\n}\n//#endregion\nexport { e as _extends };\n","//#region ../../../node_modules/.bun/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js\nfunction e(e, t) {\n\tif (e == null) return {};\n\tvar n = {};\n\tfor (var r in e) if ({}.hasOwnProperty.call(e, r)) {\n\t\tif (t.indexOf(r) !== -1) continue;\n\t\tn[r] = e[r];\n\t}\n\treturn n;\n}\n//#endregion\nexport { e as _objectWithoutPropertiesLoose };\n","//#region ../../../node_modules/.bun/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js\nfunction e(t, n) {\n\treturn e = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {\n\t\treturn e.__proto__ = t, e;\n\t}, e(t, n);\n}\n//#endregion\nexport { e as _setPrototypeOf };\n","import { _setPrototypeOf as e } from \"./setPrototypeOf.js\";\n//#region ../../../node_modules/.bun/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js\nfunction t(t, n) {\n\tt.prototype = Object.create(n.prototype), t.prototype.constructor = t, e(t, n);\n}\n//#endregion\nexport { t as _inheritsLoose };\n","//#region ../../../node_modules/.bun/resize-observer-polyfill@1.5.1/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js\nvar e = (function() {\n\tif (typeof Map < \"u\") return Map;\n\tfunction e(e, t) {\n\t\tvar n = -1;\n\t\treturn e.some(function(e, r) {\n\t\t\treturn e[0] === t ? (n = r, !0) : !1;\n\t\t}), n;\n\t}\n\treturn function() {\n\t\tfunction t() {\n\t\t\tthis.__entries__ = [];\n\t\t}\n\t\treturn Object.defineProperty(t.prototype, \"size\", {\n\t\t\tget: function() {\n\t\t\t\treturn this.__entries__.length;\n\t\t\t},\n\t\t\tenumerable: !0,\n\t\t\tconfigurable: !0\n\t\t}), t.prototype.get = function(t) {\n\t\t\tvar n = e(this.__entries__, t), r = this.__entries__[n];\n\t\t\treturn r && r[1];\n\t\t}, t.prototype.set = function(t, n) {\n\t\t\tvar r = e(this.__entries__, t);\n\t\t\t~r ? this.__entries__[r][1] = n : this.__entries__.push([t, n]);\n\t\t}, t.prototype.delete = function(t) {\n\t\t\tvar n = this.__entries__, r = e(n, t);\n\t\t\t~r && n.splice(r, 1);\n\t\t}, t.prototype.has = function(t) {\n\t\t\treturn !!~e(this.__entries__, t);\n\t\t}, t.prototype.clear = function() {\n\t\t\tthis.__entries__.splice(0);\n\t\t}, t.prototype.forEach = function(e, t) {\n\t\t\tt === void 0 && (t = null);\n\t\t\tfor (var n = 0, r = this.__entries__; n < r.length; n++) {\n\t\t\t\tvar i = r[n];\n\t\t\t\te.call(t, i[1], i[0]);\n\t\t\t}\n\t\t}, t;\n\t}();\n})(), t = typeof window < \"u\" && typeof document < \"u\" && window.document === document, n = (function() {\n\treturn typeof global < \"u\" && global.Math === Math ? global : typeof self < \"u\" && self.Math === Math ? self : typeof window < \"u\" && window.Math === Math ? window : Function(\"return this\")();\n})(), r = (function() {\n\treturn typeof requestAnimationFrame == \"function\" ? requestAnimationFrame.bind(n) : function(e) {\n\t\treturn setTimeout(function() {\n\t\t\treturn e(Date.now());\n\t\t}, 1e3 / 60);\n\t};\n})(), i = 2;\nfunction a(e, t) {\n\tvar n = !1, a = !1, o = 0;\n\tfunction s() {\n\t\tn && (n = !1, e()), a && l();\n\t}\n\tfunction c() {\n\t\tr(s);\n\t}\n\tfunction l() {\n\t\tvar e = Date.now();\n\t\tif (n) {\n\t\t\tif (e - o < i) return;\n\t\t\ta = !0;\n\t\t} else n = !0, a = !1, setTimeout(c, t);\n\t\to = e;\n\t}\n\treturn l;\n}\nvar o = 20, s = [\n\t\"top\",\n\t\"right\",\n\t\"bottom\",\n\t\"left\",\n\t\"width\",\n\t\"height\",\n\t\"size\",\n\t\"weight\"\n], c = typeof MutationObserver < \"u\", l = function() {\n\tfunction e() {\n\t\tthis.connected_ = !1, this.mutationEventsAdded_ = !1, this.mutationsObserver_ = null, this.observers_ = [], this.onTransitionEnd_ = this.onTransitionEnd_.bind(this), this.refresh = a(this.refresh.bind(this), o);\n\t}\n\treturn e.prototype.addObserver = function(e) {\n\t\t~this.observers_.indexOf(e) || this.observers_.push(e), this.connected_ || this.connect_();\n\t}, e.prototype.removeObserver = function(e) {\n\t\tvar t = this.observers_, n = t.indexOf(e);\n\t\t~n && t.splice(n, 1), !t.length && this.connected_ && this.disconnect_();\n\t}, e.prototype.refresh = function() {\n\t\tthis.updateObservers_() && this.refresh();\n\t}, e.prototype.updateObservers_ = function() {\n\t\tvar e = this.observers_.filter(function(e) {\n\t\t\treturn e.gatherActive(), e.hasActive();\n\t\t});\n\t\treturn e.forEach(function(e) {\n\t\t\treturn e.broadcastActive();\n\t\t}), e.length > 0;\n\t}, e.prototype.connect_ = function() {\n\t\t!t || this.connected_ || (document.addEventListener(\"transitionend\", this.onTransitionEnd_), window.addEventListener(\"resize\", this.refresh), c ? (this.mutationsObserver_ = new MutationObserver(this.refresh), this.mutationsObserver_.observe(document, {\n\t\t\tattributes: !0,\n\t\t\tchildList: !0,\n\t\t\tcharacterData: !0,\n\t\t\tsubtree: !0\n\t\t})) : (document.addEventListener(\"DOMSubtreeModified\", this.refresh), this.mutationEventsAdded_ = !0), this.connected_ = !0);\n\t}, e.prototype.disconnect_ = function() {\n\t\t!t || !this.connected_ || (document.removeEventListener(\"transitionend\", this.onTransitionEnd_), window.removeEventListener(\"resize\", this.refresh), this.mutationsObserver_ && this.mutationsObserver_.disconnect(), this.mutationEventsAdded_ && document.removeEventListener(\"DOMSubtreeModified\", this.refresh), this.mutationsObserver_ = null, this.mutationEventsAdded_ = !1, this.connected_ = !1);\n\t}, e.prototype.onTransitionEnd_ = function(e) {\n\t\tvar t = e.propertyName, n = t === void 0 ? \"\" : t;\n\t\ts.some(function(e) {\n\t\t\treturn !!~n.indexOf(e);\n\t\t}) && this.refresh();\n\t}, e.getInstance = function() {\n\t\treturn this.instance_ ||= new e(), this.instance_;\n\t}, e.instance_ = null, e;\n}(), u = (function(e, t) {\n\tfor (var n = 0, r = Object.keys(t); n < r.length; n++) {\n\t\tvar i = r[n];\n\t\tObject.defineProperty(e, i, {\n\t\t\tvalue: t[i],\n\t\t\tenumerable: !1,\n\t\t\twritable: !1,\n\t\t\tconfigurable: !0\n\t\t});\n\t}\n\treturn e;\n}), d = (function(e) {\n\treturn e && e.ownerDocument && e.ownerDocument.defaultView || n;\n}), f = S(0, 0, 0, 0);\nfunction p(e) {\n\treturn parseFloat(e) || 0;\n}\nfunction m(e) {\n\treturn [...arguments].slice(1).reduce(function(t, n) {\n\t\tvar r = e[\"border-\" + n + \"-width\"];\n\t\treturn t + p(r);\n\t}, 0);\n}\nfunction h(e) {\n\tfor (var t = [\n\t\t\"top\",\n\t\t\"right\",\n\t\t\"bottom\",\n\t\t\"left\"\n\t], n = {}, r = 0, i = t; r < i.length; r++) {\n\t\tvar a = i[r], o = e[\"padding-\" + a];\n\t\tn[a] = p(o);\n\t}\n\treturn n;\n}\nfunction g(e) {\n\tvar t = e.getBBox();\n\treturn S(0, 0, t.width, t.height);\n}\nfunction _(e) {\n\tvar t = e.clientWidth, n = e.clientHeight;\n\tif (!t && !n) return f;\n\tvar r = d(e).getComputedStyle(e), i = h(r), a = i.left + i.right, o = i.top + i.bottom, s = p(r.width), c = p(r.height);\n\tif (r.boxSizing === \"border-box\" && (Math.round(s + a) !== t && (s -= m(r, \"left\", \"right\") + a), Math.round(c + o) !== n && (c -= m(r, \"top\", \"bottom\") + o)), !y(e)) {\n\t\tvar l = Math.round(s + a) - t, u = Math.round(c + o) - n;\n\t\tMath.abs(l) !== 1 && (s -= l), Math.abs(u) !== 1 && (c -= u);\n\t}\n\treturn S(i.left, i.top, s, c);\n}\nvar v = (function() {\n\treturn typeof SVGGraphicsElement < \"u\" ? function(e) {\n\t\treturn e instanceof d(e).SVGGraphicsElement;\n\t} : function(e) {\n\t\treturn e instanceof d(e).SVGElement && typeof e.getBBox == \"function\";\n\t};\n})();\nfunction y(e) {\n\treturn e === d(e).document.documentElement;\n}\nfunction b(e) {\n\treturn t ? v(e) ? g(e) : _(e) : f;\n}\nfunction x(e) {\n\tvar t = e.x, n = e.y, r = e.width, i = e.height, a = Object.create((typeof DOMRectReadOnly < \"u\" ? DOMRectReadOnly : Object).prototype);\n\treturn u(a, {\n\t\tx: t,\n\t\ty: n,\n\t\twidth: r,\n\t\theight: i,\n\t\ttop: n,\n\t\tright: t + r,\n\t\tbottom: i + n,\n\t\tleft: t\n\t}), a;\n}\nfunction S(e, t, n, r) {\n\treturn {\n\t\tx: e,\n\t\ty: t,\n\t\twidth: n,\n\t\theight: r\n\t};\n}\nvar C = function() {\n\tfunction e(e) {\n\t\tthis.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ = S(0, 0, 0, 0), this.target = e;\n\t}\n\treturn e.prototype.isActive = function() {\n\t\tvar e = b(this.target);\n\t\treturn this.contentRect_ = e, e.width !== this.broadcastWidth || e.height !== this.broadcastHeight;\n\t}, e.prototype.broadcastRect = function() {\n\t\tvar e = this.contentRect_;\n\t\treturn this.broadcastWidth = e.width, this.broadcastHeight = e.height, e;\n\t}, e;\n}(), w = function() {\n\tfunction e(e, t) {\n\t\tvar n = x(t);\n\t\tu(this, {\n\t\t\ttarget: e,\n\t\t\tcontentRect: n\n\t\t});\n\t}\n\treturn e;\n}(), T = function() {\n\tfunction t(t, n, r) {\n\t\tif (this.activeObservations_ = [], this.observations_ = new e(), typeof t != \"function\") throw TypeError(\"The callback provided as parameter 1 is not a function.\");\n\t\tthis.callback_ = t, this.controller_ = n, this.callbackCtx_ = r;\n\t}\n\treturn t.prototype.observe = function(e) {\n\t\tif (!arguments.length) throw TypeError(\"1 argument required, but only 0 present.\");\n\t\tif (!(typeof Element > \"u\" || !(Element instanceof Object))) {\n\t\t\tif (!(e instanceof d(e).Element)) throw TypeError(\"parameter 1 is not of type \\\"Element\\\".\");\n\t\t\tvar t = this.observations_;\n\t\t\tt.has(e) || (t.set(e, new C(e)), this.controller_.addObserver(this), this.controller_.refresh());\n\t\t}\n\t}, t.prototype.unobserve = function(e) {\n\t\tif (!arguments.length) throw TypeError(\"1 argument required, but only 0 present.\");\n\t\tif (!(typeof Element > \"u\" || !(Element instanceof Object))) {\n\t\t\tif (!(e instanceof d(e).Element)) throw TypeError(\"parameter 1 is not of type \\\"Element\\\".\");\n\t\t\tvar t = this.observations_;\n\t\t\tt.has(e) && (t.delete(e), t.size || this.controller_.removeObserver(this));\n\t\t}\n\t}, t.prototype.disconnect = function() {\n\t\tthis.clearActive(), this.observations_.clear(), this.controller_.removeObserver(this);\n\t}, t.prototype.gatherActive = function() {\n\t\tvar e = this;\n\t\tthis.clearActive(), this.observations_.forEach(function(t) {\n\t\t\tt.isActive() && e.activeObservations_.push(t);\n\t\t});\n\t}, t.prototype.broadcastActive = function() {\n\t\tif (this.hasActive()) {\n\t\t\tvar e = this.callbackCtx_, t = this.activeObservations_.map(function(e) {\n\t\t\t\treturn new w(e.target, e.broadcastRect());\n\t\t\t});\n\t\t\tthis.callback_.call(e, t, e), this.clearActive();\n\t\t}\n\t}, t.prototype.clearActive = function() {\n\t\tthis.activeObservations_.splice(0);\n\t}, t.prototype.hasActive = function() {\n\t\treturn this.activeObservations_.length > 0;\n\t}, t;\n}(), E = typeof WeakMap < \"u\" ? /* @__PURE__ */ new WeakMap() : new e(), D = function() {\n\tfunction e(t) {\n\t\tif (!(this instanceof e)) throw TypeError(\"Cannot call a class as a function.\");\n\t\tif (!arguments.length) throw TypeError(\"1 argument required, but only 0 present.\");\n\t\tvar n = new T(t, l.getInstance(), this);\n\t\tE.set(this, n);\n\t}\n\treturn e;\n}();\n[\n\t\"observe\",\n\t\"unobserve\",\n\t\"disconnect\"\n].forEach(function(e) {\n\tD.prototype[e] = function() {\n\t\tvar t;\n\t\treturn (t = E.get(this))[e].apply(t, arguments);\n\t};\n});\nvar O = (function() {\n\treturn n.ResizeObserver === void 0 ? D : n.ResizeObserver;\n})();\n//#endregion\nexport { O as default };\n","import { _extends as e } from \"../../../../@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/extends.js\";\nimport { _objectWithoutPropertiesLoose as t } from \"../../../../@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js\";\nimport { _inheritsLoose as n } from \"../../../../@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js\";\nimport r from \"../../../../resize-observer-polyfill@1.5.1/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js\";\nimport { Component as i, createElement as a } from \"react\";\nimport o from \"prop-types\";\n//#region ../../../node_modules/.bun/react-measure@2.5.2+6dbf9a050bc9aadb/node_modules/react-measure/dist/index.esm.js\nvar s = [\n\t\"client\",\n\t\"offset\",\n\t\"scroll\",\n\t\"bounds\",\n\t\"margin\"\n];\nfunction c(e) {\n\tvar t = [];\n\treturn s.forEach(function(n) {\n\t\te[n] && t.push(n);\n\t}), t;\n}\nfunction l(e, t) {\n\tvar n = {};\n\tif (t.indexOf(\"client\") > -1 && (n.client = {\n\t\ttop: e.clientTop,\n\t\tleft: e.clientLeft,\n\t\twidth: e.clientWidth,\n\t\theight: e.clientHeight\n\t}), t.indexOf(\"offset\") > -1 && (n.offset = {\n\t\ttop: e.offsetTop,\n\t\tleft: e.offsetLeft,\n\t\twidth: e.offsetWidth,\n\t\theight: e.offsetHeight\n\t}), t.indexOf(\"scroll\") > -1 && (n.scroll = {\n\t\ttop: e.scrollTop,\n\t\tleft: e.scrollLeft,\n\t\twidth: e.scrollWidth,\n\t\theight: e.scrollHeight\n\t}), t.indexOf(\"bounds\") > -1) {\n\t\tvar r = e.getBoundingClientRect();\n\t\tn.bounds = {\n\t\t\ttop: r.top,\n\t\t\tright: r.right,\n\t\t\tbottom: r.bottom,\n\t\t\tleft: r.left,\n\t\t\twidth: r.width,\n\t\t\theight: r.height\n\t\t};\n\t}\n\tif (t.indexOf(\"margin\") > -1) {\n\t\tvar i = getComputedStyle(e);\n\t\tn.margin = {\n\t\t\ttop: i ? parseInt(i.marginTop) : 0,\n\t\t\tright: i ? parseInt(i.marginRight) : 0,\n\t\t\tbottom: i ? parseInt(i.marginBottom) : 0,\n\t\t\tleft: i ? parseInt(i.marginLeft) : 0\n\t\t};\n\t}\n\treturn n;\n}\nfunction u(e) {\n\treturn e && e.ownerDocument && e.ownerDocument.defaultView || window;\n}\nfunction d(s) {\n\treturn function(d) {\n\t\tvar f, p;\n\t\treturn p = f = /*#__PURE__*/ function(i) {\n\t\t\tn(o, i);\n\t\t\tfunction o() {\n\t\t\t\tvar e, t = [...arguments];\n\t\t\t\treturn e = i.call.apply(i, [this].concat(t)) || this, e.state = { contentRect: {\n\t\t\t\t\tentry: {},\n\t\t\t\t\tclient: {},\n\t\t\t\t\toffset: {},\n\t\t\t\t\tscroll: {},\n\t\t\t\t\tbounds: {},\n\t\t\t\t\tmargin: {}\n\t\t\t\t} }, e._animationFrameID = null, e._resizeObserver = null, e._node = null, e._window = null, e.measure = function(t) {\n\t\t\t\t\tvar n = l(e._node, s || c(e.props));\n\t\t\t\t\tt && (n.entry = t[0].contentRect), e._animationFrameID = e._window.requestAnimationFrame(function() {\n\t\t\t\t\t\te._resizeObserver !== null && (e.setState({ contentRect: n }), typeof e.props.onResize == \"function\" && e.props.onResize(n));\n\t\t\t\t\t});\n\t\t\t\t}, e._handleRef = function(t) {\n\t\t\t\t\te._resizeObserver !== null && e._node !== null && e._resizeObserver.unobserve(e._node), e._node = t, e._window = u(e._node);\n\t\t\t\t\tvar n = e.props.innerRef;\n\t\t\t\t\tn && (typeof n == \"function\" ? n(e._node) : n.current = e._node), e._resizeObserver !== null && e._node !== null && e._resizeObserver.observe(e._node);\n\t\t\t\t}, e;\n\t\t\t}\n\t\t\tvar f = o.prototype;\n\t\t\treturn f.componentDidMount = function() {\n\t\t\t\tthis._resizeObserver = this._window !== null && this._window.ResizeObserver ? new this._window.ResizeObserver(this.measure) : new r(this.measure), this._node !== null && (this._resizeObserver.observe(this._node), typeof this.props.onResize == \"function\" && this.props.onResize(l(this._node, s || c(this.props))));\n\t\t\t}, f.componentWillUnmount = function() {\n\t\t\t\tthis._window !== null && this._window.cancelAnimationFrame(this._animationFrameID), this._resizeObserver !== null && (this._resizeObserver.disconnect(), this._resizeObserver = null);\n\t\t\t}, f.render = function() {\n\t\t\t\tvar n = this.props;\n\t\t\t\treturn n.innerRef, n.onResize, a(d, e({}, t(n, [\"innerRef\", \"onResize\"]), {\n\t\t\t\t\tmeasureRef: this._handleRef,\n\t\t\t\t\tmeasure: this.measure,\n\t\t\t\t\tcontentRect: this.state.contentRect\n\t\t\t\t}));\n\t\t\t}, o;\n\t\t}(i), f.propTypes = {\n\t\t\tclient: o.bool,\n\t\t\toffset: o.bool,\n\t\t\tscroll: o.bool,\n\t\t\tbounds: o.bool,\n\t\t\tmargin: o.bool,\n\t\t\tinnerRef: o.oneOfType([o.object, o.func]),\n\t\t\tonResize: o.func\n\t\t}, p;\n\t};\n}\nvar f = d()(function(e) {\n\tvar t = e.measure, n = e.measureRef, r = e.contentRect, i = e.children;\n\treturn i({\n\t\tmeasure: t,\n\t\tmeasureRef: n,\n\t\tcontentRect: r\n\t});\n});\nf.displayName = \"Measure\", f.propTypes.children = o.func;\n//#endregion\nexport { f as default, d as withContentRect };\n","import e from \"react\";\nimport t from \"prop-types\";\nimport { styled as n } from \"@mui/material/styles\";\nimport { jsx as r } from \"react/jsx-runtime\";\n//#region src/layout/settings-box.tsx\nvar i = n(\"div\")(({ theme: e }) => ({\n\tbackgroundColor: e.palette.background.paper,\n\tborder: `2px solid ${e.palette.grey[200]}`,\n\tdisplay: \"flex\",\n\tflexDirection: \"column\",\n\tjustifyContent: \"flex-start\",\n\tminWidth: \"275px\",\n\tmaxWidth: \"300px\",\n\tpadding: \"20px 4px 4px 20px\",\n\tzIndex: 99\n})), a = class extends e.Component {\n\tstatic propTypes = {\n\t\tclassName: t.string,\n\t\tchildren: t.oneOfType([t.arrayOf(t.node), t.node]).isRequired\n\t};\n\tstatic defaultProps = {};\n\trender() {\n\t\tlet { className: e, children: t } = this.props;\n\t\treturn /* @__PURE__ */ r(i, {\n\t\t\tclassName: e,\n\t\t\tchildren: t\n\t\t});\n\t}\n};\n//#endregion\nexport { a as default };\n","import e, { withContentRect as t } from \"../node_modules/.bun/react-measure@2.5.2_6dbf9a050bc9aadb/node_modules/react-measure/dist/index.esm.js\";\nimport n from \"./layout-contents.js\";\nimport r from \"./settings-box.js\";\nimport i from \"react\";\nimport a from \"prop-types\";\nimport { StyledEngineProvider as o, ThemeProvider as s, createTheme as c } from \"@mui/material/styles\";\nimport { jsx as l, jsxs as u } from \"react/jsx-runtime\";\n//#region src/layout/config-layout.tsx\nvar d = c({\n\ttypography: { fontFamily: \"inherit\" },\n\tcomponents: { MuiButton: { styleOverrides: { contained: {\n\t\tbackgroundColor: \"#e0e0e0\",\n\t\tcolor: \"#000000\",\n\t\t\"&:hover\": { backgroundColor: \"#bdbdbd\" }\n\t} } } }\n}), f = class extends i.Component {\n\tstatic propTypes = {\n\t\tchildren: a.oneOfType([\n\t\t\ta.string,\n\t\t\ta.arrayOf(a.element),\n\t\t\ta.element\n\t\t]),\n\t\tclassName: a.string,\n\t\tdimensions: a.object,\n\t\tsettings: a.element,\n\t\tsidePanelMinWidth: a.number,\n\t\thideSettings: a.bool,\n\t\textraCSSRules: a.shape({\n\t\t\tnames: a.arrayOf(a.string),\n\t\t\trules: a.string\n\t\t})\n\t};\n\tstatic defaultProps = {\n\t\tsidePanelMinWidth: 1135,\n\t\thideSettings: !1,\n\t\tdimensions: {}\n\t};\n\tconstructor(...e) {\n\t\tsuper(...e), this.state = { layoutMode: void 0 };\n\t}\n\tonResize = (e) => {\n\t\tlet { bounds: t } = e, { sidePanelMinWidth: n, dimensions: r } = this.props, { maxWidth: i } = r || {}, a = t.width > n && (!i || i > n) ? \"inline\" : \"tabbed\";\n\t\ta !== this.state.layoutMode && this.setState({ layoutMode: a });\n\t};\n\trender() {\n\t\treturn /* @__PURE__ */ l(o, {\n\t\t\tinjectFirst: !0,\n\t\t\tchildren: /* @__PURE__ */ l(s, {\n\t\t\t\ttheme: d,\n\t\t\t\tchildren: /* @__PURE__ */ l(e, {\n\t\t\t\t\tbounds: !0,\n\t\t\t\t\tonResize: this.onResize,\n\t\t\t\t\tchildren: ({ measureRef: e }) => {\n\t\t\t\t\t\tlet { children: t, settings: i, hideSettings: a, dimensions: o, extraCSSRules: s } = this.props, { layoutMode: c } = this.state, d = a ? null : c === \"inline\" ? /* @__PURE__ */ l(r, {\n\t\t\t\t\t\t\tclassName: \"settings-box\",\n\t\t\t\t\t\t\tchildren: i\n\t\t\t\t\t\t}) : i;\n\t\t\t\t\t\treturn /* @__PURE__ */ u(\"div\", {\n\t\t\t\t\t\t\tref: e,\n\t\t\t\t\t\t\tclassName: \"main-container extraCSSRules\",\n\t\t\t\t\t\t\tchildren: [s?.rules ? /* @__PURE__ */ l(\"style\", { dangerouslySetInnerHTML: { __html: `.extraCSSRules { ${s.rules} }` } }) : null, /* @__PURE__ */ l(n, {\n\t\t\t\t\t\t\t\tmode: c,\n\t\t\t\t\t\t\t\tsecondary: d,\n\t\t\t\t\t\t\t\tdimensions: o,\n\t\t\t\t\t\t\t\tchildren: t\n\t\t\t\t\t\t\t})]\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t})\n\t\t});\n\t}\n}, p = t(\"bounds\")(f);\n//#endregion\nexport { p as default };\n","import { __exportAll as e } from \"../_virtual/_rolldown/runtime.js\";\nimport t from \"./layout-contents.js\";\nimport n from \"./config-layout.js\";\n//#region src/layout/index.ts\nvar r = /* @__PURE__ */ e({\n\tConfigLayout: () => n,\n\tLayoutContents: () => t\n});\n//#endregion\nexport { r as layout_exports };\n","import \"react\";\nimport e from \"prop-types\";\nimport { styled as t } from \"@mui/material/styles\";\nimport { jsx as n, jsxs as r } from \"react/jsx-runtime\";\nimport { color as i } from \"@pie-lib/render-ui\";\nimport a from \"@mui/material/Switch\";\nimport o from \"@mui/material/InputLabel\";\n//#region src/settings/toggle.tsx\nvar s = t(\"div\")(() => ({\n\tdisplay: \"flex\",\n\twidth: \"100%\",\n\tjustifyContent: \"space-between\"\n})), c = t(o)(({ theme: e }) => ({\n\tcolor: \"rgba(0, 0, 0, 0.89)\",\n\tfontSize: e.typography.fontSize,\n\tpaddingTop: e.spacing(2)\n})), l = t(a)(({ checked: e }) => ({\n\t\"&.Mui-checked .MuiSwitch-thumb\": { color: `${i.tertiary()} !important` },\n\t\"&.Mui-checked .MuiSwitch-track\": { backgroundColor: `${i.tertiaryLight()} !important` },\n\t\"& .MuiSwitch-track\": { backgroundColor: e ? `${i.tertiaryLight()} !important` : void 0 }\n})), u = ({ checked: e, disabled: t, label: i, toggle: a }) => /* @__PURE__ */ r(s, { children: [/* @__PURE__ */ n(c, { children: i }), /* @__PURE__ */ n(l, {\n\tchecked: e,\n\tdisabled: t,\n\tonChange: (e) => a(e.target.checked)\n})] });\nu.propTypes = {\n\tchecked: e.bool,\n\tdisabled: e.bool,\n\tlabel: e.string.isRequired,\n\ttoggle: e.func.isRequired\n};\n//#endregion\nexport { u as default };\n","import \"react\";\nimport e from \"prop-types\";\nimport { styled as t } from \"@mui/material/styles\";\nimport { jsx as n } from \"react/jsx-runtime\";\nimport { color as r } from \"@pie-lib/render-ui\";\nimport i from \"@mui/material/FormControlLabel\";\nimport a from \"@mui/material/Radio\";\n//#region src/settings/settings-radio-label.tsx\nvar o = t(i)(({ theme: e }) => ({ \"& .MuiFormControlLabel-label\": {\n\tcolor: \"rgba(0, 0, 0, 0.89)\",\n\tfontSize: e.typography.fontSize - 2,\n\tleft: \"-5px\",\n\tposition: \"relative\"\n} })), s = t(a)(() => ({ color: `${r.tertiary()} !important` })), c = ({ label: e, value: t, checked: r, onChange: i }) => /* @__PURE__ */ n(o, {\n\tvalue: t,\n\tcontrol: /* @__PURE__ */ n(s, {\n\t\tchecked: r,\n\t\tonChange: i\n\t}),\n\tlabel: e\n});\nc.propTypes = {\n\tlabel: e.string,\n\tvalue: e.string,\n\tchecked: e.bool,\n\tonChange: e.func\n};\n//#endregion\nexport { c as default };\n","import e from \"../checkbox.js\";\nimport t from \"../number-text-field.js\";\nimport { NChoice as n } from \"../two-choice.js\";\nimport r from \"./toggle.js\";\nimport i from \"./settings-radio-label.js\";\nimport a from \"react\";\nimport o from \"prop-types\";\nimport { styled as s } from \"@mui/material/styles\";\nimport { jsx as c, jsxs as l } from \"react/jsx-runtime\";\nimport { get as u, set as d } from \"lodash-es\";\nimport f from \"@mui/material/Typography\";\nimport p from \"@mui/material/Input\";\nimport m from \"@mui/material/Select\";\nimport h from \"@mui/material/MenuItem\";\nimport g from \"debug\";\n//#region src/settings/panel.tsx\nvar _ = g(\"pie-lib:config-ui:settings:panel\"), v = {\n\tlabel: o.string,\n\tvalue: o.string\n}, y = {\n\tlabel: o.string,\n\tvalue: o.string,\n\tonChange: o.func\n}, b = ({ label: t, value: n, onChange: r }) => /* @__PURE__ */ c(e, {\n\tchecked: n,\n\tlabel: t,\n\tonChange: (e) => {\n\t\tr(e.target.checked);\n\t}\n});\nb.propTypes = {\n\tlabel: o.string,\n\tvalue: o.bool,\n\tonChange: o.func\n};\nvar x = s(n)(({ theme: e }) => ({\n\tmarginTop: e.spacing(.5),\n\tpaddingBottom: e.spacing(.5),\n\twidth: \"100%\",\n\t\"& > label\": {\n\t\tcolor: \"rgba(0, 0, 0, 0.89)\",\n\t\ttransform: \"translate(0, 10px) scale(1)\",\n\t\tfontSize: \"18px\",\n\t\tmarginTop: e.spacing(2.5)\n\t},\n\t\"& > div\": { marginTop: e.spacing(2.5) }\n})), S = ({ label: e, value: t, onChange: n, choices: r }) => /* @__PURE__ */ c(x, {\n\tdirection: \"horizontal\",\n\tcustomLabel: i,\n\tvalue: t,\n\theader: e,\n\topts: r,\n\tonChange: n\n});\nS.propTypes = {\n\t...y,\n\tchoices: o.arrayOf(o.shape(v))\n};\nvar C = S, w = s(\"p\")(({ theme: e }) => ({\n\tmargin: 0,\n\tfontSize: e.typography.fontSize\n})), T = s(m)(({ theme: e }) => ({\n\tmarginTop: e.spacing(.5),\n\tborder: \"2px solid lightgrey\",\n\tpadding: `0 ${e.spacing(1)}`,\n\tborderRadius: \"4px\"\n})), E = ({ label: e, value: t, onChange: n, choices: r = [] }) => {\n\tlet i = (e) => typeof e == \"string\" ? e : e.label, a = (e) => typeof e == \"string\" ? e : e.value;\n\treturn /* @__PURE__ */ l(\"div\", { children: [e && /* @__PURE__ */ c(w, { children: e }), /* @__PURE__ */ c(T, {\n\t\tvalue: t || r && r[0],\n\t\tonChange: ({ target: e }) => n(e.value),\n\t\tinput: /* @__PURE__ */ c(p, { id: `dropdown-${e}` }),\n\t\tdisableUnderline: !0,\n\t\tMenuProps: { transitionDuration: {\n\t\t\tenter: 225,\n\t\t\texit: 195\n\t\t} },\n\t\tchildren: r.map((e, t) => /* @__PURE__ */ c(h, {\n\t\t\tvalue: a(e),\n\t\t\tchildren: i(e)\n\t\t}, t))\n\t})] });\n};\nE.propTypes = {\n\t...y,\n\tchoices: o.arrayOf(o.string)\n};\nvar D = s(f)(({ theme: e }) => ({\n\tmarginRight: e.spacing(3),\n\tmarginTop: e.spacing(1)\n})), O = ({ label: e }) => /* @__PURE__ */ c(D, { children: e }), k = s(t)(({ theme: e }) => ({\n\twidth: \"35%\",\n\tmarginRight: e.spacing(3),\n\tmarginTop: e.spacing(1),\n\t\"& .MuiInputBase-root\": {\n\t\tmarginTop: e.spacing(.5),\n\t\tborder: \"2px solid lightgrey\",\n\t\tborderRadius: \"4px\",\n\t\tpadding: `0 ${e.spacing(1)}`,\n\t\tbackgroundColor: \"transparent\"\n\t}\n})), A = ({ label: e, value: t, onChange: n = () => {}, suffix: r, min: i, max: a }) => /* @__PURE__ */ c(k, {\n\tvariant: \"standard\",\n\tlabel: e || \"Label\",\n\tvalue: t,\n\tmax: a,\n\tmin: i,\n\tonChange: (e, t) => n(t),\n\tsuffix: r,\n\tshowErrorWhenOutsideRange: !0,\n\tdisableUnderline: !0\n});\nA.propTypes = {\n\t...y,\n\tsuffix: o.string,\n\tmin: o.number,\n\tmax: o.number,\n\tvalue: o.number\n}, O.propTypes = { ...y };\nvar j = ({ disabled: e, label: t, value: n, onChange: i }) => /* @__PURE__ */ c(r, {\n\tlabel: t,\n\tchecked: !!n,\n\tdisabled: !!e,\n\ttoggle: i\n});\nj.propTypes = {\n\t...y,\n\tvalue: o.bool\n};\nvar M = {\n\ttoggle: j,\n\tradio: C,\n\tdropdown: E,\n\tnumberField: A,\n\tcheckbox: b,\n\ttextField: O\n}, N = s(\"div\")(({ theme: e }) => ({ margin: `0 0 ${e.spacing(2)} 0` })), P = s(\"div\")(({ theme: e }) => ({\n\tcolor: \"#495B8F\",\n\tfontSize: e.typography.fontSize + 2,\n\tfontWeight: 600,\n\tmarginBottom: e.spacing(1)\n})), F = s(\"p\")(({ theme: e }) => ({\n\tfontSize: e.typography.fontSize,\n\tmarginBottom: 0\n})), I = (e) => {\n\tlet { model: t, label: n, group: r, configuration: i, onChange: a } = e, o = (e, n, r) => {\n\t\tlet { isConfigProperty: o, ...s } = u(e, r || n), l = u(o ? i : t, n), d = {\n\t\t\t...s,\n\t\t\tkey: n,\n\t\t\tvalue: l\n\t\t}, f = M[d.type];\n\t\treturn /* @__PURE__ */ c(f, {\n\t\t\t...d,\n\t\t\tonChange: (e) => a(n, e, o)\n\t\t}, n);\n\t}, s = (e, t) => {\n\t\tlet n = e[t];\n\t\tif (!n) return null;\n\t\tlet { type: r, label: i, fields: a, choices: s } = n;\n\t\treturn r === \"numberFields\" ? /* @__PURE__ */ l(\"div\", { children: [/* @__PURE__ */ c(F, { children: i }), Object.keys(a).map((n) => o(e, `${t}.${n}`, `${t}.fields.${n}`))] }, `numberField-${i}`) : r === \"checkboxes\" ? /* @__PURE__ */ l(\"div\", { children: [/* @__PURE__ */ c(\"p\", { children: i }), Object.keys(s).map((n) => o(e, `${t}.${n}`, `${t}.choices.${n}`))] }, `checkbox-${i}`) : o(e, t);\n\t};\n\treturn /* @__PURE__ */ l(N, { children: [/* @__PURE__ */ c(P, { children: n }), Object.keys(r).map((e) => s(r, e))] });\n};\nI.propTypes = {\n\tmodel: o.object,\n\tlabel: o.string,\n\tgroup: o.object,\n\tconfiguration: o.object,\n\tonChange: o.func\n};\nvar L = class extends a.Component {\n\tstatic propTypes = {\n\t\tmodel: o.object,\n\t\tconfiguration: o.object,\n\t\tgroups: o.object,\n\t\tonChangeModel: o.func,\n\t\tonChangeConfiguration: o.func,\n\t\tmodal: o.object\n\t};\n\tstatic defaultProps = {\n\t\tonChangeModel: () => {},\n\t\tonChangeConfiguration: () => {}\n\t};\n\tchange = (e, t, n = !1) => {\n\t\t_(\"[changeModel]\", e, t);\n\t\tlet { onChangeModel: r, onChangeConfiguration: i } = this.props, a = { ...this.props.model }, o = { ...this.props.configuration };\n\t\tn ? (d(o, e, t), i(o, e)) : (d(a, e, t), r(a, e));\n\t};\n\trender() {\n\t\tlet { groups: e, model: t, configuration: n, modal: r } = this.props;\n\t\treturn _(\"render:\", t), /* @__PURE__ */ l(\"div\", { children: [Object.keys(e || {}).map((r) => Object.entries(e[r]).some(([, e]) => !!e) ? /* @__PURE__ */ c(I, {\n\t\t\tlabel: r,\n\t\t\tmodel: t,\n\t\t\tconfiguration: n,\n\t\t\tgroup: e[r],\n\t\t\tonChange: this.change\n\t\t}, r) : null), r] });\n\t}\n};\n//#endregion\nexport { L as default };\n","import { __exportAll as e } from \"../_virtual/_rolldown/runtime.js\";\nimport t from \"./panel.js\";\n//#region src/settings/index.ts\nvar n = /* @__PURE__ */ e({\n\tPanel: () => t,\n\tcheckbox: () => u,\n\tcheckboxes: () => d,\n\tdropdown: () => s,\n\tnumberField: () => c,\n\tnumberFields: () => l,\n\tradio: () => o,\n\ttextField: () => r,\n\ttoggle: () => i\n}), r = (e, t = !0) => ({\n\tlabel: e,\n\ttype: \"textField\",\n\tisConfigProperty: t\n}), i = (e, t = !1, n = !1) => ({\n\ttype: \"toggle\",\n\tlabel: e,\n\tisConfigProperty: t,\n\tdisabled: n\n}), a = (e) => typeof e == \"string\" ? {\n\tlabel: e,\n\tvalue: e\n} : e, o = function() {\n\tlet [e, t, n = !1] = Array.prototype.slice.call(arguments);\n\treturn {\n\t\ttype: \"radio\",\n\t\tlabel: e,\n\t\tchoices: t && t.map((e) => a(e)),\n\t\tisConfigProperty: n\n\t};\n}, s = (e, t, n = !1) => ({\n\ttype: \"dropdown\",\n\tlabel: e,\n\tchoices: t,\n\tisConfigProperty: n\n}), c = (e, t, n = !1) => ({\n\t...t,\n\tlabel: e,\n\ttype: \"numberField\",\n\tisConfigProperty: n\n}), l = (e, t, n = !1) => (Object.keys(t).map((e) => {\n\tt[e] = c(t[e].label, t[e], n);\n}), {\n\ttype: \"numberFields\",\n\tlabel: e,\n\tfields: t\n}), u = (e, t, n = !1) => ({\n\t...t,\n\tlabel: e,\n\ttype: \"checkbox\",\n\tisConfigProperty: n\n}), d = (e, t, n = !1) => (Object.keys(t).map((e) => {\n\tt[e] = u(t[e].label, t[e], n);\n}), {\n\ttype: \"checkboxes\",\n\tlabel: e,\n\tchoices: t\n});\n//#endregion\nexport { n as settings_exports };\n","import e from \"./alert-dialog.js\";\nimport t from \"./feedback-config/feedback-selector.js\";\nimport n, { buildDefaults as r } from \"./feedback-config/index.js\";\nimport { InputCheckbox as i, InputRadio as a, InputSwitch as o } from \"./inputs.js\";\nimport s, { LanguageControls as c } from \"./langs.js\";\nimport l from \"./tabs/index.js\";\nimport u from \"./checkbox.js\";\nimport d from \"./form-section.js\";\nimport f from \"./help.js\";\nimport p from \"./input.js\";\nimport m from \"./number-text-field.js\";\nimport h from \"./number-text-field-custom.js\";\nimport g, { NChoice as _ } from \"./two-choice.js\";\nimport v from \"./mui-box/index.js\";\nimport y from \"./tags-input/index.js\";\nimport b from \"./choice-configuration/index.js\";\nimport { layout_exports as x } from \"./layout/index.js\";\nimport { choice_utils_exports as S } from \"./choice-utils.js\";\nimport C from \"./with-stateful-model.js\";\nimport w from \"./settings/toggle.js\";\nimport T from \"./settings/display-size.js\";\nimport { settings_exports as E } from \"./settings/index.js\";\nimport * as D from \"@pie-lib/render-ui\";\nimport { InputContainer as O } from \"@pie-lib/render-ui\";\n//#region src/index.ts\nfunction k(e) {\n\treturn typeof e == \"function\" || typeof e == \"object\" && !!e && typeof e.$$typeof == \"symbol\";\n}\nfunction A(e, t) {\n\treturn !e || k(e) ? e : k(e.default) ? e.default : t && k(e[t]) ? e[t] : t && k(e[t]?.default) ? e[t].default : e;\n}\nvar j = A(O, \"InputContainer\") || A(P.InputContainer, \"InputContainer\"), M = D, N = M.default, P = N && typeof N == \"object\" ? N : M;\n//#endregion\nexport { e as AlertDialog, u as Checkbox, b as ChoiceConfiguration, T as DisplaySize, n as FeedbackConfig, t as FeedbackSelector, d as FormSection, f as Help, p as Input, i as InputCheckbox, j as InputContainer, a as InputRadio, o as InputSwitch, s as Langs, c as LanguageControls, v as MuiBox, _ as NChoice, m as NumberTextField, h as NumberTextFieldCustom, l as Tabs, y as TagsInput, w as Toggle, g as TwoChoice, S as choiceUtils, r as feedbackConfigDefaults, x as layout, E as settings, C as withStatefulModel };\n","import \"react\";\nimport e from \"prop-types\";\nimport { styled as t } from \"@mui/material/styles\";\nimport { Fragment as n, jsx as r, jsxs as i } from \"react/jsx-runtime\";\nimport * as a from \"@pie-lib/render-ui\";\nimport { InputContainer as o, color as s } from \"@pie-lib/render-ui\";\nimport c from \"@pie-lib/editable-html-tip-tap\";\nimport { Accordion as l, AccordionDetails as u, AccordionSummary as d, Typography as f } from \"@mui/material\";\nimport p from \"@mui/icons-material/ExpandMore\";\nimport { NumberTextFieldCustom as m, Toggle as h } from \"@pie-lib/config-ui\";\n//#region src/grid-setup.tsx\nfunction g(e) {\n\treturn typeof e == \"function\" || typeof e == \"object\" && !!e && typeof e.$$typeof == \"symbol\";\n}\nfunction _(e, t) {\n\treturn !e || g(e) ? e : g(e.default) ? e.default : t && g(e[t]) ? e[t] : t && g(e[t]?.default) ? e[t].default : e;\n}\nvar v = _(o, \"InputContainer\") || _(x.InputContainer, \"InputContainer\"), y = a, b = y.default, x = b && typeof b == \"object\" ? b : y, S = t(\"div\")(() => ({ width: \"450px\" })), C = t(\"div\")(() => ({\n\tdisplay: \"flex\",\n\tflexDirection: \"column\",\n\twidth: \"100%\"\n})), w = t(\"div\")(() => ({\n\tdisplay: \"flex\",\n\tflexDirection: \"column\",\n\talignItems: \"center\"\n})), T = t(\"div\")(() => ({\n\tdisplay: \"flex\",\n\tjustifyContent: \"space-around\",\n\talignItems: \"center\"\n})), E = t(\"div\")(({ theme: e }) => ({\n\twidth: \"130px\",\n\tmargin: `${e.spacing(1)} ${e.spacing(.5)}`\n})), D = t(\"div\")(({ theme: e }) => ({\n\twidth: \"160px\",\n\tmargin: `${e.spacing(1)} ${e.spacing(.5)}`,\n\t\"& .MuiFormControl-root\": { width: \"100%\" }\n})), O = t(\"div\")(({ theme: e }) => ({\n\twidth: \"230px\",\n\tmargin: `${e.spacing(1)} ${e.spacing(.5)}`,\n\t\"& .MuiFormControl-root\": { width: \"100%\" }\n})), k = t(f)(({ theme: e }) => ({\n\tfontStyle: \"italic\",\n\tmargin: `${e.spacing(1)} 0`\n})), A = t(\"div\")(() => ({\n\tdisplay: \"flex\",\n\tjustifyContent: \"space-between\",\n\talignItems: \"center\"\n})), j = t(f)(() => ({ color: s.disabled() })), M = t(\"div\")(({ theme: e }) => ({ paddingTop: e.spacing(2) })), N = (e) => {\n\tlet { disabled: t, displayedFields: n, labelValue: a, labelValues: o, gridValue: s, gridValues: c, onChange: l } = e, { labelStep: u = {}, step: d = {} } = n;\n\treturn /* @__PURE__ */ i(w, { children: [d && d.enabled && /* @__PURE__ */ r(D, { children: /* @__PURE__ */ r(m, {\n\t\tlabel: d.label || \"\",\n\t\tvalue: s,\n\t\tcustomValues: c,\n\t\tvariant: \"outlined\",\n\t\tdisabled: t,\n\t\tonChange: (e, t) => l(\"step\", t)\n\t}) }), u && u.enabled && /* @__PURE__ */ r(D, { children: /* @__PURE__ */ r(m, {\n\t\tlabel: u.label || \"\",\n\t\tvalue: a,\n\t\tcustomValues: o,\n\t\tvariant: \"outlined\",\n\t\tdisabled: t,\n\t\tonChange: (e, t) => l(\"labelStep\", t)\n\t}) })] });\n};\nN.propTypes = {\n\tdisabled: e.bool,\n\tdisplayedFields: e.object,\n\tlabelValue: e.number,\n\tlabelValues: e.array,\n\tgridValue: e.number,\n\tgridValues: e.array,\n\tonChange: e.func\n};\nvar P = (e) => {\n\tlet { disabled: t, displayedFields: n, displayHeader: a, label: o, maxValue: s, minValue: l, onChange: u, type: d } = e, { axisLabel: p = {}, min: h = {}, max: g = {} } = n;\n\treturn /* @__PURE__ */ i(w, { children: [\n\t\ta && /* @__PURE__ */ i(f, {\n\t\t\tvariant: \"subtitle2\",\n\t\t\tchildren: [/* @__PURE__ */ r(\"i\", { children: d === \"domain\" ? \"x\" : \"y\" }), \"-axis\"]\n\t\t}),\n\t\th && h.enabled && /* @__PURE__ */ r(D, { children: /* @__PURE__ */ r(m, {\n\t\t\tlabel: h.label || \"\",\n\t\t\tvalue: l,\n\t\t\tmin: -1e4,\n\t\t\tmax: s - .05,\n\t\t\tvariant: \"outlined\",\n\t\t\tdisabled: t,\n\t\t\tonChange: (e, t) => u(\"min\", t)\n\t\t}) }),\n\t\tg && g.enabled && /* @__PURE__ */ r(D, { children: /* @__PURE__ */ r(m, {\n\t\t\tlabel: g.label || \"\",\n\t\t\tvalue: s,\n\t\t\tmin: l + .05,\n\t\t\tmax: 1e4,\n\t\t\tvariant: \"outlined\",\n\t\t\tdisabled: t,\n\t\t\tonChange: (e, t) => u(\"max\", t)\n\t\t}) }),\n\t\tp && p.enabled && /* @__PURE__ */ r(D, { children: /* @__PURE__ */ r(v, {\n\t\t\tlabel: p.label || \"\",\n\t\t\tchildren: /* @__PURE__ */ r(M, { children: /* @__PURE__ */ r(c, {\n\t\t\t\tonChange: (e) => u(\"axisLabel\", e),\n\t\t\t\tmarkup: o || \"\",\n\t\t\t\tcharactersLimit: 5,\n\t\t\t\tonKeyDown: (e) => e.key === \"Enter\",\n\t\t\t\tactivePlugins: [\n\t\t\t\t\t\"bold\",\n\t\t\t\t\t\"italic\",\n\t\t\t\t\t\"underline\",\n\t\t\t\t\t\"strikethrough\"\n\t\t\t\t]\n\t\t\t}) })\n\t\t}) })\n\t] });\n};\nP.propTypes = {\n\tdisabled: e.bool,\n\tdisplayedFields: e.object,\n\tdisplayHeader: e.bool,\n\tlabel: e.string,\n\tmaxValue: e.number,\n\tminValue: e.number,\n\ttype: e.string,\n\tonChange: e.func\n};\nvar F = (e) => {\n\tlet { domain: t, displayedFields: a = {}, gridValues: o = {}, includeAxes: s, labelValues: c = {}, onChange: g, onChangeView: _, range: v, size: y, sizeConstraints: b, standardGrid: x } = e, D = {\n\t\tmin: 2,\n\t\tmax: 41\n\t}, { axisLabel: M = {}, dimensionsEnabled: F, includeAxesEnabled: I, labelStep: L = {}, min: R = {}, max: z = {}, standardGridEnabled: B, step: V = {} } = a || {}, H = R.enabled || z.enabled || M.enabled || V.enabled || L.enabled, U = {\n\t\tstep: V,\n\t\tlabelStep: L\n\t}, W = {\n\t\tmin: R,\n\t\tmax: z,\n\t\taxisLabel: M\n\t}, G = (e) => {\n\t\tlet n = (e) => {\n\t\t\tlet n = e === \"domain\" ? t : v;\n\t\t\treturn {\n\t\t\t\tmin: 1,\n\t\t\t\tmax: n.max < D.min || n.max > D.max ? 16 : n.max,\n\t\t\t\tstep: 1,\n\t\t\t\tlabelStep: 0\n\t\t\t};\n\t\t};\n\t\tg({\n\t\t\tincludeAxes: e,\n\t\t\trange: {\n\t\t\t\t...v,\n\t\t\t\t...e ? { labelStep: 1 } : n(\"range\")\n\t\t\t},\n\t\t\tdomain: {\n\t\t\t\t...t,\n\t\t\t\t...e ? { labelStep: 1 } : n(\"domain\")\n\t\t\t}\n\t\t});\n\t}, K = (e) => {\n\t\tg({\n\t\t\tstandardGrid: e,\n\t\t\trange: {\n\t\t\t\t...t,\n\t\t\t\taxisLabel: v.axisLabel\n\t\t\t},\n\t\t\tgraph: {\n\t\t\t\t...y,\n\t\t\t\theight: y.width\n\t\t\t}\n\t\t});\n\t}, q = (e, t) => {\n\t\tlet n = {\n\t\t\t...y,\n\t\t\t[e]: t\n\t\t};\n\t\tx && (n.height = t), g({ graph: n });\n\t}, J = (e, n) => {\n\t\tt[e] = n, x && e !== \"axisLabel\" && (v[e] = n), g({\n\t\t\tdomain: t,\n\t\t\trange: v\n\t\t});\n\t}, Y = (e, t) => {\n\t\tv[e] = t, g({ range: v });\n\t}, X = /* @__PURE__ */ i(n, { children: [\n\t\t/* @__PURE__ */ i(T, { children: [/* @__PURE__ */ r(P, {\n\t\t\tdisplayedFields: W,\n\t\t\tdisplayHeader: H,\n\t\t\ttype: \"domain\",\n\t\t\tminValue: t.min,\n\t\t\tmaxValue: t.max,\n\t\t\tlabel: t.axisLabel,\n\t\t\tincludeAxes: s,\n\t\t\tonChange: J\n\t\t}), /* @__PURE__ */ r(P, {\n\t\t\tdisplayedFields: W,\n\t\t\tdisplayHeader: H,\n\t\t\ttype: \"range\",\n\t\t\tminValue: v.min,\n\t\t\tmaxValue: v.max,\n\t\t\tlabel: v.axisLabel,\n\t\t\tdisabled: x,\n\t\t\tincludeAxes: s,\n\t\t\tonChange: Y\n\t\t})] }),\n\t\t(R.enabled || z.enabled) && /* @__PURE__ */ r(k, { children: \"If you want the axis to be visible, use a zero or negative Min Value, and a positive Max Value\" }),\n\t\t(V.enabled || L.enabled) && /* @__PURE__ */ i(T, { children: [/* @__PURE__ */ r(N, {\n\t\t\tdisplayedFields: U,\n\t\t\tgridValue: t.step,\n\t\t\tlabelValue: t.labelStep,\n\t\t\tgridValues: o.domain || [],\n\t\t\tlabelValues: c.domain || [],\n\t\t\tonChange: J\n\t\t}), /* @__PURE__ */ r(N, {\n\t\t\tdisabled: x,\n\t\t\tdisplayedFields: U,\n\t\t\tgridValue: v.step,\n\t\t\tlabelValue: v.labelStep,\n\t\t\tgridValues: o.range || [],\n\t\t\tlabelValues: c.range || [],\n\t\t\tonChange: Y\n\t\t})] }),\n\t\tL.enabled && /* @__PURE__ */ r(k, { children: \"For unnumbered gridlines, enter a label interval of 0\" })\n\t] }), Z = z.enabled ? /* @__PURE__ */ i(w, { children: [/* @__PURE__ */ r(O, { children: /* @__PURE__ */ r(m, {\n\t\tlabel: \"Number of Vertical Gridlines\",\n\t\tvalue: t.max,\n\t\tmin: !s && D.min,\n\t\tmax: !s && D.max,\n\t\tvariant: \"outlined\",\n\t\tonChange: (e, t) => J(\"max\", t)\n\t}) }), /* @__PURE__ */ r(O, { children: /* @__PURE__ */ r(m, {\n\t\tlabel: \"Number of Horizontal Gridlines\",\n\t\tvalue: v.max,\n\t\tmin: !s && D.min,\n\t\tmax: !s && D.max,\n\t\tvariant: \"outlined\",\n\t\tdisabled: x,\n\t\tonChange: (e, t) => Y(\"max\", t)\n\t}) })] }) : null;\n\treturn /* @__PURE__ */ r(S, { children: /* @__PURE__ */ i(l, {\n\t\tonChange: _,\n\t\tTransitionProps: { timeout: {\n\t\t\tenter: 225,\n\t\t\texit: 195\n\t\t} },\n\t\tchildren: [/* @__PURE__ */ r(d, {\n\t\t\texpandIcon: /* @__PURE__ */ r(p, {}),\n\t\t\tchildren: /* @__PURE__ */ r(f, {\n\t\t\t\tvariant: \"subtitle1\",\n\t\t\t\tchildren: \"Customize Grid Setup\"\n\t\t\t})\n\t\t}), /* @__PURE__ */ r(u, { children: /* @__PURE__ */ i(C, { children: [\n\t\t\tI && /* @__PURE__ */ r(h, {\n\t\t\t\tlabel: \"Include axes and labels?\",\n\t\t\t\ttoggle: G,\n\t\t\t\tchecked: s\n\t\t\t}),\n\t\t\tB && /* @__PURE__ */ r(h, {\n\t\t\t\tlabel: \"Constrain to standard coordinate grid?\",\n\t\t\t\ttoggle: K,\n\t\t\t\tchecked: x\n\t\t\t}),\n\t\t\ts ? X : Z,\n\t\t\tF && /* @__PURE__ */ i(A, { children: [\n\t\t\t\t/* @__PURE__ */ i(\"div\", { children: [/* @__PURE__ */ r(f, { children: \"Dimensions(px)\" }), /* @__PURE__ */ i(j, { children: [\n\t\t\t\t\t\"Min \",\n\t\t\t\t\tb.min,\n\t\t\t\t\t\", Max \",\n\t\t\t\t\tb.max\n\t\t\t\t] })] }),\n\t\t\t\t/* @__PURE__ */ r(E, { children: /* @__PURE__ */ r(m, {\n\t\t\t\t\tlabel: \"Width\",\n\t\t\t\t\tvalue: y.width,\n\t\t\t\t\tmin: b.min,\n\t\t\t\t\tmax: b.max,\n\t\t\t\t\tstep: b.step,\n\t\t\t\t\tvariant: \"outlined\",\n\t\t\t\t\tonChange: (e, t) => q(\"width\", t)\n\t\t\t\t}) }),\n\t\t\t\t/* @__PURE__ */ r(E, { children: /* @__PURE__ */ r(m, {\n\t\t\t\t\tlabel: \"Height\",\n\t\t\t\t\tvalue: y.height,\n\t\t\t\t\tmin: b.min,\n\t\t\t\t\tmax: b.max,\n\t\t\t\t\tstep: b.step,\n\t\t\t\t\tvariant: \"outlined\",\n\t\t\t\t\tdisabled: x,\n\t\t\t\t\tonChange: (e, t) => q(\"height\", t)\n\t\t\t\t}) })\n\t\t\t] })\n\t\t] }) })]\n\t}) });\n};\nF.propTypes = {\n\tdomain: e.object,\n\tdisplayedFields: e.object,\n\tgridValues: e.object,\n\tincludeAxes: e.bool,\n\tlabelValues: e.object,\n\tonChange: e.func,\n\tonChangeView: e.func,\n\trange: e.object,\n\tsize: e.object,\n\tsizeConstraints: e.object,\n\tstandardGrid: e.bool\n};\n//#endregion\nexport { F as default };\n","// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/graphing/configure/src/utils.js\n * @auto-generated\n *\n * This file is automatically synced from pie-elements and converted to TypeScript.\n * Manual edits will be overwritten on next sync.\n * To make changes, edit the upstream JavaScript file and run sync again.\n */\n\nimport { isEqual } from 'lodash-es';\n\nconst VALID_GRID_VALUES = [\n 0.01, 0.02, 0.04, 0.05, 0.0625, 0.1, 0.125, 0.2, 0.25, 0.5, 1, 2, 3, 4, 5, 8, 10, 12, 15, 20, 40, 50, 64, 100, 500,\n 1000,\n];\n\n// same as VALID_GRID_VALUES but next values are excluded: 0.04, 0.0625, 0.125, 3, 4, 8, 12, 15, 40, 64\nconst PREFERRED_VALID_GRID_VALUES = [0.01, 0.02, 0.05, 0.1, 0.2, 0.25, 0.5, 1, 2, 5, 10, 20, 50, 100, 500, 1000];\n\nexport const VALID_LABEL_VALUES = {\n 0.01: [0, 0.01, 0.02, 0.04, 0.05, 0.1],\n 0.02: [0, 0.02, 0.04, 0.1],\n 0.04: [0, 0.04, 0.08, 0.16, 0.2],\n 0.05: [0, 0.05, 0.1, 0.2, 0.25],\n 0.0625: [0, 0.0625, 0.125, 0.25, 0.5],\n 0.1: [0, 0.1, 0.2, 0.4, 0.5, 1],\n 0.125: [0, 0.125, 0.25, 0.5, 1],\n 0.2: [0, 0.2, 0.5, 0.1],\n 0.25: [0, 0.25, 0.5, 1, 2],\n 0.5: [0, 0.5, 1, 2],\n 1: [0, 1, 2, 4, 5, 10],\n 2: [0, 2, 4, 8, 10],\n 3: [0, 3, 6, 12, 15],\n 4: [0, 4, 8, 16, 20],\n 5: [0, 5, 10, 20, 25],\n 8: [0, 8, 16, 32, 40, 64],\n 10: [0, 10, 20, 40, 50, 100],\n 12: [0, 12, 24],\n 15: [0, 15, 30, 60],\n 20: [0, 20, 40, 80, 100],\n 40: [0, 40, 80, 160, 200],\n 50: [0, 50, 100, 200, 250],\n 64: [0, 64, 128],\n 100: [0, 100, 200, 400, 500],\n 500: [0, 500, 1000, 2500],\n 1000: [0, 1000, 2000, 4000, 5000],\n};\n\nexport const getGridValues = (axis, size, prefferedValues = false) => {\n const minValue = (10 * (axis.max - axis.min)) / size;\n const maxValue = minValue * 10;\n\n // if preferred values should be used enforce all values to be used if the axis step\n // is included in all supported values and not included in preferred values\n const useAllValues =\n prefferedValues && !PREFERRED_VALID_GRID_VALUES.includes(axis.step) && VALID_GRID_VALUES.includes(axis.step);\n const values = !prefferedValues || useAllValues ? VALID_GRID_VALUES : PREFERRED_VALID_GRID_VALUES;\n\n return values.filter((value) => value >= minValue && value <= maxValue);\n};\n\nexport const getLabelValues = (value) => VALID_LABEL_VALUES[value] || [];\n\nexport const applyConstraints = (axis, size, oldGridValues, oldLabelValues) => {\n const gridValues = getGridValues(axis, size);\n let labelValues = getLabelValues(axis.step);\n\n if (!isEqual(oldGridValues, gridValues) && !gridValues.includes(axis.step)) {\n const preferredValues = getGridValues(axis, size, true);\n const lowestValue = preferredValues[0] || 1;\n\n axis.step = lowestValue;\n labelValues = getLabelValues(lowestValue);\n\n if (!labelValues.includes(axis.labelStep)) {\n axis.labelStep = lowestValue;\n }\n\n return { gridValues, labelValues };\n }\n\n if (!isEqual(oldLabelValues, labelValues) && !labelValues.includes(axis.labelStep)) {\n axis.labelStep = axis.step;\n }\n\n return { gridValues, labelValues };\n};\n\n// also used in pie-lib/graphing/utils as 'getTickValues'\nconst getPlotablePoints = (prop) => {\n const tickValues = [];\n let tickVal = 0;\n\n while (tickVal >= prop.min && tickValues.indexOf(tickVal) < 0) {\n tickValues.push(tickVal);\n tickVal = Math.round((tickVal - prop.step) * 10000) / 10000;\n }\n\n tickVal = Math.round(prop.step * 10000) / 10000;\n\n while (tickVal <= prop.max && tickValues.indexOf(tickVal) < 0) {\n tickValues.push(tickVal);\n tickVal = Math.round((tickVal + prop.step) * 10000) / 10000;\n }\n\n // return only ticks that are inside the min-max interval\n if (tickValues) {\n return tickValues.filter((tV) => tV >= prop.min && tV <= prop.max);\n }\n\n return [];\n};\n\nexport const filterPlotableMarks = (domain, range, answers) => {\n const domainValues = getPlotablePoints(domain);\n const rangeValues = getPlotablePoints(range);\n\n const isPointPlotable = (x, y) => domainValues.includes(x) && rangeValues.includes(y);\n\n return Object.entries(answers || {}).reduce((newAnswers, [key, answer]) => {\n newAnswers[key] = {\n ...answer,\n marks: (answer.marks || []).filter((mark) => {\n if (mark.type === 'point') {\n return isPointPlotable(mark.x, mark.y);\n }\n\n if (mark.type === 'polygon') {\n return !mark.points.find((point) => !isPointPlotable(point.x, point.y));\n }\n\n const from = mark.from || mark.root;\n const to = mark.to || mark.edge;\n\n return mark.building\n ? isPointPlotable(from.x, from.y)\n : isPointPlotable(from.x, from.y) && isPointPlotable(to.x, to.y);\n }),\n };\n\n return newAnswers;\n }, {});\n};\n","// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/graphing/configure/src/graphing-config.jsx\n * @auto-generated\n *\n * This file is automatically synced from pie-elements and converted to TypeScript.\n * Manual edits will be overwritten on next sync.\n * To make changes, edit the upstream JavaScript file and run sync again.\n */\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { GraphContainer, GridSetup } from '@pie-lib/graphing';\nimport { AlertDialog } from '@pie-lib/config-ui';\nimport { MenuItem, Select, Typography, OutlinedInput } from '@mui/material';\nimport { styled } from '@mui/material/styles';\nimport { applyConstraints, filterPlotableMarks, getGridValues, getLabelValues } from './utils.js';\nimport { isEqual } from 'lodash-es';\n\nconst Container: any = styled('div')(({ theme }) => ({\n display: 'flex',\n flexWrap: 'wrap',\n marginBottom: theme.spacing(2.5),\n}));\n\nconst GridConfigWrapper: any = styled('div')(({ theme }) => ({\n display: 'flex',\n flexDirection: 'column',\n marginRight: theme.spacing(3),\n marginBottom: theme.spacing(2.5),\n}));\n\nconst GraphConfig: any = styled('div')({\n display: 'flex',\n flexDirection: 'column',\n});\n\nconst SubtitleText: any = styled(Typography)(({ theme }) => ({\n marginTop: theme.spacing(1.5),\n marginBottom: theme.spacing(1),\n}));\n\nconst GridConfig: any = styled('div')(({ theme }) => ({\n display: 'flex',\n flexWrap: 'wrap',\n alignItems: 'center',\n width: '100%',\n marginBottom: theme.spacing(2.5),\n}));\n\nconst GridConfigLabel: any = styled(Typography)(({ theme }) => ({\n padding: `0 ${theme.spacing(1)}`,\n}));\n\nconst GridConfigSelect: any = styled(Select)({\n flex: '1',\n});\n\nexport class GraphingConfig extends React.Component {\n static propTypes = {\n availableTools: PropTypes.array,\n authoring: PropTypes.object,\n dimensionsEnabled: PropTypes.bool,\n graphDimensions: PropTypes.object,\n gridConfigurations: PropTypes.array,\n labelsPlaceholders: PropTypes.object,\n model: PropTypes.object.isRequired,\n onChange: PropTypes.func.isRequired,\n showLabels: PropTypes.bool,\n showTitle: PropTypes.bool,\n titlePlaceholder: PropTypes.string,\n };\n\n constructor(props) {\n super(props);\n const { domain, range, graph } = props.model || {};\n\n const gridValues = {\n domain: getGridValues(domain, graph.width, true),\n range: getGridValues(range, graph.height, true),\n };\n const labelValues = {\n domain: getLabelValues(domain.step),\n range: getLabelValues(range.step),\n };\n\n this.state = {\n gridValues,\n labelValues,\n showPixelGuides: false,\n dialog: { isOpened: false },\n domain: { ...domain },\n range: { ...range },\n };\n }\n\n changeBackgroundMarks: any = (backgroundMarks) => {\n const model = { ...this.props.model, backgroundMarks };\n\n this.props.onChange(model);\n };\n\n changeLabels: any = (labels) => {\n const { model, onChange } = this.props;\n\n onChange({ ...model, labels });\n };\n\n changeTitle: any = (title) => {\n const { model, onChange } = this.props;\n\n onChange({ ...model, title });\n };\n\n onConfigChange: any = (config, newSelectedGrid) => {\n const { model, onChange } = this.props;\n const { defaultGridConfiguration: oldSelectedGrid = 0 } = model;\n const { gridValues: oldGridValues, labelValues: oldLabelValues, domain: oldDomain, range: oldRange } = this.state;\n const updatedModel = { ...model, ...config };\n const { answers, domain, includeAxes, graph, range, standardGrid } = updatedModel;\n const gridValues = { domain: [], range: [] };\n const labelValues = { domain: [], range: [] };\n const selectedGrid = newSelectedGrid >= 0 ? newSelectedGrid : oldSelectedGrid;\n\n if (includeAxes) {\n const domainConstraints = applyConstraints(domain, graph.width, oldGridValues.domain, oldLabelValues.domain);\n\n gridValues.domain = domainConstraints.gridValues || [];\n labelValues.domain = domainConstraints.labelValues || [];\n }\n\n if (standardGrid) {\n gridValues.range = gridValues.domain;\n labelValues.range = labelValues.domain;\n range.step = domain.step;\n range.labelStep = domain.labelStep;\n } else {\n if (includeAxes) {\n const rangeConstraints = applyConstraints(range, graph.height, oldGridValues.range, oldLabelValues.range);\n\n gridValues.range = rangeConstraints.gridValues || [];\n labelValues.range = rangeConstraints.labelValues || [];\n }\n }\n\n const plotableAnswers = filterPlotableMarks(domain, range, answers);\n\n if (!isEqual(answers, plotableAnswers)) {\n this.setState({\n dialog: {\n isOpened: true,\n onClose: () =>\n this.setState({ dialog: { isOpened: false } }, onChange({ ...model, domain: oldDomain, range: oldRange })),\n onConfirm: () => {\n this.setState(\n {\n gridValues,\n labelValues,\n dialog: { isOpened: false },\n domain: { ...domain },\n range: { ...range },\n },\n onChange({ ...updatedModel, answers: plotableAnswers, defaultGridConfiguration: selectedGrid }),\n );\n },\n },\n });\n\n return;\n }\n\n this.setState({ gridValues, labelValues, domain: { ...domain }, range: { ...range } });\n onChange({ ...updatedModel, defaultGridConfiguration: selectedGrid });\n };\n\n onChangeView: any = (event, expanded) => {\n const { graphDimensions: { enabled } = {} } = this.props;\n\n if (enabled) {\n this.setState({ showPixelGuides: expanded });\n }\n };\n\n changeGridConfiguration: any = (event) => {\n const { gridConfigurations } = this.props;\n const { value } = event.target;\n\n this.onConfigChange(gridConfigurations?.[value] || {}, value);\n };\n\n render() {\n const {\n authoring = {},\n availableTools = [],\n gridConfigurations = [],\n graphDimensions = {},\n labelsPlaceholders,\n model,\n showLabels,\n dimensionsEnabled,\n showTitle,\n titlePlaceholder,\n mathMlOptions = {},\n removeIncompleteTool,\n } = this.props;\n const {\n arrows,\n backgroundMarks,\n coordinatesOnHover,\n defaultGridConfiguration,\n domain,\n includeAxes,\n labels,\n range,\n standardGrid,\n title,\n } = model || {};\n const graph = (model || {}).graph || {};\n const { min, max, step } = graphDimensions || {};\n const { dialog = {}, gridValues, labelValues, showPixelGuides } = this.state;\n\n const sizeConstraints = {\n min: Math.max(150, min),\n max: Math.min(800, max),\n step: step >= 1 ? Math.min(200, step) : 20,\n };\n\n const displayedFields = {\n axisLabel: authoring.axisLabel,\n dimensionsEnabled,\n includeAxesEnabled: authoring.includeAxesEnabled,\n labelStep: authoring.labelStep,\n min: authoring.min,\n max: authoring.max,\n standardGridEnabled: authoring.standardGridEnabled,\n step: authoring.step,\n };\n\n const displayGridSetup =\n authoring.enabled &&\n Object.values(displayedFields).some((field) => (typeof field === 'object' ? field.enabled : field));\n\n return (\n <Container>\n <GridConfigWrapper>\n {gridConfigurations && gridConfigurations.length ? (\n <GridConfig>\n <GridConfigLabel component=\"div\" variant=\"h6\">\n Grid Configuration\n </GridConfigLabel>\n\n <GridConfigSelect\n input={<OutlinedInput />}\n displayEmpty\n onChange={this.changeGridConfiguration}\n value={defaultGridConfiguration}\n MenuProps={{ transitionDuration: { enter: 225, exit: 195 } }}\n >\n {(gridConfigurations || []).map((config, index) => (\n <MenuItem key={index} value={index}>\n {config.label}\n </MenuItem>\n ))}\n </GridConfigSelect>\n </GridConfig>\n ) : null}\n\n {displayGridSetup && (\n <GridSetup\n displayedFields={displayedFields}\n domain={domain}\n gridValues={gridValues}\n includeAxes={includeAxes}\n labelValues={labelValues}\n range={range}\n size={graph}\n sizeConstraints={sizeConstraints}\n standardGrid={standardGrid}\n onChange={this.onConfigChange}\n onChangeView={this.onChangeView}\n />\n )}\n </GridConfigWrapper>\n\n <GraphConfig key=\"graph\">\n <Typography component=\"div\" variant=\"h6\">\n Define Graph Attributes\n </Typography>\n\n <SubtitleText component=\"div\" variant=\"body1\">\n Use this interface to add/edit a title and/or labels, and to set background shapes\n </SubtitleText>\n\n <GraphContainer\n axesSettings={{ includeArrows: arrows }}\n backgroundMarks={[]}\n coordinatesOnHover={coordinatesOnHover}\n collapsibleToolbar={true}\n collapsibleToolbarTitle={'Add Background Shapes to Graph'}\n domain={domain}\n key=\"graphing-config\"\n labels={labels}\n labelsPlaceholders={labelsPlaceholders}\n marks={backgroundMarks}\n onChangeLabels={this.changeLabels}\n onChangeMarks={this.changeBackgroundMarks}\n onChangeTitle={this.changeTitle}\n range={range}\n showLabels={showLabels}\n showPixelGuides={showPixelGuides}\n showTitle={showTitle}\n size={{ width: graph.width, height: graph.height }}\n title={title}\n titlePlaceholder={titlePlaceholder}\n toolbarTools={availableTools}\n mathMlOptions={mathMlOptions}\n removeIncompleteTool={removeIncompleteTool}\n />\n </GraphConfig>\n\n <AlertDialog\n open={dialog.isOpened}\n title=\"Warning\"\n text=\"This change would make it impossible for students to plot one or more graph objects in the current correct answers. If you proceed, all such graph objects will be removed from the correct answers.\"\n onClose={dialog.onClose}\n onConfirm={dialog.onConfirm}\n />\n </Container>\n );\n }\n}\n\nexport default GraphingConfig;\n","\"use client\";\n\nimport createSvgIcon from \"./utils/createSvgIcon.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z\"\n}), 'Info');","// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/graphing/configure/src/correct-response.jsx\n * @auto-generated\n *\n * This file is automatically synced from pie-elements and converted to TypeScript.\n * Manual edits will be overwritten on next sync.\n * To make changes, edit the upstream JavaScript file and run sync again.\n */\n\nimport * as React from 'react';\nimport ReactDOM from 'react-dom';\nimport PropTypes from 'prop-types';\nimport { styled } from '@mui/material/styles';\nimport { GraphContainer as Graph } from '@pie-lib/graphing';\nimport { AlertDialog } from '@pie-lib/config-ui';\nimport { renderMath } from '@pie-element/shared-math-rendering-mathjax';\nimport Delete from '@mui/icons-material/Delete';\nimport { set, isEqual } from 'lodash-es';\nimport { MenuItem, Select, Tooltip, Typography } from '@mui/material';\nimport Info from '@mui/icons-material/Info';\n\n// custom grey values close to old v3 accents\nconst GREY_A100 = '#D5D5D5';\nconst GREY_A200 = '#AAAAAA';\n\nconst GraphingTools: any = styled('div')({\n color: GREY_A200,\n});\n\nconst Button: any = styled('div')(({ theme }) => ({\n margin: `${theme.spacing(2.5)} 0`,\n cursor: 'pointer',\n background: theme.palette.grey[200],\n padding: theme.spacing(1.5),\n width: 'fit-content',\n borderRadius: '4px',\n '&:hover': {\n background: GREY_A100,\n },\n}));\n\nconst AvailableTools: any = styled('div')(({ theme }) => ({\n marginTop: theme.spacing(1),\n display: 'flex',\n flexWrap: 'wrap',\n}));\n\nconst AvailableTool: any = styled('div')(({ theme }) => ({\n cursor: 'pointer',\n margin: theme.spacing(1),\n padding: theme.spacing(1),\n border: `2px solid ${theme.palette.common.white}`,\n textTransform: 'capitalize',\n '&:hover': {\n color: theme.palette.grey[800],\n },\n}));\n\nconst SelectedTool: any = styled(AvailableTool)({\n background: GREY_A100,\n border: `2px solid ${GREY_A200}`,\n});\n\nconst ResponseTitle: any = styled('div')(({ theme }) => ({\n display: 'flex',\n alignItems: 'center',\n marginTop: theme.spacing(2.5),\n}));\n\nconst IconButton: any = styled('div')(({ theme }) => ({\n marginLeft: '6px',\n color: theme.palette.grey[600],\n '&:hover': {\n cursor: 'pointer',\n color: theme.palette.common.black,\n },\n}));\n\nconst Name: any = styled('div')(({ theme }) => ({\n marginBottom: theme.spacing(0.5),\n}));\n\nconst StyledTooltip: any = styled(({ className, ...props }) => (\n <Tooltip {...props} classes={{ tooltip: className }} />\n))(({ theme }) => ({\n '& .MuiTooltip-tooltip': {\n fontSize: theme.typography.fontSize - 2,\n whiteSpace: 'pre',\n maxWidth: '500px',\n },\n}));\n\nconst SubtitleText: any = styled(Typography)(({ theme }) => ({\n marginTop: theme.spacing(1.5),\n marginBottom: theme.spacing(1),\n}));\n\nconst ToolsHeader: any = styled('div')({\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n});\n\nconst DefaultTool: any = styled('div')({\n display: 'flex',\n alignItems: 'center',\n width: '300px',\n});\n\nconst DefaultToolSelect: any = styled(Select)(({ theme }) => ({\n marginLeft: theme.spacing(1),\n textTransform: 'uppercase',\n color: theme.palette.grey[800],\n}));\n\nconst StyledMenuItem: any = styled(MenuItem)({\n textTransform: 'uppercase',\n});\n\nconst ErrorMessage: any = styled('div')(({ theme }) => ({\n fontSize: theme.typography.fontSize - 2,\n color: theme.palette.error.main,\n marginTop: theme.spacing(1),\n}));\n\nexport const Tools = ({\n availableTools,\n defaultTool,\n hasErrors,\n toolbarTools,\n toggleToolBarTool,\n onDefaultToolChange,\n}) => {\n let allTools = availableTools || [];\n const isLabelAvailable = allTools.includes('label');\n const toolbarToolsNoLabel = (toolbarTools || []).filter((tool) => tool !== 'label');\n\n if (isLabelAvailable) {\n // label has to be placed at the end of the list\n const allToolsNoLabel = allTools.filter((tool) => tool !== 'label');\n allTools = [...allToolsNoLabel, 'label'];\n }\n\n return (\n <GraphingTools>\n <ToolsHeader>\n <span>GRAPHING TOOLS</span>\n {toolbarToolsNoLabel.length > 0 && (\n <DefaultTool>\n <span>Default graphing tool:</span>\n <DefaultToolSelect\n variant=\"standard\"\n onChange={onDefaultToolChange}\n value={defaultTool}\n disableUnderline\n MenuProps={{ transitionDuration: { enter: 225, exit: 195 } }}\n >\n {toolbarToolsNoLabel.map((tool, index) => (\n <StyledMenuItem key={index} value={tool}>\n {tool}\n </StyledMenuItem>\n ))}\n </DefaultToolSelect>\n </DefaultTool>\n )}\n </ToolsHeader>\n <AvailableTools>\n {allTools.map((tool) => {\n const selected = toolbarTools.find((t) => t === tool);\n const ToolComponent = selected ? SelectedTool : AvailableTool;\n\n return (\n <ToolComponent\n key={tool}\n style={{\n ...(hasErrors && tool !== 'label' && { color: 'red' }),\n }}\n onClick={() => toggleToolBarTool(tool)}\n >\n {tool.toUpperCase()}\n </ToolComponent>\n );\n })}\n </AvailableTools>\n </GraphingTools>\n );\n};\n\nTools.propTypes = {\n toolbarTools: PropTypes.arrayOf(PropTypes.string),\n toggleToolBarTool: PropTypes.func,\n availableTools: PropTypes.array,\n defaultTool: PropTypes.string,\n hasErrors: PropTypes.number,\n onDefaultToolChange: PropTypes.func,\n};\n\nexport class CorrectResponse extends React.Component {\n static propTypes = {\n availableTools: PropTypes.array,\n errors: PropTypes.object,\n model: PropTypes.object.isRequired,\n onChange: PropTypes.func.isRequired,\n toolbarTools: PropTypes.arrayOf(PropTypes.String),\n };\n\n state = {\n dialog: {\n open: false,\n },\n };\n\n componentDidMount() {\n try {\n // eslint-disable-next-line react/no-find-dom-node\n const domNode = ReactDOM.findDOMNode(this);\n\n renderMath(domNode);\n } catch (e) {\n // Added try-catch block to handle \"Unable to find node on an unmounted component\" error from tests, thrown because of the usage of shallow\n console.error('DOM not mounted');\n }\n }\n\n handleAlertDialog = (open, callback) =>\n this.setState(\n {\n dialog: { open },\n },\n callback,\n );\n\n changeMarks: any = (key, marks) => {\n const { model, onChange } = this.props;\n\n set(model, `answers.${key}.marks`, marks);\n onChange(model);\n };\n\n filterMarks: any = (tool) => {\n const {\n model: { answers },\n } = this.props;\n\n return Object.entries(answers || {}).reduce((object, [key, answer]) => {\n object[key] = {\n ...answer,\n marks: (answer.marks || []).filter((mark) => mark.type !== tool),\n };\n\n return object;\n }, {});\n };\n\n changeToolbarTools: any = (toolbarTools) => {\n const { model, onChange } = this.props;\n model.toolbarTools = toolbarTools;\n\n onChange(model);\n };\n\n updateModel: any = (props) => {\n const { model, onChange } = this.props;\n\n onChange({\n ...model,\n ...props,\n });\n };\n\n toggleToolBarTool: any = (tool) => {\n const {\n model: { defaultTool, toolbarTools, answers = {} },\n } = this.props;\n const updatedToolbarTools = [...toolbarTools];\n let newDefaultTool = defaultTool;\n\n const index = toolbarTools.findIndex((t) => tool === t);\n\n if (index >= 0) {\n const updatedAnswers = this.filterMarks(tool);\n updatedToolbarTools.splice(index, 1);\n if (tool === defaultTool) {\n const toolbarToolsNoLabel = (updatedToolbarTools || []).filter((tool) => tool !== 'label');\n newDefaultTool = (toolbarToolsNoLabel.length && toolbarToolsNoLabel[0]) || '';\n }\n\n if (!isEqual(answers, updatedAnswers)) {\n this.setState({\n dialog: {\n open: true,\n title: 'Warning',\n text: `Correct answer includes one or more ${tool} objects and all of them will be deleted.`,\n onConfirm: () =>\n this.handleAlertDialog(\n false,\n this.updateModel({\n toolbarTools: updatedToolbarTools,\n answers: updatedAnswers,\n defaultTool: newDefaultTool,\n }),\n ),\n onClose: () => this.handleAlertDialog(false),\n },\n });\n\n return;\n }\n } else {\n updatedToolbarTools.push(tool);\n\n if (defaultTool === '' && tool !== 'label') {\n newDefaultTool = tool;\n }\n }\n\n this.updateModel({\n toolbarTools: updatedToolbarTools,\n defaultTool: newDefaultTool,\n });\n };\n\n onDefaultToolChange: any = (event) => {\n const { value } = event.target;\n\n this.updateModel({ defaultTool: value });\n };\n\n addAlternateResponse: any = () => {\n const { model, onChange } = this.props;\n const { answers } = model || {};\n const answersKeys = Object.keys(answers || {});\n\n set(model, `answers.${`alternate${answersKeys.length}`}`, {\n name: `Alternate ${answersKeys.length}`,\n marks: [],\n });\n onChange(model);\n };\n\n deleteAlternateResponse: any = (answerKey, answer) => {\n const { model, onChange } = this.props;\n const { answers } = model || {};\n const { marks = [], name } = answer || {};\n\n const deleteAnswer = () => {\n delete answers[answerKey];\n // rebuild answers based on new alternate positions after deletion\n const newAnswers = Object.entries(answers).reduce((acc, currentValue, index) => {\n const [key, value] = currentValue;\n const newAnswer =\n key === 'correctAnswer'\n ? { ...acc, [key]: value }\n : { ...acc, ['alternate' + index]: { ...value, name: `Alternate ${index}` } };\n return newAnswer;\n }, {});\n\n onChange({ ...model, answers: newAnswers });\n };\n\n if (marks.length) {\n this.setState({\n dialog: {\n open: true,\n title: 'Warning',\n text: `${name} includes one or more shapes and the entire response will be deleted.`,\n onConfirm: () => this.handleAlertDialog(false, deleteAnswer),\n onClose: () => this.handleAlertDialog(false),\n },\n });\n\n return;\n }\n\n deleteAnswer();\n };\n\n render() {\n const { availableTools, errors, model, mathMlOptions = {}, removeIncompleteTool } = this.props;\n const { dialog } = this.state;\n const {\n answers = {},\n arrows,\n backgroundMarks,\n coordinatesOnHover,\n defaultTool,\n domain,\n graph = {},\n labels,\n labelsEnabled,\n range,\n title,\n titleEnabled,\n toolbarTools,\n } = model || {};\n const { correctAnswerErrors = {}, toolbarToolsError } = errors || {};\n\n return (\n <div>\n <Typography component=\"div\" variant=\"h6\">\n Define Tool Set and Correct Response\n </Typography>\n\n <SubtitleText component=\"div\" variant=\"body1\">\n Use this interface to choose which graphing tools students will be able to use, and to define the correct\n answer\n </SubtitleText>\n\n <Tools\n availableTools={availableTools}\n defaultTool={defaultTool}\n hasErrors={!!toolbarToolsError}\n onDefaultToolChange={this.onDefaultToolChange}\n toggleToolBarTool={this.toggleToolBarTool}\n toolbarTools={toolbarTools}\n />\n\n {toolbarToolsError && <ErrorMessage>{toolbarToolsError}</ErrorMessage>}\n\n {Object.entries(answers || {}).map(([key, answer]) => {\n const { marks = [], name } = answer || {};\n\n return (\n <React.Fragment key={`correct-response-graph-${name}`}>\n <ResponseTitle>\n <Name>{name}</Name>\n {key === 'correctAnswer' && (\n <StyledTooltip\n disableFocusListener\n disableTouchListener\n placement={'right'}\n title={'At least 1 graph object should be defined.'}\n >\n <Info fontSize={'small'} color={'primary'} style={{ marginLeft: '8px', marginBottom: 'auto' }} />\n </StyledTooltip>\n )}\n {key !== 'correctAnswer' && (\n <IconButton onClick={() => this.deleteAlternateResponse(key, answer)}>\n <Delete />\n </IconButton>\n )}\n </ResponseTitle>\n\n <Graph\n style={correctAnswerErrors[key] && { border: '2px solid red' }}\n axesSettings={{ includeArrows: arrows }}\n backgroundMarks={backgroundMarks.filter((mark) => !mark.building)}\n coordinatesOnHover={coordinatesOnHover}\n disabledLabels={true}\n disabledTitle={true}\n domain={domain}\n draggableTools={key === 'correctAnswer'}\n labels={labels}\n marks={marks}\n onChangeMarks={(newMarks) => this.changeMarks(key, newMarks)}\n range={range}\n showLabels={labelsEnabled}\n showTitle={titleEnabled}\n size={{ width: graph.width, height: graph.height }}\n title={title}\n toolbarTools={toolbarTools}\n onChangeTools={(toolbarTools) => this.updateModel({ toolbarTools })}\n mathMlOptions={mathMlOptions}\n removeIncompleteTool={removeIncompleteTool}\n limitLabeling={true}\n />\n\n {correctAnswerErrors[key] && <ErrorMessage>{correctAnswerErrors[key]}</ErrorMessage>}\n </React.Fragment>\n );\n })}\n\n <Button onClick={this.addAlternateResponse}>\n ADD ALTERNATE\n </Button>\n\n <AlertDialog\n open={dialog.open}\n title={dialog.title}\n text={dialog.text}\n onClose={dialog.onClose}\n onConfirm={dialog.onConfirm}\n />\n </div>\n );\n }\n}\n\nexport default CorrectResponse;\n","// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/graphing/configure/src/configure.jsx\n * @auto-generated\n *\n * This file is automatically synced from pie-elements and converted to TypeScript.\n * Manual edits will be overwritten on next sync.\n * To make changes, edit the upstream JavaScript file and run sync again.\n */\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport debug from 'debug';\nimport { intersection } from 'lodash-es';\nimport { styled } from '@mui/material/styles';\nimport Typography from '@mui/material/Typography';\n\nimport { settings, layout, InputContainer } from '@pie-lib/config-ui';\nimport EditableHtml from '@pie-lib/editable-html-tip-tap';\n\nimport GraphingConfig from './graphing-config.js';\nimport CorrectResponse from './correct-response.js';\n\nconst { Panel, toggle, radio, checkboxes, textField, dropdown } = settings;\nconst log = debug('@pie-element:graphing:configure');\n\nconst StyledInputContainer: any = styled(InputContainer)(({ theme }) => ({\n width: '100%',\n paddingTop: theme.spacing(2),\n marginBottom: theme.spacing(2),\n}));\n\nconst Description: any = styled(Typography)(({ theme }) => ({\n marginBottom: theme.spacing(2.5),\n}));\n\nconst ErrorText: any = styled('div')(({ theme }) => ({\n fontSize: theme.typography.fontSize - 2,\n color: theme.palette.error.main,\n paddingTop: theme.spacing(1),\n}));\n\nexport class Configure extends React.Component {\n static propTypes = {\n onModelChanged: PropTypes.func,\n onConfigurationChanged: PropTypes.func,\n imageSupport: PropTypes.object,\n uploadSoundSupport: PropTypes.object,\n model: PropTypes.object.isRequired,\n configuration: PropTypes.object.isRequired,\n };\n\n componentDidMount() {\n const { configuration, onModelChanged, model } = this.props;\n const { availableTools, title, graphDimensions } = configuration || {};\n let { arrows, titleEnabled: showTitle, dimensionsEnabled: showDimensions } = model || {};\n\n // This is used for offering support for old models which have the property arrows: boolean\n // Same thing is set in the controller: packages/graphing/controller/src/index.js - model\n if (typeof arrows === 'boolean') {\n if (arrows) {\n arrows = { left: true, right: true, up: true, down: true };\n } else {\n arrows = { left: false, right: false, up: false, down: false };\n }\n }\n\n const toolbarTools = intersection(availableTools || [], model.toolbarTools || []);\n const titleEnabled = showTitle === undefined || showTitle === null ? title.enabled : showTitle;\n const dimensionsEnabled =\n showDimensions === undefined || showDimensions === null ? graphDimensions.enabled : showDimensions;\n\n onModelChanged && onModelChanged({ ...model, arrows, toolbarTools, titleEnabled, dimensionsEnabled });\n }\n\n onRationaleChange: any = (rationale) => {\n const { onModelChanged, model } = this.props;\n\n onModelChanged({ ...model, rationale });\n };\n\n onPromptChange: any = (prompt) => {\n const { onModelChanged, model } = this.props;\n\n onModelChanged({ ...model, prompt });\n };\n\n onTeacherInstructionsChange: any = (teacherInstructions) => {\n const { onModelChanged, model } = this.props;\n\n onModelChanged({ ...model, teacherInstructions });\n };\n\n render() {\n const { model, configuration, onConfigurationChanged, onModelChanged, imageSupport, uploadSoundSupport } =\n this.props;\n const {\n arrows = {},\n authoring = {},\n availableTools = [],\n baseInputConfiguration = {},\n coordinatesOnHover = {},\n contentDimensions = {},\n gridConfigurations = [],\n graphDimensions = {},\n instruction = {},\n labels = {},\n padding = {},\n prompt = {},\n rationale = {},\n scoringType = {},\n settingsPanelDisabled,\n spellCheck = {},\n studentInstructions = {},\n teacherInstructions = {},\n title = {},\n maxImageWidth = {},\n maxImageHeight = {},\n withRubric = {},\n language = {},\n languageChoices = {},\n mathMlOptions = {},\n removeIncompleteTool = false,\n } = configuration || {};\n const {\n errors = {},\n extraCSSRules,\n labelsEnabled,\n dimensionsEnabled,\n promptEnabled,\n rationaleEnabled,\n spellCheckEnabled,\n teacherInstructionsEnabled,\n titleEnabled,\n } = model || {};\n const {\n prompt: promptError,\n rationale: rationaleError,\n teacherInstructions: teacherInstructionsError,\n } = errors || {};\n\n log('[render] model', model);\n\n const defaultImageMaxWidth = maxImageWidth && maxImageWidth.prompt;\n const defaultImageMaxHeight = maxImageHeight && maxImageHeight.prompt;\n const labelsPlaceholders = {\n top: labels.top,\n right: labels.right,\n bottom: labels.bottom,\n left: labels.left,\n };\n\n const panelItemType = {\n arrows:\n arrows.settings &&\n checkboxes(arrows.label, {\n left: arrows.left,\n right: arrows.right,\n up: arrows.up,\n down: arrows.down,\n }),\n titleEnabled: title.settings && toggle(title.label),\n padding: padding.settings && toggle(padding.label),\n labelsEnabled: labels.settings && toggle(labels.label),\n 'language.enabled': language.settings && toggle(language.label, true),\n language: language.settings && language.enabled && dropdown(languageChoices.label, languageChoices.options),\n dimensionsEnabled: graphDimensions.settings && toggle(graphDimensions.label),\n coordinatesOnHover: coordinatesOnHover.settings && toggle(coordinatesOnHover.label),\n };\n\n const panelProperties = {\n 'authoring.enabled': authoring.settings && toggle(authoring.label, true),\n teacherInstructionsEnabled: teacherInstructions.settings && toggle(teacherInstructions.label),\n studentInstructionsEnabled: studentInstructions.settings && toggle(studentInstructions.label),\n promptEnabled: prompt.settings && toggle(prompt.label),\n rationaleEnabled: rationale.settings && toggle(rationale.label),\n spellCheckEnabled: spellCheck.settings && toggle(spellCheck.label),\n scoringType: scoringType.settings && radio(scoringType.label, ['dichotomous', 'partial scoring']),\n rubricEnabled: withRubric?.settings && toggle(withRubric?.label),\n instruction: instruction.settings && textField(instruction.label),\n };\n\n const getPluginProps = (props = {}) => ({\n ...baseInputConfiguration,\n ...props,\n });\n\n return (\n <layout.ConfigLayout\n extraCSSRules={extraCSSRules}\n dimensions={contentDimensions}\n hideSettings={settingsPanelDisabled}\n settings={\n <Panel\n model={model}\n configuration={configuration}\n onChangeModel={onModelChanged}\n onChangeConfiguration={onConfigurationChanged}\n groups={{\n Settings: panelItemType,\n Properties: panelProperties,\n }}\n />\n }\n >\n <Description component=\"div\" variant=\"body1\">\n {instruction?.label || ''}\n </Description>\n\n {teacherInstructionsEnabled && (\n <StyledInputContainer label={teacherInstructions.label}>\n <EditableHtml\n markup={model.teacherInstructions || ''}\n onChange={this.onTeacherInstructionsChange}\n imageSupport={imageSupport}\n error={teacherInstructionsError}\n nonEmpty={false}\n pluginProps={getPluginProps(teacherInstructions?.inputConfiguration)}\n spellCheck={spellCheckEnabled}\n maxImageWidth={(maxImageWidth && maxImageWidth.teacherInstructions) || defaultImageMaxWidth}\n maxImageHeight={(maxImageHeight && maxImageHeight.teacherInstructions) || defaultImageMaxHeight}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n mathMlOptions={mathMlOptions}\n />\n {teacherInstructionsError && <ErrorText>{teacherInstructionsError}</ErrorText>}\n </StyledInputContainer>\n )}\n\n {promptEnabled && (\n <StyledInputContainer label={prompt.label}>\n <EditableHtml\n markup={model.prompt}\n onChange={this.onPromptChange}\n imageSupport={imageSupport}\n error={promptError}\n nonEmpty={false}\n spellCheck={spellCheckEnabled}\n pluginProps={getPluginProps(prompt?.inputConfiguration)}\n disableUnderline\n maxImageWidth={defaultImageMaxWidth}\n maxImageHeight={defaultImageMaxHeight}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n mathMlOptions={mathMlOptions}\n />\n {promptError && <ErrorText>{promptError}</ErrorText>}\n </StyledInputContainer>\n )}\n\n <GraphingConfig\n authoring={authoring}\n availableTools={availableTools}\n gridConfigurations={gridConfigurations}\n graphDimensions={graphDimensions}\n labelsPlaceholders={labelsPlaceholders}\n model={model}\n showLabels={labelsEnabled}\n dimensionsEnabled={dimensionsEnabled}\n showTitle={titleEnabled}\n titlePlaceholder={title.placeholder}\n onChange={this.props.onModelChanged}\n mathMlOptions={mathMlOptions}\n removeIncompleteTool={removeIncompleteTool}\n />\n\n <CorrectResponse\n availableTools={availableTools}\n errors={errors}\n model={model}\n onChange={this.props.onModelChanged}\n mathMlOptions={mathMlOptions}\n removeIncompleteTool={removeIncompleteTool}\n />\n\n {rationaleEnabled && (\n <StyledInputContainer label={rationale.label || 'Rationale'}>\n <EditableHtml\n markup={model.rationale || ''}\n onChange={this.onRationaleChange}\n imageSupport={imageSupport}\n error={rationaleError}\n spellCheck={spellCheckEnabled}\n pluginProps={getPluginProps(rationale?.inputConfiguration)}\n maxImageWidth={(maxImageWidth && maxImageWidth.rationale) || defaultImageMaxWidth}\n maxImageHeight={(maxImageHeight && maxImageHeight.rationale) || defaultImageMaxHeight}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n mathMlOptions={mathMlOptions}\n />\n {rationaleError && <ErrorText>{rationaleError}</ErrorText>}\n </StyledInputContainer>\n )}\n </layout.ConfigLayout>\n );\n }\n}\n\nexport default Configure;\n","//#region src/index.ts\nvar e = class e extends CustomEvent {\n\tstatic {\n\t\tthis.TYPE = \"model.updated\";\n\t}\n\tconstructor(t, n = !1) {\n\t\tsuper(e.TYPE, {\n\t\t\tbubbles: !0,\n\t\t\tdetail: {\n\t\t\t\tupdate: t,\n\t\t\t\treset: n\n\t\t\t}\n\t\t}), this.update = t, this.reset = n;\n\t}\n}, t = class e extends CustomEvent {\n\tstatic {\n\t\tthis.TYPE = \"delete.image\";\n\t}\n\tconstructor(t, n) {\n\t\tsuper(e.TYPE, {\n\t\t\tbubbles: !0,\n\t\t\tdetail: {\n\t\t\t\tsrc: t,\n\t\t\t\tdone: n\n\t\t\t}\n\t\t}), this.src = t, this.done = n;\n\t}\n}, n = class e extends CustomEvent {\n\tstatic {\n\t\tthis.TYPE = \"insert.image\";\n\t}\n\tconstructor(t) {\n\t\tsuper(e.TYPE, {\n\t\t\tbubbles: !0,\n\t\t\tdetail: t\n\t\t}), this.handler = t;\n\t}\n}, r = class e extends CustomEvent {\n\tstatic {\n\t\tthis.TYPE = \"delete.sound\";\n\t}\n\tconstructor(t, n) {\n\t\tsuper(e.TYPE, {\n\t\t\tbubbles: !0,\n\t\t\tdetail: {\n\t\t\t\tsrc: t,\n\t\t\t\tdone: n\n\t\t\t}\n\t\t}), this.src = t, this.done = n;\n\t}\n}, i = class e extends CustomEvent {\n\tstatic {\n\t\tthis.TYPE = \"insert.sound\";\n\t}\n\tconstructor(t) {\n\t\tsuper(e.TYPE, {\n\t\t\tbubbles: !0,\n\t\t\tdetail: t\n\t\t}), this.handler = t;\n\t}\n};\n//#endregion\nexport { t as DeleteImageEvent, r as DeleteSoundEvent, n as InsertImageEvent, i as InsertSoundEvent, e as ModelUpdatedEvent };\n","// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/graphing/configure/src/defaults.js\n * @auto-generated\n *\n * This file is automatically synced from pie-elements and converted to TypeScript.\n * Manual edits will be overwritten on next sync.\n * To make changes, edit the upstream JavaScript file and run sync again.\n */\n\nconst allTools = [\n 'circle',\n 'line',\n 'label',\n 'parabola',\n 'point',\n 'polygon',\n 'ray',\n 'segment',\n 'sine',\n 'vector',\n // 'absolute', // - not available as default\n // 'exponential', // - not available as default\n];\n\nexport default {\n model: {\n answers: {\n correctAnswer: {\n name: 'Correct Answer',\n marks: [],\n },\n },\n arrows: {\n left: true,\n right: true,\n up: true,\n down: true,\n },\n backgroundMarks: [],\n coordinatesOnHover: false,\n defaultGridConfiguration: 0,\n domain: {\n min: -5,\n max: 5,\n step: 1,\n labelStep: 1,\n axisLabel: 'x',\n },\n graph: { width: 500, height: 500 },\n includeAxes: true,\n labels: {},\n labelsEnabled: true,\n padding: true,\n prompt: '',\n promptEnabled: true,\n range: {\n min: -5,\n max: 5,\n step: 1,\n labelStep: 1,\n axisLabel: 'y',\n },\n rationale: '',\n rationaleEnabled: true,\n standardGrid: false,\n studentInstructionsEnabled: true,\n teacherInstructions: '',\n teacherInstructionsEnabled: true,\n title: '',\n titleEnabled: true,\n toolbarTools: allTools,\n },\n configuration: {\n baseInputConfiguration: {\n h3: { disabled: true },\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n textAlign: { disabled: true },\n showParagraphs: { disabled: false },\n separateParagraphs: { disabled: true },\n },\n availableTools: allTools,\n authoring: {\n settings: false,\n label: 'Customize Grid Setup',\n enabled: true,\n includeAxesEnabled: true,\n standardGridEnabled: true,\n min: {\n label: 'Min Value',\n enabled: true,\n },\n max: {\n label: 'Max Value',\n enabled: true,\n },\n axisLabel: {\n label: 'Label',\n enabled: true,\n },\n step: {\n label: 'Grid Interval',\n enabled: true,\n },\n labelStep: {\n label: 'Label Interval',\n enabled: true,\n },\n },\n arrows: {\n settings: true,\n label: 'Include Arrows',\n left: {\n label: 'left',\n },\n right: {\n label: 'right',\n },\n up: {\n label: 'up',\n },\n down: {\n label: 'down',\n },\n },\n gridConfigurations: [\n {\n label: '4-quadrant coordinate grid, -10 to 10',\n arrows: {\n left: true,\n right: true,\n up: true,\n down: true,\n },\n domain: {\n min: -10,\n max: 10,\n step: 1,\n padding: 0,\n labelStep: 1,\n axisLabel: '<i>x</i>',\n },\n graph: {\n width: 480,\n height: 480,\n },\n includeAxes: true,\n labels: {\n top: '',\n right: '',\n bottom: '',\n left: '',\n },\n padding: true,\n range: {\n min: -10,\n max: 10,\n step: 1,\n padding: 0,\n labelStep: 1,\n axisLabel: '<i>y</i>',\n },\n standardGrid: true,\n title: '',\n },\n {\n label: '0 to 10 on both axes',\n arrows: {\n left: false,\n right: true,\n up: true,\n down: false,\n },\n domain: {\n min: 0,\n max: 10,\n step: 1,\n padding: 0,\n labelStep: 1,\n axisLabel: '<i>x</i>',\n },\n graph: {\n width: 480,\n height: 480,\n },\n includeAxes: true,\n labels: {\n top: '',\n right: '',\n bottom: '',\n left: '',\n },\n padding: true,\n range: {\n min: 0,\n max: 10,\n step: 1,\n padding: 0,\n labelStep: 1,\n axisLabel: '<i>y</i>',\n },\n standardGrid: true,\n title: '',\n },\n {\n label: '0 to 20 on both axes',\n arrows: {\n left: false,\n right: true,\n up: true,\n down: false,\n },\n domain: {\n min: 0,\n max: 20,\n step: 1,\n padding: 0,\n labelStep: 1,\n axisLabel: '<i>x</i>',\n },\n graph: {\n width: 480,\n height: 480,\n },\n includeAxes: true,\n labels: {\n top: '',\n right: '',\n bottom: '',\n left: '',\n },\n padding: true,\n range: {\n min: 0,\n max: 20,\n step: 1,\n padding: 0,\n labelStep: 1,\n axisLabel: '<i>y</i>',\n },\n standardGrid: true,\n title: '',\n },\n {\n label: 'Sample Data Graph',\n arrows: {\n left: false,\n right: true,\n up: true,\n down: false,\n },\n domain: {\n min: 0,\n max: 30,\n step: 1,\n padding: 0,\n labelStep: 2,\n axisLabel: '<i>t</i>',\n },\n graph: {\n width: 480,\n height: 480,\n },\n includeAxes: true,\n labels: {\n top: '',\n right: '',\n bottom: 'Time (seconds)',\n left: 'Distance (meters)',\n },\n padding: true,\n range: {\n min: 0,\n max: 80,\n step: 5,\n padding: 0,\n labelStep: 10,\n axisLabel: '<i>d</i>',\n },\n standardGrid: false,\n title: 'Distance as a function of time',\n },\n {\n label: 'No Visible Axes',\n arrows: {\n left: false,\n right: false,\n up: false,\n down: false,\n },\n domain: {\n min: 1,\n max: 21,\n step: 1,\n padding: 0,\n labelStep: 0,\n axisLabel: '',\n },\n graph: {\n width: 480,\n height: 480,\n },\n includeAxes: false,\n labels: {\n top: '',\n right: '',\n bottom: '',\n left: '',\n },\n padding: true,\n range: {\n min: 1,\n max: 21,\n step: 1,\n padding: 0,\n labelStep: 0,\n axisLabel: '',\n },\n standardGrid: false,\n title: '',\n },\n ],\n graphDimensions: {\n settings: false,\n label: 'Graph Dimensions',\n enabled: true,\n min: 150,\n max: 800,\n step: 20,\n },\n padding: {\n settings: false,\n label: 'Padding',\n },\n labels: {\n settings: true,\n label: 'Graph Labels',\n enabled: true,\n top: 'Click here to add a top label',\n right: 'Click here to add a right label',\n bottom: 'Click here to add a bottom label',\n left: 'Click here to add a left label',\n },\n prompt: {\n settings: true,\n label: 'Item Stem',\n required: false,\n inputConfiguration: {\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n },\n },\n rationale: {\n settings: true,\n label: 'Rationale',\n required: false,\n inputConfiguration: {\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n },\n },\n scoringType: {\n settings: false,\n label: 'Scoring Type',\n },\n studentInstructions: {\n settings: false,\n label: 'Student Instructions',\n },\n teacherInstructions: {\n settings: true,\n label: 'Teacher Instructions',\n required: false,\n inputConfiguration: {\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n },\n },\n title: {\n settings: true,\n label: 'Graph Title',\n enabled: true,\n placeholder: 'Click here to add a title for this graph',\n },\n instruction: {\n settings: false,\n label:\n 'Graphing questions involve plotting points, lines, or other objects on a graph. To create one, first configure the grid, then select the plotting tools students will be offered, and use them to define the correct answer.',\n },\n settingsPanelDisabled: false,\n spellCheck: {\n label: 'Spellcheck',\n settings: false,\n enabled: true,\n },\n coordinatesOnHover: {\n settings: true,\n label: 'Coordinates on Hover',\n },\n maxImageWidth: {\n teacherInstructions: 300,\n prompt: 300,\n rationale: 300,\n },\n maxImageHeight: {\n teacherInstructions: 300,\n prompt: 300,\n rationale: 300,\n },\n withRubric: {\n settings: false,\n label: 'Add Rubric',\n },\n language: {\n settings: false,\n label: 'Specify Language',\n enabled: false,\n },\n languageChoices: {\n label: 'Language Choices',\n options: [],\n },\n mathMlOptions: {\n mmlOutput: false,\n mmlEditing: false,\n },\n removeIncompleteTool: false,\n },\n};\n","// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/graphing/configure/src/index.js\n * @auto-generated\n *\n * This file is automatically synced from pie-elements and converted to TypeScript.\n * Manual edits will be overwritten on next sync.\n * To make changes, edit the upstream JavaScript file and run sync again.\n */\n\nimport React from 'react';\nimport { createRoot } from 'react-dom/client';\nimport Configure from './configure.js';\nimport {\n DeleteImageEvent,\n DeleteSoundEvent,\n InsertImageEvent,\n InsertSoundEvent,\n ModelUpdatedEvent,\n} from '@pie-element/shared-configure-events';\nimport debug from 'debug';\nimport defaultValues from './defaults.js';\nimport { renderMath } from '@pie-element/shared-math-rendering-mathjax';\nimport { cloneDeep } from 'lodash-es';\n\nconst log = debug('pie-elements:graphing:configure');\n\n// this function is implemented in controller as well\nconst sortedAnswers = (answers) =>\n Object.keys(answers || {})\n .sort()\n .reduce((result, key) => {\n if (key !== 'correctAnswer') {\n result[key] = answers[key];\n }\n\n return result;\n }, {});\n\nexport default class GraphLinesConfigure extends HTMLElement {\n static createDefaultModel = (model = {}) => {\n const normalizedModel = { ...defaultValues.model, ...model };\n const {\n answers = {},\n domain = {},\n defaultTool,\n graph = {},\n range = {},\n standardGrid,\n toolbarTools,\n } = normalizedModel;\n\n // added support for models without defaultTool defined; also used in packages/graphing/controller/src/index.js\n const toolbarToolsNoLabel = (toolbarTools || []).filter((tool) => tool !== 'label');\n const normalizedDefaultTool = defaultTool || (toolbarToolsNoLabel.length && toolbarToolsNoLabel[0]) || '';\n\n return {\n ...normalizedModel,\n answers:\n (answers &&\n answers.correctAnswer && {\n correctAnswer: answers.correctAnswer,\n ...sortedAnswers(answers),\n }) ||\n answers,\n defaultTool: normalizedDefaultTool,\n range:\n (standardGrid && {\n ...range,\n min: domain.min,\n max: domain.max,\n step: domain.step,\n labelStep: domain.labelStep,\n }) ||\n range,\n graph: (standardGrid && { ...graph, height: graph.width }) || graph,\n };\n };\n\n constructor() {\n super();\n this._root = null;\n this._model = GraphLinesConfigure.createDefaultModel();\n this._configuration = defaultValues.configuration;\n }\n\n set model(m) {\n this._model = GraphLinesConfigure.createDefaultModel(m);\n this._modelCopy = cloneDeep(this._model);\n\n this._render();\n }\n\n resetModelAfterConfigurationIsSet: any = () => {\n // In environments that use pie-player-components, model is set before configuration.\n // This is the reason why sometimes the model gets altered non-reversible\n // (altered using default configuration instead of client configuration, because at that point client configuration was not set yet)\n // Therefore, in such environments, we will make sure to keep a modelCopy (initialised in set model) and use it to reset\n // the model in set configuration (resetModelAfterConfigurationIsSet) if set configuration is ever called\n const pieAuthors = document.querySelectorAll('pie-author');\n this.hasPlayerAsParent = Array.from(pieAuthors).some((author) => author.contains(this));\n\n if (this.hasPlayerAsParent) {\n if (this._modelCopy) {\n this._model = this._modelCopy;\n } else {\n delete this._modelCopy;\n }\n }\n };\n\n set configuration(c) {\n this._configuration = {\n ...defaultValues.configuration,\n ...c,\n };\n\n this.resetModelAfterConfigurationIsSet();\n\n // if language:enabled is true, then the corresponding default item model should include a language value;\n // if it is false, then the language field should be omitted from the item model.\n // if a default item model includes a language value (e.g., en_US) and the corresponding authoring view settings have language:settings = true,\n // then (a) language:enabled should also be true, and (b) that default language value should be represented in languageChoices[] (as a key).\n //TODO: add logic in controller and add tests\n if (c.language?.enabled) {\n if (c.languageChoices?.options?.length) {\n this._model.language = c.languageChoices.options[0].value;\n }\n } else {\n if (c.language.settings) {\n if (this._model.language) {\n this._configuration.language.enabled = true;\n }\n } else {\n delete this._model.language;\n }\n }\n\n this._render();\n }\n\n onModelChanged: any = (model) => {\n this._model = model;\n this._render();\n\n log('[onModelChanged]: ', this._model);\n\n this.dispatchEvent(new ModelUpdatedEvent(this._model));\n };\n\n onConfigurationChanged: any = (config) => {\n this._configuration = config;\n this._render();\n };\n\n insertImage: any = (handler) => {\n this.dispatchEvent(new InsertImageEvent(handler));\n };\n\n onDeleteImage: any = (src, done) => {\n this.dispatchEvent(new DeleteImageEvent(src, done));\n };\n\n insertSound(handler) {\n this.dispatchEvent(new InsertSoundEvent(handler));\n }\n\n onDeleteSound(src, done) {\n this.dispatchEvent(new DeleteSoundEvent(src, done));\n }\n\n _render() {\n if (this._model) {\n const el = React.createElement(Configure, {\n onModelChanged: this.onModelChanged,\n onConfigurationChanged: this.onConfigurationChanged,\n model: this._model,\n configuration: this._configuration,\n imageSupport: {\n add: this.insertImage,\n delete: this.onDeleteImage,\n },\n uploadSoundSupport: {\n add: this.insertSound.bind(this),\n delete: this.onDeleteSound.bind(this),\n },\n });\n\n if (!this._root) {\n this._root = createRoot(this);\n }\n this._root.render(el);\n queueMicrotask(() => {\n renderMath(this);\n });\n }\n }\n\n disconnectedCallback() {\n if (this._root) {\n this._root.unmount();\n }\n }\n}\n"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,66,67,68,69,70,71,83],"mappings":";;;;;;;;AAQA,IAAI,KAAY,KAAK;AAYrB,SAAS,GAAiB,GAAQ,GAAU,GAAY;CAStD,KARA,IAAI,IAAW,IAAa,IAAoB,GAC5C,IAAS,EAAO,GAAG,QAC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;KACN,SAAS;KACT,WAAW;KACX,WAAW;IACb;IACA,cAAc;IACd,OAAO;GACT;GACA;IACE,OAAO;IACP,QAAQ;KACN,MAAM;KACN,OAAO;KACP,IAAI;KACJ,MAAM;IACR;IACA,QAAQ;KACN,KAAK;KACL,KAAK;KACL,MAAM;KACN,SAAS;KACT,WAAW;KACX,WAAW;IACb;IACA,OAAO;KACL,OAAO;KACP,QAAQ;IACV;IACA,aAAa;IACb,QAAQ;KACN,KAAK;KACL,OAAO;KACP,QAAQ;KACR,MAAM;IACR;IACA,SAAS;IACT,OAAO;KACL,KAAK;KACL,KAAK;KACL,MAAM;KACN,SAAS;KACT,WAAW;KACX,WAAW;IACb;IACA,cAAc;IACd,OAAO;GACT;GACA;IACE,OAAO;IACP,QAAQ;KACN,MAAM;KACN,OAAO;KACP,IAAI;KACJ,MAAM;IACR;IACA,QAAQ;KACN,KAAK;KACL,KAAK;KACL,MAAM;KACN,SAAS;KACT,WAAW;KACX,WAAW;IACb;IACA,OAAO;KACL,OAAO;KACP,QAAQ;IACV;IACA,aAAa;IACb,QAAQ;KACN,KAAK;KACL,OAAO;KACP,QAAQ;KACR,MAAM;IACR;IACA,SAAS;IACT,OAAO;KACL,KAAK;KACL,KAAK;KACL,MAAM;KACN,SAAS;KACT,WAAW;KACX,WAAW;IACb;IACA,cAAc;IACd,OAAO;GACT;GACA;IACE,OAAO;IACP,QAAQ;KACN,MAAM;KACN,OAAO;KACP,IAAI;KACJ,MAAM;IACR;IACA,QAAQ;KACN,KAAK;KACL,KAAK;KACL,MAAM;KACN,SAAS;KACT,WAAW;KACX,WAAW;IACb;IACA,OAAO;KACL,OAAO;KACP,QAAQ;IACV;IACA,aAAa;IACb,QAAQ;KACN,KAAK;KACL,OAAO;KACP,QAAQ;KACR,MAAM;IACR;IACA,SAAS;IACT,OAAO;KACL,KAAK;KACL,KAAK;KACL,MAAM;KACN,SAAS;KACT,WAAW;KACX,WAAW;IACb;IACA,cAAc;IACd,OAAO;GACT;EACF;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F,CAAC;GAMD,AAJA,AACE,KAAK,UAAQ,GAAW,IAAI,GAE9B,KAAK,MAAM,OAAO,CAAE,GACpB,qBAAqB;IACnB,GAAW,IAAI;GACjB,CAAC;EACH;CACF;CAEA,uBAAuB;EACrB,AAAI,KAAK,SACP,KAAK,MAAM,QAAQ;CAEvB;AACF"}
1
+ {"version":3,"file":"index.js","names":["useUtilityClasses","capitalize","useControlled","useUtilityClasses","capitalize","defaultCheckedIcon","CheckBoxIcon","defaultIcon","CheckBoxOutlineBlankIcon","IndeterminateCheckBoxIcon","useUtilityClasses","capitalize","capitalize","useUtilityClasses","React","RadioButtonUncheckedIcon","RadioButtonCheckedIcon","React","useUtilityClasses","capitalize","createChainedFunction","useUtilityClasses","capitalize","React","useControlled","useId","useEventCallback","useForkRef","capitalize","e","e","e","t","e","e","t","n","r","i","a","o","s","c","l","u","d","f","S","p","g","_","y","v","b","x","C","w","T","E","D","O","s","c","l","u","d","r","a","e","t","i","o","f"],"sources":["../../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/utils/createChainedFunction.js","../../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/internal/switchBaseClasses.js","../../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/internal/SwitchBase.js","../../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/internal/svg-icons/CheckBoxOutlineBlank.js","../../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/internal/svg-icons/CheckBox.js","../../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/internal/svg-icons/IndeterminateCheckBox.js","../../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Checkbox/checkboxClasses.js","../../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Checkbox/Checkbox.js","../../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/FormControlLabel/formControlLabelClasses.js","../../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/FormControlLabel/FormControlLabel.js","../../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/InputAdornment/inputAdornmentClasses.js","../../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/InputAdornment/InputAdornment.js","../../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/internal/svg-icons/RadioButtonUnchecked.js","../../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/internal/svg-icons/RadioButtonChecked.js","../../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Radio/RadioButtonIcon.js","../../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/RadioGroup/RadioGroupContext.js","../../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/RadioGroup/useRadioGroup.js","../../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Radio/radioClasses.js","../../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Radio/Radio.js","../../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Tooltip/tooltipClasses.js","../../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Tooltip/Tooltip.js","../../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Switch/switchClasses.js","../../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Switch/Switch.js","../../../../../lib-react/config-ui/dist/alert-dialog.js","../../../../../lib-react/config-ui/dist/radio-with-label.js","../../../../../lib-react/config-ui/dist/tabs/index.js","../../../../../lib-react/config-ui/dist/checkbox.js","../../../../../lib-react/config-ui/dist/number-text-field.js","../../../../../lib-react/config-ui/dist/fraction-to-number.js","../../../../../../node_modules/.bun/@mui+icons-material@7.3.11+44ccb211c00abd9d/node_modules/@mui/icons-material/esm/Remove.js","../../../../../../node_modules/.bun/@mui+icons-material@7.3.11+44ccb211c00abd9d/node_modules/@mui/icons-material/esm/Add.js","../../../../../lib-react/config-ui/dist/number-text-field-custom.js","../../../../../lib-react/config-ui/dist/two-choice.js","../../../../../lib-react/config-ui/dist/_virtual/_rolldown/runtime.js","../../../../../lib-react/config-ui/dist/layout/layout-contents.js","../../../../../lib-react/config-ui/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/extends.js","../../../../../lib-react/config-ui/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","../../../../../lib-react/config-ui/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","../../../../../lib-react/config-ui/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","../../../../../lib-react/config-ui/dist/node_modules/.bun/resize-observer-polyfill@1.5.1/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js","../../../../../lib-react/config-ui/dist/node_modules/.bun/react-measure@2.5.2_6dbf9a050bc9aadb/node_modules/react-measure/dist/index.esm.js","../../../../../lib-react/config-ui/dist/layout/settings-box.js","../../../../../lib-react/config-ui/dist/layout/config-layout.js","../../../../../lib-react/config-ui/dist/layout/index.js","../../../../../lib-react/config-ui/dist/settings/toggle.js","../../../../../lib-react/config-ui/dist/settings/settings-radio-label.js","../../../../../lib-react/config-ui/dist/settings/panel.js","../../../../../lib-react/config-ui/dist/settings/index.js","../../../../../lib-react/config-ui/dist/index.js","../../../../../lib-react/graphing/dist/grid-setup.js","../../../src/author/utils.ts","../../../src/author/graphing-config.tsx","../../../../../../node_modules/.bun/@mui+icons-material@7.3.11+44ccb211c00abd9d/node_modules/@mui/icons-material/esm/Info.js","../../../src/author/correct-response.tsx","../../../src/author/configure.tsx","../../../../../shared/configure-events/dist/index.js","../../../src/author/defaults.tsx","../../../src/author/index.ts"],"sourcesContent":["import createChainedFunction from '@mui/utils/createChainedFunction';\nexport default createChainedFunction;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getSwitchBaseUtilityClass(slot) {\n return generateUtilityClass('PrivateSwitchBase', slot);\n}\nconst switchBaseClasses = generateUtilityClasses('PrivateSwitchBase', ['root', 'checked', 'disabled', 'input', 'edgeStart', 'edgeEnd']);\nexport default switchBaseClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport refType from '@mui/utils/refType';\nimport composeClasses from '@mui/utils/composeClasses';\nimport capitalize from \"../utils/capitalize.js\";\nimport rootShouldForwardProp from \"../styles/rootShouldForwardProp.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport useControlled from \"../utils/useControlled.js\";\nimport useFormControl from \"../FormControl/useFormControl.js\";\nimport ButtonBase from \"../ButtonBase/index.js\";\nimport { getSwitchBaseUtilityClass } from \"./switchBaseClasses.js\";\nimport useSlot from \"../utils/useSlot.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n checked,\n disabled,\n edge\n } = ownerState;\n const slots = {\n root: ['root', checked && 'checked', disabled && 'disabled', edge && `edge${capitalize(edge)}`],\n input: ['input']\n };\n return composeClasses(slots, getSwitchBaseUtilityClass, classes);\n};\nconst SwitchBaseRoot = styled(ButtonBase, {\n name: 'MuiSwitchBase'\n})({\n padding: 9,\n borderRadius: '50%',\n variants: [{\n props: {\n edge: 'start',\n size: 'small'\n },\n style: {\n marginLeft: -3\n }\n }, {\n props: ({\n edge,\n ownerState\n }) => edge === 'start' && ownerState.size !== 'small',\n style: {\n marginLeft: -12\n }\n }, {\n props: {\n edge: 'end',\n size: 'small'\n },\n style: {\n marginRight: -3\n }\n }, {\n props: ({\n edge,\n ownerState\n }) => edge === 'end' && ownerState.size !== 'small',\n style: {\n marginRight: -12\n }\n }]\n});\nconst SwitchBaseInput = styled('input', {\n name: 'MuiSwitchBase',\n shouldForwardProp: rootShouldForwardProp\n})({\n cursor: 'inherit',\n position: 'absolute',\n opacity: 0,\n width: '100%',\n height: '100%',\n top: 0,\n left: 0,\n margin: 0,\n padding: 0,\n zIndex: 1\n});\n\n/**\n * @ignore - internal component.\n */\nconst SwitchBase = /*#__PURE__*/React.forwardRef(function SwitchBase(props, ref) {\n const {\n autoFocus,\n checked: checkedProp,\n checkedIcon,\n defaultChecked,\n disabled: disabledProp,\n disableFocusRipple = false,\n edge = false,\n icon,\n id,\n inputProps,\n inputRef,\n name,\n onBlur,\n onChange,\n onFocus,\n readOnly,\n required = false,\n tabIndex,\n type,\n value,\n slots = {},\n slotProps = {},\n ...other\n } = props;\n const [checked, setCheckedState] = useControlled({\n controlled: checkedProp,\n default: Boolean(defaultChecked),\n name: 'SwitchBase',\n state: 'checked'\n });\n const muiFormControl = useFormControl();\n const handleFocus = event => {\n if (onFocus) {\n onFocus(event);\n }\n if (muiFormControl && muiFormControl.onFocus) {\n muiFormControl.onFocus(event);\n }\n };\n const handleBlur = event => {\n if (onBlur) {\n onBlur(event);\n }\n if (muiFormControl && muiFormControl.onBlur) {\n muiFormControl.onBlur(event);\n }\n };\n const handleInputChange = event => {\n // Workaround for https://github.com/facebook/react/issues/9023\n if (event.nativeEvent.defaultPrevented || readOnly) {\n return;\n }\n const newChecked = event.target.checked;\n setCheckedState(newChecked);\n if (onChange) {\n // TODO v6: remove the second argument.\n onChange(event, newChecked);\n }\n };\n let disabled = disabledProp;\n if (muiFormControl) {\n if (typeof disabled === 'undefined') {\n disabled = muiFormControl.disabled;\n }\n }\n const hasLabelFor = type === 'checkbox' || type === 'radio';\n const ownerState = {\n ...props,\n checked,\n disabled,\n disableFocusRipple,\n edge\n };\n const classes = useUtilityClasses(ownerState);\n const externalForwardedProps = {\n slots,\n slotProps: {\n input: inputProps,\n ...slotProps\n }\n };\n const [RootSlot, rootSlotProps] = useSlot('root', {\n ref,\n elementType: SwitchBaseRoot,\n className: classes.root,\n shouldForwardComponentProp: true,\n externalForwardedProps: {\n ...externalForwardedProps,\n component: 'span',\n ...other\n },\n getSlotProps: handlers => ({\n ...handlers,\n onFocus: event => {\n handlers.onFocus?.(event);\n handleFocus(event);\n },\n onBlur: event => {\n handlers.onBlur?.(event);\n handleBlur(event);\n }\n }),\n ownerState,\n additionalProps: {\n centerRipple: true,\n focusRipple: !disableFocusRipple,\n role: undefined,\n tabIndex: null\n }\n });\n const [InputSlot, inputSlotProps] = useSlot('input', {\n ref: inputRef,\n elementType: SwitchBaseInput,\n className: classes.input,\n externalForwardedProps,\n getSlotProps: handlers => ({\n ...handlers,\n onChange: event => {\n handlers.onChange?.(event);\n handleInputChange(event);\n }\n }),\n ownerState,\n additionalProps: {\n autoFocus,\n checked: checkedProp,\n defaultChecked,\n disabled,\n id: hasLabelFor ? id : undefined,\n name,\n readOnly,\n required,\n tabIndex,\n type,\n ...(type === 'checkbox' && value === undefined ? {} : {\n value\n })\n }\n });\n return /*#__PURE__*/_jsxs(RootSlot, {\n ...rootSlotProps,\n children: [/*#__PURE__*/_jsx(InputSlot, {\n ...inputSlotProps\n }), checked ? checkedIcon : icon]\n });\n});\n\n// NB: If changed, please update Checkbox, Switch and Radio\n// so that the API documentation is updated.\nprocess.env.NODE_ENV !== \"production\" ? SwitchBase.propTypes = {\n /**\n * If `true`, the `input` element is focused during the first mount.\n */\n autoFocus: PropTypes.bool,\n /**\n * If `true`, the component is checked.\n */\n checked: PropTypes.bool,\n /**\n * The icon to display when the component is checked.\n */\n checkedIcon: PropTypes.node.isRequired,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * @ignore\n */\n defaultChecked: PropTypes.bool,\n /**\n * If `true`, the component is disabled.\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, the keyboard focus ripple is disabled.\n * @default false\n */\n disableFocusRipple: PropTypes.bool,\n /**\n * If given, uses a negative margin to counteract the padding on one\n * side (this is often helpful for aligning the left or right\n * side of the icon with content above or below, without ruining the border\n * size and shape).\n * @default false\n */\n edge: PropTypes.oneOf(['end', 'start', false]),\n /**\n * The icon to display when the component is unchecked.\n */\n icon: PropTypes.node.isRequired,\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#attributes) applied to the `input` element.\n */\n inputProps: PropTypes.object,\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n /*\n * @ignore\n */\n name: PropTypes.string,\n /**\n * @ignore\n */\n onBlur: PropTypes.func,\n /**\n * Callback fired when the state is changed.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new checked state by accessing `event.target.checked` (boolean).\n */\n onChange: PropTypes.func,\n /**\n * @ignore\n */\n onFocus: PropTypes.func,\n /**\n * It prevents the user from changing the value of the field\n * (not from interacting with the field).\n */\n readOnly: PropTypes.bool,\n /**\n * If `true`, the `input` element is required.\n */\n required: PropTypes.bool,\n /**\n * The props used for each slot inside.\n * @default {}\n */\n slotProps: PropTypes.shape({\n input: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside.\n * @default {}\n */\n slots: PropTypes.shape({\n input: PropTypes.elementType,\n root: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.object,\n /**\n * @ignore\n */\n tabIndex: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /**\n * The input component prop `type`.\n */\n type: PropTypes.string.isRequired,\n /**\n * The value of the component.\n */\n value: PropTypes.any\n} : void 0;\nexport default SwitchBase;","'use client';\n\nimport createSvgIcon from \"../../utils/createSvgIcon.js\";\n\n/**\n * @ignore - internal component.\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z\"\n}), 'CheckBoxOutlineBlank');","'use client';\n\nimport createSvgIcon from \"../../utils/createSvgIcon.js\";\n\n/**\n * @ignore - internal component.\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z\"\n}), 'CheckBox');","'use client';\n\nimport createSvgIcon from \"../../utils/createSvgIcon.js\";\n\n/**\n * @ignore - internal component.\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z\"\n}), 'IndeterminateCheckBox');","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getCheckboxUtilityClass(slot) {\n return generateUtilityClass('MuiCheckbox', slot);\n}\nconst checkboxClasses = generateUtilityClasses('MuiCheckbox', ['root', 'checked', 'disabled', 'indeterminate', 'colorPrimary', 'colorSecondary', 'sizeSmall', 'sizeMedium']);\nexport default checkboxClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport SwitchBase from \"../internal/SwitchBase.js\";\nimport CheckBoxOutlineBlankIcon from \"../internal/svg-icons/CheckBoxOutlineBlank.js\";\nimport CheckBoxIcon from \"../internal/svg-icons/CheckBox.js\";\nimport IndeterminateCheckBoxIcon from \"../internal/svg-icons/IndeterminateCheckBox.js\";\nimport capitalize from \"../utils/capitalize.js\";\nimport rootShouldForwardProp from \"../styles/rootShouldForwardProp.js\";\nimport checkboxClasses, { getCheckboxUtilityClass } from \"./checkboxClasses.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport createSimplePaletteValueFilter from \"../utils/createSimplePaletteValueFilter.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport { mergeSlotProps } from \"../utils/index.js\";\nimport useSlot from \"../utils/useSlot.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n indeterminate,\n color,\n size\n } = ownerState;\n const slots = {\n root: ['root', indeterminate && 'indeterminate', `color${capitalize(color)}`, `size${capitalize(size)}`]\n };\n const composedClasses = composeClasses(slots, getCheckboxUtilityClass, classes);\n return {\n ...classes,\n // forward the disabled and checked classes to the SwitchBase\n ...composedClasses\n };\n};\nconst CheckboxRoot = styled(SwitchBase, {\n shouldForwardProp: prop => rootShouldForwardProp(prop) || prop === 'classes',\n name: 'MuiCheckbox',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.indeterminate && styles.indeterminate, styles[`size${capitalize(ownerState.size)}`], ownerState.color !== 'default' && styles[`color${capitalize(ownerState.color)}`]];\n }\n})(memoTheme(({\n theme\n}) => ({\n color: (theme.vars || theme).palette.text.secondary,\n variants: [{\n props: {\n color: 'default',\n disableRipple: false\n },\n style: {\n '&:hover': {\n backgroundColor: theme.alpha((theme.vars || theme).palette.action.active, (theme.vars || theme).palette.action.hoverOpacity)\n }\n }\n }, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({\n props: {\n color,\n disableRipple: false\n },\n style: {\n '&:hover': {\n backgroundColor: theme.alpha((theme.vars || theme).palette[color].main, (theme.vars || theme).palette.action.hoverOpacity)\n }\n }\n })), ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({\n props: {\n color\n },\n style: {\n [`&.${checkboxClasses.checked}, &.${checkboxClasses.indeterminate}`]: {\n color: (theme.vars || theme).palette[color].main\n },\n [`&.${checkboxClasses.disabled}`]: {\n color: (theme.vars || theme).palette.action.disabled\n }\n }\n })), {\n // Should be last to override other colors\n props: {\n disableRipple: false\n },\n style: {\n // Reset on touch devices, it doesn't add specificity\n '&:hover': {\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n }\n }]\n})));\nconst defaultCheckedIcon = /*#__PURE__*/_jsx(CheckBoxIcon, {});\nconst defaultIcon = /*#__PURE__*/_jsx(CheckBoxOutlineBlankIcon, {});\nconst defaultIndeterminateIcon = /*#__PURE__*/_jsx(IndeterminateCheckBoxIcon, {});\nconst Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiCheckbox'\n });\n const {\n checkedIcon = defaultCheckedIcon,\n color = 'primary',\n icon: iconProp = defaultIcon,\n indeterminate = false,\n indeterminateIcon: indeterminateIconProp = defaultIndeterminateIcon,\n inputProps,\n size = 'medium',\n disableRipple = false,\n className,\n slots = {},\n slotProps = {},\n ...other\n } = props;\n const icon = indeterminate ? indeterminateIconProp : iconProp;\n const indeterminateIcon = indeterminate ? indeterminateIconProp : checkedIcon;\n const ownerState = {\n ...props,\n disableRipple,\n color,\n indeterminate,\n size\n };\n const classes = useUtilityClasses(ownerState);\n const externalInputProps = slotProps.input ?? inputProps;\n const [RootSlot, rootSlotProps] = useSlot('root', {\n ref,\n elementType: CheckboxRoot,\n className: clsx(classes.root, className),\n shouldForwardComponentProp: true,\n externalForwardedProps: {\n slots,\n slotProps,\n ...other\n },\n ownerState,\n additionalProps: {\n type: 'checkbox',\n icon: /*#__PURE__*/React.cloneElement(icon, {\n fontSize: icon.props.fontSize ?? size\n }),\n checkedIcon: /*#__PURE__*/React.cloneElement(indeterminateIcon, {\n fontSize: indeterminateIcon.props.fontSize ?? size\n }),\n disableRipple,\n slots,\n slotProps: {\n input: mergeSlotProps(typeof externalInputProps === 'function' ? externalInputProps(ownerState) : externalInputProps, {\n 'data-indeterminate': indeterminate,\n 'aria-checked': indeterminate ? 'mixed' : undefined\n })\n }\n }\n });\n return /*#__PURE__*/_jsx(RootSlot, {\n ...rootSlotProps,\n classes: classes\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Checkbox.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * If `true`, the component is checked.\n */\n checked: PropTypes.bool,\n /**\n * The icon to display when the component is checked.\n * @default <CheckBoxIcon />\n */\n checkedIcon: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The color of the component.\n * It supports both default and custom theme colors, which can be added as shown in the\n * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).\n * @default 'primary'\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['default', 'primary', 'secondary', 'error', 'info', 'success', 'warning']), PropTypes.string]),\n /**\n * The default checked state. Use when the component is not controlled.\n */\n defaultChecked: PropTypes.bool,\n /**\n * If `true`, the component is disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, the ripple effect is disabled.\n * @default false\n */\n disableRipple: PropTypes.bool,\n /**\n * The icon to display when the component is unchecked.\n * @default <CheckBoxOutlineBlankIcon />\n */\n icon: PropTypes.node,\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n /**\n * If `true`, the component appears indeterminate.\n * This does not set the native input element to indeterminate due\n * to inconsistent behavior across browsers.\n * However, we set a `data-indeterminate` attribute on the `input`.\n * @default false\n */\n indeterminate: PropTypes.bool,\n /**\n * The icon to display when the component is indeterminate.\n * @default <IndeterminateCheckBoxIcon />\n */\n indeterminateIcon: PropTypes.node,\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#attributes) applied to the `input` element.\n * @deprecated Use `slotProps.input` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n */\n inputProps: PropTypes.object,\n /**\n * Callback fired when the state is changed.\n *\n * @param {React.ChangeEvent<HTMLInputElement>} event The event source of the callback.\n * You can pull out the new checked state by accessing `event.target.checked` (boolean).\n */\n onChange: PropTypes.func,\n /**\n * If `true`, the `input` element is required.\n * @default false\n */\n required: PropTypes.bool,\n /**\n * The size of the component.\n * `small` is equivalent to the dense checkbox styling.\n * @default 'medium'\n */\n size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['medium', 'small']), PropTypes.string]),\n /**\n * The props used for each slot inside.\n * @default {}\n */\n slotProps: PropTypes.shape({\n input: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside.\n * @default {}\n */\n slots: PropTypes.shape({\n input: PropTypes.elementType,\n root: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The value of the component. The DOM API casts this to a string.\n * The browser uses \"on\" as the default value.\n */\n value: PropTypes.any\n} : void 0;\nexport default Checkbox;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getFormControlLabelUtilityClasses(slot) {\n return generateUtilityClass('MuiFormControlLabel', slot);\n}\nconst formControlLabelClasses = generateUtilityClasses('MuiFormControlLabel', ['root', 'labelPlacementStart', 'labelPlacementTop', 'labelPlacementBottom', 'disabled', 'label', 'error', 'required', 'asterisk']);\nexport default formControlLabelClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport refType from '@mui/utils/refType';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { useFormControl } from \"../FormControl/index.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport Typography from \"../Typography/index.js\";\nimport capitalize from \"../utils/capitalize.js\";\nimport formControlLabelClasses, { getFormControlLabelUtilityClasses } from \"./formControlLabelClasses.js\";\nimport formControlState from \"../FormControl/formControlState.js\";\nimport useSlot from \"../utils/useSlot.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n disabled,\n labelPlacement,\n error,\n required\n } = ownerState;\n const slots = {\n root: ['root', disabled && 'disabled', `labelPlacement${capitalize(labelPlacement)}`, error && 'error', required && 'required'],\n label: ['label', disabled && 'disabled'],\n asterisk: ['asterisk', error && 'error']\n };\n return composeClasses(slots, getFormControlLabelUtilityClasses, classes);\n};\nexport const FormControlLabelRoot = styled('label', {\n name: 'MuiFormControlLabel',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [{\n [`& .${formControlLabelClasses.label}`]: styles.label\n }, styles.root, styles[`labelPlacement${capitalize(ownerState.labelPlacement)}`]];\n }\n})(memoTheme(({\n theme\n}) => ({\n display: 'inline-flex',\n alignItems: 'center',\n cursor: 'pointer',\n // For correct alignment with the text.\n verticalAlign: 'middle',\n WebkitTapHighlightColor: 'transparent',\n marginLeft: -11,\n marginRight: 16,\n // used for row presentation of radio/checkbox\n [`&.${formControlLabelClasses.disabled}`]: {\n cursor: 'default'\n },\n [`& .${formControlLabelClasses.label}`]: {\n [`&.${formControlLabelClasses.disabled}`]: {\n color: (theme.vars || theme).palette.text.disabled\n }\n },\n variants: [{\n props: {\n labelPlacement: 'start'\n },\n style: {\n flexDirection: 'row-reverse',\n marginRight: -11\n }\n }, {\n props: {\n labelPlacement: 'top'\n },\n style: {\n flexDirection: 'column-reverse'\n }\n }, {\n props: {\n labelPlacement: 'bottom'\n },\n style: {\n flexDirection: 'column'\n }\n }, {\n props: ({\n labelPlacement\n }) => labelPlacement === 'start' || labelPlacement === 'top' || labelPlacement === 'bottom',\n style: {\n marginLeft: 16 // used for row presentation of radio/checkbox\n }\n }]\n})));\nconst AsteriskComponent = styled('span', {\n name: 'MuiFormControlLabel',\n slot: 'Asterisk'\n})(memoTheme(({\n theme\n}) => ({\n [`&.${formControlLabelClasses.error}`]: {\n color: (theme.vars || theme).palette.error.main\n }\n})));\n\n/**\n * Drop-in replacement of the `Radio`, `Switch` and `Checkbox` component.\n * Use this component if you want to display an extra label.\n */\nconst FormControlLabel = /*#__PURE__*/React.forwardRef(function FormControlLabel(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiFormControlLabel'\n });\n const {\n checked,\n className,\n componentsProps = {},\n control,\n disabled: disabledProp,\n disableTypography,\n inputRef,\n label: labelProp,\n labelPlacement = 'end',\n name,\n onChange,\n required: requiredProp,\n slots = {},\n slotProps = {},\n value,\n ...other\n } = props;\n const muiFormControl = useFormControl();\n const disabled = disabledProp ?? control.props.disabled ?? muiFormControl?.disabled;\n const required = requiredProp ?? control.props.required;\n const controlProps = {\n disabled,\n required\n };\n ['checked', 'name', 'onChange', 'value', 'inputRef'].forEach(key => {\n if (typeof control.props[key] === 'undefined' && typeof props[key] !== 'undefined') {\n controlProps[key] = props[key];\n }\n });\n const fcs = formControlState({\n props,\n muiFormControl,\n states: ['error']\n });\n const ownerState = {\n ...props,\n disabled,\n labelPlacement,\n required,\n error: fcs.error\n };\n const classes = useUtilityClasses(ownerState);\n const externalForwardedProps = {\n slots,\n slotProps: {\n ...componentsProps,\n ...slotProps\n }\n };\n const [TypographySlot, typographySlotProps] = useSlot('typography', {\n elementType: Typography,\n externalForwardedProps,\n ownerState\n });\n let label = labelProp;\n if (label != null && label.type !== Typography && !disableTypography) {\n label = /*#__PURE__*/_jsx(TypographySlot, {\n component: \"span\",\n ...typographySlotProps,\n className: clsx(classes.label, typographySlotProps?.className),\n children: label\n });\n }\n return /*#__PURE__*/_jsxs(FormControlLabelRoot, {\n className: clsx(classes.root, className),\n ownerState: ownerState,\n ref: ref,\n ...other,\n children: [/*#__PURE__*/React.cloneElement(control, controlProps), required ? /*#__PURE__*/_jsxs(\"div\", {\n children: [label, /*#__PURE__*/_jsxs(AsteriskComponent, {\n ownerState: ownerState,\n \"aria-hidden\": true,\n className: classes.asterisk,\n children: [\"\\u2009\", '*']\n })]\n }) : label]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? FormControlLabel.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * If `true`, the component appears selected.\n */\n checked: PropTypes.bool,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The props used for each slot inside.\n * @default {}\n * @deprecated use the `slotProps` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n */\n componentsProps: PropTypes.shape({\n typography: PropTypes.object\n }),\n /**\n * A control element. For instance, it can be a `Radio`, a `Switch` or a `Checkbox`.\n */\n control: PropTypes.element.isRequired,\n /**\n * If `true`, the control is disabled.\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, the label is rendered as it is passed without an additional typography node.\n */\n disableTypography: PropTypes.bool,\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n /**\n * A text or an element to be used in an enclosing label element.\n */\n label: PropTypes.node,\n /**\n * The position of the label.\n * @default 'end'\n */\n labelPlacement: PropTypes.oneOf(['bottom', 'end', 'start', 'top']),\n /**\n * @ignore\n */\n name: PropTypes.string,\n /**\n * Callback fired when the state is changed.\n *\n * @param {React.SyntheticEvent} event The event source of the callback.\n * You can pull out the new checked state by accessing `event.target.checked` (boolean).\n */\n onChange: PropTypes.func,\n /**\n * If `true`, the label will indicate that the `input` is required.\n */\n required: PropTypes.bool,\n /**\n * The props used for each slot inside.\n * @default {}\n */\n slotProps: PropTypes.shape({\n typography: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside.\n * @default {}\n */\n slots: PropTypes.shape({\n typography: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The value of the component.\n */\n value: PropTypes.any\n} : void 0;\nexport default FormControlLabel;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getInputAdornmentUtilityClass(slot) {\n return generateUtilityClass('MuiInputAdornment', slot);\n}\nconst inputAdornmentClasses = generateUtilityClasses('MuiInputAdornment', ['root', 'filled', 'standard', 'outlined', 'positionStart', 'positionEnd', 'disablePointerEvents', 'hiddenLabel', 'sizeSmall']);\nexport default inputAdornmentClasses;","'use client';\n\nvar _span;\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport capitalize from \"../utils/capitalize.js\";\nimport Typography from \"../Typography/index.js\";\nimport FormControlContext from \"../FormControl/FormControlContext.js\";\nimport useFormControl from \"../FormControl/useFormControl.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport inputAdornmentClasses, { getInputAdornmentUtilityClass } from \"./inputAdornmentClasses.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst overridesResolver = (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, styles[`position${capitalize(ownerState.position)}`], ownerState.disablePointerEvents === true && styles.disablePointerEvents, styles[ownerState.variant]];\n};\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n disablePointerEvents,\n hiddenLabel,\n position,\n size,\n variant\n } = ownerState;\n const slots = {\n root: ['root', disablePointerEvents && 'disablePointerEvents', position && `position${capitalize(position)}`, variant, hiddenLabel && 'hiddenLabel', size && `size${capitalize(size)}`]\n };\n return composeClasses(slots, getInputAdornmentUtilityClass, classes);\n};\nconst InputAdornmentRoot = styled('div', {\n name: 'MuiInputAdornment',\n slot: 'Root',\n overridesResolver\n})(memoTheme(({\n theme\n}) => ({\n display: 'flex',\n maxHeight: '2em',\n alignItems: 'center',\n whiteSpace: 'nowrap',\n color: (theme.vars || theme).palette.action.active,\n variants: [{\n props: {\n variant: 'filled'\n },\n style: {\n [`&.${inputAdornmentClasses.positionStart}&:not(.${inputAdornmentClasses.hiddenLabel})`]: {\n marginTop: 16\n }\n }\n }, {\n props: {\n position: 'start'\n },\n style: {\n marginRight: 8\n }\n }, {\n props: {\n position: 'end'\n },\n style: {\n marginLeft: 8\n }\n }, {\n props: {\n disablePointerEvents: true\n },\n style: {\n pointerEvents: 'none'\n }\n }]\n})));\nconst InputAdornment = /*#__PURE__*/React.forwardRef(function InputAdornment(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiInputAdornment'\n });\n const {\n children,\n className,\n component = 'div',\n disablePointerEvents = false,\n disableTypography = false,\n position,\n variant: variantProp,\n ...other\n } = props;\n const muiFormControl = useFormControl() || {};\n let variant = variantProp;\n if (variantProp && muiFormControl.variant) {\n if (process.env.NODE_ENV !== 'production') {\n if (variantProp === muiFormControl.variant) {\n console.error('MUI: The `InputAdornment` variant infers the variant prop ' + 'you do not have to provide one.');\n }\n }\n }\n if (muiFormControl && !variant) {\n variant = muiFormControl.variant;\n }\n const ownerState = {\n ...props,\n hiddenLabel: muiFormControl.hiddenLabel,\n size: muiFormControl.size,\n disablePointerEvents,\n position,\n variant\n };\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(FormControlContext.Provider, {\n value: null,\n children: /*#__PURE__*/_jsx(InputAdornmentRoot, {\n as: component,\n ownerState: ownerState,\n className: clsx(classes.root, className),\n ref: ref,\n ...other,\n children: typeof children === 'string' && !disableTypography ? /*#__PURE__*/_jsx(Typography, {\n color: \"textSecondary\",\n children: children\n }) : /*#__PURE__*/_jsxs(React.Fragment, {\n children: [position === 'start' ? (/* notranslate needed while Google Translate will not fix zero-width space issue */_span || (_span = /*#__PURE__*/_jsx(\"span\", {\n className: \"notranslate\",\n \"aria-hidden\": true,\n children: \"\\u200B\"\n }))) : null, children]\n })\n })\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? InputAdornment.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The content of the component, normally an `IconButton` or string.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * Disable pointer events on the root.\n * This allows for the content of the adornment to focus the `input` on click.\n * @default false\n */\n disablePointerEvents: PropTypes.bool,\n /**\n * If children is a string then disable wrapping in a Typography component.\n * @default false\n */\n disableTypography: PropTypes.bool,\n /**\n * The position this adornment should appear relative to the `Input`.\n */\n position: PropTypes.oneOf(['end', 'start']).isRequired,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The variant to use.\n * Note: If you are using the `TextField` component or the `FormControl` component\n * you do not have to set this manually.\n */\n variant: PropTypes.oneOf(['filled', 'outlined', 'standard'])\n} : void 0;\nexport default InputAdornment;","'use client';\n\nimport createSvgIcon from \"../../utils/createSvgIcon.js\";\n\n/**\n * @ignore - internal component.\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z\"\n}), 'RadioButtonUnchecked');","'use client';\n\nimport createSvgIcon from \"../../utils/createSvgIcon.js\";\n\n/**\n * @ignore - internal component.\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z\"\n}), 'RadioButtonChecked');","'use client';\n\nimport PropTypes from 'prop-types';\nimport RadioButtonUncheckedIcon from \"../internal/svg-icons/RadioButtonUnchecked.js\";\nimport RadioButtonCheckedIcon from \"../internal/svg-icons/RadioButtonChecked.js\";\nimport rootShouldForwardProp from \"../styles/rootShouldForwardProp.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst RadioButtonIconRoot = styled('span', {\n name: 'MuiRadioButtonIcon',\n shouldForwardProp: rootShouldForwardProp\n})({\n position: 'relative',\n display: 'flex'\n});\nconst RadioButtonIconBackground = styled(RadioButtonUncheckedIcon, {\n name: 'MuiRadioButtonIcon'\n})({\n // Scale applied to prevent dot misalignment in Safari\n transform: 'scale(1)'\n});\nconst RadioButtonIconDot = styled(RadioButtonCheckedIcon, {\n name: 'MuiRadioButtonIcon'\n})(memoTheme(({\n theme\n}) => ({\n left: 0,\n position: 'absolute',\n transform: 'scale(0)',\n transition: theme.transitions.create('transform', {\n easing: theme.transitions.easing.easeIn,\n duration: theme.transitions.duration.shortest\n }),\n variants: [{\n props: {\n checked: true\n },\n style: {\n transform: 'scale(1)',\n transition: theme.transitions.create('transform', {\n easing: theme.transitions.easing.easeOut,\n duration: theme.transitions.duration.shortest\n })\n }\n }]\n})));\n\n/**\n * @ignore - internal component.\n */\nfunction RadioButtonIcon(props) {\n const {\n checked = false,\n classes = {},\n fontSize\n } = props;\n const ownerState = {\n ...props,\n checked\n };\n return /*#__PURE__*/_jsxs(RadioButtonIconRoot, {\n className: classes.root,\n ownerState: ownerState,\n children: [/*#__PURE__*/_jsx(RadioButtonIconBackground, {\n fontSize: fontSize,\n className: classes.background,\n ownerState: ownerState\n }), /*#__PURE__*/_jsx(RadioButtonIconDot, {\n fontSize: fontSize,\n className: classes.dot,\n ownerState: ownerState\n })]\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? RadioButtonIcon.propTypes /* remove-proptypes */ = {\n /**\n * If `true`, the component is checked.\n */\n checked: PropTypes.bool,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * The size of the component.\n * `small` is equivalent to the dense radio styling.\n */\n fontSize: PropTypes.oneOf(['small', 'medium'])\n} : void 0;\nexport default RadioButtonIcon;","'use client';\n\nimport * as React from 'react';\n/**\n * @ignore - internal component.\n */\nconst RadioGroupContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== 'production') {\n RadioGroupContext.displayName = 'RadioGroupContext';\n}\nexport default RadioGroupContext;","'use client';\n\nimport * as React from 'react';\nimport RadioGroupContext from \"./RadioGroupContext.js\";\nexport default function useRadioGroup() {\n return React.useContext(RadioGroupContext);\n}","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getRadioUtilityClass(slot) {\n return generateUtilityClass('MuiRadio', slot);\n}\nconst radioClasses = generateUtilityClasses('MuiRadio', ['root', 'checked', 'disabled', 'colorPrimary', 'colorSecondary', 'sizeSmall']);\nexport default radioClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport refType from '@mui/utils/refType';\nimport composeClasses from '@mui/utils/composeClasses';\nimport SwitchBase from \"../internal/SwitchBase.js\";\nimport RadioButtonIcon from \"./RadioButtonIcon.js\";\nimport capitalize from \"../utils/capitalize.js\";\nimport createChainedFunction from \"../utils/createChainedFunction.js\";\nimport useFormControl from \"../FormControl/useFormControl.js\";\nimport useRadioGroup from \"../RadioGroup/useRadioGroup.js\";\nimport radioClasses, { getRadioUtilityClass } from \"./radioClasses.js\";\nimport rootShouldForwardProp from \"../styles/rootShouldForwardProp.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport createSimplePaletteValueFilter from \"../utils/createSimplePaletteValueFilter.js\";\nimport useSlot from \"../utils/useSlot.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n color,\n size\n } = ownerState;\n const slots = {\n root: ['root', `color${capitalize(color)}`, size !== 'medium' && `size${capitalize(size)}`]\n };\n return {\n ...classes,\n ...composeClasses(slots, getRadioUtilityClass, classes)\n };\n};\nconst RadioRoot = styled(SwitchBase, {\n shouldForwardProp: prop => rootShouldForwardProp(prop) || prop === 'classes',\n name: 'MuiRadio',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.size !== 'medium' && styles[`size${capitalize(ownerState.size)}`], styles[`color${capitalize(ownerState.color)}`]];\n }\n})(memoTheme(({\n theme\n}) => ({\n color: (theme.vars || theme).palette.text.secondary,\n [`&.${radioClasses.disabled}`]: {\n color: (theme.vars || theme).palette.action.disabled\n },\n variants: [{\n props: {\n color: 'default',\n disabled: false,\n disableRipple: false\n },\n style: {\n '&:hover': {\n backgroundColor: theme.alpha((theme.vars || theme).palette.action.active, (theme.vars || theme).palette.action.hoverOpacity)\n }\n }\n }, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({\n props: {\n color,\n disabled: false,\n disableRipple: false\n },\n style: {\n '&:hover': {\n backgroundColor: theme.alpha((theme.vars || theme).palette[color].main, (theme.vars || theme).palette.action.hoverOpacity)\n }\n }\n })), ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({\n props: {\n color,\n disabled: false\n },\n style: {\n [`&.${radioClasses.checked}`]: {\n color: (theme.vars || theme).palette[color].main\n }\n }\n })), {\n // Should be last to override other colors\n props: {\n disableRipple: false\n },\n style: {\n // Reset on touch devices, it doesn't add specificity\n '&:hover': {\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n }\n }]\n})));\nfunction areEqualValues(a, b) {\n if (typeof b === 'object' && b !== null) {\n return a === b;\n }\n\n // The value could be a number, the DOM will stringify it anyway.\n return String(a) === String(b);\n}\nconst defaultCheckedIcon = /*#__PURE__*/_jsx(RadioButtonIcon, {\n checked: true\n});\nconst defaultIcon = /*#__PURE__*/_jsx(RadioButtonIcon, {});\nconst Radio = /*#__PURE__*/React.forwardRef(function Radio(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiRadio'\n });\n const {\n checked: checkedProp,\n checkedIcon = defaultCheckedIcon,\n color = 'primary',\n icon = defaultIcon,\n name: nameProp,\n onChange: onChangeProp,\n size = 'medium',\n className,\n disabled: disabledProp,\n disableRipple = false,\n slots = {},\n slotProps = {},\n inputProps,\n ...other\n } = props;\n const muiFormControl = useFormControl();\n let disabled = disabledProp;\n if (muiFormControl) {\n if (typeof disabled === 'undefined') {\n disabled = muiFormControl.disabled;\n }\n }\n disabled ??= false;\n const ownerState = {\n ...props,\n disabled,\n disableRipple,\n color,\n size\n };\n const classes = useUtilityClasses(ownerState);\n const radioGroup = useRadioGroup();\n let checked = checkedProp;\n const onChange = createChainedFunction(onChangeProp, radioGroup && radioGroup.onChange);\n let name = nameProp;\n if (radioGroup) {\n if (typeof checked === 'undefined') {\n checked = areEqualValues(radioGroup.value, props.value);\n }\n if (typeof name === 'undefined') {\n name = radioGroup.name;\n }\n }\n const externalInputProps = slotProps.input ?? inputProps;\n const [RootSlot, rootSlotProps] = useSlot('root', {\n ref,\n elementType: RadioRoot,\n className: clsx(classes.root, className),\n shouldForwardComponentProp: true,\n externalForwardedProps: {\n slots,\n slotProps,\n ...other\n },\n getSlotProps: handlers => ({\n ...handlers,\n onChange: (event, ...args) => {\n handlers.onChange?.(event, ...args);\n onChange(event, ...args);\n }\n }),\n ownerState,\n additionalProps: {\n type: 'radio',\n icon: /*#__PURE__*/React.cloneElement(icon, {\n fontSize: icon.props.fontSize ?? size\n }),\n checkedIcon: /*#__PURE__*/React.cloneElement(checkedIcon, {\n fontSize: checkedIcon.props.fontSize ?? size\n }),\n disabled,\n name,\n checked,\n slots,\n slotProps: {\n // Do not forward `slotProps.root` again because it's already handled by the `RootSlot` in this file.\n input: typeof externalInputProps === 'function' ? externalInputProps(ownerState) : externalInputProps\n }\n }\n });\n return /*#__PURE__*/_jsx(RootSlot, {\n ...rootSlotProps,\n classes: classes\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Radio.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * If `true`, the component is checked.\n */\n checked: PropTypes.bool,\n /**\n * The icon to display when the component is checked.\n * @default <RadioButtonIcon checked />\n */\n checkedIcon: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The color of the component.\n * It supports both default and custom theme colors, which can be added as shown in the\n * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).\n * @default 'primary'\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['default', 'primary', 'secondary', 'error', 'info', 'success', 'warning']), PropTypes.string]),\n /**\n * If `true`, the component is disabled.\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, the ripple effect is disabled.\n * @default false\n */\n disableRipple: PropTypes.bool,\n /**\n * The icon to display when the component is unchecked.\n * @default <RadioButtonIcon />\n */\n icon: PropTypes.node,\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#attributes) applied to the `input` element.\n * @deprecated Use `slotProps.input` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n */\n inputProps: PropTypes.object,\n /**\n * Pass a ref to the `input` element.\n * @deprecated Use `slotProps.input.ref` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n */\n inputRef: refType,\n /**\n * Name attribute of the `input` element.\n */\n name: PropTypes.string,\n /**\n * Callback fired when the state is changed.\n *\n * @param {React.ChangeEvent<HTMLInputElement>} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n * You can pull out the new checked state by accessing `event.target.checked` (boolean).\n */\n onChange: PropTypes.func,\n /**\n * If `true`, the `input` element is required.\n * @default false\n */\n required: PropTypes.bool,\n /**\n * The size of the component.\n * `small` is equivalent to the dense radio styling.\n * @default 'medium'\n */\n size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['medium', 'small']), PropTypes.string]),\n /**\n * The props used for each slot inside.\n * @default {}\n */\n slotProps: PropTypes.shape({\n input: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside.\n * @default {}\n */\n slots: PropTypes.shape({\n input: PropTypes.elementType,\n root: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The value of the component. The DOM API casts this to a string.\n */\n value: PropTypes.any\n} : void 0;\nexport default Radio;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getTooltipUtilityClass(slot) {\n return generateUtilityClass('MuiTooltip', slot);\n}\nconst tooltipClasses = generateUtilityClasses('MuiTooltip', ['popper', 'popperInteractive', 'popperArrow', 'popperClose', 'tooltip', 'tooltipArrow', 'touch', 'tooltipPlacementLeft', 'tooltipPlacementRight', 'tooltipPlacementTop', 'tooltipPlacementBottom', 'arrow']);\nexport default tooltipClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport useTimeout, { Timeout } from '@mui/utils/useTimeout';\nimport elementAcceptingRef from '@mui/utils/elementAcceptingRef';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { useRtl } from '@mui/system/RtlProvider';\nimport isFocusVisible from '@mui/utils/isFocusVisible';\nimport getReactElementRef from '@mui/utils/getReactElementRef';\nimport { styled, useTheme } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport capitalize from \"../utils/capitalize.js\";\nimport Grow from \"../Grow/index.js\";\nimport Popper from \"../Popper/index.js\";\nimport useEventCallback from \"../utils/useEventCallback.js\";\nimport useForkRef from \"../utils/useForkRef.js\";\nimport useId from \"../utils/useId.js\";\nimport useControlled from \"../utils/useControlled.js\";\nimport useSlot from \"../utils/useSlot.js\";\nimport tooltipClasses, { getTooltipUtilityClass } from \"./tooltipClasses.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction round(value) {\n return Math.round(value * 1e5) / 1e5;\n}\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n disableInteractive,\n arrow,\n touch,\n placement\n } = ownerState;\n const slots = {\n popper: ['popper', !disableInteractive && 'popperInteractive', arrow && 'popperArrow'],\n tooltip: ['tooltip', arrow && 'tooltipArrow', touch && 'touch', `tooltipPlacement${capitalize(placement.split('-')[0])}`],\n arrow: ['arrow']\n };\n return composeClasses(slots, getTooltipUtilityClass, classes);\n};\nconst TooltipPopper = styled(Popper, {\n name: 'MuiTooltip',\n slot: 'Popper',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.popper, !ownerState.disableInteractive && styles.popperInteractive, ownerState.arrow && styles.popperArrow, !ownerState.open && styles.popperClose];\n }\n})(memoTheme(({\n theme\n}) => ({\n zIndex: (theme.vars || theme).zIndex.tooltip,\n pointerEvents: 'none',\n variants: [{\n props: ({\n ownerState\n }) => !ownerState.disableInteractive,\n style: {\n pointerEvents: 'auto'\n }\n }, {\n props: ({\n open\n }) => !open,\n style: {\n pointerEvents: 'none'\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.arrow,\n style: {\n [`&[data-popper-placement*=\"bottom\"] .${tooltipClasses.arrow}`]: {\n top: 0,\n marginTop: '-0.71em',\n '&::before': {\n transformOrigin: '0 100%'\n }\n },\n [`&[data-popper-placement*=\"top\"] .${tooltipClasses.arrow}`]: {\n bottom: 0,\n marginBottom: '-0.71em',\n '&::before': {\n transformOrigin: '100% 0'\n }\n },\n [`&[data-popper-placement*=\"right\"] .${tooltipClasses.arrow}`]: {\n height: '1em',\n width: '0.71em',\n '&::before': {\n transformOrigin: '100% 100%'\n }\n },\n [`&[data-popper-placement*=\"left\"] .${tooltipClasses.arrow}`]: {\n height: '1em',\n width: '0.71em',\n '&::before': {\n transformOrigin: '0 0'\n }\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.arrow && !ownerState.isRtl,\n style: {\n [`&[data-popper-placement*=\"right\"] .${tooltipClasses.arrow}`]: {\n left: 0,\n marginLeft: '-0.71em'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.arrow && !!ownerState.isRtl,\n style: {\n [`&[data-popper-placement*=\"right\"] .${tooltipClasses.arrow}`]: {\n right: 0,\n marginRight: '-0.71em'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.arrow && !ownerState.isRtl,\n style: {\n [`&[data-popper-placement*=\"left\"] .${tooltipClasses.arrow}`]: {\n right: 0,\n marginRight: '-0.71em'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.arrow && !!ownerState.isRtl,\n style: {\n [`&[data-popper-placement*=\"left\"] .${tooltipClasses.arrow}`]: {\n left: 0,\n marginLeft: '-0.71em'\n }\n }\n }]\n})));\nconst TooltipTooltip = styled('div', {\n name: 'MuiTooltip',\n slot: 'Tooltip',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.tooltip, ownerState.touch && styles.touch, ownerState.arrow && styles.tooltipArrow, styles[`tooltipPlacement${capitalize(ownerState.placement.split('-')[0])}`]];\n }\n})(memoTheme(({\n theme\n}) => ({\n backgroundColor: theme.vars ? theme.vars.palette.Tooltip.bg : theme.alpha(theme.palette.grey[700], 0.92),\n borderRadius: (theme.vars || theme).shape.borderRadius,\n color: (theme.vars || theme).palette.common.white,\n fontFamily: theme.typography.fontFamily,\n padding: '4px 8px',\n fontSize: theme.typography.pxToRem(11),\n maxWidth: 300,\n margin: 2,\n wordWrap: 'break-word',\n fontWeight: theme.typography.fontWeightMedium,\n [`.${tooltipClasses.popper}[data-popper-placement*=\"left\"] &`]: {\n transformOrigin: 'right center'\n },\n [`.${tooltipClasses.popper}[data-popper-placement*=\"right\"] &`]: {\n transformOrigin: 'left center'\n },\n [`.${tooltipClasses.popper}[data-popper-placement*=\"top\"] &`]: {\n transformOrigin: 'center bottom',\n marginBottom: '14px'\n },\n [`.${tooltipClasses.popper}[data-popper-placement*=\"bottom\"] &`]: {\n transformOrigin: 'center top',\n marginTop: '14px'\n },\n variants: [{\n props: ({\n ownerState\n }) => ownerState.arrow,\n style: {\n position: 'relative',\n margin: 0\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.touch,\n style: {\n padding: '8px 16px',\n fontSize: theme.typography.pxToRem(14),\n lineHeight: `${round(16 / 14)}em`,\n fontWeight: theme.typography.fontWeightRegular\n }\n }, {\n props: ({\n ownerState\n }) => !ownerState.isRtl,\n style: {\n [`.${tooltipClasses.popper}[data-popper-placement*=\"left\"] &`]: {\n marginRight: '14px'\n },\n [`.${tooltipClasses.popper}[data-popper-placement*=\"right\"] &`]: {\n marginLeft: '14px'\n }\n }\n }, {\n props: ({\n ownerState\n }) => !ownerState.isRtl && ownerState.touch,\n style: {\n [`.${tooltipClasses.popper}[data-popper-placement*=\"left\"] &`]: {\n marginRight: '24px'\n },\n [`.${tooltipClasses.popper}[data-popper-placement*=\"right\"] &`]: {\n marginLeft: '24px'\n }\n }\n }, {\n props: ({\n ownerState\n }) => !!ownerState.isRtl,\n style: {\n [`.${tooltipClasses.popper}[data-popper-placement*=\"left\"] &`]: {\n marginLeft: '14px'\n },\n [`.${tooltipClasses.popper}[data-popper-placement*=\"right\"] &`]: {\n marginRight: '14px'\n }\n }\n }, {\n props: ({\n ownerState\n }) => !!ownerState.isRtl && ownerState.touch,\n style: {\n [`.${tooltipClasses.popper}[data-popper-placement*=\"left\"] &`]: {\n marginLeft: '24px'\n },\n [`.${tooltipClasses.popper}[data-popper-placement*=\"right\"] &`]: {\n marginRight: '24px'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.touch,\n style: {\n [`.${tooltipClasses.popper}[data-popper-placement*=\"top\"] &`]: {\n marginBottom: '24px'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.touch,\n style: {\n [`.${tooltipClasses.popper}[data-popper-placement*=\"bottom\"] &`]: {\n marginTop: '24px'\n }\n }\n }]\n})));\nconst TooltipArrow = styled('span', {\n name: 'MuiTooltip',\n slot: 'Arrow'\n})(memoTheme(({\n theme\n}) => ({\n overflow: 'hidden',\n position: 'absolute',\n width: '1em',\n height: '0.71em' /* = width / sqrt(2) = (length of the hypotenuse) */,\n boxSizing: 'border-box',\n color: theme.vars ? theme.vars.palette.Tooltip.bg : theme.alpha(theme.palette.grey[700], 0.9),\n '&::before': {\n content: '\"\"',\n margin: 'auto',\n display: 'block',\n width: '100%',\n height: '100%',\n backgroundColor: 'currentColor',\n transform: 'rotate(45deg)'\n }\n})));\nlet hystersisOpen = false;\nconst hystersisTimer = new Timeout();\nlet cursorPosition = {\n x: 0,\n y: 0\n};\nexport function testReset() {\n hystersisOpen = false;\n hystersisTimer.clear();\n}\nfunction composeEventHandler(handler, eventHandler) {\n return (event, ...params) => {\n if (eventHandler) {\n eventHandler(event, ...params);\n }\n handler(event, ...params);\n };\n}\n\n// TODO v6: Remove PopperComponent, PopperProps, TransitionComponent and TransitionProps.\nconst Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiTooltip'\n });\n const {\n arrow = false,\n children: childrenProp,\n classes: classesProp,\n components = {},\n componentsProps = {},\n describeChild = false,\n disableFocusListener = false,\n disableHoverListener = false,\n disableInteractive: disableInteractiveProp = false,\n disableTouchListener = false,\n enterDelay = 100,\n enterNextDelay = 0,\n enterTouchDelay = 700,\n followCursor = false,\n id: idProp,\n leaveDelay = 0,\n leaveTouchDelay = 1500,\n onClose,\n onOpen,\n open: openProp,\n placement = 'bottom',\n PopperComponent: PopperComponentProp,\n PopperProps = {},\n slotProps = {},\n slots = {},\n title,\n TransitionComponent: TransitionComponentProp,\n TransitionProps,\n ...other\n } = props;\n\n // to prevent runtime errors, developers will need to provide a child as a React element anyway.\n const children = /*#__PURE__*/React.isValidElement(childrenProp) ? childrenProp : /*#__PURE__*/_jsx(\"span\", {\n children: childrenProp\n });\n const theme = useTheme();\n const isRtl = useRtl();\n const [childNode, setChildNode] = React.useState();\n const [arrowRef, setArrowRef] = React.useState(null);\n const ignoreNonTouchEvents = React.useRef(false);\n const disableInteractive = disableInteractiveProp || followCursor;\n const closeTimer = useTimeout();\n const enterTimer = useTimeout();\n const leaveTimer = useTimeout();\n const touchTimer = useTimeout();\n const [openState, setOpenState] = useControlled({\n controlled: openProp,\n default: false,\n name: 'Tooltip',\n state: 'open'\n });\n let open = openState;\n if (process.env.NODE_ENV !== 'production') {\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler\n // eslint-disable-next-line react-hooks/rules-of-hooks -- process.env never changes\n const {\n current: isControlled\n } = React.useRef(openProp !== undefined);\n\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler\n // eslint-disable-next-line react-hooks/rules-of-hooks -- process.env never changes\n React.useEffect(() => {\n if (childNode && childNode.disabled && !isControlled && title !== '' && childNode.tagName.toLowerCase() === 'button') {\n console.warn(['MUI: You are providing a disabled `button` child to the Tooltip component.', 'A disabled element does not fire events.', \"Tooltip needs to listen to the child element's events to display the title.\", '', 'Add a simple wrapper element, such as a `span`.'].join('\\n'));\n }\n }, [title, childNode, isControlled]);\n }\n const id = useId(idProp);\n const prevUserSelect = React.useRef();\n const stopTouchInteraction = useEventCallback(() => {\n if (prevUserSelect.current !== undefined) {\n document.body.style.WebkitUserSelect = prevUserSelect.current;\n prevUserSelect.current = undefined;\n }\n touchTimer.clear();\n });\n React.useEffect(() => stopTouchInteraction, [stopTouchInteraction]);\n const handleOpen = event => {\n hystersisTimer.clear();\n hystersisOpen = true;\n\n // The mouseover event will trigger for every nested element in the tooltip.\n // We can skip rerendering when the tooltip is already open.\n // We are using the mouseover event instead of the mouseenter event to fix a hide/show issue.\n setOpenState(true);\n if (onOpen && !open) {\n onOpen(event);\n }\n };\n const handleClose = useEventCallback(\n /**\n * @param {React.SyntheticEvent | Event} event\n */\n event => {\n hystersisTimer.start(800 + leaveDelay, () => {\n hystersisOpen = false;\n });\n setOpenState(false);\n if (onClose && open) {\n onClose(event);\n }\n closeTimer.start(theme.transitions.duration.shortest, () => {\n ignoreNonTouchEvents.current = false;\n });\n });\n const handleMouseOver = event => {\n if (ignoreNonTouchEvents.current && event.type !== 'touchstart') {\n return;\n }\n\n // Remove the title ahead of time.\n // We don't want to wait for the next render commit.\n // We would risk displaying two tooltips at the same time (native + this one).\n if (childNode) {\n childNode.removeAttribute('title');\n }\n enterTimer.clear();\n leaveTimer.clear();\n if (enterDelay || hystersisOpen && enterNextDelay) {\n enterTimer.start(hystersisOpen ? enterNextDelay : enterDelay, () => {\n handleOpen(event);\n });\n } else {\n handleOpen(event);\n }\n };\n const handleMouseLeave = event => {\n enterTimer.clear();\n leaveTimer.start(leaveDelay, () => {\n handleClose(event);\n });\n };\n const [, setChildIsFocusVisible] = React.useState(false);\n const handleBlur = event => {\n // Needed for https://github.com/mui/material-ui/issues/45373\n const target = event?.target ?? childNode;\n if (!target || !isFocusVisible(target)) {\n setChildIsFocusVisible(false);\n\n // InputBase can call onBlur() without an event when the input becomes disabled.\n // Tooltip must not assume an event object exists.\n const closeEvent = event ?? new Event('blur');\n\n // `new Event('blur')` has `target/currentTarget === null`, but Tooltip's close logic\n // (and user callbacks like onClose) may expect them to reference the anchor element.\n if (!event && target) {\n Object.defineProperty(closeEvent, 'target', {\n value: target\n });\n Object.defineProperty(closeEvent, 'currentTarget', {\n value: target\n });\n }\n handleMouseLeave(closeEvent);\n }\n };\n const handleFocus = event => {\n // Workaround for https://github.com/facebook/react/issues/7769\n // The autoFocus of React might trigger the event before the componentDidMount.\n // We need to account for this eventuality.\n if (!childNode) {\n setChildNode(event.currentTarget);\n }\n if (isFocusVisible(event.target)) {\n setChildIsFocusVisible(true);\n handleMouseOver(event);\n }\n };\n const detectTouchStart = event => {\n ignoreNonTouchEvents.current = true;\n const childrenProps = children.props;\n if (childrenProps.onTouchStart) {\n childrenProps.onTouchStart(event);\n }\n };\n const handleTouchStart = event => {\n detectTouchStart(event);\n leaveTimer.clear();\n closeTimer.clear();\n stopTouchInteraction();\n prevUserSelect.current = document.body.style.WebkitUserSelect;\n // Prevent iOS text selection on long-tap.\n document.body.style.WebkitUserSelect = 'none';\n touchTimer.start(enterTouchDelay, () => {\n document.body.style.WebkitUserSelect = prevUserSelect.current;\n handleMouseOver(event);\n });\n };\n const handleTouchEnd = event => {\n if (children.props.onTouchEnd) {\n children.props.onTouchEnd(event);\n }\n stopTouchInteraction();\n leaveTimer.start(leaveTouchDelay, () => {\n handleClose(event);\n });\n };\n React.useEffect(() => {\n if (!open) {\n return undefined;\n }\n\n /**\n * @param {KeyboardEvent} nativeEvent\n */\n function handleKeyDown(nativeEvent) {\n if (nativeEvent.key === 'Escape') {\n handleClose(nativeEvent);\n }\n }\n document.addEventListener('keydown', handleKeyDown);\n return () => {\n document.removeEventListener('keydown', handleKeyDown);\n };\n }, [handleClose, open]);\n const handleRef = useForkRef(getReactElementRef(children), setChildNode, ref);\n\n // There is no point in displaying an empty tooltip.\n // So we exclude all falsy values, except 0, which is valid.\n if (!title && title !== 0) {\n open = false;\n }\n const popperRef = React.useRef();\n const handleMouseMove = event => {\n const childrenProps = children.props;\n if (childrenProps.onMouseMove) {\n childrenProps.onMouseMove(event);\n }\n cursorPosition = {\n x: event.clientX,\n y: event.clientY\n };\n if (popperRef.current) {\n popperRef.current.update();\n }\n };\n const nameOrDescProps = {};\n const titleIsString = typeof title === 'string';\n if (describeChild) {\n nameOrDescProps.title = !open && titleIsString && !disableHoverListener ? title : null;\n nameOrDescProps['aria-describedby'] = open ? id : null;\n } else {\n nameOrDescProps['aria-label'] = titleIsString ? title : null;\n nameOrDescProps['aria-labelledby'] = open && !titleIsString ? id : null;\n }\n const childrenProps = {\n ...nameOrDescProps,\n ...other,\n ...children.props,\n className: clsx(other.className, children.props.className),\n onTouchStart: detectTouchStart,\n ref: handleRef,\n ...(followCursor ? {\n onMouseMove: handleMouseMove\n } : {})\n };\n if (process.env.NODE_ENV !== 'production') {\n childrenProps['data-mui-internal-clone-element'] = true;\n\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler\n // eslint-disable-next-line react-hooks/rules-of-hooks -- process.env never changes\n React.useEffect(() => {\n if (childNode && !childNode.getAttribute('data-mui-internal-clone-element')) {\n console.error(['MUI: The `children` component of the Tooltip is not forwarding its props correctly.', 'Please make sure that props are spread on the same element that the ref is applied to.'].join('\\n'));\n }\n }, [childNode]);\n }\n const interactiveWrapperListeners = {};\n if (!disableTouchListener) {\n childrenProps.onTouchStart = handleTouchStart;\n childrenProps.onTouchEnd = handleTouchEnd;\n }\n if (!disableHoverListener) {\n childrenProps.onMouseOver = composeEventHandler(handleMouseOver, childrenProps.onMouseOver);\n childrenProps.onMouseLeave = composeEventHandler(handleMouseLeave, childrenProps.onMouseLeave);\n if (!disableInteractive) {\n interactiveWrapperListeners.onMouseOver = handleMouseOver;\n interactiveWrapperListeners.onMouseLeave = handleMouseLeave;\n }\n }\n if (!disableFocusListener) {\n childrenProps.onFocus = composeEventHandler(handleFocus, childrenProps.onFocus);\n childrenProps.onBlur = composeEventHandler(handleBlur, childrenProps.onBlur);\n if (!disableInteractive) {\n interactiveWrapperListeners.onFocus = handleFocus;\n interactiveWrapperListeners.onBlur = handleBlur;\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n if (children.props.title) {\n console.error(['MUI: You have provided a `title` prop to the child of <Tooltip />.', `Remove this title prop \\`${children.props.title}\\` or the Tooltip component.`].join('\\n'));\n }\n }\n const ownerState = {\n ...props,\n isRtl,\n arrow,\n disableInteractive,\n placement,\n PopperComponentProp,\n touch: ignoreNonTouchEvents.current\n };\n const resolvedPopperProps = typeof slotProps.popper === 'function' ? slotProps.popper(ownerState) : slotProps.popper;\n const popperOptions = React.useMemo(() => {\n let tooltipModifiers = [{\n name: 'arrow',\n enabled: Boolean(arrowRef),\n options: {\n element: arrowRef,\n padding: 4\n }\n }];\n if (PopperProps.popperOptions?.modifiers) {\n tooltipModifiers = tooltipModifiers.concat(PopperProps.popperOptions.modifiers);\n }\n if (resolvedPopperProps?.popperOptions?.modifiers) {\n tooltipModifiers = tooltipModifiers.concat(resolvedPopperProps.popperOptions.modifiers);\n }\n return {\n ...PopperProps.popperOptions,\n ...resolvedPopperProps?.popperOptions,\n modifiers: tooltipModifiers\n };\n }, [arrowRef, PopperProps.popperOptions, resolvedPopperProps?.popperOptions]);\n const classes = useUtilityClasses(ownerState);\n const resolvedTransitionProps = typeof slotProps.transition === 'function' ? slotProps.transition(ownerState) : slotProps.transition;\n const externalForwardedProps = {\n slots: {\n popper: components.Popper,\n transition: components.Transition ?? TransitionComponentProp,\n tooltip: components.Tooltip,\n arrow: components.Arrow,\n ...slots\n },\n slotProps: {\n arrow: slotProps.arrow ?? componentsProps.arrow,\n popper: {\n ...PopperProps,\n ...(resolvedPopperProps ?? componentsProps.popper)\n },\n // resolvedPopperProps can be spread because it's already an object\n tooltip: slotProps.tooltip ?? componentsProps.tooltip,\n transition: {\n ...TransitionProps,\n ...(resolvedTransitionProps ?? componentsProps.transition)\n }\n }\n };\n const [PopperSlot, popperSlotProps] = useSlot('popper', {\n elementType: TooltipPopper,\n externalForwardedProps,\n ownerState,\n className: clsx(classes.popper, PopperProps?.className)\n });\n const [TransitionSlot, transitionSlotProps] = useSlot('transition', {\n elementType: Grow,\n externalForwardedProps,\n ownerState\n });\n const [TooltipSlot, tooltipSlotProps] = useSlot('tooltip', {\n elementType: TooltipTooltip,\n className: classes.tooltip,\n externalForwardedProps,\n ownerState\n });\n const [ArrowSlot, arrowSlotProps] = useSlot('arrow', {\n elementType: TooltipArrow,\n className: classes.arrow,\n externalForwardedProps,\n ownerState,\n ref: setArrowRef\n });\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/React.cloneElement(children, childrenProps), /*#__PURE__*/_jsx(PopperSlot, {\n as: PopperComponentProp ?? Popper,\n placement: placement,\n anchorEl: followCursor ? {\n getBoundingClientRect: () => ({\n top: cursorPosition.y,\n left: cursorPosition.x,\n right: cursorPosition.x,\n bottom: cursorPosition.y,\n width: 0,\n height: 0\n })\n } : childNode,\n popperRef: popperRef,\n open: childNode ? open : false,\n id: id,\n transition: true,\n ...interactiveWrapperListeners,\n ...popperSlotProps,\n popperOptions: popperOptions,\n children: ({\n TransitionProps: TransitionPropsInner\n }) => /*#__PURE__*/_jsx(TransitionSlot, {\n timeout: theme.transitions.duration.shorter,\n ...TransitionPropsInner,\n ...transitionSlotProps,\n children: /*#__PURE__*/_jsxs(TooltipSlot, {\n ...tooltipSlotProps,\n children: [title, arrow ? /*#__PURE__*/_jsx(ArrowSlot, {\n ...arrowSlotProps\n }) : null]\n })\n })\n })]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Tooltip.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * If `true`, adds an arrow to the tooltip.\n * @default false\n */\n arrow: PropTypes.bool,\n /**\n * Tooltip reference element.\n */\n children: elementAcceptingRef.isRequired,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The components used for each slot inside.\n *\n * @deprecated use the `slots` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n *\n * @default {}\n */\n components: PropTypes.shape({\n Arrow: PropTypes.elementType,\n Popper: PropTypes.elementType,\n Tooltip: PropTypes.elementType,\n Transition: PropTypes.elementType\n }),\n /**\n * The extra props for the slot components.\n * You can override the existing props or add new ones.\n *\n * @deprecated use the `slotProps` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n *\n * @default {}\n */\n componentsProps: PropTypes.shape({\n arrow: PropTypes.object,\n popper: PropTypes.object,\n tooltip: PropTypes.object,\n transition: PropTypes.object\n }),\n /**\n * Set to `true` if the `title` acts as an accessible description.\n * By default the `title` acts as an accessible label for the child.\n * @default false\n */\n describeChild: PropTypes.bool,\n /**\n * Do not respond to focus-visible events.\n * @default false\n */\n disableFocusListener: PropTypes.bool,\n /**\n * Do not respond to hover events.\n * @default false\n */\n disableHoverListener: PropTypes.bool,\n /**\n * Makes a tooltip not interactive, i.e. it will close when the user\n * hovers over the tooltip before the `leaveDelay` is expired.\n * @default false\n */\n disableInteractive: PropTypes.bool,\n /**\n * Do not respond to long press touch events.\n * @default false\n */\n disableTouchListener: PropTypes.bool,\n /**\n * The number of milliseconds to wait before showing the tooltip.\n * This prop won't impact the enter touch delay (`enterTouchDelay`).\n * @default 100\n */\n enterDelay: PropTypes.number,\n /**\n * The number of milliseconds to wait before showing the tooltip when one was already recently opened.\n * @default 0\n */\n enterNextDelay: PropTypes.number,\n /**\n * The number of milliseconds a user must touch the element before showing the tooltip.\n * @default 700\n */\n enterTouchDelay: PropTypes.number,\n /**\n * If `true`, the tooltip follow the cursor over the wrapped element.\n * @default false\n */\n followCursor: PropTypes.bool,\n /**\n * This prop is used to help implement the accessibility logic.\n * If you don't provide this prop. It falls back to a randomly generated id.\n */\n id: PropTypes.string,\n /**\n * The number of milliseconds to wait before hiding the tooltip.\n * This prop won't impact the leave touch delay (`leaveTouchDelay`).\n * @default 0\n */\n leaveDelay: PropTypes.number,\n /**\n * The number of milliseconds after the user stops touching an element before hiding the tooltip.\n * @default 1500\n */\n leaveTouchDelay: PropTypes.number,\n /**\n * Callback fired when the component requests to be closed.\n *\n * @param {React.SyntheticEvent} event The event source of the callback.\n */\n onClose: PropTypes.func,\n /**\n * Callback fired when the component requests to be open.\n *\n * @param {React.SyntheticEvent} event The event source of the callback.\n */\n onOpen: PropTypes.func,\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool,\n /**\n * Tooltip placement.\n * @default 'bottom'\n */\n placement: PropTypes.oneOf(['auto-end', 'auto-start', 'auto', 'bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),\n /**\n * The component used for the popper.\n * @deprecated use the `slots.popper` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n */\n PopperComponent: PropTypes.elementType,\n /**\n * Props applied to the [`Popper`](https://mui.com/material-ui/api/popper/) element.\n * @deprecated use the `slotProps.popper` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n * @default {}\n */\n PopperProps: PropTypes.object,\n /**\n * The props used for each slot inside.\n * @default {}\n */\n slotProps: PropTypes.shape({\n arrow: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n popper: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n tooltip: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n transition: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside.\n * @default {}\n */\n slots: PropTypes.shape({\n arrow: PropTypes.elementType,\n popper: PropTypes.elementType,\n tooltip: PropTypes.elementType,\n transition: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * Tooltip title. Zero-length titles string, undefined, null and false are never displayed.\n */\n title: PropTypes.node,\n /**\n * The component used for the transition.\n * [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n * @deprecated use the `slots.transition` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n */\n TransitionComponent: PropTypes.elementType,\n /**\n * Props applied to the transition element.\n * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.\n * @deprecated use the `slotProps.transition` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n * @default {}\n */\n TransitionProps: PropTypes.object\n} : void 0;\nexport default Tooltip;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getSwitchUtilityClass(slot) {\n return generateUtilityClass('MuiSwitch', slot);\n}\nconst switchClasses = generateUtilityClasses('MuiSwitch', ['root', 'edgeStart', 'edgeEnd', 'switchBase', 'colorPrimary', 'colorSecondary', 'sizeSmall', 'sizeMedium', 'checked', 'disabled', 'input', 'thumb', 'track']);\nexport default switchClasses;","'use client';\n\n// @inheritedComponent IconButton\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport refType from '@mui/utils/refType';\nimport composeClasses from '@mui/utils/composeClasses';\nimport capitalize from \"../utils/capitalize.js\";\nimport createSimplePaletteValueFilter from \"../utils/createSimplePaletteValueFilter.js\";\nimport SwitchBase from \"../internal/SwitchBase.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport switchClasses, { getSwitchUtilityClass } from \"./switchClasses.js\";\nimport { mergeSlotProps } from \"../utils/index.js\";\nimport useSlot from \"../utils/useSlot.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n edge,\n size,\n color,\n checked,\n disabled\n } = ownerState;\n const slots = {\n root: ['root', edge && `edge${capitalize(edge)}`, `size${capitalize(size)}`],\n switchBase: ['switchBase', `color${capitalize(color)}`, checked && 'checked', disabled && 'disabled'],\n thumb: ['thumb'],\n track: ['track'],\n input: ['input']\n };\n const composedClasses = composeClasses(slots, getSwitchUtilityClass, classes);\n return {\n ...classes,\n // forward the disabled and checked classes to the SwitchBase\n ...composedClasses\n };\n};\nconst SwitchRoot = styled('span', {\n name: 'MuiSwitch',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.edge && styles[`edge${capitalize(ownerState.edge)}`], styles[`size${capitalize(ownerState.size)}`]];\n }\n})({\n display: 'inline-flex',\n width: 34 + 12 * 2,\n height: 14 + 12 * 2,\n overflow: 'hidden',\n padding: 12,\n boxSizing: 'border-box',\n position: 'relative',\n flexShrink: 0,\n zIndex: 0,\n // Reset the stacking context.\n verticalAlign: 'middle',\n // For correct alignment with the text.\n '@media print': {\n colorAdjust: 'exact'\n },\n variants: [{\n props: {\n edge: 'start'\n },\n style: {\n marginLeft: -8\n }\n }, {\n props: {\n edge: 'end'\n },\n style: {\n marginRight: -8\n }\n }, {\n props: {\n size: 'small'\n },\n style: {\n width: 40,\n height: 24,\n padding: 7,\n [`& .${switchClasses.thumb}`]: {\n width: 16,\n height: 16\n },\n [`& .${switchClasses.switchBase}`]: {\n padding: 4,\n [`&.${switchClasses.checked}`]: {\n transform: 'translateX(16px)'\n }\n }\n }\n }]\n});\nconst SwitchSwitchBase = styled(SwitchBase, {\n name: 'MuiSwitch',\n slot: 'SwitchBase',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.switchBase, {\n [`& .${switchClasses.input}`]: styles.input\n }, ownerState.color !== 'default' && styles[`color${capitalize(ownerState.color)}`]];\n }\n})(memoTheme(({\n theme\n}) => ({\n position: 'absolute',\n top: 0,\n left: 0,\n zIndex: 1,\n // Render above the focus ripple.\n color: theme.vars ? theme.vars.palette.Switch.defaultColor : `${theme.palette.mode === 'light' ? theme.palette.common.white : theme.palette.grey[300]}`,\n transition: theme.transitions.create(['left', 'transform'], {\n duration: theme.transitions.duration.shortest\n }),\n [`&.${switchClasses.checked}`]: {\n transform: 'translateX(20px)'\n },\n [`&.${switchClasses.disabled}`]: {\n color: theme.vars ? theme.vars.palette.Switch.defaultDisabledColor : `${theme.palette.mode === 'light' ? theme.palette.grey[100] : theme.palette.grey[600]}`\n },\n [`&.${switchClasses.checked} + .${switchClasses.track}`]: {\n opacity: 0.5\n },\n [`&.${switchClasses.disabled} + .${switchClasses.track}`]: {\n opacity: theme.vars ? theme.vars.opacity.switchTrackDisabled : `${theme.palette.mode === 'light' ? 0.12 : 0.2}`\n },\n [`& .${switchClasses.input}`]: {\n left: '-100%',\n width: '300%'\n }\n})), memoTheme(({\n theme\n}) => ({\n '&:hover': {\n backgroundColor: theme.alpha((theme.vars || theme).palette.action.active, (theme.vars || theme).palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n },\n variants: [...Object.entries(theme.palette).filter(createSimplePaletteValueFilter(['light'])) // check all the used fields in the style below\n .map(([color]) => ({\n props: {\n color\n },\n style: {\n [`&.${switchClasses.checked}`]: {\n color: (theme.vars || theme).palette[color].main,\n '&:hover': {\n backgroundColor: theme.alpha((theme.vars || theme).palette[color].main, (theme.vars || theme).palette.action.hoverOpacity),\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n },\n [`&.${switchClasses.disabled}`]: {\n color: theme.vars ? theme.vars.palette.Switch[`${color}DisabledColor`] : `${theme.palette.mode === 'light' ? theme.lighten(theme.palette[color].main, 0.62) : theme.darken(theme.palette[color].main, 0.55)}`\n }\n },\n [`&.${switchClasses.checked} + .${switchClasses.track}`]: {\n backgroundColor: (theme.vars || theme).palette[color].main\n }\n }\n }))]\n})));\nconst SwitchTrack = styled('span', {\n name: 'MuiSwitch',\n slot: 'Track'\n})(memoTheme(({\n theme\n}) => ({\n height: '100%',\n width: '100%',\n borderRadius: 14 / 2,\n boxSizing: 'border-box',\n border: '1px solid transparent',\n zIndex: -1,\n transition: theme.transitions.create(['opacity', 'background-color'], {\n duration: theme.transitions.duration.shortest\n }),\n backgroundColor: theme.vars ? theme.vars.palette.common.onBackground : `${theme.palette.mode === 'light' ? theme.palette.common.black : theme.palette.common.white}`,\n opacity: theme.vars ? theme.vars.opacity.switchTrack : `${theme.palette.mode === 'light' ? 0.38 : 0.3}`\n})));\nconst SwitchThumb = styled('span', {\n name: 'MuiSwitch',\n slot: 'Thumb'\n})(memoTheme(({\n theme\n}) => ({\n boxShadow: (theme.vars || theme).shadows[1],\n backgroundColor: 'currentColor',\n boxSizing: 'border-box',\n border: '1px solid transparent',\n width: 20,\n height: 20,\n borderRadius: '50%'\n})));\nconst Switch = /*#__PURE__*/React.forwardRef(function Switch(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiSwitch'\n });\n const {\n className,\n color = 'primary',\n edge = false,\n size = 'medium',\n sx,\n slots = {},\n slotProps = {},\n ...other\n } = props;\n const ownerState = {\n ...props,\n color,\n edge,\n size\n };\n const classes = useUtilityClasses(ownerState);\n const externalInputProps = slotProps.input;\n const externalForwardedProps = {\n slots,\n slotProps\n };\n const [RootSlot, rootSlotProps] = useSlot('root', {\n className: clsx(classes.root, className),\n elementType: SwitchRoot,\n externalForwardedProps,\n ownerState,\n additionalProps: {\n sx\n }\n });\n const [ThumbSlot, thumbSlotProps] = useSlot('thumb', {\n className: classes.thumb,\n elementType: SwitchThumb,\n externalForwardedProps,\n ownerState\n });\n const icon = /*#__PURE__*/_jsx(ThumbSlot, {\n ...thumbSlotProps\n });\n const [TrackSlot, trackSlotProps] = useSlot('track', {\n className: classes.track,\n elementType: SwitchTrack,\n externalForwardedProps,\n ownerState\n });\n return /*#__PURE__*/_jsxs(RootSlot, {\n ...rootSlotProps,\n children: [/*#__PURE__*/_jsx(SwitchSwitchBase, {\n type: \"checkbox\",\n icon: icon,\n checkedIcon: icon,\n ref: ref,\n ownerState: ownerState,\n ...other,\n classes: {\n ...classes,\n root: classes.switchBase\n },\n slots: {\n ...(slots.switchBase && {\n root: slots.switchBase\n }),\n ...(slots.input && {\n input: slots.input\n })\n },\n slotProps: {\n ...(slotProps.switchBase && {\n root: typeof slotProps.switchBase === 'function' ? slotProps.switchBase(ownerState) : slotProps.switchBase\n }),\n input: mergeSlotProps(typeof externalInputProps === 'function' ? externalInputProps(ownerState) : externalInputProps, {\n role: 'switch'\n })\n }\n }), /*#__PURE__*/_jsx(TrackSlot, {\n ...trackSlotProps\n })]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Switch.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * If `true`, the component is checked.\n */\n checked: PropTypes.bool,\n /**\n * The icon to display when the component is checked.\n */\n checkedIcon: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The color of the component.\n * It supports both default and custom theme colors, which can be added as shown in the\n * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).\n * @default 'primary'\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['default', 'primary', 'secondary', 'error', 'info', 'success', 'warning']), PropTypes.string]),\n /**\n * The default checked state. Use when the component is not controlled.\n */\n defaultChecked: PropTypes.bool,\n /**\n * If `true`, the component is disabled.\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, the ripple effect is disabled.\n * @default false\n */\n disableRipple: PropTypes.bool,\n /**\n * If given, uses a negative margin to counteract the padding on one\n * side (this is often helpful for aligning the left or right\n * side of the icon with content above or below, without ruining the border\n * size and shape).\n * @default false\n */\n edge: PropTypes.oneOf(['end', 'start', false]),\n /**\n * The icon to display when the component is unchecked.\n */\n icon: PropTypes.node,\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#attributes) applied to the `input` element.\n * @deprecated Use `slotProps.input` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n */\n inputProps: PropTypes.object,\n /**\n * Pass a ref to the `input` element.\n * @deprecated Use `slotProps.input.ref` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n */\n inputRef: refType,\n /**\n * Callback fired when the state is changed.\n *\n * @param {React.ChangeEvent<HTMLInputElement>} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n * You can pull out the new checked state by accessing `event.target.checked` (boolean).\n */\n onChange: PropTypes.func,\n /**\n * If `true`, the `input` element is required.\n * @default false\n */\n required: PropTypes.bool,\n /**\n * The size of the component.\n * `small` is equivalent to the dense switch styling.\n * @default 'medium'\n */\n size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['medium', 'small']), PropTypes.string]),\n /**\n * The props used for each slot inside.\n * @default {}\n */\n slotProps: PropTypes.shape({\n input: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n switchBase: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n thumb: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n track: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside.\n * @default {}\n */\n slots: PropTypes.shape({\n input: PropTypes.elementType,\n root: PropTypes.elementType,\n switchBase: PropTypes.elementType,\n thumb: PropTypes.elementType,\n track: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The value of the component. The DOM API casts this to a string.\n * The browser uses \"on\" as the default value.\n */\n value: PropTypes.any\n} : void 0;\nexport default Switch;","import \"react\";\nimport e from \"prop-types\";\nimport { Button as t, Dialog as n, DialogActions as r, DialogContent as i, DialogContentText as a, DialogTitle as o } from \"@mui/material\";\nimport { styled as s } from \"@mui/material/styles\";\nimport { jsx as c, jsxs as l } from \"react/jsx-runtime\";\n//#region src/alert-dialog.tsx\nvar u = s(o)(() => ({ fontSize: \"max(1.25rem, 18px)\" })), d = s(a)(() => ({ fontSize: \"max(1rem, 14px)\" })), f = ({ text: e, title: a, onClose: o, onConfirm: s, open: f, onCloseText: p, onConfirmText: m, disableAutoFocus: h, disableEnforceFocus: g, disableRestoreFocus: _ }) => /* @__PURE__ */ l(n, {\n\topen: f,\n\tdisableAutoFocus: h,\n\tdisableEnforceFocus: g,\n\tdisableRestoreFocus: _,\n\tonClose: o,\n\tchildren: [\n\t\ta && /* @__PURE__ */ c(u, { children: a }),\n\t\te && /* @__PURE__ */ c(i, { children: /* @__PURE__ */ c(d, { children: e }) }),\n\t\t/* @__PURE__ */ l(r, { children: [o && /* @__PURE__ */ c(t, {\n\t\t\tonClick: o,\n\t\t\tcolor: \"primary\",\n\t\t\tchildren: p\n\t\t}), s && /* @__PURE__ */ c(t, {\n\t\t\tautoFocus: !0,\n\t\t\tonClick: s,\n\t\t\tcolor: \"primary\",\n\t\t\tchildren: m\n\t\t})] })\n\t]\n});\nf.defaultProps = {\n\tonCloseText: \"CANCEL\",\n\tonConfirmText: \"OK\",\n\tdisableAutoFocus: !1,\n\tdisableEnforceFocus: !1,\n\tdisableRestoreFocus: !1\n}, f.propTypes = {\n\ttext: e.oneOfType([e.string, e.object]),\n\ttitle: e.string,\n\tonClose: e.func,\n\tonConfirm: e.func,\n\topen: e.bool,\n\tonConfirmText: e.string,\n\tonCloseText: e.string,\n\tdisableAutoFocus: e.bool,\n\tdisableEnforceFocus: e.bool,\n\tdisableRestoreFocus: e.bool\n};\n//#endregion\nexport { f as default };\n","import \"react\";\nimport e from \"prop-types\";\nimport { styled as t } from \"@mui/material/styles\";\nimport { jsx as n } from \"react/jsx-runtime\";\nimport { color as r } from \"@pie-lib/render-ui\";\nimport i from \"@mui/material/FormControlLabel\";\nimport a from \"@mui/material/Radio\";\n//#region src/radio-with-label.tsx\nvar o = t(i)(() => ({ \"& .MuiFormControlLabel-label\": {\n\tleft: \"-5px\",\n\tposition: \"relative\"\n} })), s = t(a)(() => ({ color: `${r.tertiary()} !important` })), c = ({ label: e, value: t, checked: r, onChange: i }) => /* @__PURE__ */ n(o, {\n\tvalue: t,\n\tcontrol: /* @__PURE__ */ n(s, {\n\t\tchecked: r,\n\t\tonChange: i\n\t}),\n\tlabel: e\n});\nc.propTypes = {\n\tlabel: e.string,\n\tvalue: e.string,\n\tchecked: e.bool,\n\tonChange: e.func\n};\n//#endregion\nexport { c as default };\n","import e from \"react\";\nimport t from \"prop-types\";\nimport { styled as n } from \"@mui/material/styles\";\nimport { jsx as r, jsxs as i } from \"react/jsx-runtime\";\nimport a from \"@mui/material/Tabs\";\nimport o from \"@mui/material/Tab\";\n//#region src/tabs/index.tsx\nvar s = n(o)(() => ({})), c = class extends e.Component {\n\tstatic propTypes = {\n\t\tclassName: t.string,\n\t\tcontentClassName: t.string,\n\t\tcontentStyle: t.object,\n\t\tchildren: t.oneOfType([t.arrayOf(t.node), t.node]).isRequired\n\t};\n\tconstructor(e) {\n\t\tsuper(e), this.state = { value: 0 };\n\t}\n\thandleChange = (e, t) => {\n\t\tthis.setState({ value: t });\n\t};\n\trender() {\n\t\tlet { value: t } = this.state, { children: n, className: o, contentClassName: c, contentStyle: l = {} } = this.props;\n\t\treturn /* @__PURE__ */ i(\"div\", {\n\t\t\tclassName: o,\n\t\t\tchildren: [/* @__PURE__ */ r(a, {\n\t\t\t\tindicatorColor: \"primary\",\n\t\t\t\tvalue: t,\n\t\t\t\tonChange: this.handleChange,\n\t\t\t\tchildren: e.Children.map(n, (e, t) => e && e.props.title ? /* @__PURE__ */ r(s, { label: e.props.title }, t) : null)\n\t\t\t}), /* @__PURE__ */ r(\"div\", {\n\t\t\t\tclassName: c,\n\t\t\t\tstyle: l,\n\t\t\t\tchildren: n[t]\n\t\t\t})]\n\t\t});\n\t}\n};\n//#endregion\nexport { c as default };\n","import \"react\";\nimport e from \"prop-types\";\nimport { styled as t } from \"@mui/material/styles\";\nimport { jsx as n } from \"react/jsx-runtime\";\nimport { color as r } from \"@pie-lib/render-ui\";\nimport i from \"@mui/material/FormControlLabel\";\nimport a from \"@mui/material/Checkbox\";\nimport { grey as o } from \"@mui/material/colors\";\n//#region src/checkbox.tsx\nvar s = t(i)(({ theme: e, mini: t }) => ({\n\tmargin: 0,\n\tmarginLeft: 0,\n\tpadding: 0,\n\t\"& .MuiFormControlLabel-label\": {\n\t\tfontSize: e.typography.fontSize - 1,\n\t\ttransform: \"translate(-4%, 2%)\",\n\t\tcolor: \"rgba(0,0,0,1.0)\",\n\t\t...t && {\n\t\t\tmarginLeft: e.spacing(1),\n\t\t\tcolor: o[700],\n\t\t\tfontSize: e.typography.fontSize - 3\n\t\t}\n\t}\n})), c = t(a)(({ theme: e, mini: t, error: n }) => ({\n\tcolor: `${r.tertiary()} !important`,\n\t...t && {\n\t\tmargin: 0,\n\t\tpadding: 0,\n\t\twidth: e.spacing(3),\n\t\theight: e.spacing(3)\n\t},\n\t...n && { color: `${e.palette.error.main} !important` }\n})), l = ({ mini: e, checked: t, onChange: r, value: i, label: a, error: o }) => /* @__PURE__ */ n(s, {\n\tmini: e,\n\tcontrol: /* @__PURE__ */ n(c, {\n\t\tchecked: t,\n\t\tonChange: r,\n\t\tvalue: i,\n\t\tmini: e,\n\t\terror: o\n\t}),\n\tlabel: a\n});\nl.propTypes = {\n\tmini: e.bool,\n\tchecked: e.bool.isRequired,\n\tonChange: e.func.isRequired,\n\tvalue: e.string,\n\tlabel: e.string.isRequired,\n\terror: e.bool\n}, l.defaultProps = {\n\tvalue: \"\",\n\tmini: !1,\n\terror: !1\n};\n//#endregion\nexport { l as default };\n","import e from \"react\";\nimport t from \"prop-types\";\nimport { styled as n } from \"@mui/material/styles\";\nimport { jsx as r } from \"react/jsx-runtime\";\nimport { isFinite as i } from \"@pie-element/shared-lodash\";\nimport a from \"debug\";\nimport o from \"@mui/material/TextField\";\nimport s from \"@mui/material/InputAdornment\";\n//#region src/number-text-field.tsx\nvar c = a(\"@pie-lib:config-ui:number-text-field\"), l = n(o)(({ theme: e }) => ({\n\tmarginRight: e.spacing(1),\n\t\"& .MuiInputLabel-root\": {\n\t\twidth: \"auto\",\n\t\tminWidth: \"max-content\",\n\t\tmaxWidth: \"none\",\n\t\twhiteSpace: \"nowrap\",\n\t\toverflow: \"visible\",\n\t\ttransform: \"translate(0, 8px) scale(0.75)\",\n\t\ttransformOrigin: \"top left\",\n\t\tposition: \"relative\"\n\t},\n\t\"& .MuiInputBase-root, & .MuiInput-root, & .MuiFilledInput-root, & .MuiOutlinedInput-root\": {\n\t\theight: \"auto\",\n\t\tminHeight: \"auto\",\n\t\tmarginTop: 0\n\t},\n\t\"& .MuiInputBase-input\": {\n\t\theight: \"auto\",\n\t\tminHeight: \"auto\",\n\t\tpadding: \"6px 0 7px\"\n\t}\n})), u = (e, t) => {\n\tif (!i(e) && !i(t)) return 0;\n\tif (!i(e) && i(t)) return t;\n\tif (i(e)) return e;\n}, d = class extends e.Component {\n\tstatic propTypes = {\n\t\tdisabled: t.bool,\n\t\tclassName: t.string,\n\t\tinputClassName: t.string,\n\t\tonChange: t.func.isRequired,\n\t\tvalue: t.number,\n\t\tmin: t.number,\n\t\tmax: t.number,\n\t\tlabel: t.string,\n\t\tsuffix: t.string,\n\t\tshowErrorWhenOutsideRange: t.bool,\n\t\tdisableUnderline: t.bool,\n\t\tvariant: t.string\n\t};\n\tstatic defaultProps = { showErrorWhenOutsideRange: !1 };\n\tconstructor(e) {\n\t\tsuper(e);\n\t\tlet t = this.clamp(e.value);\n\t\tthis.state = { value: t }, t !== e.value && this.props.onChange({}, t), this.onChange = this.onChange.bind(this);\n\t}\n\tUNSAFE_componentWillReceiveProps(e) {\n\t\tlet t = this.clamp(e.value, e.min, e.max);\n\t\tthis.setState({ value: t });\n\t}\n\tclamp(e, t = this.props.min, n = this.props.max) {\n\t\treturn i(e) ? (i(n) && (e = Math.min(e, n)), i(t) && (e = Math.max(e, t)), e) : u(t, n);\n\t}\n\tonBlur = (e) => {\n\t\tlet t = e.target.value, n = parseFloat(t);\n\t\tc(\"rawNumber: \", n);\n\t\tlet r = this.clamp(n);\n\t\tc(\"number: \", r), r !== this.state.value && (c(\"trigger update...\"), this.setState({ value: r.toString() }, () => {\n\t\t\tthis.props.onChange(e, r);\n\t\t}));\n\t};\n\tonChange(e) {\n\t\tlet t = e.target.value;\n\t\tthis.setState({ value: t });\n\t}\n\terrorMessage = () => {\n\t\tlet { min: e, max: t } = this.props;\n\t\tif (e && t) return `The value must be between ${e} and ${t}`;\n\t\tif (e) return `The value must be greater than ${e}`;\n\t\tif (t) return `The value must be less than ${t}`;\n\t};\n\tgetError = () => {\n\t\tlet { value: e } = this.state, t = parseFloat(e);\n\t\tif (this.clamp(t) !== t) return this.errorMessage();\n\t};\n\trender() {\n\t\tlet { className: e, label: t, disabled: n, suffix: i, min: a, max: o, inputClassName: c, disableUnderline: u, showErrorWhenOutsideRange: d, variant: f } = this.props, p = d && this.getError();\n\t\treturn /* @__PURE__ */ r(l, {\n\t\t\tvariant: u ? \"filled\" : f || \"standard\",\n\t\t\tinputRef: (e) => {\n\t\t\t\tthis.inputRef = e;\n\t\t\t},\n\t\t\tdisabled: n,\n\t\t\tlabel: t,\n\t\t\tInputLabelProps: { shrink: !0 },\n\t\t\tvalue: this.state.value,\n\t\t\terror: !!p,\n\t\t\thelperText: p,\n\t\t\tonChange: this.onChange,\n\t\t\tonBlur: this.onBlur,\n\t\t\tonKeyDown: (e) => {\n\t\t\t\te.key === \"Enter\" && this.inputRef && this.inputRef.blur();\n\t\t\t},\n\t\t\ttype: \"number\",\n\t\t\tclassName: e,\n\t\t\tslotProps: { input: {\n\t\t\t\tendAdornment: i && /* @__PURE__ */ r(s, {\n\t\t\t\t\tposition: \"end\",\n\t\t\t\t\tchildren: i\n\t\t\t\t}),\n\t\t\t\tclassName: c,\n\t\t\t\tinputProps: {\n\t\t\t\t\tmin: a,\n\t\t\t\t\tmax: o\n\t\t\t\t}\n\t\t\t} },\n\t\t\tmargin: \"normal\"\n\t\t});\n\t}\n};\n//#endregion\nexport { d as default };\n","//#region src/fraction-to-number.ts\nvar e = (e) => typeof e == \"object\" && !!e && typeof e.n == \"number\" && typeof e.d == \"number\", t = (t) => {\n\tif (typeof t == \"number\") return t;\n\tif (e(t)) return (t.s ?? 1) * t.n / t.d;\n\tlet n = String(t).trim(), r = n.match(/^([+-]?\\d+)\\s*\\/\\s*([+-]?\\d+)$/);\n\treturn r ? Number.parseInt(r[1] ?? \"0\", 10) / Number.parseInt(r[2] ?? \"1\", 10) : Number(n);\n};\n//#endregion\nexport { t as fractionToNumber };\n","\"use client\";\n\nimport createSvgIcon from \"./utils/createSvgIcon.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M19 13H5v-2h14z\"\n}), 'Remove');","\"use client\";\n\nimport createSvgIcon from \"./utils/createSvgIcon.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z\"\n}), 'Add');","import { fractionToNumber as e } from \"./fraction-to-number.js\";\nimport t from \"react\";\nimport n from \"prop-types\";\nimport { styled as r } from \"@mui/material/styles\";\nimport { jsx as i } from \"react/jsx-runtime\";\nimport { isFinite as a } from \"@pie-element/shared-lodash\";\nimport o from \"@mui/material/IconButton\";\nimport s from \"@mui/material/TextField\";\nimport c from \"@mui/material/InputAdornment\";\nimport l from \"@mui/icons-material/Remove\";\nimport u from \"@mui/icons-material/Add\";\n//#region src/number-text-field-custom.tsx\nvar d = r(s)(() => ({\n\t\"& input[type=number]\": { MozAppearance: \"textfield\" },\n\t\"& input[type=number]::-webkit-outer-spin-button\": {\n\t\tWebkitAppearance: \"none\",\n\t\tmargin: 0\n\t},\n\t\"& input[type=number]::-webkit-inner-spin-button\": {\n\t\tWebkitAppearance: \"none\",\n\t\tmargin: 0\n\t}\n})), f = r(o)(() => ({ padding: \"2px\" })), p = (e, t) => {\n\tif (!a(e) && !a(t)) return 0;\n\tif (!a(e) && a(t)) return t;\n\tif (a(e)) return e;\n}, m = class extends t.Component {\n\tstatic propTypes = {\n\t\tclassName: n.string,\n\t\tcustomValues: n.array,\n\t\tdisabled: n.bool,\n\t\terror: n.bool,\n\t\tinputClassName: n.string,\n\t\thelperText: n.string,\n\t\tonChange: n.func.isRequired,\n\t\tonlyIntegersAllowed: n.bool,\n\t\tvalue: n.any,\n\t\tmin: n.number,\n\t\tmax: n.number,\n\t\tstep: n.number,\n\t\tlabel: n.string,\n\t\tdisableUnderline: n.bool,\n\t\ttextAlign: n.string,\n\t\tvariant: n.string,\n\t\ttype: n.string\n\t};\n\tstatic defaultProps = {\n\t\tstep: 1,\n\t\tcustomValues: [],\n\t\ttextAlign: \"center\",\n\t\tvariant: \"standard\",\n\t\tonlyIntegersAllowed: !1\n\t};\n\tconstructor(e) {\n\t\tsuper(e);\n\t\tlet { value: t, currentIndex: n } = this.normalizeValueAndIndex(e.customValues, e.value);\n\t\tthis.state = {\n\t\t\tvalue: t,\n\t\t\tcurrentIndex: n\n\t\t}, t !== e.value && this.props.onChange({}, t), this.onChange = this.onChange.bind(this);\n\t}\n\tUNSAFE_componentWillReceiveProps(e) {\n\t\tlet { value: t, currentIndex: n } = this.normalizeValueAndIndex(e.customValues, e.value, e.min, e.max);\n\t\tthis.setState({\n\t\t\tvalue: t,\n\t\t\tcurrentIndex: n\n\t\t});\n\t}\n\tclamp(e, t = this.props.min, n = this.props.max) {\n\t\tlet { customValues: r } = this.props;\n\t\treturn (r || []).length > 0 ? e : a(e) ? (a(n) && (e = Math.min(e, n)), a(t) && (e = Math.max(e, t)), e) : p(t, n);\n\t}\n\tnormalizeValueAndIndex = (e, t, n, r) => {\n\t\tlet { type: i } = this.props, a = this.clamp(t, n, r), o = (e || []).findIndex((e) => e === a);\n\t\tif ((e || []).length > 0 && o === -1) {\n\t\t\tlet t = i === \"text\" ? this.getClosestFractionValue(e, a) : this.getClosestValue(e, a);\n\t\t\treturn {\n\t\t\t\tvalue: t.value,\n\t\t\t\tcurrentIndex: t.index\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\tvalue: a,\n\t\t\tcurrentIndex: o\n\t\t};\n\t};\n\tgetClosestValue = (e, t) => e.reduce((e, n, r) => Math.abs(n - t) < Math.abs(e.value - t) ? {\n\t\tvalue: n,\n\t\tindex: r\n\t} : e, {\n\t\tvalue: e[0],\n\t\tindex: 0\n\t});\n\tgetClosestFractionValue = (t, n) => t.reduce((t, r, i) => Math.abs(e(r) - e(n)) < Math.abs(e(t.value) - e(n)) ? {\n\t\tvalue: r,\n\t\tindex: i\n\t} : t, {\n\t\tvalue: t[0],\n\t\tindex: 0\n\t});\n\tgetValidFraction = (e) => {\n\t\tif (this.isPositiveInteger(e.trim())) return e.trim();\n\t\tif (e.trim() === \"\" || e.trim().split(\"/\").length !== 2) return !1;\n\t\tlet [t, n] = e.trim().split(\"/\");\n\t\treturn isNaN(t) || isNaN(n) || (t = parseFloat(t), n = parseFloat(n), !Number.isInteger(t) || !Number.isInteger(n)) || t < 0 || n < 1 ? !1 : t + \"/\" + n;\n\t};\n\tisPositiveInteger = (e) => e >>> 0 === parseFloat(e);\n\tonBlur = (e) => {\n\t\tlet { customValues: t, onlyIntegersAllowed: n, type: r } = this.props, { value: i } = e.target;\n\t\tr === \"text\" && (i = this.getValidFraction(i) || this.props.value);\n\t\tlet a = n ? Math.round(parseFloat(i)) : parseFloat(i);\n\t\tr === \"text\" && (a = i.trim());\n\t\tlet { value: o, currentIndex: s } = this.normalizeValueAndIndex(t, a);\n\t\tthis.setState({\n\t\t\tvalue: o.toString(),\n\t\t\tcurrentIndex: s\n\t\t}, () => this.props.onChange(e, o));\n\t};\n\tonChange(e) {\n\t\tlet { type: t } = this.props, { value: n } = e.target;\n\t\tt !== \"text\" && typeof n == \"string\" && n.trim() === \"\" || this.setState({ value: n });\n\t}\n\tchangeValue(e, t = 1, n = !1) {\n\t\te.preventDefault();\n\t\tlet { customValues: r, step: i, onlyIntegersAllowed: a, onChange: o } = this.props, { currentIndex: s, value: c } = this.state, l = s + t * 1, u;\n\t\tif (r.length > 0) {\n\t\t\tif (l < 0 || l >= r.length) return;\n\t\t\tu = r[l];\n\t\t} else {\n\t\t\tlet e = ((a ? parseInt(c) : parseFloat(c)) * 1e4 + i * t * 1e4) / 1e4;\n\t\t\tu = this.clamp(e);\n\t\t}\n\t\tthis.setState({\n\t\t\tvalue: u.toString(),\n\t\t\tcurrentIndex: l\n\t\t}, () => {\n\t\t\tn && o(e, u);\n\t\t});\n\t}\n\trender() {\n\t\tlet { className: e, label: t, disabled: n, error: r, min: o, max: s, customValues: p, inputClassName: m, disableUnderline: h, helperText: g, variant: _, textAlign: v, type: y = \"number\" } = this.props, { value: b } = this.state, x = e, S = !1, C = !1;\n\t\treturn p.length > 0 ? (S = b === p[0], C = b === p[p.length - 1]) : a(o) && a(s) && (S = b === o, C = b === s), /* @__PURE__ */ i(d, {\n\t\t\tvariant: _,\n\t\t\tinputRef: (e) => this.inputRef = e,\n\t\t\tdisabled: n,\n\t\t\tlabel: t,\n\t\t\tvalue: b,\n\t\t\terror: r,\n\t\t\thelperText: g,\n\t\t\tonChange: this.onChange,\n\t\t\tonBlur: this.onBlur,\n\t\t\tonKeyPress: (e) => {\n\t\t\t\te.key === \"Enter\" && this.inputRef && this.inputRef.blur();\n\t\t\t},\n\t\t\tonKeyDown: (e) => {\n\t\t\t\te.key === \"ArrowUp\" && this.changeValue(e), e.key === \"ArrowDown\" && this.changeValue(e, -1);\n\t\t\t},\n\t\t\ttitle: \"\",\n\t\t\ttype: y,\n\t\t\tclassName: x,\n\t\t\tInputProps: {\n\t\t\t\tclassName: m,\n\t\t\t\tdisableUnderline: h,\n\t\t\t\tstartAdornment: /* @__PURE__ */ i(c, {\n\t\t\t\t\tposition: \"start\",\n\t\t\t\t\tchildren: /* @__PURE__ */ i(f, {\n\t\t\t\t\t\tdisabled: n || S,\n\t\t\t\t\t\tonClick: (e) => this.changeValue(e, -1, !0),\n\t\t\t\t\t\tsize: \"large\",\n\t\t\t\t\t\tchildren: /* @__PURE__ */ i(l, { fontSize: \"small\" })\n\t\t\t\t\t})\n\t\t\t\t}),\n\t\t\t\tendAdornment: /* @__PURE__ */ i(c, {\n\t\t\t\t\tposition: \"end\",\n\t\t\t\t\tchildren: /* @__PURE__ */ i(f, {\n\t\t\t\t\t\tdisabled: n || C,\n\t\t\t\t\t\tonClick: (e) => this.changeValue(e, 1, !0),\n\t\t\t\t\t\tsize: \"large\",\n\t\t\t\t\t\tchildren: /* @__PURE__ */ i(u, { fontSize: \"small\" })\n\t\t\t\t\t})\n\t\t\t\t})\n\t\t\t},\n\t\t\tinputProps: {\n\t\t\t\tstyle: { textAlign: v },\n\t\t\t\tmin: o,\n\t\t\t\tmax: s\n\t\t\t}\n\t\t});\n\t}\n};\n//#endregion\nexport { m as default };\n","import e from \"./radio-with-label.js\";\nimport t from \"react\";\nimport n from \"prop-types\";\nimport { styled as r } from \"@mui/material/styles\";\nimport { jsx as i } from \"react/jsx-runtime\";\nimport * as a from \"@pie-lib/render-ui\";\nimport { InputContainer as o } from \"@pie-lib/render-ui\";\n//#region src/two-choice.tsx\nfunction s(e) {\n\treturn typeof e == \"function\" || typeof e == \"object\" && !!e && typeof e.$$typeof == \"symbol\";\n}\nfunction c(e, t) {\n\treturn !e || s(e) ? e : s(e.default) ? e.default : t && s(e[t]) ? e[t] : t && s(e[t]?.default) ? e[t].default : e;\n}\nvar l = c(o, \"InputContainer\") || c(f.InputContainer, \"InputContainer\"), u = a, d = u.default, f = d && typeof d == \"object\" ? d : u, p = r(\"div\")(({ theme: e, direction: t }) => ({\n\tdisplay: \"flex\",\n\tflexWrap: \"wrap\",\n\tpaddingLeft: 0,\n\tmarginTop: e.spacing(1),\n\t...t === \"vertical\" && { flexDirection: \"column\" }\n})), m = class extends t.Component {\n\tstatic propTypes = {\n\t\theader: n.string.isRequired,\n\t\tclassName: n.string,\n\t\tcustomLabel: n.func,\n\t\topts: n.array.isRequired,\n\t\tvalue: n.string,\n\t\tonChange: n.func.isRequired,\n\t\tdirection: n.oneOf([\"horizontal\", \"vertical\"])\n\t};\n\thandleChange = (e) => {\n\t\tthis.props.onChange(e.currentTarget.value);\n\t};\n\trender() {\n\t\tlet { header: t, className: n, customLabel: r, opts: a, value: o, direction: s } = this.props, c = a.map((e) => typeof e == \"string\" ? {\n\t\t\tlabel: e,\n\t\t\tvalue: e\n\t\t} : e), u = r || e;\n\t\treturn /* @__PURE__ */ i(l, {\n\t\t\tlabel: t,\n\t\t\tclassName: n,\n\t\t\tchildren: /* @__PURE__ */ i(p, {\n\t\t\t\tdirection: s,\n\t\t\t\tchildren: c.map((e, t) => /* @__PURE__ */ i(u, {\n\t\t\t\t\tvalue: e.value,\n\t\t\t\t\tchecked: e.value === o,\n\t\t\t\t\tonChange: this.handleChange,\n\t\t\t\t\tlabel: e.label\n\t\t\t\t}, t))\n\t\t\t})\n\t\t});\n\t}\n}, h = n.shape({\n\tlabel: n.string,\n\tvalue: n.string\n}), g = class extends t.Component {\n\tstatic propTypes = {\n\t\theader: n.string.isRequired,\n\t\tvalue: n.string.isRequired,\n\t\tonChange: n.func.isRequired,\n\t\tone: n.oneOfType([h, n.string]),\n\t\ttwo: n.oneOfType([h, n.string]),\n\t\tclassName: n.string,\n\t\tcustomLabel: n.func\n\t};\n\trender() {\n\t\tlet { one: e, two: t, header: n, className: r, customLabel: a, value: o, onChange: s } = this.props;\n\t\treturn /* @__PURE__ */ i(m, {\n\t\t\tcustomLabel: a,\n\t\t\theader: n,\n\t\t\tclassName: r,\n\t\t\topts: [e, t],\n\t\t\tvalue: o,\n\t\t\tonChange: s\n\t\t});\n\t}\n};\n//#endregion\nexport { m as NChoice, g as default };\n","//#region \\0rolldown/runtime.js\nvar e = Object.defineProperty, t = (t, n) => {\n\tlet r = {};\n\tfor (var i in t) e(r, i, {\n\t\tget: t[i],\n\t\tenumerable: !0\n\t});\n\treturn n || e(r, Symbol.toStringTag, { value: \"Module\" }), r;\n};\n//#endregion\nexport { t as __exportAll };\n","import e from \"../tabs/index.js\";\nimport t from \"react\";\nimport n from \"prop-types\";\nimport { styled as r } from \"@mui/material/styles\";\nimport { jsx as i, jsxs as a } from \"react/jsx-runtime\";\n//#region src/layout/layout-contents.tsx\nvar o = r(\"div\")(() => ({\n\tdisplay: \"flex\",\n\tflexDirection: \"column\",\n\tposition: \"relative\"\n})), s = r(\"div\")(() => ({\n\tdisplay: \"flex\",\n\tjustifyContent: \"space-between\"\n})), c = r(\"div\")(({ theme: e }) => ({ padding: `${e.spacing(2)} 0` })), l = r(\"div\")(() => ({ flex: \"1\" })), u = r(\"div\")(({ theme: e }) => ({ marginLeft: e.spacing(2) })), d = class extends t.Component {\n\tstatic propTypes = {\n\t\tmode: n.oneOf([\"tabbed\", \"inline\"]),\n\t\tsecondary: n.oneOfType([n.arrayOf(n.node), n.node]),\n\t\tchildren: n.oneOfType([n.arrayOf(n.node), n.node]),\n\t\tdimensions: n.object\n\t};\n\tgetConfiguration = () => {\n\t\tlet { secondary: e } = this.props;\n\t\treturn e?.props?.configuration || e?.props?.children?.props?.configuration || void 0;\n\t};\n\trender() {\n\t\tlet { mode: t, secondary: n, children: r, dimensions: d } = this.props, { minHeight: f, minWidth: p, maxHeight: m, maxWidth: h } = d || {}, g = this.getConfiguration(), _ = Object.entries(g || {}).some(([, e]) => !!e?.settings);\n\t\tif (!_) try {\n\t\t\t_ = JSON.stringify(g)?.match(/settings\":true/)?.length;\n\t\t} catch (e) {\n\t\t\tconsole.log(e.toString());\n\t\t}\n\t\treturn /* @__PURE__ */ a(o, {\n\t\t\tstyle: {\n\t\t\t\tminHeight: f,\n\t\t\t\tminWidth: p,\n\t\t\t\tmaxHeight: m,\n\t\t\t\tmaxWidth: h\n\t\t\t},\n\t\t\tchildren: [\n\t\t\t\tt === \"inline\" && /* @__PURE__ */ a(s, { children: [/* @__PURE__ */ i(l, {\n\t\t\t\t\tclassName: \"design-container\",\n\t\t\t\t\tchildren: r\n\t\t\t\t}), _ && /* @__PURE__ */ i(u, {\n\t\t\t\t\tclassName: \"settings-container\",\n\t\t\t\t\tchildren: n\n\t\t\t\t})] }),\n\t\t\t\tt === \"tabbed\" && _ && /* @__PURE__ */ a(e, {\n\t\t\t\t\tonChange: this.onTabsChange,\n\t\t\t\t\tcontentClassName: \"content-container\",\n\t\t\t\t\tindicatorColor: \"primary\",\n\t\t\t\t\tchildren: [/* @__PURE__ */ i(c, {\n\t\t\t\t\t\ttitle: \"Design\",\n\t\t\t\t\t\tclassName: \"design-container\",\n\t\t\t\t\t\tchildren: r\n\t\t\t\t\t}), /* @__PURE__ */ i(c, {\n\t\t\t\t\t\ttitle: \"Settings\",\n\t\t\t\t\t\tclassName: \"settings-container\",\n\t\t\t\t\t\tchildren: n\n\t\t\t\t\t})]\n\t\t\t\t}),\n\t\t\t\tt === \"tabbed\" && !_ && /* @__PURE__ */ i(c, {\n\t\t\t\t\tclassName: \"design-container\",\n\t\t\t\t\tchildren: r\n\t\t\t\t})\n\t\t\t]\n\t\t});\n\t}\n};\n//#endregion\nexport { d as default };\n","//#region ../../../node_modules/.bun/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/extends.js\nfunction e() {\n\treturn e = Object.assign ? Object.assign.bind() : function(e) {\n\t\tfor (var t = 1; t < arguments.length; t++) {\n\t\t\tvar n = arguments[t];\n\t\t\tfor (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);\n\t\t}\n\t\treturn e;\n\t}, e.apply(null, arguments);\n}\n//#endregion\nexport { e as _extends };\n","//#region ../../../node_modules/.bun/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js\nfunction e(e, t) {\n\tif (e == null) return {};\n\tvar n = {};\n\tfor (var r in e) if ({}.hasOwnProperty.call(e, r)) {\n\t\tif (t.indexOf(r) !== -1) continue;\n\t\tn[r] = e[r];\n\t}\n\treturn n;\n}\n//#endregion\nexport { e as _objectWithoutPropertiesLoose };\n","//#region ../../../node_modules/.bun/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js\nfunction e(t, n) {\n\treturn e = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {\n\t\treturn e.__proto__ = t, e;\n\t}, e(t, n);\n}\n//#endregion\nexport { e as _setPrototypeOf };\n","import { _setPrototypeOf as e } from \"./setPrototypeOf.js\";\n//#region ../../../node_modules/.bun/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js\nfunction t(t, n) {\n\tt.prototype = Object.create(n.prototype), t.prototype.constructor = t, e(t, n);\n}\n//#endregion\nexport { t as _inheritsLoose };\n","//#region ../../../node_modules/.bun/resize-observer-polyfill@1.5.1/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js\nvar e = (function() {\n\tif (typeof Map < \"u\") return Map;\n\tfunction e(e, t) {\n\t\tvar n = -1;\n\t\treturn e.some(function(e, r) {\n\t\t\treturn e[0] === t ? (n = r, !0) : !1;\n\t\t}), n;\n\t}\n\treturn function() {\n\t\tfunction t() {\n\t\t\tthis.__entries__ = [];\n\t\t}\n\t\treturn Object.defineProperty(t.prototype, \"size\", {\n\t\t\tget: function() {\n\t\t\t\treturn this.__entries__.length;\n\t\t\t},\n\t\t\tenumerable: !0,\n\t\t\tconfigurable: !0\n\t\t}), t.prototype.get = function(t) {\n\t\t\tvar n = e(this.__entries__, t), r = this.__entries__[n];\n\t\t\treturn r && r[1];\n\t\t}, t.prototype.set = function(t, n) {\n\t\t\tvar r = e(this.__entries__, t);\n\t\t\t~r ? this.__entries__[r][1] = n : this.__entries__.push([t, n]);\n\t\t}, t.prototype.delete = function(t) {\n\t\t\tvar n = this.__entries__, r = e(n, t);\n\t\t\t~r && n.splice(r, 1);\n\t\t}, t.prototype.has = function(t) {\n\t\t\treturn !!~e(this.__entries__, t);\n\t\t}, t.prototype.clear = function() {\n\t\t\tthis.__entries__.splice(0);\n\t\t}, t.prototype.forEach = function(e, t) {\n\t\t\tt === void 0 && (t = null);\n\t\t\tfor (var n = 0, r = this.__entries__; n < r.length; n++) {\n\t\t\t\tvar i = r[n];\n\t\t\t\te.call(t, i[1], i[0]);\n\t\t\t}\n\t\t}, t;\n\t}();\n})(), t = typeof window < \"u\" && typeof document < \"u\" && window.document === document, n = (function() {\n\treturn typeof global < \"u\" && global.Math === Math ? global : typeof self < \"u\" && self.Math === Math ? self : typeof window < \"u\" && window.Math === Math ? window : Function(\"return this\")();\n})(), r = (function() {\n\treturn typeof requestAnimationFrame == \"function\" ? requestAnimationFrame.bind(n) : function(e) {\n\t\treturn setTimeout(function() {\n\t\t\treturn e(Date.now());\n\t\t}, 1e3 / 60);\n\t};\n})(), i = 2;\nfunction a(e, t) {\n\tvar n = !1, a = !1, o = 0;\n\tfunction s() {\n\t\tn && (n = !1, e()), a && l();\n\t}\n\tfunction c() {\n\t\tr(s);\n\t}\n\tfunction l() {\n\t\tvar e = Date.now();\n\t\tif (n) {\n\t\t\tif (e - o < i) return;\n\t\t\ta = !0;\n\t\t} else n = !0, a = !1, setTimeout(c, t);\n\t\to = e;\n\t}\n\treturn l;\n}\nvar o = 20, s = [\n\t\"top\",\n\t\"right\",\n\t\"bottom\",\n\t\"left\",\n\t\"width\",\n\t\"height\",\n\t\"size\",\n\t\"weight\"\n], c = typeof MutationObserver < \"u\", l = function() {\n\tfunction e() {\n\t\tthis.connected_ = !1, this.mutationEventsAdded_ = !1, this.mutationsObserver_ = null, this.observers_ = [], this.onTransitionEnd_ = this.onTransitionEnd_.bind(this), this.refresh = a(this.refresh.bind(this), o);\n\t}\n\treturn e.prototype.addObserver = function(e) {\n\t\t~this.observers_.indexOf(e) || this.observers_.push(e), this.connected_ || this.connect_();\n\t}, e.prototype.removeObserver = function(e) {\n\t\tvar t = this.observers_, n = t.indexOf(e);\n\t\t~n && t.splice(n, 1), !t.length && this.connected_ && this.disconnect_();\n\t}, e.prototype.refresh = function() {\n\t\tthis.updateObservers_() && this.refresh();\n\t}, e.prototype.updateObservers_ = function() {\n\t\tvar e = this.observers_.filter(function(e) {\n\t\t\treturn e.gatherActive(), e.hasActive();\n\t\t});\n\t\treturn e.forEach(function(e) {\n\t\t\treturn e.broadcastActive();\n\t\t}), e.length > 0;\n\t}, e.prototype.connect_ = function() {\n\t\t!t || this.connected_ || (document.addEventListener(\"transitionend\", this.onTransitionEnd_), window.addEventListener(\"resize\", this.refresh), c ? (this.mutationsObserver_ = new MutationObserver(this.refresh), this.mutationsObserver_.observe(document, {\n\t\t\tattributes: !0,\n\t\t\tchildList: !0,\n\t\t\tcharacterData: !0,\n\t\t\tsubtree: !0\n\t\t})) : (document.addEventListener(\"DOMSubtreeModified\", this.refresh), this.mutationEventsAdded_ = !0), this.connected_ = !0);\n\t}, e.prototype.disconnect_ = function() {\n\t\t!t || !this.connected_ || (document.removeEventListener(\"transitionend\", this.onTransitionEnd_), window.removeEventListener(\"resize\", this.refresh), this.mutationsObserver_ && this.mutationsObserver_.disconnect(), this.mutationEventsAdded_ && document.removeEventListener(\"DOMSubtreeModified\", this.refresh), this.mutationsObserver_ = null, this.mutationEventsAdded_ = !1, this.connected_ = !1);\n\t}, e.prototype.onTransitionEnd_ = function(e) {\n\t\tvar t = e.propertyName, n = t === void 0 ? \"\" : t;\n\t\ts.some(function(e) {\n\t\t\treturn !!~n.indexOf(e);\n\t\t}) && this.refresh();\n\t}, e.getInstance = function() {\n\t\treturn this.instance_ ||= new e(), this.instance_;\n\t}, e.instance_ = null, e;\n}(), u = (function(e, t) {\n\tfor (var n = 0, r = Object.keys(t); n < r.length; n++) {\n\t\tvar i = r[n];\n\t\tObject.defineProperty(e, i, {\n\t\t\tvalue: t[i],\n\t\t\tenumerable: !1,\n\t\t\twritable: !1,\n\t\t\tconfigurable: !0\n\t\t});\n\t}\n\treturn e;\n}), d = (function(e) {\n\treturn e && e.ownerDocument && e.ownerDocument.defaultView || n;\n}), f = S(0, 0, 0, 0);\nfunction p(e) {\n\treturn parseFloat(e) || 0;\n}\nfunction m(e) {\n\treturn [...arguments].slice(1).reduce(function(t, n) {\n\t\tvar r = e[\"border-\" + n + \"-width\"];\n\t\treturn t + p(r);\n\t}, 0);\n}\nfunction h(e) {\n\tfor (var t = [\n\t\t\"top\",\n\t\t\"right\",\n\t\t\"bottom\",\n\t\t\"left\"\n\t], n = {}, r = 0, i = t; r < i.length; r++) {\n\t\tvar a = i[r], o = e[\"padding-\" + a];\n\t\tn[a] = p(o);\n\t}\n\treturn n;\n}\nfunction g(e) {\n\tvar t = e.getBBox();\n\treturn S(0, 0, t.width, t.height);\n}\nfunction _(e) {\n\tvar t = e.clientWidth, n = e.clientHeight;\n\tif (!t && !n) return f;\n\tvar r = d(e).getComputedStyle(e), i = h(r), a = i.left + i.right, o = i.top + i.bottom, s = p(r.width), c = p(r.height);\n\tif (r.boxSizing === \"border-box\" && (Math.round(s + a) !== t && (s -= m(r, \"left\", \"right\") + a), Math.round(c + o) !== n && (c -= m(r, \"top\", \"bottom\") + o)), !y(e)) {\n\t\tvar l = Math.round(s + a) - t, u = Math.round(c + o) - n;\n\t\tMath.abs(l) !== 1 && (s -= l), Math.abs(u) !== 1 && (c -= u);\n\t}\n\treturn S(i.left, i.top, s, c);\n}\nvar v = (function() {\n\treturn typeof SVGGraphicsElement < \"u\" ? function(e) {\n\t\treturn e instanceof d(e).SVGGraphicsElement;\n\t} : function(e) {\n\t\treturn e instanceof d(e).SVGElement && typeof e.getBBox == \"function\";\n\t};\n})();\nfunction y(e) {\n\treturn e === d(e).document.documentElement;\n}\nfunction b(e) {\n\treturn t ? v(e) ? g(e) : _(e) : f;\n}\nfunction x(e) {\n\tvar t = e.x, n = e.y, r = e.width, i = e.height, a = Object.create((typeof DOMRectReadOnly < \"u\" ? DOMRectReadOnly : Object).prototype);\n\treturn u(a, {\n\t\tx: t,\n\t\ty: n,\n\t\twidth: r,\n\t\theight: i,\n\t\ttop: n,\n\t\tright: t + r,\n\t\tbottom: i + n,\n\t\tleft: t\n\t}), a;\n}\nfunction S(e, t, n, r) {\n\treturn {\n\t\tx: e,\n\t\ty: t,\n\t\twidth: n,\n\t\theight: r\n\t};\n}\nvar C = function() {\n\tfunction e(e) {\n\t\tthis.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ = S(0, 0, 0, 0), this.target = e;\n\t}\n\treturn e.prototype.isActive = function() {\n\t\tvar e = b(this.target);\n\t\treturn this.contentRect_ = e, e.width !== this.broadcastWidth || e.height !== this.broadcastHeight;\n\t}, e.prototype.broadcastRect = function() {\n\t\tvar e = this.contentRect_;\n\t\treturn this.broadcastWidth = e.width, this.broadcastHeight = e.height, e;\n\t}, e;\n}(), w = function() {\n\tfunction e(e, t) {\n\t\tvar n = x(t);\n\t\tu(this, {\n\t\t\ttarget: e,\n\t\t\tcontentRect: n\n\t\t});\n\t}\n\treturn e;\n}(), T = function() {\n\tfunction t(t, n, r) {\n\t\tif (this.activeObservations_ = [], this.observations_ = new e(), typeof t != \"function\") throw TypeError(\"The callback provided as parameter 1 is not a function.\");\n\t\tthis.callback_ = t, this.controller_ = n, this.callbackCtx_ = r;\n\t}\n\treturn t.prototype.observe = function(e) {\n\t\tif (!arguments.length) throw TypeError(\"1 argument required, but only 0 present.\");\n\t\tif (!(typeof Element > \"u\" || !(Element instanceof Object))) {\n\t\t\tif (!(e instanceof d(e).Element)) throw TypeError(\"parameter 1 is not of type \\\"Element\\\".\");\n\t\t\tvar t = this.observations_;\n\t\t\tt.has(e) || (t.set(e, new C(e)), this.controller_.addObserver(this), this.controller_.refresh());\n\t\t}\n\t}, t.prototype.unobserve = function(e) {\n\t\tif (!arguments.length) throw TypeError(\"1 argument required, but only 0 present.\");\n\t\tif (!(typeof Element > \"u\" || !(Element instanceof Object))) {\n\t\t\tif (!(e instanceof d(e).Element)) throw TypeError(\"parameter 1 is not of type \\\"Element\\\".\");\n\t\t\tvar t = this.observations_;\n\t\t\tt.has(e) && (t.delete(e), t.size || this.controller_.removeObserver(this));\n\t\t}\n\t}, t.prototype.disconnect = function() {\n\t\tthis.clearActive(), this.observations_.clear(), this.controller_.removeObserver(this);\n\t}, t.prototype.gatherActive = function() {\n\t\tvar e = this;\n\t\tthis.clearActive(), this.observations_.forEach(function(t) {\n\t\t\tt.isActive() && e.activeObservations_.push(t);\n\t\t});\n\t}, t.prototype.broadcastActive = function() {\n\t\tif (this.hasActive()) {\n\t\t\tvar e = this.callbackCtx_, t = this.activeObservations_.map(function(e) {\n\t\t\t\treturn new w(e.target, e.broadcastRect());\n\t\t\t});\n\t\t\tthis.callback_.call(e, t, e), this.clearActive();\n\t\t}\n\t}, t.prototype.clearActive = function() {\n\t\tthis.activeObservations_.splice(0);\n\t}, t.prototype.hasActive = function() {\n\t\treturn this.activeObservations_.length > 0;\n\t}, t;\n}(), E = typeof WeakMap < \"u\" ? /* @__PURE__ */ new WeakMap() : new e(), D = function() {\n\tfunction e(t) {\n\t\tif (!(this instanceof e)) throw TypeError(\"Cannot call a class as a function.\");\n\t\tif (!arguments.length) throw TypeError(\"1 argument required, but only 0 present.\");\n\t\tvar n = new T(t, l.getInstance(), this);\n\t\tE.set(this, n);\n\t}\n\treturn e;\n}();\n[\n\t\"observe\",\n\t\"unobserve\",\n\t\"disconnect\"\n].forEach(function(e) {\n\tD.prototype[e] = function() {\n\t\tvar t;\n\t\treturn (t = E.get(this))[e].apply(t, arguments);\n\t};\n});\nvar O = (function() {\n\treturn n.ResizeObserver === void 0 ? D : n.ResizeObserver;\n})();\n//#endregion\nexport { O as default };\n","import { _extends as e } from \"../../../../@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/extends.js\";\nimport { _objectWithoutPropertiesLoose as t } from \"../../../../@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js\";\nimport { _inheritsLoose as n } from \"../../../../@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js\";\nimport r from \"../../../../resize-observer-polyfill@1.5.1/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js\";\nimport { Component as i, createElement as a } from \"react\";\nimport o from \"prop-types\";\n//#region ../../../node_modules/.bun/react-measure@2.5.2+6dbf9a050bc9aadb/node_modules/react-measure/dist/index.esm.js\nvar s = [\n\t\"client\",\n\t\"offset\",\n\t\"scroll\",\n\t\"bounds\",\n\t\"margin\"\n];\nfunction c(e) {\n\tvar t = [];\n\treturn s.forEach(function(n) {\n\t\te[n] && t.push(n);\n\t}), t;\n}\nfunction l(e, t) {\n\tvar n = {};\n\tif (t.indexOf(\"client\") > -1 && (n.client = {\n\t\ttop: e.clientTop,\n\t\tleft: e.clientLeft,\n\t\twidth: e.clientWidth,\n\t\theight: e.clientHeight\n\t}), t.indexOf(\"offset\") > -1 && (n.offset = {\n\t\ttop: e.offsetTop,\n\t\tleft: e.offsetLeft,\n\t\twidth: e.offsetWidth,\n\t\theight: e.offsetHeight\n\t}), t.indexOf(\"scroll\") > -1 && (n.scroll = {\n\t\ttop: e.scrollTop,\n\t\tleft: e.scrollLeft,\n\t\twidth: e.scrollWidth,\n\t\theight: e.scrollHeight\n\t}), t.indexOf(\"bounds\") > -1) {\n\t\tvar r = e.getBoundingClientRect();\n\t\tn.bounds = {\n\t\t\ttop: r.top,\n\t\t\tright: r.right,\n\t\t\tbottom: r.bottom,\n\t\t\tleft: r.left,\n\t\t\twidth: r.width,\n\t\t\theight: r.height\n\t\t};\n\t}\n\tif (t.indexOf(\"margin\") > -1) {\n\t\tvar i = getComputedStyle(e);\n\t\tn.margin = {\n\t\t\ttop: i ? parseInt(i.marginTop) : 0,\n\t\t\tright: i ? parseInt(i.marginRight) : 0,\n\t\t\tbottom: i ? parseInt(i.marginBottom) : 0,\n\t\t\tleft: i ? parseInt(i.marginLeft) : 0\n\t\t};\n\t}\n\treturn n;\n}\nfunction u(e) {\n\treturn e && e.ownerDocument && e.ownerDocument.defaultView || window;\n}\nfunction d(s) {\n\treturn function(d) {\n\t\tvar f, p;\n\t\treturn p = f = /*#__PURE__*/ function(i) {\n\t\t\tn(o, i);\n\t\t\tfunction o() {\n\t\t\t\tvar e, t = [...arguments];\n\t\t\t\treturn e = i.call.apply(i, [this].concat(t)) || this, e.state = { contentRect: {\n\t\t\t\t\tentry: {},\n\t\t\t\t\tclient: {},\n\t\t\t\t\toffset: {},\n\t\t\t\t\tscroll: {},\n\t\t\t\t\tbounds: {},\n\t\t\t\t\tmargin: {}\n\t\t\t\t} }, e._animationFrameID = null, e._resizeObserver = null, e._node = null, e._window = null, e.measure = function(t) {\n\t\t\t\t\tvar n = l(e._node, s || c(e.props));\n\t\t\t\t\tt && (n.entry = t[0].contentRect), e._animationFrameID = e._window.requestAnimationFrame(function() {\n\t\t\t\t\t\te._resizeObserver !== null && (e.setState({ contentRect: n }), typeof e.props.onResize == \"function\" && e.props.onResize(n));\n\t\t\t\t\t});\n\t\t\t\t}, e._handleRef = function(t) {\n\t\t\t\t\te._resizeObserver !== null && e._node !== null && e._resizeObserver.unobserve(e._node), e._node = t, e._window = u(e._node);\n\t\t\t\t\tvar n = e.props.innerRef;\n\t\t\t\t\tn && (typeof n == \"function\" ? n(e._node) : n.current = e._node), e._resizeObserver !== null && e._node !== null && e._resizeObserver.observe(e._node);\n\t\t\t\t}, e;\n\t\t\t}\n\t\t\tvar f = o.prototype;\n\t\t\treturn f.componentDidMount = function() {\n\t\t\t\tthis._resizeObserver = this._window !== null && this._window.ResizeObserver ? new this._window.ResizeObserver(this.measure) : new r(this.measure), this._node !== null && (this._resizeObserver.observe(this._node), typeof this.props.onResize == \"function\" && this.props.onResize(l(this._node, s || c(this.props))));\n\t\t\t}, f.componentWillUnmount = function() {\n\t\t\t\tthis._window !== null && this._window.cancelAnimationFrame(this._animationFrameID), this._resizeObserver !== null && (this._resizeObserver.disconnect(), this._resizeObserver = null);\n\t\t\t}, f.render = function() {\n\t\t\t\tvar n = this.props;\n\t\t\t\treturn n.innerRef, n.onResize, a(d, e({}, t(n, [\"innerRef\", \"onResize\"]), {\n\t\t\t\t\tmeasureRef: this._handleRef,\n\t\t\t\t\tmeasure: this.measure,\n\t\t\t\t\tcontentRect: this.state.contentRect\n\t\t\t\t}));\n\t\t\t}, o;\n\t\t}(i), f.propTypes = {\n\t\t\tclient: o.bool,\n\t\t\toffset: o.bool,\n\t\t\tscroll: o.bool,\n\t\t\tbounds: o.bool,\n\t\t\tmargin: o.bool,\n\t\t\tinnerRef: o.oneOfType([o.object, o.func]),\n\t\t\tonResize: o.func\n\t\t}, p;\n\t};\n}\nvar f = d()(function(e) {\n\tvar t = e.measure, n = e.measureRef, r = e.contentRect, i = e.children;\n\treturn i({\n\t\tmeasure: t,\n\t\tmeasureRef: n,\n\t\tcontentRect: r\n\t});\n});\nf.displayName = \"Measure\", f.propTypes.children = o.func;\n//#endregion\nexport { f as default, d as withContentRect };\n","import e from \"react\";\nimport t from \"prop-types\";\nimport { styled as n } from \"@mui/material/styles\";\nimport { jsx as r } from \"react/jsx-runtime\";\n//#region src/layout/settings-box.tsx\nvar i = n(\"div\")(({ theme: e }) => ({\n\tbackgroundColor: e.palette.background.paper,\n\tborder: `2px solid ${e.palette.grey[200]}`,\n\tdisplay: \"flex\",\n\tflexDirection: \"column\",\n\tjustifyContent: \"flex-start\",\n\tminWidth: \"275px\",\n\tmaxWidth: \"300px\",\n\tpadding: \"20px 4px 4px 20px\",\n\tzIndex: 99\n})), a = class extends e.Component {\n\tstatic propTypes = {\n\t\tclassName: t.string,\n\t\tchildren: t.oneOfType([t.arrayOf(t.node), t.node]).isRequired\n\t};\n\tstatic defaultProps = {};\n\trender() {\n\t\tlet { className: e, children: t } = this.props;\n\t\treturn /* @__PURE__ */ r(i, {\n\t\t\tclassName: e,\n\t\t\tchildren: t\n\t\t});\n\t}\n};\n//#endregion\nexport { a as default };\n","import e, { withContentRect as t } from \"../node_modules/.bun/react-measure@2.5.2_6dbf9a050bc9aadb/node_modules/react-measure/dist/index.esm.js\";\nimport n from \"./layout-contents.js\";\nimport r from \"./settings-box.js\";\nimport i from \"react\";\nimport a from \"prop-types\";\nimport { StyledEngineProvider as o, ThemeProvider as s, createTheme as c } from \"@mui/material/styles\";\nimport { jsx as l, jsxs as u } from \"react/jsx-runtime\";\n//#region src/layout/config-layout.tsx\nvar d = c({\n\ttypography: { fontFamily: \"inherit\" },\n\tcomponents: { MuiButton: { styleOverrides: { contained: {\n\t\tbackgroundColor: \"#e0e0e0\",\n\t\tcolor: \"#000000\",\n\t\t\"&:hover\": { backgroundColor: \"#bdbdbd\" }\n\t} } } }\n}), f = class extends i.Component {\n\tstatic propTypes = {\n\t\tchildren: a.oneOfType([\n\t\t\ta.string,\n\t\t\ta.arrayOf(a.element),\n\t\t\ta.element\n\t\t]),\n\t\tclassName: a.string,\n\t\tdimensions: a.object,\n\t\tsettings: a.element,\n\t\tsidePanelMinWidth: a.number,\n\t\thideSettings: a.bool,\n\t\textraCSSRules: a.shape({\n\t\t\tnames: a.arrayOf(a.string),\n\t\t\trules: a.string\n\t\t})\n\t};\n\tstatic defaultProps = {\n\t\tsidePanelMinWidth: 1135,\n\t\thideSettings: !1,\n\t\tdimensions: {}\n\t};\n\tconstructor(...e) {\n\t\tsuper(...e), this.state = { layoutMode: void 0 };\n\t}\n\tonResize = (e) => {\n\t\tlet { bounds: t } = e, { sidePanelMinWidth: n, dimensions: r } = this.props, { maxWidth: i } = r || {}, a = t.width > n && (!i || i > n) ? \"inline\" : \"tabbed\";\n\t\ta !== this.state.layoutMode && this.setState({ layoutMode: a });\n\t};\n\trender() {\n\t\treturn /* @__PURE__ */ l(o, {\n\t\t\tinjectFirst: !0,\n\t\t\tchildren: /* @__PURE__ */ l(s, {\n\t\t\t\ttheme: d,\n\t\t\t\tchildren: /* @__PURE__ */ l(e, {\n\t\t\t\t\tbounds: !0,\n\t\t\t\t\tonResize: this.onResize,\n\t\t\t\t\tchildren: ({ measureRef: e }) => {\n\t\t\t\t\t\tlet { children: t, settings: i, hideSettings: a, dimensions: o, extraCSSRules: s } = this.props, { layoutMode: c } = this.state, d = a ? null : c === \"inline\" ? /* @__PURE__ */ l(r, {\n\t\t\t\t\t\t\tclassName: \"settings-box\",\n\t\t\t\t\t\t\tchildren: i\n\t\t\t\t\t\t}) : i;\n\t\t\t\t\t\treturn /* @__PURE__ */ u(\"div\", {\n\t\t\t\t\t\t\tref: e,\n\t\t\t\t\t\t\tclassName: \"main-container extraCSSRules\",\n\t\t\t\t\t\t\tchildren: [s?.rules ? /* @__PURE__ */ l(\"style\", { dangerouslySetInnerHTML: { __html: `.extraCSSRules { ${s.rules} }` } }) : null, /* @__PURE__ */ l(n, {\n\t\t\t\t\t\t\t\tmode: c,\n\t\t\t\t\t\t\t\tsecondary: d,\n\t\t\t\t\t\t\t\tdimensions: o,\n\t\t\t\t\t\t\t\tchildren: t\n\t\t\t\t\t\t\t})]\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t})\n\t\t});\n\t}\n}, p = t(\"bounds\")(f);\n//#endregion\nexport { p as default };\n","import { __exportAll as e } from \"../_virtual/_rolldown/runtime.js\";\nimport t from \"./layout-contents.js\";\nimport n from \"./config-layout.js\";\n//#region src/layout/index.ts\nvar r = /* @__PURE__ */ e({\n\tConfigLayout: () => n,\n\tLayoutContents: () => t\n});\n//#endregion\nexport { r as layout_exports };\n","import \"react\";\nimport e from \"prop-types\";\nimport { styled as t } from \"@mui/material/styles\";\nimport { jsx as n, jsxs as r } from \"react/jsx-runtime\";\nimport { color as i } from \"@pie-lib/render-ui\";\nimport a from \"@mui/material/Switch\";\nimport o from \"@mui/material/InputLabel\";\n//#region src/settings/toggle.tsx\nvar s = t(\"div\")(() => ({\n\tdisplay: \"flex\",\n\twidth: \"100%\",\n\tjustifyContent: \"space-between\"\n})), c = t(o)(({ theme: e }) => ({\n\tcolor: \"rgba(0, 0, 0, 0.89)\",\n\tfontSize: e.typography.fontSize,\n\tpaddingTop: e.spacing(2)\n})), l = t(a)(({ checked: e }) => ({\n\t\"&.Mui-checked .MuiSwitch-thumb\": { color: `${i.tertiary()} !important` },\n\t\"&.Mui-checked .MuiSwitch-track\": { backgroundColor: `${i.tertiaryLight()} !important` },\n\t\"& .MuiSwitch-track\": { backgroundColor: e ? `${i.tertiaryLight()} !important` : void 0 }\n})), u = ({ checked: e, disabled: t, label: i, toggle: a }) => /* @__PURE__ */ r(s, { children: [/* @__PURE__ */ n(c, { children: i }), /* @__PURE__ */ n(l, {\n\tchecked: e,\n\tdisabled: t,\n\tonChange: (e) => a(e.target.checked)\n})] });\nu.propTypes = {\n\tchecked: e.bool,\n\tdisabled: e.bool,\n\tlabel: e.string.isRequired,\n\ttoggle: e.func.isRequired\n};\n//#endregion\nexport { u as default };\n","import \"react\";\nimport e from \"prop-types\";\nimport { styled as t } from \"@mui/material/styles\";\nimport { jsx as n } from \"react/jsx-runtime\";\nimport { color as r } from \"@pie-lib/render-ui\";\nimport i from \"@mui/material/FormControlLabel\";\nimport a from \"@mui/material/Radio\";\n//#region src/settings/settings-radio-label.tsx\nvar o = t(i)(({ theme: e }) => ({ \"& .MuiFormControlLabel-label\": {\n\tcolor: \"rgba(0, 0, 0, 0.89)\",\n\tfontSize: e.typography.fontSize - 2,\n\tleft: \"-5px\",\n\tposition: \"relative\"\n} })), s = t(a)(() => ({ color: `${r.tertiary()} !important` })), c = ({ label: e, value: t, checked: r, onChange: i }) => /* @__PURE__ */ n(o, {\n\tvalue: t,\n\tcontrol: /* @__PURE__ */ n(s, {\n\t\tchecked: r,\n\t\tonChange: i\n\t}),\n\tlabel: e\n});\nc.propTypes = {\n\tlabel: e.string,\n\tvalue: e.string,\n\tchecked: e.bool,\n\tonChange: e.func\n};\n//#endregion\nexport { c as default };\n","import e from \"../checkbox.js\";\nimport t from \"../number-text-field.js\";\nimport { NChoice as n } from \"../two-choice.js\";\nimport r from \"./toggle.js\";\nimport i from \"./settings-radio-label.js\";\nimport a from \"react\";\nimport o from \"prop-types\";\nimport { styled as s } from \"@mui/material/styles\";\nimport { jsx as c, jsxs as l } from \"react/jsx-runtime\";\nimport { get as u, set as d } from \"@pie-element/shared-lodash\";\nimport f from \"@mui/material/Typography\";\nimport p from \"@mui/material/Input\";\nimport m from \"@mui/material/Select\";\nimport h from \"@mui/material/MenuItem\";\nimport g from \"debug\";\n//#region src/settings/panel.tsx\nvar _ = g(\"pie-lib:config-ui:settings:panel\"), v = {\n\tlabel: o.string,\n\tvalue: o.string\n}, y = {\n\tlabel: o.string,\n\tvalue: o.string,\n\tonChange: o.func\n}, b = ({ label: t, value: n, onChange: r }) => /* @__PURE__ */ c(e, {\n\tchecked: n,\n\tlabel: t,\n\tonChange: (e) => {\n\t\tr(e.target.checked);\n\t}\n});\nb.propTypes = {\n\tlabel: o.string,\n\tvalue: o.bool,\n\tonChange: o.func\n};\nvar x = s(n)(({ theme: e }) => ({\n\tmarginTop: e.spacing(.5),\n\tpaddingBottom: e.spacing(.5),\n\twidth: \"100%\",\n\t\"& > label\": {\n\t\tcolor: \"rgba(0, 0, 0, 0.89)\",\n\t\ttransform: \"translate(0, 10px) scale(1)\",\n\t\tfontSize: \"18px\",\n\t\tmarginTop: e.spacing(2.5)\n\t},\n\t\"& > div\": { marginTop: e.spacing(2.5) }\n})), S = ({ label: e, value: t, onChange: n, choices: r }) => /* @__PURE__ */ c(x, {\n\tdirection: \"horizontal\",\n\tcustomLabel: i,\n\tvalue: t,\n\theader: e,\n\topts: r,\n\tonChange: n\n});\nS.propTypes = {\n\t...y,\n\tchoices: o.arrayOf(o.shape(v))\n};\nvar C = S, w = s(\"p\")(({ theme: e }) => ({\n\tmargin: 0,\n\tfontSize: e.typography.fontSize\n})), T = s(m)(({ theme: e }) => ({\n\tmarginTop: e.spacing(.5),\n\tborder: \"2px solid lightgrey\",\n\tpadding: `0 ${e.spacing(1)}`,\n\tborderRadius: \"4px\"\n})), E = ({ label: e, value: t, onChange: n, choices: r = [] }) => {\n\tlet i = (e) => typeof e == \"string\" ? e : e.label, a = (e) => typeof e == \"string\" ? e : e.value;\n\treturn /* @__PURE__ */ l(\"div\", { children: [e && /* @__PURE__ */ c(w, { children: e }), /* @__PURE__ */ c(T, {\n\t\tvalue: t || r && r[0],\n\t\tonChange: ({ target: e }) => n(e.value),\n\t\tinput: /* @__PURE__ */ c(p, { id: `dropdown-${e}` }),\n\t\tdisableUnderline: !0,\n\t\tMenuProps: { transitionDuration: {\n\t\t\tenter: 225,\n\t\t\texit: 195\n\t\t} },\n\t\tchildren: r.map((e, t) => /* @__PURE__ */ c(h, {\n\t\t\tvalue: a(e),\n\t\t\tchildren: i(e)\n\t\t}, t))\n\t})] });\n};\nE.propTypes = {\n\t...y,\n\tchoices: o.arrayOf(o.string)\n};\nvar D = s(f)(({ theme: e }) => ({\n\tmarginRight: e.spacing(3),\n\tmarginTop: e.spacing(1)\n})), O = ({ label: e }) => /* @__PURE__ */ c(D, { children: e }), k = s(t)(({ theme: e }) => ({\n\twidth: \"35%\",\n\tmarginRight: e.spacing(3),\n\tmarginTop: e.spacing(1),\n\t\"& .MuiInputBase-root\": {\n\t\tmarginTop: e.spacing(.5),\n\t\tborder: \"2px solid lightgrey\",\n\t\tborderRadius: \"4px\",\n\t\tpadding: `0 ${e.spacing(1)}`,\n\t\tbackgroundColor: \"transparent\"\n\t}\n})), A = ({ label: e, value: t, onChange: n = () => {}, suffix: r, min: i, max: a }) => /* @__PURE__ */ c(k, {\n\tvariant: \"standard\",\n\tlabel: e || \"Label\",\n\tvalue: t,\n\tmax: a,\n\tmin: i,\n\tonChange: (e, t) => n(t),\n\tsuffix: r,\n\tshowErrorWhenOutsideRange: !0,\n\tdisableUnderline: !0\n});\nA.propTypes = {\n\t...y,\n\tsuffix: o.string,\n\tmin: o.number,\n\tmax: o.number,\n\tvalue: o.number\n}, O.propTypes = { ...y };\nvar j = ({ disabled: e, label: t, value: n, onChange: i }) => /* @__PURE__ */ c(r, {\n\tlabel: t,\n\tchecked: !!n,\n\tdisabled: !!e,\n\ttoggle: i\n});\nj.propTypes = {\n\t...y,\n\tvalue: o.bool\n};\nvar M = {\n\ttoggle: j,\n\tradio: C,\n\tdropdown: E,\n\tnumberField: A,\n\tcheckbox: b,\n\ttextField: O\n}, N = s(\"div\")(({ theme: e }) => ({ margin: `0 0 ${e.spacing(2)} 0` })), P = s(\"div\")(({ theme: e }) => ({\n\tcolor: \"#495B8F\",\n\tfontSize: e.typography.fontSize + 2,\n\tfontWeight: 600,\n\tmarginBottom: e.spacing(1)\n})), F = s(\"p\")(({ theme: e }) => ({\n\tfontSize: e.typography.fontSize,\n\tmarginBottom: 0\n})), I = (e) => {\n\tlet { model: t, label: n, group: r, configuration: i, onChange: a } = e, o = (e, n, r) => {\n\t\tlet { isConfigProperty: o, ...s } = u(e, r || n), l = u(o ? i : t, n), d = {\n\t\t\t...s,\n\t\t\tkey: n,\n\t\t\tvalue: l\n\t\t}, f = M[d.type];\n\t\treturn /* @__PURE__ */ c(f, {\n\t\t\t...d,\n\t\t\tonChange: (e) => a(n, e, o)\n\t\t}, n);\n\t}, s = (e, t) => {\n\t\tlet n = e[t];\n\t\tif (!n) return null;\n\t\tlet { type: r, label: i, fields: a, choices: s } = n;\n\t\treturn r === \"numberFields\" ? /* @__PURE__ */ l(\"div\", { children: [/* @__PURE__ */ c(F, { children: i }), Object.keys(a).map((n) => o(e, `${t}.${n}`, `${t}.fields.${n}`))] }, `numberField-${i}`) : r === \"checkboxes\" ? /* @__PURE__ */ l(\"div\", { children: [/* @__PURE__ */ c(\"p\", { children: i }), Object.keys(s).map((n) => o(e, `${t}.${n}`, `${t}.choices.${n}`))] }, `checkbox-${i}`) : o(e, t);\n\t};\n\treturn /* @__PURE__ */ l(N, { children: [/* @__PURE__ */ c(P, { children: n }), Object.keys(r).map((e) => s(r, e))] });\n};\nI.propTypes = {\n\tmodel: o.object,\n\tlabel: o.string,\n\tgroup: o.object,\n\tconfiguration: o.object,\n\tonChange: o.func\n};\nvar L = class extends a.Component {\n\tstatic propTypes = {\n\t\tmodel: o.object,\n\t\tconfiguration: o.object,\n\t\tgroups: o.object,\n\t\tonChangeModel: o.func,\n\t\tonChangeConfiguration: o.func,\n\t\tmodal: o.object\n\t};\n\tstatic defaultProps = {\n\t\tonChangeModel: () => {},\n\t\tonChangeConfiguration: () => {}\n\t};\n\tchange = (e, t, n = !1) => {\n\t\t_(\"[changeModel]\", e, t);\n\t\tlet { onChangeModel: r, onChangeConfiguration: i } = this.props, a = { ...this.props.model }, o = { ...this.props.configuration };\n\t\tn ? (d(o, e, t), i(o, e)) : (d(a, e, t), r(a, e));\n\t};\n\trender() {\n\t\tlet { groups: e, model: t, configuration: n, modal: r } = this.props;\n\t\treturn _(\"render:\", t), /* @__PURE__ */ l(\"div\", { children: [Object.keys(e || {}).map((r) => Object.entries(e[r]).some(([, e]) => !!e) ? /* @__PURE__ */ c(I, {\n\t\t\tlabel: r,\n\t\t\tmodel: t,\n\t\t\tconfiguration: n,\n\t\t\tgroup: e[r],\n\t\t\tonChange: this.change\n\t\t}, r) : null), r] });\n\t}\n};\n//#endregion\nexport { L as default };\n","import { __exportAll as e } from \"../_virtual/_rolldown/runtime.js\";\nimport t from \"./panel.js\";\n//#region src/settings/index.ts\nvar n = /* @__PURE__ */ e({\n\tPanel: () => t,\n\tcheckbox: () => u,\n\tcheckboxes: () => d,\n\tdropdown: () => s,\n\tnumberField: () => c,\n\tnumberFields: () => l,\n\tradio: () => o,\n\ttextField: () => r,\n\ttoggle: () => i\n}), r = (e, t = !0) => ({\n\tlabel: e,\n\ttype: \"textField\",\n\tisConfigProperty: t\n}), i = (e, t = !1, n = !1) => ({\n\ttype: \"toggle\",\n\tlabel: e,\n\tisConfigProperty: t,\n\tdisabled: n\n}), a = (e) => typeof e == \"string\" ? {\n\tlabel: e,\n\tvalue: e\n} : e, o = function() {\n\tlet [e, t, n = !1] = Array.prototype.slice.call(arguments);\n\treturn {\n\t\ttype: \"radio\",\n\t\tlabel: e,\n\t\tchoices: t && t.map((e) => a(e)),\n\t\tisConfigProperty: n\n\t};\n}, s = (e, t, n = !1) => ({\n\ttype: \"dropdown\",\n\tlabel: e,\n\tchoices: t,\n\tisConfigProperty: n\n}), c = (e, t, n = !1) => ({\n\t...t,\n\tlabel: e,\n\ttype: \"numberField\",\n\tisConfigProperty: n\n}), l = (e, t, n = !1) => (Object.keys(t).map((e) => {\n\tt[e] = c(t[e].label, t[e], n);\n}), {\n\ttype: \"numberFields\",\n\tlabel: e,\n\tfields: t\n}), u = (e, t, n = !1) => ({\n\t...t,\n\tlabel: e,\n\ttype: \"checkbox\",\n\tisConfigProperty: n\n}), d = (e, t, n = !1) => (Object.keys(t).map((e) => {\n\tt[e] = u(t[e].label, t[e], n);\n}), {\n\ttype: \"checkboxes\",\n\tlabel: e,\n\tchoices: t\n});\n//#endregion\nexport { n as settings_exports };\n","import e from \"./alert-dialog.js\";\nimport t from \"./feedback-config/feedback-selector.js\";\nimport n, { buildDefaults as r } from \"./feedback-config/index.js\";\nimport { InputCheckbox as i, InputRadio as a, InputSwitch as o } from \"./inputs.js\";\nimport s, { LanguageControls as c } from \"./langs.js\";\nimport l from \"./tabs/index.js\";\nimport u from \"./checkbox.js\";\nimport d from \"./form-section.js\";\nimport f from \"./help.js\";\nimport p from \"./input.js\";\nimport m from \"./number-text-field.js\";\nimport h from \"./number-text-field-custom.js\";\nimport g, { NChoice as _ } from \"./two-choice.js\";\nimport v from \"./mui-box/index.js\";\nimport y from \"./tags-input/index.js\";\nimport b from \"./choice-configuration/index.js\";\nimport { layout_exports as x } from \"./layout/index.js\";\nimport { choice_utils_exports as S } from \"./choice-utils.js\";\nimport C from \"./with-stateful-model.js\";\nimport w from \"./settings/toggle.js\";\nimport T from \"./settings/display-size.js\";\nimport { settings_exports as E } from \"./settings/index.js\";\nimport * as D from \"@pie-lib/render-ui\";\nimport { InputContainer as O } from \"@pie-lib/render-ui\";\n//#region src/index.ts\nfunction k(e) {\n\treturn typeof e == \"function\" || typeof e == \"object\" && !!e && typeof e.$$typeof == \"symbol\";\n}\nfunction A(e, t) {\n\treturn !e || k(e) ? e : k(e.default) ? e.default : t && k(e[t]) ? e[t] : t && k(e[t]?.default) ? e[t].default : e;\n}\nvar j = A(O, \"InputContainer\") || A(P.InputContainer, \"InputContainer\"), M = D, N = M.default, P = N && typeof N == \"object\" ? N : M;\n//#endregion\nexport { e as AlertDialog, u as Checkbox, b as ChoiceConfiguration, T as DisplaySize, n as FeedbackConfig, t as FeedbackSelector, d as FormSection, f as Help, p as Input, i as InputCheckbox, j as InputContainer, a as InputRadio, o as InputSwitch, s as Langs, c as LanguageControls, v as MuiBox, _ as NChoice, m as NumberTextField, h as NumberTextFieldCustom, l as Tabs, y as TagsInput, w as Toggle, g as TwoChoice, S as choiceUtils, r as feedbackConfigDefaults, x as layout, E as settings, C as withStatefulModel };\n","import \"react\";\nimport e from \"prop-types\";\nimport { styled as t } from \"@mui/material/styles\";\nimport { Fragment as n, jsx as r, jsxs as i } from \"react/jsx-runtime\";\nimport * as a from \"@pie-lib/render-ui\";\nimport { InputContainer as o, color as s } from \"@pie-lib/render-ui\";\nimport c from \"@pie-lib/editable-html-tip-tap\";\nimport { Accordion as l, AccordionDetails as u, AccordionSummary as d, Typography as f } from \"@mui/material\";\nimport p from \"@mui/icons-material/ExpandMore\";\nimport { NumberTextFieldCustom as m, Toggle as h } from \"@pie-lib/config-ui\";\n//#region src/grid-setup.tsx\nfunction g(e) {\n\treturn typeof e == \"function\" || typeof e == \"object\" && !!e && typeof e.$$typeof == \"symbol\";\n}\nfunction _(e, t) {\n\treturn !e || g(e) ? e : g(e.default) ? e.default : t && g(e[t]) ? e[t] : t && g(e[t]?.default) ? e[t].default : e;\n}\nvar v = _(o, \"InputContainer\") || _(x.InputContainer, \"InputContainer\"), y = a, b = y.default, x = b && typeof b == \"object\" ? b : y, S = t(\"div\")(() => ({ width: \"450px\" })), C = t(\"div\")(() => ({\n\tdisplay: \"flex\",\n\tflexDirection: \"column\",\n\twidth: \"100%\"\n})), w = t(\"div\")(() => ({\n\tdisplay: \"flex\",\n\tflexDirection: \"column\",\n\talignItems: \"center\"\n})), T = t(\"div\")(() => ({\n\tdisplay: \"flex\",\n\tjustifyContent: \"space-around\",\n\talignItems: \"center\"\n})), E = t(\"div\")(({ theme: e }) => ({\n\twidth: \"130px\",\n\tmargin: `${e.spacing(1)} ${e.spacing(.5)}`\n})), D = t(\"div\")(({ theme: e }) => ({\n\twidth: \"160px\",\n\tmargin: `${e.spacing(1)} ${e.spacing(.5)}`,\n\t\"& .MuiFormControl-root\": { width: \"100%\" }\n})), O = t(\"div\")(({ theme: e }) => ({\n\twidth: \"230px\",\n\tmargin: `${e.spacing(1)} ${e.spacing(.5)}`,\n\t\"& .MuiFormControl-root\": { width: \"100%\" }\n})), k = t(f)(({ theme: e }) => ({\n\tfontStyle: \"italic\",\n\tmargin: `${e.spacing(1)} 0`\n})), A = t(\"div\")(() => ({\n\tdisplay: \"flex\",\n\tjustifyContent: \"space-between\",\n\talignItems: \"center\"\n})), j = t(f)(() => ({ color: s.disabled() })), M = t(\"div\")(({ theme: e }) => ({ paddingTop: e.spacing(2) })), N = (e) => {\n\tlet { disabled: t, displayedFields: n, labelValue: a, labelValues: o, gridValue: s, gridValues: c, onChange: l } = e, { labelStep: u = {}, step: d = {} } = n;\n\treturn /* @__PURE__ */ i(w, { children: [d && d.enabled && /* @__PURE__ */ r(D, { children: /* @__PURE__ */ r(m, {\n\t\tlabel: d.label || \"\",\n\t\tvalue: s,\n\t\tcustomValues: c,\n\t\tvariant: \"outlined\",\n\t\tdisabled: t,\n\t\tonChange: (e, t) => l(\"step\", t)\n\t}) }), u && u.enabled && /* @__PURE__ */ r(D, { children: /* @__PURE__ */ r(m, {\n\t\tlabel: u.label || \"\",\n\t\tvalue: a,\n\t\tcustomValues: o,\n\t\tvariant: \"outlined\",\n\t\tdisabled: t,\n\t\tonChange: (e, t) => l(\"labelStep\", t)\n\t}) })] });\n};\nN.propTypes = {\n\tdisabled: e.bool,\n\tdisplayedFields: e.object,\n\tlabelValue: e.number,\n\tlabelValues: e.array,\n\tgridValue: e.number,\n\tgridValues: e.array,\n\tonChange: e.func\n};\nvar P = (e) => {\n\tlet { disabled: t, displayedFields: n, displayHeader: a, label: o, maxValue: s, minValue: l, onChange: u, type: d } = e, { axisLabel: p = {}, min: h = {}, max: g = {} } = n;\n\treturn /* @__PURE__ */ i(w, { children: [\n\t\ta && /* @__PURE__ */ i(f, {\n\t\t\tvariant: \"subtitle2\",\n\t\t\tchildren: [/* @__PURE__ */ r(\"i\", { children: d === \"domain\" ? \"x\" : \"y\" }), \"-axis\"]\n\t\t}),\n\t\th && h.enabled && /* @__PURE__ */ r(D, { children: /* @__PURE__ */ r(m, {\n\t\t\tlabel: h.label || \"\",\n\t\t\tvalue: l,\n\t\t\tmin: -1e4,\n\t\t\tmax: s - .05,\n\t\t\tvariant: \"outlined\",\n\t\t\tdisabled: t,\n\t\t\tonChange: (e, t) => u(\"min\", t)\n\t\t}) }),\n\t\tg && g.enabled && /* @__PURE__ */ r(D, { children: /* @__PURE__ */ r(m, {\n\t\t\tlabel: g.label || \"\",\n\t\t\tvalue: s,\n\t\t\tmin: l + .05,\n\t\t\tmax: 1e4,\n\t\t\tvariant: \"outlined\",\n\t\t\tdisabled: t,\n\t\t\tonChange: (e, t) => u(\"max\", t)\n\t\t}) }),\n\t\tp && p.enabled && /* @__PURE__ */ r(D, { children: /* @__PURE__ */ r(v, {\n\t\t\tlabel: p.label || \"\",\n\t\t\tchildren: /* @__PURE__ */ r(M, { children: /* @__PURE__ */ r(c, {\n\t\t\t\tonChange: (e) => u(\"axisLabel\", e),\n\t\t\t\tmarkup: o || \"\",\n\t\t\t\tcharactersLimit: 5,\n\t\t\t\tonKeyDown: (e) => e.key === \"Enter\",\n\t\t\t\tactivePlugins: [\n\t\t\t\t\t\"bold\",\n\t\t\t\t\t\"italic\",\n\t\t\t\t\t\"underline\",\n\t\t\t\t\t\"strikethrough\"\n\t\t\t\t]\n\t\t\t}) })\n\t\t}) })\n\t] });\n};\nP.propTypes = {\n\tdisabled: e.bool,\n\tdisplayedFields: e.object,\n\tdisplayHeader: e.bool,\n\tlabel: e.string,\n\tmaxValue: e.number,\n\tminValue: e.number,\n\ttype: e.string,\n\tonChange: e.func\n};\nvar F = (e) => {\n\tlet { domain: t, displayedFields: a = {}, gridValues: o = {}, includeAxes: s, labelValues: c = {}, onChange: g, onChangeView: _, range: v, size: y, sizeConstraints: b, standardGrid: x } = e, D = {\n\t\tmin: 2,\n\t\tmax: 41\n\t}, { axisLabel: M = {}, dimensionsEnabled: F, includeAxesEnabled: I, labelStep: L = {}, min: R = {}, max: z = {}, standardGridEnabled: B, step: V = {} } = a || {}, H = R.enabled || z.enabled || M.enabled || V.enabled || L.enabled, U = {\n\t\tstep: V,\n\t\tlabelStep: L\n\t}, W = {\n\t\tmin: R,\n\t\tmax: z,\n\t\taxisLabel: M\n\t}, G = (e) => {\n\t\tlet n = (e) => {\n\t\t\tlet n = e === \"domain\" ? t : v;\n\t\t\treturn {\n\t\t\t\tmin: 1,\n\t\t\t\tmax: n.max < D.min || n.max > D.max ? 16 : n.max,\n\t\t\t\tstep: 1,\n\t\t\t\tlabelStep: 0\n\t\t\t};\n\t\t};\n\t\tg({\n\t\t\tincludeAxes: e,\n\t\t\trange: {\n\t\t\t\t...v,\n\t\t\t\t...e ? { labelStep: 1 } : n(\"range\")\n\t\t\t},\n\t\t\tdomain: {\n\t\t\t\t...t,\n\t\t\t\t...e ? { labelStep: 1 } : n(\"domain\")\n\t\t\t}\n\t\t});\n\t}, K = (e) => {\n\t\tg({\n\t\t\tstandardGrid: e,\n\t\t\trange: {\n\t\t\t\t...t,\n\t\t\t\taxisLabel: v.axisLabel\n\t\t\t},\n\t\t\tgraph: {\n\t\t\t\t...y,\n\t\t\t\theight: y.width\n\t\t\t}\n\t\t});\n\t}, q = (e, t) => {\n\t\tlet n = {\n\t\t\t...y,\n\t\t\t[e]: t\n\t\t};\n\t\tx && (n.height = t), g({ graph: n });\n\t}, J = (e, n) => {\n\t\tt[e] = n, x && e !== \"axisLabel\" && (v[e] = n), g({\n\t\t\tdomain: t,\n\t\t\trange: v\n\t\t});\n\t}, Y = (e, t) => {\n\t\tv[e] = t, g({ range: v });\n\t}, X = /* @__PURE__ */ i(n, { children: [\n\t\t/* @__PURE__ */ i(T, { children: [/* @__PURE__ */ r(P, {\n\t\t\tdisplayedFields: W,\n\t\t\tdisplayHeader: H,\n\t\t\ttype: \"domain\",\n\t\t\tminValue: t.min,\n\t\t\tmaxValue: t.max,\n\t\t\tlabel: t.axisLabel,\n\t\t\tincludeAxes: s,\n\t\t\tonChange: J\n\t\t}), /* @__PURE__ */ r(P, {\n\t\t\tdisplayedFields: W,\n\t\t\tdisplayHeader: H,\n\t\t\ttype: \"range\",\n\t\t\tminValue: v.min,\n\t\t\tmaxValue: v.max,\n\t\t\tlabel: v.axisLabel,\n\t\t\tdisabled: x,\n\t\t\tincludeAxes: s,\n\t\t\tonChange: Y\n\t\t})] }),\n\t\t(R.enabled || z.enabled) && /* @__PURE__ */ r(k, { children: \"If you want the axis to be visible, use a zero or negative Min Value, and a positive Max Value\" }),\n\t\t(V.enabled || L.enabled) && /* @__PURE__ */ i(T, { children: [/* @__PURE__ */ r(N, {\n\t\t\tdisplayedFields: U,\n\t\t\tgridValue: t.step,\n\t\t\tlabelValue: t.labelStep,\n\t\t\tgridValues: o.domain || [],\n\t\t\tlabelValues: c.domain || [],\n\t\t\tonChange: J\n\t\t}), /* @__PURE__ */ r(N, {\n\t\t\tdisabled: x,\n\t\t\tdisplayedFields: U,\n\t\t\tgridValue: v.step,\n\t\t\tlabelValue: v.labelStep,\n\t\t\tgridValues: o.range || [],\n\t\t\tlabelValues: c.range || [],\n\t\t\tonChange: Y\n\t\t})] }),\n\t\tL.enabled && /* @__PURE__ */ r(k, { children: \"For unnumbered gridlines, enter a label interval of 0\" })\n\t] }), Z = z.enabled ? /* @__PURE__ */ i(w, { children: [/* @__PURE__ */ r(O, { children: /* @__PURE__ */ r(m, {\n\t\tlabel: \"Number of Vertical Gridlines\",\n\t\tvalue: t.max,\n\t\tmin: !s && D.min,\n\t\tmax: !s && D.max,\n\t\tvariant: \"outlined\",\n\t\tonChange: (e, t) => J(\"max\", t)\n\t}) }), /* @__PURE__ */ r(O, { children: /* @__PURE__ */ r(m, {\n\t\tlabel: \"Number of Horizontal Gridlines\",\n\t\tvalue: v.max,\n\t\tmin: !s && D.min,\n\t\tmax: !s && D.max,\n\t\tvariant: \"outlined\",\n\t\tdisabled: x,\n\t\tonChange: (e, t) => Y(\"max\", t)\n\t}) })] }) : null;\n\treturn /* @__PURE__ */ r(S, { children: /* @__PURE__ */ i(l, {\n\t\tonChange: _,\n\t\tTransitionProps: { timeout: {\n\t\t\tenter: 225,\n\t\t\texit: 195\n\t\t} },\n\t\tchildren: [/* @__PURE__ */ r(d, {\n\t\t\texpandIcon: /* @__PURE__ */ r(p, {}),\n\t\t\tchildren: /* @__PURE__ */ r(f, {\n\t\t\t\tvariant: \"subtitle1\",\n\t\t\t\tchildren: \"Customize Grid Setup\"\n\t\t\t})\n\t\t}), /* @__PURE__ */ r(u, { children: /* @__PURE__ */ i(C, { children: [\n\t\t\tI && /* @__PURE__ */ r(h, {\n\t\t\t\tlabel: \"Include axes and labels?\",\n\t\t\t\ttoggle: G,\n\t\t\t\tchecked: s\n\t\t\t}),\n\t\t\tB && /* @__PURE__ */ r(h, {\n\t\t\t\tlabel: \"Constrain to standard coordinate grid?\",\n\t\t\t\ttoggle: K,\n\t\t\t\tchecked: x\n\t\t\t}),\n\t\t\ts ? X : Z,\n\t\t\tF && /* @__PURE__ */ i(A, { children: [\n\t\t\t\t/* @__PURE__ */ i(\"div\", { children: [/* @__PURE__ */ r(f, { children: \"Dimensions(px)\" }), /* @__PURE__ */ i(j, { children: [\n\t\t\t\t\t\"Min \",\n\t\t\t\t\tb.min,\n\t\t\t\t\t\", Max \",\n\t\t\t\t\tb.max\n\t\t\t\t] })] }),\n\t\t\t\t/* @__PURE__ */ r(E, { children: /* @__PURE__ */ r(m, {\n\t\t\t\t\tlabel: \"Width\",\n\t\t\t\t\tvalue: y.width,\n\t\t\t\t\tmin: b.min,\n\t\t\t\t\tmax: b.max,\n\t\t\t\t\tstep: b.step,\n\t\t\t\t\tvariant: \"outlined\",\n\t\t\t\t\tonChange: (e, t) => q(\"width\", t)\n\t\t\t\t}) }),\n\t\t\t\t/* @__PURE__ */ r(E, { children: /* @__PURE__ */ r(m, {\n\t\t\t\t\tlabel: \"Height\",\n\t\t\t\t\tvalue: y.height,\n\t\t\t\t\tmin: b.min,\n\t\t\t\t\tmax: b.max,\n\t\t\t\t\tstep: b.step,\n\t\t\t\t\tvariant: \"outlined\",\n\t\t\t\t\tdisabled: x,\n\t\t\t\t\tonChange: (e, t) => q(\"height\", t)\n\t\t\t\t}) })\n\t\t\t] })\n\t\t] }) })]\n\t}) });\n};\nF.propTypes = {\n\tdomain: e.object,\n\tdisplayedFields: e.object,\n\tgridValues: e.object,\n\tincludeAxes: e.bool,\n\tlabelValues: e.object,\n\tonChange: e.func,\n\tonChangeView: e.func,\n\trange: e.object,\n\tsize: e.object,\n\tsizeConstraints: e.object,\n\tstandardGrid: e.bool\n};\n//#endregion\nexport { F as default };\n","// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/graphing/configure/src/utils.js\n * @auto-generated\n *\n * This file is automatically synced from pie-elements and converted to TypeScript.\n * Manual edits will be overwritten on next sync.\n * To make changes, edit the upstream JavaScript file and run sync again.\n */\n\nimport { isEqual } from '@pie-element/shared-lodash';\n\nconst VALID_GRID_VALUES = [\n 0.01, 0.02, 0.04, 0.05, 0.0625, 0.1, 0.125, 0.2, 0.25, 0.5, 1, 2, 3, 4, 5, 8, 10, 12, 15, 20, 40, 50, 64, 100, 500,\n 1000,\n];\n\n// same as VALID_GRID_VALUES but next values are excluded: 0.04, 0.0625, 0.125, 3, 4, 8, 12, 15, 40, 64\nconst PREFERRED_VALID_GRID_VALUES = [0.01, 0.02, 0.05, 0.1, 0.2, 0.25, 0.5, 1, 2, 5, 10, 20, 50, 100, 500, 1000];\n\nexport const VALID_LABEL_VALUES = {\n 0.01: [0, 0.01, 0.02, 0.04, 0.05, 0.1],\n 0.02: [0, 0.02, 0.04, 0.1],\n 0.04: [0, 0.04, 0.08, 0.16, 0.2],\n 0.05: [0, 0.05, 0.1, 0.2, 0.25],\n 0.0625: [0, 0.0625, 0.125, 0.25, 0.5],\n 0.1: [0, 0.1, 0.2, 0.4, 0.5, 1],\n 0.125: [0, 0.125, 0.25, 0.5, 1],\n 0.2: [0, 0.2, 0.5, 0.1],\n 0.25: [0, 0.25, 0.5, 1, 2],\n 0.5: [0, 0.5, 1, 2],\n 1: [0, 1, 2, 4, 5, 10],\n 2: [0, 2, 4, 8, 10],\n 3: [0, 3, 6, 12, 15],\n 4: [0, 4, 8, 16, 20],\n 5: [0, 5, 10, 20, 25],\n 8: [0, 8, 16, 32, 40, 64],\n 10: [0, 10, 20, 40, 50, 100],\n 12: [0, 12, 24],\n 15: [0, 15, 30, 60],\n 20: [0, 20, 40, 80, 100],\n 40: [0, 40, 80, 160, 200],\n 50: [0, 50, 100, 200, 250],\n 64: [0, 64, 128],\n 100: [0, 100, 200, 400, 500],\n 500: [0, 500, 1000, 2500],\n 1000: [0, 1000, 2000, 4000, 5000],\n};\n\nexport const getGridValues = (axis, size, prefferedValues = false) => {\n const minValue = (10 * (axis.max - axis.min)) / size;\n const maxValue = minValue * 10;\n\n // if preferred values should be used enforce all values to be used if the axis step\n // is included in all supported values and not included in preferred values\n const useAllValues =\n prefferedValues && !PREFERRED_VALID_GRID_VALUES.includes(axis.step) && VALID_GRID_VALUES.includes(axis.step);\n const values = !prefferedValues || useAllValues ? VALID_GRID_VALUES : PREFERRED_VALID_GRID_VALUES;\n\n return values.filter((value) => value >= minValue && value <= maxValue);\n};\n\nexport const getLabelValues = (value) => VALID_LABEL_VALUES[value] || [];\n\nexport const applyConstraints = (axis, size, oldGridValues, oldLabelValues) => {\n const gridValues = getGridValues(axis, size);\n let labelValues = getLabelValues(axis.step);\n\n if (!isEqual(oldGridValues, gridValues) && !gridValues.includes(axis.step)) {\n const preferredValues = getGridValues(axis, size, true);\n const lowestValue = preferredValues[0] || 1;\n\n axis.step = lowestValue;\n labelValues = getLabelValues(lowestValue);\n\n if (!labelValues.includes(axis.labelStep)) {\n axis.labelStep = lowestValue;\n }\n\n return { gridValues, labelValues };\n }\n\n if (!isEqual(oldLabelValues, labelValues) && !labelValues.includes(axis.labelStep)) {\n axis.labelStep = axis.step;\n }\n\n return { gridValues, labelValues };\n};\n\n// also used in pie-lib/graphing/utils as 'getTickValues'\nconst getPlotablePoints = (prop) => {\n const tickValues = [];\n let tickVal = 0;\n\n while (tickVal >= prop.min && tickValues.indexOf(tickVal) < 0) {\n tickValues.push(tickVal);\n tickVal = Math.round((tickVal - prop.step) * 10000) / 10000;\n }\n\n tickVal = Math.round(prop.step * 10000) / 10000;\n\n while (tickVal <= prop.max && tickValues.indexOf(tickVal) < 0) {\n tickValues.push(tickVal);\n tickVal = Math.round((tickVal + prop.step) * 10000) / 10000;\n }\n\n // return only ticks that are inside the min-max interval\n if (tickValues) {\n return tickValues.filter((tV) => tV >= prop.min && tV <= prop.max);\n }\n\n return [];\n};\n\nexport const filterPlotableMarks = (domain, range, answers) => {\n const domainValues = getPlotablePoints(domain);\n const rangeValues = getPlotablePoints(range);\n\n const isPointPlotable = (x, y) => domainValues.includes(x) && rangeValues.includes(y);\n\n return Object.entries(answers || {}).reduce((newAnswers, [key, answer]) => {\n newAnswers[key] = {\n ...answer,\n marks: (answer.marks || []).filter((mark) => {\n if (mark.type === 'point') {\n return isPointPlotable(mark.x, mark.y);\n }\n\n if (mark.type === 'polygon') {\n return !mark.points.find((point) => !isPointPlotable(point.x, point.y));\n }\n\n const from = mark.from || mark.root;\n const to = mark.to || mark.edge;\n\n return mark.building\n ? isPointPlotable(from.x, from.y)\n : isPointPlotable(from.x, from.y) && isPointPlotable(to.x, to.y);\n }),\n };\n\n return newAnswers;\n }, {});\n};\n","// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/graphing/configure/src/graphing-config.jsx\n * @auto-generated\n *\n * This file is automatically synced from pie-elements and converted to TypeScript.\n * Manual edits will be overwritten on next sync.\n * To make changes, edit the upstream JavaScript file and run sync again.\n */\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { GraphContainer, GridSetup } from '@pie-lib/graphing';\nimport { AlertDialog } from '@pie-lib/config-ui';\nimport { MenuItem, Select, Typography, OutlinedInput } from '@mui/material';\nimport { styled } from '@mui/material/styles';\nimport { applyConstraints, filterPlotableMarks, getGridValues, getLabelValues } from './utils.js';\nimport { isEqual } from '@pie-element/shared-lodash';\n\nconst Container: any = styled('div')(({ theme }) => ({\n display: 'flex',\n flexWrap: 'wrap',\n marginBottom: theme.spacing(2.5),\n}));\n\nconst GridConfigWrapper: any = styled('div')(({ theme }) => ({\n display: 'flex',\n flexDirection: 'column',\n marginRight: theme.spacing(3),\n marginBottom: theme.spacing(2.5),\n}));\n\nconst GraphConfig: any = styled('div')({\n display: 'flex',\n flexDirection: 'column',\n});\n\nconst SubtitleText: any = styled(Typography)(({ theme }) => ({\n marginTop: theme.spacing(1.5),\n marginBottom: theme.spacing(1),\n}));\n\nconst GridConfig: any = styled('div')(({ theme }) => ({\n display: 'flex',\n flexWrap: 'wrap',\n alignItems: 'center',\n width: '100%',\n marginBottom: theme.spacing(2.5),\n}));\n\nconst GridConfigLabel: any = styled(Typography)(({ theme }) => ({\n padding: `0 ${theme.spacing(1)}`,\n}));\n\nconst GridConfigSelect: any = styled(Select)({\n flex: '1',\n});\n\nexport class GraphingConfig extends React.Component {\n static propTypes = {\n availableTools: PropTypes.array,\n authoring: PropTypes.object,\n dimensionsEnabled: PropTypes.bool,\n graphDimensions: PropTypes.object,\n gridConfigurations: PropTypes.array,\n labelsPlaceholders: PropTypes.object,\n model: PropTypes.object.isRequired,\n onChange: PropTypes.func.isRequired,\n showLabels: PropTypes.bool,\n showTitle: PropTypes.bool,\n titlePlaceholder: PropTypes.string,\n };\n\n constructor(props) {\n super(props);\n const { domain, range, graph } = props.model || {};\n\n const gridValues = {\n domain: getGridValues(domain, graph.width, true),\n range: getGridValues(range, graph.height, true),\n };\n const labelValues = {\n domain: getLabelValues(domain.step),\n range: getLabelValues(range.step),\n };\n\n this.state = {\n gridValues,\n labelValues,\n showPixelGuides: false,\n dialog: { isOpened: false },\n domain: { ...domain },\n range: { ...range },\n };\n }\n\n changeBackgroundMarks: any = (backgroundMarks) => {\n const model = { ...this.props.model, backgroundMarks };\n\n this.props.onChange(model);\n };\n\n changeLabels: any = (labels) => {\n const { model, onChange } = this.props;\n\n onChange({ ...model, labels });\n };\n\n changeTitle: any = (title) => {\n const { model, onChange } = this.props;\n\n onChange({ ...model, title });\n };\n\n onConfigChange: any = (config, newSelectedGrid) => {\n const { model, onChange } = this.props;\n const { defaultGridConfiguration: oldSelectedGrid = 0 } = model;\n const { gridValues: oldGridValues, labelValues: oldLabelValues, domain: oldDomain, range: oldRange } = this.state;\n const updatedModel = { ...model, ...config };\n const { answers, domain, includeAxes, graph, range, standardGrid } = updatedModel;\n const gridValues = { domain: [], range: [] };\n const labelValues = { domain: [], range: [] };\n const selectedGrid = newSelectedGrid >= 0 ? newSelectedGrid : oldSelectedGrid;\n\n if (includeAxes) {\n const domainConstraints = applyConstraints(domain, graph.width, oldGridValues.domain, oldLabelValues.domain);\n\n gridValues.domain = domainConstraints.gridValues || [];\n labelValues.domain = domainConstraints.labelValues || [];\n }\n\n if (standardGrid) {\n gridValues.range = gridValues.domain;\n labelValues.range = labelValues.domain;\n range.step = domain.step;\n range.labelStep = domain.labelStep;\n } else {\n if (includeAxes) {\n const rangeConstraints = applyConstraints(range, graph.height, oldGridValues.range, oldLabelValues.range);\n\n gridValues.range = rangeConstraints.gridValues || [];\n labelValues.range = rangeConstraints.labelValues || [];\n }\n }\n\n const plotableAnswers = filterPlotableMarks(domain, range, answers);\n\n if (!isEqual(answers, plotableAnswers)) {\n this.setState({\n dialog: {\n isOpened: true,\n onClose: () =>\n this.setState({ dialog: { isOpened: false } }, onChange({ ...model, domain: oldDomain, range: oldRange })),\n onConfirm: () => {\n this.setState(\n {\n gridValues,\n labelValues,\n dialog: { isOpened: false },\n domain: { ...domain },\n range: { ...range },\n },\n onChange({ ...updatedModel, answers: plotableAnswers, defaultGridConfiguration: selectedGrid }),\n );\n },\n },\n });\n\n return;\n }\n\n this.setState({ gridValues, labelValues, domain: { ...domain }, range: { ...range } });\n onChange({ ...updatedModel, defaultGridConfiguration: selectedGrid });\n };\n\n onChangeView: any = (event, expanded) => {\n const { graphDimensions: { enabled } = {} } = this.props;\n\n if (enabled) {\n this.setState({ showPixelGuides: expanded });\n }\n };\n\n changeGridConfiguration: any = (event) => {\n const { gridConfigurations } = this.props;\n const { value } = event.target;\n\n this.onConfigChange(gridConfigurations?.[value] || {}, value);\n };\n\n render() {\n const {\n authoring = {},\n availableTools = [],\n gridConfigurations = [],\n graphDimensions = {},\n labelsPlaceholders,\n model,\n showLabels,\n dimensionsEnabled,\n showTitle,\n titlePlaceholder,\n mathMlOptions = {},\n removeIncompleteTool,\n } = this.props;\n const {\n arrows,\n backgroundMarks,\n coordinatesOnHover,\n defaultGridConfiguration,\n domain,\n includeAxes,\n labels,\n range,\n standardGrid,\n title,\n } = model || {};\n const graph = (model || {}).graph || {};\n const { min, max, step } = graphDimensions || {};\n const { dialog = {}, gridValues, labelValues, showPixelGuides } = this.state;\n\n const sizeConstraints = {\n min: Math.max(150, min),\n max: Math.min(800, max),\n step: step >= 1 ? Math.min(200, step) : 20,\n };\n\n const displayedFields = {\n axisLabel: authoring.axisLabel,\n dimensionsEnabled,\n includeAxesEnabled: authoring.includeAxesEnabled,\n labelStep: authoring.labelStep,\n min: authoring.min,\n max: authoring.max,\n standardGridEnabled: authoring.standardGridEnabled,\n step: authoring.step,\n };\n\n const displayGridSetup =\n authoring.enabled &&\n Object.values(displayedFields).some((field) => (typeof field === 'object' ? field.enabled : field));\n\n return (\n <Container>\n <GridConfigWrapper>\n {gridConfigurations && gridConfigurations.length ? (\n <GridConfig>\n <GridConfigLabel component=\"div\" variant=\"h6\">\n Grid Configuration\n </GridConfigLabel>\n\n <GridConfigSelect\n input={<OutlinedInput />}\n displayEmpty\n onChange={this.changeGridConfiguration}\n value={defaultGridConfiguration}\n MenuProps={{ transitionDuration: { enter: 225, exit: 195 } }}\n >\n {(gridConfigurations || []).map((config, index) => (\n <MenuItem key={index} value={index}>\n {config.label}\n </MenuItem>\n ))}\n </GridConfigSelect>\n </GridConfig>\n ) : null}\n\n {displayGridSetup && (\n <GridSetup\n displayedFields={displayedFields}\n domain={domain}\n gridValues={gridValues}\n includeAxes={includeAxes}\n labelValues={labelValues}\n range={range}\n size={graph}\n sizeConstraints={sizeConstraints}\n standardGrid={standardGrid}\n onChange={this.onConfigChange}\n onChangeView={this.onChangeView}\n />\n )}\n </GridConfigWrapper>\n\n <GraphConfig key=\"graph\">\n <Typography component=\"div\" variant=\"h6\">\n Define Graph Attributes\n </Typography>\n\n <SubtitleText component=\"div\" variant=\"body1\">\n Use this interface to add/edit a title and/or labels, and to set background shapes\n </SubtitleText>\n\n <GraphContainer\n axesSettings={{ includeArrows: arrows }}\n backgroundMarks={[]}\n coordinatesOnHover={coordinatesOnHover}\n collapsibleToolbar={true}\n collapsibleToolbarTitle={'Add Background Shapes to Graph'}\n domain={domain}\n key=\"graphing-config\"\n labels={labels}\n labelsPlaceholders={labelsPlaceholders}\n marks={backgroundMarks}\n onChangeLabels={this.changeLabels}\n onChangeMarks={this.changeBackgroundMarks}\n onChangeTitle={this.changeTitle}\n range={range}\n showLabels={showLabels}\n showPixelGuides={showPixelGuides}\n showTitle={showTitle}\n size={{ width: graph.width, height: graph.height }}\n title={title}\n titlePlaceholder={titlePlaceholder}\n toolbarTools={availableTools}\n mathMlOptions={mathMlOptions}\n removeIncompleteTool={removeIncompleteTool}\n />\n </GraphConfig>\n\n <AlertDialog\n open={dialog.isOpened}\n title=\"Warning\"\n text=\"This change would make it impossible for students to plot one or more graph objects in the current correct answers. If you proceed, all such graph objects will be removed from the correct answers.\"\n onClose={dialog.onClose}\n onConfirm={dialog.onConfirm}\n />\n </Container>\n );\n }\n}\n\nexport default GraphingConfig;\n","\"use client\";\n\nimport createSvgIcon from \"./utils/createSvgIcon.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z\"\n}), 'Info');","// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/graphing/configure/src/correct-response.jsx\n * @auto-generated\n *\n * This file is automatically synced from pie-elements and converted to TypeScript.\n * Manual edits will be overwritten on next sync.\n * To make changes, edit the upstream JavaScript file and run sync again.\n */\n\nimport * as React from 'react';\nimport ReactDOM from 'react-dom';\nimport PropTypes from 'prop-types';\nimport { styled } from '@mui/material/styles';\nimport { GraphContainer as Graph } from '@pie-lib/graphing';\nimport { AlertDialog } from '@pie-lib/config-ui';\nimport { renderMath } from '@pie-element/shared-math-rendering-mathjax';\nimport Delete from '@mui/icons-material/Delete';\nimport { set, isEqual } from '@pie-element/shared-lodash';\nimport { MenuItem, Select, Tooltip, Typography } from '@mui/material';\nimport Info from '@mui/icons-material/Info';\n\n// custom grey values close to old v3 accents\nconst GREY_A100 = '#D5D5D5';\nconst GREY_A200 = '#AAAAAA';\n\nconst GraphingTools: any = styled('div')({\n color: GREY_A200,\n});\n\nconst Button: any = styled('div')(({ theme }) => ({\n margin: `${theme.spacing(2.5)} 0`,\n cursor: 'pointer',\n background: theme.palette.grey[200],\n padding: theme.spacing(1.5),\n width: 'fit-content',\n borderRadius: '4px',\n '&:hover': {\n background: GREY_A100,\n },\n}));\n\nconst AvailableTools: any = styled('div')(({ theme }) => ({\n marginTop: theme.spacing(1),\n display: 'flex',\n flexWrap: 'wrap',\n}));\n\nconst AvailableTool: any = styled('div')(({ theme }) => ({\n cursor: 'pointer',\n margin: theme.spacing(1),\n padding: theme.spacing(1),\n border: `2px solid ${theme.palette.common.white}`,\n textTransform: 'capitalize',\n '&:hover': {\n color: theme.palette.grey[800],\n },\n}));\n\nconst SelectedTool: any = styled(AvailableTool)({\n background: GREY_A100,\n border: `2px solid ${GREY_A200}`,\n});\n\nconst ResponseTitle: any = styled('div')(({ theme }) => ({\n display: 'flex',\n alignItems: 'center',\n marginTop: theme.spacing(2.5),\n}));\n\nconst IconButton: any = styled('div')(({ theme }) => ({\n marginLeft: '6px',\n color: theme.palette.grey[600],\n '&:hover': {\n cursor: 'pointer',\n color: theme.palette.common.black,\n },\n}));\n\nconst Name: any = styled('div')(({ theme }) => ({\n marginBottom: theme.spacing(0.5),\n}));\n\nconst StyledTooltip: any = styled(({ className, ...props }) => (\n <Tooltip {...props} classes={{ tooltip: className }} />\n))(({ theme }) => ({\n '& .MuiTooltip-tooltip': {\n fontSize: theme.typography.fontSize - 2,\n whiteSpace: 'pre',\n maxWidth: '500px',\n },\n}));\n\nconst SubtitleText: any = styled(Typography)(({ theme }) => ({\n marginTop: theme.spacing(1.5),\n marginBottom: theme.spacing(1),\n}));\n\nconst ToolsHeader: any = styled('div')({\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n});\n\nconst DefaultTool: any = styled('div')({\n display: 'flex',\n alignItems: 'center',\n width: '300px',\n});\n\nconst DefaultToolSelect: any = styled(Select)(({ theme }) => ({\n marginLeft: theme.spacing(1),\n textTransform: 'uppercase',\n color: theme.palette.grey[800],\n}));\n\nconst StyledMenuItem: any = styled(MenuItem)({\n textTransform: 'uppercase',\n});\n\nconst ErrorMessage: any = styled('div')(({ theme }) => ({\n fontSize: theme.typography.fontSize - 2,\n color: theme.palette.error.main,\n marginTop: theme.spacing(1),\n}));\n\nexport const Tools = ({\n availableTools,\n defaultTool,\n hasErrors,\n toolbarTools,\n toggleToolBarTool,\n onDefaultToolChange,\n}) => {\n let allTools = availableTools || [];\n const isLabelAvailable = allTools.includes('label');\n const toolbarToolsNoLabel = (toolbarTools || []).filter((tool) => tool !== 'label');\n\n if (isLabelAvailable) {\n // label has to be placed at the end of the list\n const allToolsNoLabel = allTools.filter((tool) => tool !== 'label');\n allTools = [...allToolsNoLabel, 'label'];\n }\n\n return (\n <GraphingTools>\n <ToolsHeader>\n <span>GRAPHING TOOLS</span>\n {toolbarToolsNoLabel.length > 0 && (\n <DefaultTool>\n <span>Default graphing tool:</span>\n <DefaultToolSelect\n variant=\"standard\"\n onChange={onDefaultToolChange}\n value={defaultTool}\n disableUnderline\n MenuProps={{ transitionDuration: { enter: 225, exit: 195 } }}\n >\n {toolbarToolsNoLabel.map((tool, index) => (\n <StyledMenuItem key={index} value={tool}>\n {tool}\n </StyledMenuItem>\n ))}\n </DefaultToolSelect>\n </DefaultTool>\n )}\n </ToolsHeader>\n <AvailableTools>\n {allTools.map((tool) => {\n const selected = toolbarTools.find((t) => t === tool);\n const ToolComponent = selected ? SelectedTool : AvailableTool;\n\n return (\n <ToolComponent\n key={tool}\n style={{\n ...(hasErrors && tool !== 'label' && { color: 'red' }),\n }}\n onClick={() => toggleToolBarTool(tool)}\n >\n {tool.toUpperCase()}\n </ToolComponent>\n );\n })}\n </AvailableTools>\n </GraphingTools>\n );\n};\n\nTools.propTypes = {\n toolbarTools: PropTypes.arrayOf(PropTypes.string),\n toggleToolBarTool: PropTypes.func,\n availableTools: PropTypes.array,\n defaultTool: PropTypes.string,\n hasErrors: PropTypes.number,\n onDefaultToolChange: PropTypes.func,\n};\n\nexport class CorrectResponse extends React.Component {\n static propTypes = {\n availableTools: PropTypes.array,\n errors: PropTypes.object,\n model: PropTypes.object.isRequired,\n onChange: PropTypes.func.isRequired,\n toolbarTools: PropTypes.arrayOf(PropTypes.String),\n };\n\n state = {\n dialog: {\n open: false,\n },\n };\n\n componentDidMount() {\n try {\n // eslint-disable-next-line react/no-find-dom-node\n const domNode = ReactDOM.findDOMNode(this);\n\n renderMath(domNode);\n } catch (e) {\n // Added try-catch block to handle \"Unable to find node on an unmounted component\" error from tests, thrown because of the usage of shallow\n console.error('DOM not mounted');\n }\n }\n\n handleAlertDialog = (open, callback) =>\n this.setState(\n {\n dialog: { open },\n },\n callback,\n );\n\n changeMarks: any = (key, marks) => {\n const { model, onChange } = this.props;\n\n set(model, `answers.${key}.marks`, marks);\n onChange(model);\n };\n\n filterMarks: any = (tool) => {\n const {\n model: { answers },\n } = this.props;\n\n return Object.entries(answers || {}).reduce((object, [key, answer]) => {\n object[key] = {\n ...answer,\n marks: (answer.marks || []).filter((mark) => mark.type !== tool),\n };\n\n return object;\n }, {});\n };\n\n changeToolbarTools: any = (toolbarTools) => {\n const { model, onChange } = this.props;\n model.toolbarTools = toolbarTools;\n\n onChange(model);\n };\n\n updateModel: any = (props) => {\n const { model, onChange } = this.props;\n\n onChange({\n ...model,\n ...props,\n });\n };\n\n toggleToolBarTool: any = (tool) => {\n const {\n model: { defaultTool, toolbarTools, answers = {} },\n } = this.props;\n const updatedToolbarTools = [...toolbarTools];\n let newDefaultTool = defaultTool;\n\n const index = toolbarTools.findIndex((t) => tool === t);\n\n if (index >= 0) {\n const updatedAnswers = this.filterMarks(tool);\n updatedToolbarTools.splice(index, 1);\n if (tool === defaultTool) {\n const toolbarToolsNoLabel = (updatedToolbarTools || []).filter((tool) => tool !== 'label');\n newDefaultTool = (toolbarToolsNoLabel.length && toolbarToolsNoLabel[0]) || '';\n }\n\n if (!isEqual(answers, updatedAnswers)) {\n this.setState({\n dialog: {\n open: true,\n title: 'Warning',\n text: `Correct answer includes one or more ${tool} objects and all of them will be deleted.`,\n onConfirm: () =>\n this.handleAlertDialog(\n false,\n this.updateModel({\n toolbarTools: updatedToolbarTools,\n answers: updatedAnswers,\n defaultTool: newDefaultTool,\n }),\n ),\n onClose: () => this.handleAlertDialog(false),\n },\n });\n\n return;\n }\n } else {\n updatedToolbarTools.push(tool);\n\n if (defaultTool === '' && tool !== 'label') {\n newDefaultTool = tool;\n }\n }\n\n this.updateModel({\n toolbarTools: updatedToolbarTools,\n defaultTool: newDefaultTool,\n });\n };\n\n onDefaultToolChange: any = (event) => {\n const { value } = event.target;\n\n this.updateModel({ defaultTool: value });\n };\n\n addAlternateResponse: any = () => {\n const { model, onChange } = this.props;\n const { answers } = model || {};\n const answersKeys = Object.keys(answers || {});\n\n set(model, `answers.${`alternate${answersKeys.length}`}`, {\n name: `Alternate ${answersKeys.length}`,\n marks: [],\n });\n onChange(model);\n };\n\n deleteAlternateResponse: any = (answerKey, answer) => {\n const { model, onChange } = this.props;\n const { answers } = model || {};\n const { marks = [], name } = answer || {};\n\n const deleteAnswer = () => {\n delete answers[answerKey];\n // rebuild answers based on new alternate positions after deletion\n const newAnswers = Object.entries(answers).reduce((acc, currentValue, index) => {\n const [key, value] = currentValue;\n const newAnswer =\n key === 'correctAnswer'\n ? { ...acc, [key]: value }\n : { ...acc, ['alternate' + index]: { ...value, name: `Alternate ${index}` } };\n return newAnswer;\n }, {});\n\n onChange({ ...model, answers: newAnswers });\n };\n\n if (marks.length) {\n this.setState({\n dialog: {\n open: true,\n title: 'Warning',\n text: `${name} includes one or more shapes and the entire response will be deleted.`,\n onConfirm: () => this.handleAlertDialog(false, deleteAnswer),\n onClose: () => this.handleAlertDialog(false),\n },\n });\n\n return;\n }\n\n deleteAnswer();\n };\n\n render() {\n const { availableTools, errors, model, mathMlOptions = {}, removeIncompleteTool } = this.props;\n const { dialog } = this.state;\n const {\n answers = {},\n arrows,\n backgroundMarks,\n coordinatesOnHover,\n defaultTool,\n domain,\n graph = {},\n labels,\n labelsEnabled,\n range,\n title,\n titleEnabled,\n toolbarTools,\n } = model || {};\n const { correctAnswerErrors = {}, toolbarToolsError } = errors || {};\n\n return (\n <div>\n <Typography component=\"div\" variant=\"h6\">\n Define Tool Set and Correct Response\n </Typography>\n\n <SubtitleText component=\"div\" variant=\"body1\">\n Use this interface to choose which graphing tools students will be able to use, and to define the correct\n answer\n </SubtitleText>\n\n <Tools\n availableTools={availableTools}\n defaultTool={defaultTool}\n hasErrors={!!toolbarToolsError}\n onDefaultToolChange={this.onDefaultToolChange}\n toggleToolBarTool={this.toggleToolBarTool}\n toolbarTools={toolbarTools}\n />\n\n {toolbarToolsError && <ErrorMessage>{toolbarToolsError}</ErrorMessage>}\n\n {Object.entries(answers || {}).map(([key, answer]) => {\n const { marks = [], name } = answer || {};\n\n return (\n <React.Fragment key={`correct-response-graph-${name}`}>\n <ResponseTitle>\n <Name>{name}</Name>\n {key === 'correctAnswer' && (\n <StyledTooltip\n disableFocusListener\n disableTouchListener\n placement={'right'}\n title={'At least 1 graph object should be defined.'}\n >\n <Info fontSize={'small'} color={'primary'} style={{ marginLeft: '8px', marginBottom: 'auto' }} />\n </StyledTooltip>\n )}\n {key !== 'correctAnswer' && (\n <IconButton onClick={() => this.deleteAlternateResponse(key, answer)}>\n <Delete />\n </IconButton>\n )}\n </ResponseTitle>\n\n <Graph\n style={correctAnswerErrors[key] && { border: '2px solid red' }}\n axesSettings={{ includeArrows: arrows }}\n backgroundMarks={backgroundMarks.filter((mark) => !mark.building)}\n coordinatesOnHover={coordinatesOnHover}\n disabledLabels={true}\n disabledTitle={true}\n domain={domain}\n draggableTools={key === 'correctAnswer'}\n labels={labels}\n marks={marks}\n onChangeMarks={(newMarks) => this.changeMarks(key, newMarks)}\n range={range}\n showLabels={labelsEnabled}\n showTitle={titleEnabled}\n size={{ width: graph.width, height: graph.height }}\n title={title}\n toolbarTools={toolbarTools}\n onChangeTools={(toolbarTools) => this.updateModel({ toolbarTools })}\n mathMlOptions={mathMlOptions}\n removeIncompleteTool={removeIncompleteTool}\n limitLabeling={true}\n />\n\n {correctAnswerErrors[key] && <ErrorMessage>{correctAnswerErrors[key]}</ErrorMessage>}\n </React.Fragment>\n );\n })}\n\n <Button onClick={this.addAlternateResponse}>\n ADD ALTERNATE\n </Button>\n\n <AlertDialog\n open={dialog.open}\n title={dialog.title}\n text={dialog.text}\n onClose={dialog.onClose}\n onConfirm={dialog.onConfirm}\n />\n </div>\n );\n }\n}\n\nexport default CorrectResponse;\n","// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/graphing/configure/src/configure.jsx\n * @auto-generated\n *\n * This file is automatically synced from pie-elements and converted to TypeScript.\n * Manual edits will be overwritten on next sync.\n * To make changes, edit the upstream JavaScript file and run sync again.\n */\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport debug from 'debug';\nimport { intersection } from '@pie-element/shared-lodash';\nimport { styled } from '@mui/material/styles';\nimport Typography from '@mui/material/Typography';\n\nimport { settings, layout, InputContainer } from '@pie-lib/config-ui';\nimport EditableHtml from '@pie-lib/editable-html-tip-tap';\n\nimport GraphingConfig from './graphing-config.js';\nimport CorrectResponse from './correct-response.js';\n\nconst { Panel, toggle, radio, checkboxes, textField, dropdown } = settings;\nconst log = debug('@pie-element:graphing:configure');\n\nconst StyledInputContainer: any = styled(InputContainer)(({ theme }) => ({\n width: '100%',\n paddingTop: theme.spacing(2),\n marginBottom: theme.spacing(2),\n}));\n\nconst Description: any = styled(Typography)(({ theme }) => ({\n marginBottom: theme.spacing(2.5),\n}));\n\nconst ErrorText: any = styled('div')(({ theme }) => ({\n fontSize: theme.typography.fontSize - 2,\n color: theme.palette.error.main,\n paddingTop: theme.spacing(1),\n}));\n\nexport class Configure extends React.Component {\n static propTypes = {\n onModelChanged: PropTypes.func,\n onConfigurationChanged: PropTypes.func,\n imageSupport: PropTypes.object,\n uploadSoundSupport: PropTypes.object,\n model: PropTypes.object.isRequired,\n configuration: PropTypes.object.isRequired,\n };\n\n componentDidMount() {\n const { configuration, onModelChanged, model } = this.props;\n const { availableTools, title, graphDimensions } = configuration || {};\n let { arrows, titleEnabled: showTitle, dimensionsEnabled: showDimensions } = model || {};\n\n // This is used for offering support for old models which have the property arrows: boolean\n // Same thing is set in the controller: packages/graphing/controller/src/index.js - model\n if (typeof arrows === 'boolean') {\n if (arrows) {\n arrows = { left: true, right: true, up: true, down: true };\n } else {\n arrows = { left: false, right: false, up: false, down: false };\n }\n }\n\n const toolbarTools = intersection(availableTools || [], model.toolbarTools || []);\n const titleEnabled = showTitle === undefined || showTitle === null ? title.enabled : showTitle;\n const dimensionsEnabled =\n showDimensions === undefined || showDimensions === null ? graphDimensions.enabled : showDimensions;\n\n onModelChanged && onModelChanged({ ...model, arrows, toolbarTools, titleEnabled, dimensionsEnabled });\n }\n\n onRationaleChange: any = (rationale) => {\n const { onModelChanged, model } = this.props;\n\n onModelChanged({ ...model, rationale });\n };\n\n onPromptChange: any = (prompt) => {\n const { onModelChanged, model } = this.props;\n\n onModelChanged({ ...model, prompt });\n };\n\n onTeacherInstructionsChange: any = (teacherInstructions) => {\n const { onModelChanged, model } = this.props;\n\n onModelChanged({ ...model, teacherInstructions });\n };\n\n render() {\n const { model, configuration, onConfigurationChanged, onModelChanged, imageSupport, uploadSoundSupport } =\n this.props;\n const {\n arrows = {},\n authoring = {},\n availableTools = [],\n baseInputConfiguration = {},\n coordinatesOnHover = {},\n contentDimensions = {},\n gridConfigurations = [],\n graphDimensions = {},\n instruction = {},\n labels = {},\n padding = {},\n prompt = {},\n rationale = {},\n scoringType = {},\n settingsPanelDisabled,\n spellCheck = {},\n studentInstructions = {},\n teacherInstructions = {},\n title = {},\n maxImageWidth = {},\n maxImageHeight = {},\n withRubric = {},\n language = {},\n languageChoices = {},\n mathMlOptions = {},\n removeIncompleteTool = false,\n } = configuration || {};\n const {\n errors = {},\n extraCSSRules,\n labelsEnabled,\n dimensionsEnabled,\n promptEnabled,\n rationaleEnabled,\n spellCheckEnabled,\n teacherInstructionsEnabled,\n titleEnabled,\n } = model || {};\n const {\n prompt: promptError,\n rationale: rationaleError,\n teacherInstructions: teacherInstructionsError,\n } = errors || {};\n\n log('[render] model', model);\n\n const defaultImageMaxWidth = maxImageWidth && maxImageWidth.prompt;\n const defaultImageMaxHeight = maxImageHeight && maxImageHeight.prompt;\n const labelsPlaceholders = {\n top: labels.top,\n right: labels.right,\n bottom: labels.bottom,\n left: labels.left,\n };\n\n const panelItemType = {\n arrows:\n arrows.settings &&\n checkboxes(arrows.label, {\n left: arrows.left,\n right: arrows.right,\n up: arrows.up,\n down: arrows.down,\n }),\n titleEnabled: title.settings && toggle(title.label),\n padding: padding.settings && toggle(padding.label),\n labelsEnabled: labels.settings && toggle(labels.label),\n 'language.enabled': language.settings && toggle(language.label, true),\n language: language.settings && language.enabled && dropdown(languageChoices.label, languageChoices.options),\n dimensionsEnabled: graphDimensions.settings && toggle(graphDimensions.label),\n coordinatesOnHover: coordinatesOnHover.settings && toggle(coordinatesOnHover.label),\n };\n\n const panelProperties = {\n 'authoring.enabled': authoring.settings && toggle(authoring.label, true),\n teacherInstructionsEnabled: teacherInstructions.settings && toggle(teacherInstructions.label),\n studentInstructionsEnabled: studentInstructions.settings && toggle(studentInstructions.label),\n promptEnabled: prompt.settings && toggle(prompt.label),\n rationaleEnabled: rationale.settings && toggle(rationale.label),\n spellCheckEnabled: spellCheck.settings && toggle(spellCheck.label),\n scoringType: scoringType.settings && radio(scoringType.label, ['dichotomous', 'partial scoring']),\n rubricEnabled: withRubric?.settings && toggle(withRubric?.label),\n instruction: instruction.settings && textField(instruction.label),\n };\n\n const getPluginProps = (props = {}) => ({\n ...baseInputConfiguration,\n ...props,\n });\n\n return (\n <layout.ConfigLayout\n extraCSSRules={extraCSSRules}\n dimensions={contentDimensions}\n hideSettings={settingsPanelDisabled}\n settings={\n <Panel\n model={model}\n configuration={configuration}\n onChangeModel={onModelChanged}\n onChangeConfiguration={onConfigurationChanged}\n groups={{\n Settings: panelItemType,\n Properties: panelProperties,\n }}\n />\n }\n >\n <Description component=\"div\" variant=\"body1\">\n {instruction?.label || ''}\n </Description>\n\n {teacherInstructionsEnabled && (\n <StyledInputContainer label={teacherInstructions.label}>\n <EditableHtml\n markup={model.teacherInstructions || ''}\n onChange={this.onTeacherInstructionsChange}\n imageSupport={imageSupport}\n error={teacherInstructionsError}\n nonEmpty={false}\n pluginProps={getPluginProps(teacherInstructions?.inputConfiguration)}\n spellCheck={spellCheckEnabled}\n maxImageWidth={(maxImageWidth && maxImageWidth.teacherInstructions) || defaultImageMaxWidth}\n maxImageHeight={(maxImageHeight && maxImageHeight.teacherInstructions) || defaultImageMaxHeight}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n mathMlOptions={mathMlOptions}\n />\n {teacherInstructionsError && <ErrorText>{teacherInstructionsError}</ErrorText>}\n </StyledInputContainer>\n )}\n\n {promptEnabled && (\n <StyledInputContainer label={prompt.label}>\n <EditableHtml\n markup={model.prompt}\n onChange={this.onPromptChange}\n imageSupport={imageSupport}\n error={promptError}\n nonEmpty={false}\n spellCheck={spellCheckEnabled}\n pluginProps={getPluginProps(prompt?.inputConfiguration)}\n disableUnderline\n maxImageWidth={defaultImageMaxWidth}\n maxImageHeight={defaultImageMaxHeight}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n mathMlOptions={mathMlOptions}\n />\n {promptError && <ErrorText>{promptError}</ErrorText>}\n </StyledInputContainer>\n )}\n\n <GraphingConfig\n authoring={authoring}\n availableTools={availableTools}\n gridConfigurations={gridConfigurations}\n graphDimensions={graphDimensions}\n labelsPlaceholders={labelsPlaceholders}\n model={model}\n showLabels={labelsEnabled}\n dimensionsEnabled={dimensionsEnabled}\n showTitle={titleEnabled}\n titlePlaceholder={title.placeholder}\n onChange={this.props.onModelChanged}\n mathMlOptions={mathMlOptions}\n removeIncompleteTool={removeIncompleteTool}\n />\n\n <CorrectResponse\n availableTools={availableTools}\n errors={errors}\n model={model}\n onChange={this.props.onModelChanged}\n mathMlOptions={mathMlOptions}\n removeIncompleteTool={removeIncompleteTool}\n />\n\n {rationaleEnabled && (\n <StyledInputContainer label={rationale.label || 'Rationale'}>\n <EditableHtml\n markup={model.rationale || ''}\n onChange={this.onRationaleChange}\n imageSupport={imageSupport}\n error={rationaleError}\n spellCheck={spellCheckEnabled}\n pluginProps={getPluginProps(rationale?.inputConfiguration)}\n maxImageWidth={(maxImageWidth && maxImageWidth.rationale) || defaultImageMaxWidth}\n maxImageHeight={(maxImageHeight && maxImageHeight.rationale) || defaultImageMaxHeight}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n mathMlOptions={mathMlOptions}\n />\n {rationaleError && <ErrorText>{rationaleError}</ErrorText>}\n </StyledInputContainer>\n )}\n </layout.ConfigLayout>\n );\n }\n}\n\nexport default Configure;\n","//#region src/index.ts\nvar e = class e extends CustomEvent {\n\tstatic {\n\t\tthis.TYPE = \"model.updated\";\n\t}\n\tconstructor(t, n = !1) {\n\t\tsuper(e.TYPE, {\n\t\t\tbubbles: !0,\n\t\t\tdetail: {\n\t\t\t\tupdate: t,\n\t\t\t\treset: n\n\t\t\t}\n\t\t}), this.update = t, this.reset = n;\n\t}\n}, t = class e extends CustomEvent {\n\tstatic {\n\t\tthis.TYPE = \"delete.image\";\n\t}\n\tconstructor(t, n) {\n\t\tsuper(e.TYPE, {\n\t\t\tbubbles: !0,\n\t\t\tdetail: {\n\t\t\t\tsrc: t,\n\t\t\t\tdone: n\n\t\t\t}\n\t\t}), this.src = t, this.done = n;\n\t}\n}, n = class e extends CustomEvent {\n\tstatic {\n\t\tthis.TYPE = \"insert.image\";\n\t}\n\tconstructor(t) {\n\t\tsuper(e.TYPE, {\n\t\t\tbubbles: !0,\n\t\t\tdetail: t\n\t\t}), this.handler = t;\n\t}\n}, r = class e extends CustomEvent {\n\tstatic {\n\t\tthis.TYPE = \"delete.sound\";\n\t}\n\tconstructor(t, n) {\n\t\tsuper(e.TYPE, {\n\t\t\tbubbles: !0,\n\t\t\tdetail: {\n\t\t\t\tsrc: t,\n\t\t\t\tdone: n\n\t\t\t}\n\t\t}), this.src = t, this.done = n;\n\t}\n}, i = class e extends CustomEvent {\n\tstatic {\n\t\tthis.TYPE = \"insert.sound\";\n\t}\n\tconstructor(t) {\n\t\tsuper(e.TYPE, {\n\t\t\tbubbles: !0,\n\t\t\tdetail: t\n\t\t}), this.handler = t;\n\t}\n};\n//#endregion\nexport { t as DeleteImageEvent, r as DeleteSoundEvent, n as InsertImageEvent, i as InsertSoundEvent, e as ModelUpdatedEvent };\n","// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/graphing/configure/src/defaults.js\n * @auto-generated\n *\n * This file is automatically synced from pie-elements and converted to TypeScript.\n * Manual edits will be overwritten on next sync.\n * To make changes, edit the upstream JavaScript file and run sync again.\n */\n\nconst allTools = [\n 'circle',\n 'line',\n 'label',\n 'parabola',\n 'point',\n 'polygon',\n 'ray',\n 'segment',\n 'sine',\n 'vector',\n // 'absolute', // - not available as default\n // 'exponential', // - not available as default\n];\n\nexport default {\n model: {\n answers: {\n correctAnswer: {\n name: 'Correct Answer',\n marks: [],\n },\n },\n arrows: {\n left: true,\n right: true,\n up: true,\n down: true,\n },\n backgroundMarks: [],\n coordinatesOnHover: false,\n defaultGridConfiguration: 0,\n domain: {\n min: -5,\n max: 5,\n step: 1,\n labelStep: 1,\n axisLabel: 'x',\n },\n graph: { width: 500, height: 500 },\n includeAxes: true,\n labels: {},\n labelsEnabled: true,\n padding: true,\n prompt: '',\n promptEnabled: true,\n range: {\n min: -5,\n max: 5,\n step: 1,\n labelStep: 1,\n axisLabel: 'y',\n },\n rationale: '',\n rationaleEnabled: true,\n standardGrid: false,\n studentInstructionsEnabled: true,\n teacherInstructions: '',\n teacherInstructionsEnabled: true,\n title: '',\n titleEnabled: true,\n toolbarTools: allTools,\n },\n configuration: {\n baseInputConfiguration: {\n h3: { disabled: true },\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n textAlign: { disabled: true },\n showParagraphs: { disabled: false },\n separateParagraphs: { disabled: true },\n },\n availableTools: allTools,\n authoring: {\n settings: false,\n label: 'Customize Grid Setup',\n enabled: true,\n includeAxesEnabled: true,\n standardGridEnabled: true,\n min: {\n label: 'Min Value',\n enabled: true,\n },\n max: {\n label: 'Max Value',\n enabled: true,\n },\n axisLabel: {\n label: 'Label',\n enabled: true,\n },\n step: {\n label: 'Grid Interval',\n enabled: true,\n },\n labelStep: {\n label: 'Label Interval',\n enabled: true,\n },\n },\n arrows: {\n settings: true,\n label: 'Include Arrows',\n left: {\n label: 'left',\n },\n right: {\n label: 'right',\n },\n up: {\n label: 'up',\n },\n down: {\n label: 'down',\n },\n },\n gridConfigurations: [\n {\n label: '4-quadrant coordinate grid, -10 to 10',\n arrows: {\n left: true,\n right: true,\n up: true,\n down: true,\n },\n domain: {\n min: -10,\n max: 10,\n step: 1,\n padding: 0,\n labelStep: 1,\n axisLabel: '<i>x</i>',\n },\n graph: {\n width: 480,\n height: 480,\n },\n includeAxes: true,\n labels: {\n top: '',\n right: '',\n bottom: '',\n left: '',\n },\n padding: true,\n range: {\n min: -10,\n max: 10,\n step: 1,\n padding: 0,\n labelStep: 1,\n axisLabel: '<i>y</i>',\n },\n standardGrid: true,\n title: '',\n },\n {\n label: '0 to 10 on both axes',\n arrows: {\n left: false,\n right: true,\n up: true,\n down: false,\n },\n domain: {\n min: 0,\n max: 10,\n step: 1,\n padding: 0,\n labelStep: 1,\n axisLabel: '<i>x</i>',\n },\n graph: {\n width: 480,\n height: 480,\n },\n includeAxes: true,\n labels: {\n top: '',\n right: '',\n bottom: '',\n left: '',\n },\n padding: true,\n range: {\n min: 0,\n max: 10,\n step: 1,\n padding: 0,\n labelStep: 1,\n axisLabel: '<i>y</i>',\n },\n standardGrid: true,\n title: '',\n },\n {\n label: '0 to 20 on both axes',\n arrows: {\n left: false,\n right: true,\n up: true,\n down: false,\n },\n domain: {\n min: 0,\n max: 20,\n step: 1,\n padding: 0,\n labelStep: 1,\n axisLabel: '<i>x</i>',\n },\n graph: {\n width: 480,\n height: 480,\n },\n includeAxes: true,\n labels: {\n top: '',\n right: '',\n bottom: '',\n left: '',\n },\n padding: true,\n range: {\n min: 0,\n max: 20,\n step: 1,\n padding: 0,\n labelStep: 1,\n axisLabel: '<i>y</i>',\n },\n standardGrid: true,\n title: '',\n },\n {\n label: 'Sample Data Graph',\n arrows: {\n left: false,\n right: true,\n up: true,\n down: false,\n },\n domain: {\n min: 0,\n max: 30,\n step: 1,\n padding: 0,\n labelStep: 2,\n axisLabel: '<i>t</i>',\n },\n graph: {\n width: 480,\n height: 480,\n },\n includeAxes: true,\n labels: {\n top: '',\n right: '',\n bottom: 'Time (seconds)',\n left: 'Distance (meters)',\n },\n padding: true,\n range: {\n min: 0,\n max: 80,\n step: 5,\n padding: 0,\n labelStep: 10,\n axisLabel: '<i>d</i>',\n },\n standardGrid: false,\n title: 'Distance as a function of time',\n },\n {\n label: 'No Visible Axes',\n arrows: {\n left: false,\n right: false,\n up: false,\n down: false,\n },\n domain: {\n min: 1,\n max: 21,\n step: 1,\n padding: 0,\n labelStep: 0,\n axisLabel: '',\n },\n graph: {\n width: 480,\n height: 480,\n },\n includeAxes: false,\n labels: {\n top: '',\n right: '',\n bottom: '',\n left: '',\n },\n padding: true,\n range: {\n min: 1,\n max: 21,\n step: 1,\n padding: 0,\n labelStep: 0,\n axisLabel: '',\n },\n standardGrid: false,\n title: '',\n },\n ],\n graphDimensions: {\n settings: false,\n label: 'Graph Dimensions',\n enabled: true,\n min: 150,\n max: 800,\n step: 20,\n },\n padding: {\n settings: false,\n label: 'Padding',\n },\n labels: {\n settings: true,\n label: 'Graph Labels',\n enabled: true,\n top: 'Click here to add a top label',\n right: 'Click here to add a right label',\n bottom: 'Click here to add a bottom label',\n left: 'Click here to add a left label',\n },\n prompt: {\n settings: true,\n label: 'Item Stem',\n required: false,\n inputConfiguration: {\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n },\n },\n rationale: {\n settings: true,\n label: 'Rationale',\n required: false,\n inputConfiguration: {\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n },\n },\n scoringType: {\n settings: false,\n label: 'Scoring Type',\n },\n studentInstructions: {\n settings: false,\n label: 'Student Instructions',\n },\n teacherInstructions: {\n settings: true,\n label: 'Teacher Instructions',\n required: false,\n inputConfiguration: {\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n },\n },\n title: {\n settings: true,\n label: 'Graph Title',\n enabled: true,\n placeholder: 'Click here to add a title for this graph',\n },\n instruction: {\n settings: false,\n label:\n 'Graphing questions involve plotting points, lines, or other objects on a graph. To create one, first configure the grid, then select the plotting tools students will be offered, and use them to define the correct answer.',\n },\n settingsPanelDisabled: false,\n spellCheck: {\n label: 'Spellcheck',\n settings: false,\n enabled: true,\n },\n coordinatesOnHover: {\n settings: true,\n label: 'Coordinates on Hover',\n },\n maxImageWidth: {\n teacherInstructions: 300,\n prompt: 300,\n rationale: 300,\n },\n maxImageHeight: {\n teacherInstructions: 300,\n prompt: 300,\n rationale: 300,\n },\n withRubric: {\n settings: false,\n label: 'Add Rubric',\n },\n language: {\n settings: false,\n label: 'Specify Language',\n enabled: false,\n },\n languageChoices: {\n label: 'Language Choices',\n options: [],\n },\n mathMlOptions: {\n mmlOutput: false,\n mmlEditing: false,\n },\n removeIncompleteTool: false,\n },\n};\n","// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/graphing/configure/src/index.js\n * @auto-generated\n *\n * This file is automatically synced from pie-elements and converted to TypeScript.\n * Manual edits will be overwritten on next sync.\n * To make changes, edit the upstream JavaScript file and run sync again.\n */\n\nimport React from 'react';\nimport { createRoot } from 'react-dom/client';\nimport Configure from './configure.js';\nimport {\n DeleteImageEvent,\n DeleteSoundEvent,\n InsertImageEvent,\n InsertSoundEvent,\n ModelUpdatedEvent,\n} from '@pie-element/shared-configure-events';\nimport debug from 'debug';\nimport defaultValues from './defaults.js';\nimport { renderMath } from '@pie-element/shared-math-rendering-mathjax';\nimport { cloneDeep } from '@pie-element/shared-lodash';\n\nconst log = debug('pie-elements:graphing:configure');\n\n// this function is implemented in controller as well\nconst sortedAnswers = (answers) =>\n Object.keys(answers || {})\n .sort()\n .reduce((result, key) => {\n if (key !== 'correctAnswer') {\n result[key] = answers[key];\n }\n\n return result;\n }, {});\n\nexport default class GraphLinesConfigure extends HTMLElement {\n static createDefaultModel = (model = {}) => {\n const normalizedModel = { ...defaultValues.model, ...model };\n const {\n answers = {},\n domain = {},\n defaultTool,\n graph = {},\n range = {},\n standardGrid,\n toolbarTools,\n } = normalizedModel;\n\n // added support for models without defaultTool defined; also used in packages/graphing/controller/src/index.js\n const toolbarToolsNoLabel = (toolbarTools || []).filter((tool) => tool !== 'label');\n const normalizedDefaultTool = defaultTool || (toolbarToolsNoLabel.length && toolbarToolsNoLabel[0]) || '';\n\n return {\n ...normalizedModel,\n answers:\n (answers &&\n answers.correctAnswer && {\n correctAnswer: answers.correctAnswer,\n ...sortedAnswers(answers),\n }) ||\n answers,\n defaultTool: normalizedDefaultTool,\n range:\n (standardGrid && {\n ...range,\n min: domain.min,\n max: domain.max,\n step: domain.step,\n labelStep: domain.labelStep,\n }) ||\n range,\n graph: (standardGrid && { ...graph, height: graph.width }) || graph,\n };\n };\n\n constructor() {\n super();\n this._root = null;\n this._model = GraphLinesConfigure.createDefaultModel();\n this._configuration = defaultValues.configuration;\n }\n\n set model(m) {\n this._model = GraphLinesConfigure.createDefaultModel(m);\n this._modelCopy = cloneDeep(this._model);\n\n this._render();\n }\n\n resetModelAfterConfigurationIsSet: any = () => {\n // In environments that use pie-player-components, model is set before configuration.\n // This is the reason why sometimes the model gets altered non-reversible\n // (altered using default configuration instead of client configuration, because at that point client configuration was not set yet)\n // Therefore, in such environments, we will make sure to keep a modelCopy (initialised in set model) and use it to reset\n // the model in set configuration (resetModelAfterConfigurationIsSet) if set configuration is ever called\n const pieAuthors = document.querySelectorAll('pie-author');\n this.hasPlayerAsParent = Array.from(pieAuthors).some((author) => author.contains(this));\n\n if (this.hasPlayerAsParent) {\n if (this._modelCopy) {\n this._model = this._modelCopy;\n } else {\n delete this._modelCopy;\n }\n }\n };\n\n set configuration(c) {\n this._configuration = {\n ...defaultValues.configuration,\n ...c,\n };\n\n this.resetModelAfterConfigurationIsSet();\n\n // if language:enabled is true, then the corresponding default item model should include a language value;\n // if it is false, then the language field should be omitted from the item model.\n // if a default item model includes a language value (e.g., en_US) and the corresponding authoring view settings have language:settings = true,\n // then (a) language:enabled should also be true, and (b) that default language value should be represented in languageChoices[] (as a key).\n //TODO: add logic in controller and add tests\n if (c.language?.enabled) {\n if (c.languageChoices?.options?.length) {\n this._model.language = c.languageChoices.options[0].value;\n }\n } else {\n if (c.language.settings) {\n if (this._model.language) {\n this._configuration.language.enabled = true;\n }\n } else {\n delete this._model.language;\n }\n }\n\n this._render();\n }\n\n onModelChanged: any = (model) => {\n this._model = model;\n this._render();\n\n log('[onModelChanged]: ', this._model);\n\n this.dispatchEvent(new ModelUpdatedEvent(this._model));\n };\n\n onConfigurationChanged: any = (config) => {\n this._configuration = config;\n this._render();\n };\n\n insertImage: any = (handler) => {\n this.dispatchEvent(new InsertImageEvent(handler));\n };\n\n onDeleteImage: any = (src, done) => {\n this.dispatchEvent(new DeleteImageEvent(src, done));\n };\n\n insertSound(handler) {\n this.dispatchEvent(new InsertSoundEvent(handler));\n }\n\n onDeleteSound(src, done) {\n this.dispatchEvent(new DeleteSoundEvent(src, done));\n }\n\n _render() {\n if (this._model) {\n const el = React.createElement(Configure, {\n onModelChanged: this.onModelChanged,\n onConfigurationChanged: this.onConfigurationChanged,\n model: this._model,\n configuration: this._configuration,\n imageSupport: {\n add: this.insertImage,\n delete: this.onDeleteImage,\n },\n uploadSoundSupport: {\n add: this.insertSound.bind(this),\n delete: this.onDeleteSound.bind(this),\n },\n });\n\n if (!this._root) {\n this._root = createRoot(this);\n }\n this._root.render(el);\n queueMicrotask(() => {\n renderMath(this);\n });\n }\n }\n\n disconnectedCallback() {\n if (this._root) {\n this._root.unmount();\n }\n }\n}\n"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,29,30,35,36,37,38,39,40,52],"mappings":";;;;;;;;AACA,IAAA,KAAe;;;ACCf,SAAgB,GAA0B,GAAM;CAC9C,OAAO,EAAqB,qBAAqB,CAAI;AACvD;AAC0B,EAAuB,qBAAqB;CAAC;CAAQ;CAAW;CAAY;CAAS;CAAa;AAAS,CAAC;;;ACUtI,IAAMA,MAAoB,MAAc;CACtC,IAAM,EACJ,YACA,YACA,aACA,YACE;CAKJ,OAAO,EAAe;EAHpB,MAAM;GAAC;GAAQ,KAAW;GAAW,KAAY;GAAY,KAAQ,OAAOC,EAAW,CAAI;EAAG;EAC9F,OAAO,CAAC,OAAO;CAES,GAAG,IAA2B,CAAO;AACjE,GACM,KAAiB,EAAO,GAAY,EACxC,MAAM,gBACR,CAAC,EAAE;CACD,SAAS;CACT,cAAc;CACd,UAAU;EAAC;GACT,OAAO;IACL,MAAM;IACN,MAAM;GACR;GACA,OAAO,EACL,YAAY,GACd;EACF;EAAG;GACD,QAAQ,EACN,SACA,oBACI,MAAS,WAAW,EAAW,SAAS;GAC9C,OAAO,EACL,YAAY,IACd;EACF;EAAG;GACD,OAAO;I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L,OAAO;KACP,QAAQ;IACV;IACA,aAAa;IACb,QAAQ;KACN,KAAK;KACL,OAAO;KACP,QAAQ;KACR,MAAM;IACR;IACA,SAAS;IACT,OAAO;KACL,KAAK;KACL,KAAK;KACL,MAAM;KACN,SAAS;KACT,WAAW;KACX,WAAW;IACb;IACA,cAAc;IACd,OAAO;GACT;GACA;IACE,OAAO;IACP,QAAQ;KACN,MAAM;KACN,OAAO;KACP,IAAI;KACJ,MAAM;IACR;IACA,QAAQ;KACN,KAAK;KACL,KAAK;KACL,MAAM;KACN,SAAS;KACT,WAAW;KACX,WAAW;IACb;IACA,OAAO;KACL,OAAO;KACP,QAAQ;IACV;IACA,aAAa;IACb,QAAQ;KACN,KAAK;KACL,OAAO;KACP,QAAQ;KACR,MAAM;IACR;IACA,SAAS;IACT,OAAO;KACL,KAAK;KACL,KAAK;KACL,MAAM;KACN,SAAS;KACT,WAAW;KACX,WAAW;IACb;IACA,cAAc;IACd,OAAO;GACT;GACA;IACE,OAAO;IACP,QAAQ;KACN,MAAM;KACN,OAAO;KACP,IAAI;KACJ,MAAM;IACR;IACA,QAAQ;KACN,KAAK;KACL,KAAK;KACL,MAAM;KACN,SAAS;KACT,WAAW;KACX,WAAW;IACb;IACA,OAAO;KACL,OAAO;KACP,QAAQ;IACV;IACA,aAAa;IACb,QAAQ;KACN,KAAK;KACL,OAAO;KACP,QAAQ;KACR,MAAM;IACR;IACA,SAAS;IACT,OAAO;KACL,KAAK;KACL,KAAK;KACL,MAAM;KACN,SAAS;KACT,WAAW;KACX,WAAW;IACb;IACA,cAAc;IACd,OAAO;GACT;GACA;IACE,OAAO;IACP,QAAQ;KACN,MAAM;KACN,OAAO;KACP,IAAI;KACJ,MAAM;IACR;IACA,QAAQ;KACN,KAAK;KACL,KAAK;KACL,MAAM;KACN,SAAS;KACT,WAAW;KACX,WAAW;IACb;IACA,OAAO;KACL,OAAO;KACP,QAAQ;IACV;IACA,aAAa;IACb,QAAQ;KACN,KAAK;KACL,OAAO;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