@ryuzaki13/react-foundation-lib 2.31.0 → 2.31.3

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 (497) hide show
  1. package/README.md +17 -5
  2. package/dist/analytical-table/definition/analyticalDefinitionConstants.d.ts +17 -0
  3. package/dist/analytical-table/definition/analyticalDefinitionConstants.d.ts.map +1 -0
  4. package/dist/analytical-table/definition/compileAnalyticalTableDefinition.d.ts.map +1 -1
  5. package/dist/analytical-table/definition/types.d.ts +6 -5
  6. package/dist/analytical-table/definition/types.d.ts.map +1 -1
  7. package/dist/analytical-table/dynamic-columns/analyticalDateColumnConstants.d.ts +7 -0
  8. package/dist/analytical-table/dynamic-columns/analyticalDateColumnConstants.d.ts.map +1 -0
  9. package/dist/analytical-table/dynamic-columns/dateColumns.d.ts.map +1 -1
  10. package/dist/analytical-table/dynamic-columns/types.d.ts +2 -1
  11. package/dist/analytical-table/dynamic-columns/types.d.ts.map +1 -1
  12. package/dist/analytical-table/index.js +124 -113
  13. package/dist/analytical-table/index.js.map +1 -1
  14. package/dist/analytical-table/projections/analyticalExportConstants.d.ts +7 -0
  15. package/dist/analytical-table/projections/analyticalExportConstants.d.ts.map +1 -0
  16. package/dist/analytical-table/projections/expansion.d.ts +2 -1
  17. package/dist/analytical-table/projections/expansion.d.ts.map +1 -1
  18. package/dist/analytical-table/projections/exportProjection.d.ts.map +1 -1
  19. package/dist/analytical-table/projections/types.d.ts +3 -2
  20. package/dist/analytical-table/projections/types.d.ts.map +1 -1
  21. package/dist/analytical-table/runtime/aggregation.d.ts.map +1 -1
  22. package/dist/analytical-table/runtime/analyticalRowConstants.d.ts +4 -0
  23. package/dist/analytical-table/runtime/analyticalRowConstants.d.ts.map +1 -0
  24. package/dist/analytical-table/runtime/analyticalViewConstants.d.ts +16 -0
  25. package/dist/analytical-table/runtime/analyticalViewConstants.d.ts.map +1 -0
  26. package/dist/analytical-table/runtime/buildGroupedModel.d.ts.map +1 -1
  27. package/dist/analytical-table/runtime/filtering.d.ts.map +1 -1
  28. package/dist/analytical-table/runtime/grouping.d.ts.map +1 -1
  29. package/dist/analytical-table/runtime/hierarchy.d.ts +2 -1
  30. package/dist/analytical-table/runtime/hierarchy.d.ts.map +1 -1
  31. package/dist/analytical-table/runtime/totals.d.ts +2 -2
  32. package/dist/analytical-table/runtime/totals.d.ts.map +1 -1
  33. package/dist/analytical-table/runtime/types.d.ts +5 -3
  34. package/dist/analytical-table/runtime/types.d.ts.map +1 -1
  35. package/dist/analytical-table/runtime/valueComparison.d.ts.map +1 -1
  36. package/dist/array/index.js +1 -1
  37. package/dist/array/reorder.d.ts +6 -1
  38. package/dist/array/reorder.d.ts.map +1 -1
  39. package/dist/async-task-runner/createCoalescingTaskRunner.d.ts.map +1 -1
  40. package/dist/async-task-runner/createDeadlineTimer.d.ts.map +1 -1
  41. package/dist/async-task-runner/index.js +39 -36
  42. package/dist/async-task-runner/index.js.map +1 -1
  43. package/dist/async-task-runner/nativeTimerConstants.d.ts +3 -0
  44. package/dist/async-task-runner/nativeTimerConstants.d.ts.map +1 -0
  45. package/dist/binary/base64Constants.d.ts +6 -0
  46. package/dist/binary/base64Constants.d.ts.map +1 -0
  47. package/dist/binary/binaryToBlob.d.ts.map +1 -1
  48. package/dist/binary/getBase64DecodedSize.d.ts.map +1 -1
  49. package/dist/binary/index.js +95 -70
  50. package/dist/binary/index.js.map +1 -1
  51. package/dist/browser-notifications/browserNotificationConstants.d.ts +3 -0
  52. package/dist/browser-notifications/browserNotificationConstants.d.ts.map +1 -0
  53. package/dist/browser-notifications/browserNotificationTypes.d.ts +2 -1
  54. package/dist/browser-notifications/browserNotificationTypes.d.ts.map +1 -1
  55. package/dist/browser-notifications/createBrowserNotificationPresenter.d.ts.map +1 -1
  56. package/dist/browser-notifications/index.js +38 -37
  57. package/dist/browser-notifications/index.js.map +1 -1
  58. package/dist/chunks/{array-D-_yMMUK.js → array-bd7LYFto.js} +1 -3
  59. package/dist/chunks/{array-D-_yMMUK.js.map → array-bd7LYFto.js.map} +1 -1
  60. package/dist/chunks/{dom-BK22UmgF.js → dom-ZSeWZ0Gg.js} +103 -98
  61. package/dist/chunks/dom-ZSeWZ0Gg.js.map +1 -0
  62. package/dist/chunks/formatDate-CNPcfNte.js +133 -0
  63. package/dist/chunks/formatDate-CNPcfNte.js.map +1 -0
  64. package/dist/chunks/{formatters-CZnnbdud.js → formatters-CO40zvVB.js} +496 -496
  65. package/dist/chunks/formatters-CO40zvVB.js.map +1 -0
  66. package/dist/chunks/{formulas-BXT_XBWI.js → formulas-Y0HOcFhe.js} +90 -86
  67. package/dist/chunks/formulas-Y0HOcFhe.js.map +1 -0
  68. package/dist/chunks/hasSignatureBytes-D2wO_Myl.js +11 -0
  69. package/dist/chunks/hasSignatureBytes-D2wO_Myl.js.map +1 -0
  70. package/dist/chunks/keyboardConstants-BZKskWsm.js +6 -0
  71. package/dist/chunks/keyboardConstants-BZKskWsm.js.map +1 -0
  72. package/dist/chunks/media-imBOXWwa.js +192 -0
  73. package/dist/chunks/media-imBOXWwa.js.map +1 -0
  74. package/dist/chunks/mimeTypeConstants-BzONV-b1.js +6 -0
  75. package/dist/chunks/mimeTypeConstants-BzONV-b1.js.map +1 -0
  76. package/dist/chunks/{query-client-CVRfrYZM.js → query-client-D0HQZ84w.js} +142 -142
  77. package/dist/chunks/query-client-D0HQZ84w.js.map +1 -0
  78. package/dist/chunks/scalarTypeClassification-D4YcGxtQ.js +766 -0
  79. package/dist/chunks/scalarTypeClassification-D4YcGxtQ.js.map +1 -0
  80. package/dist/chunks/scalarTypeConstants-CnSsjpGO.js +6 -0
  81. package/dist/chunks/scalarTypeConstants-CnSsjpGO.js.map +1 -0
  82. package/dist/chunks/utils-DW0Yso1Q.js +210 -0
  83. package/dist/chunks/utils-DW0Yso1Q.js.map +1 -0
  84. package/dist/chunks/{uuid-CUJPAbRY.js → uuid-izDzLv18.js} +1 -2
  85. package/dist/chunks/uuid-izDzLv18.js.map +1 -0
  86. package/dist/chunks/validate-8URYKKly.js +613 -0
  87. package/dist/chunks/validate-8URYKKly.js.map +1 -0
  88. package/dist/copy/index.js +5 -5
  89. package/dist/copy/index.js.map +1 -1
  90. package/dist/copy/useCopyFeedback.d.ts.map +1 -1
  91. package/dist/crypto/hashString.d.ts.map +1 -1
  92. package/dist/crypto/hexadecimalConstants.d.ts +3 -0
  93. package/dist/crypto/hexadecimalConstants.d.ts.map +1 -0
  94. package/dist/crypto/index.js +25 -24
  95. package/dist/crypto/index.js.map +1 -1
  96. package/dist/crypto/uuid.d.ts.map +1 -1
  97. package/dist/date-segments/index.js +81 -81
  98. package/dist/date-segments/index.js.map +1 -1
  99. package/dist/date-segments/mask.d.ts +13 -3
  100. package/dist/date-segments/mask.d.ts.map +1 -1
  101. package/dist/decimal/decimalConstants.d.ts +3 -0
  102. package/dist/decimal/decimalConstants.d.ts.map +1 -0
  103. package/dist/decimal/index.js +0 -2
  104. package/dist/decimal/index.js.map +1 -1
  105. package/dist/decimal/normalizeDecimal.d.ts.map +1 -1
  106. package/dist/decimal/normalizeDecimalLiteral.d.ts.map +1 -1
  107. package/dist/decimal/resolveDecimalMaxLength.d.ts.map +1 -1
  108. package/dist/decimal/sumDecimals.d.ts.map +1 -1
  109. package/dist/decimal/writeDecimalParts.d.ts.map +1 -1
  110. package/dist/dom/document-scroll/acquireDocumentScrollLock.d.ts.map +1 -1
  111. package/dist/dom/document-scroll/attachDocumentTouchScrollGuard.d.ts.map +1 -1
  112. package/dist/dom/document-scroll/canConsumeVerticalTouchScroll.d.ts.map +1 -1
  113. package/dist/dom/domEventConstants.d.ts +4 -0
  114. package/dist/dom/domEventConstants.d.ts.map +1 -0
  115. package/dist/dom/domScrollConstants.d.ts +3 -0
  116. package/dist/dom/domScrollConstants.d.ts.map +1 -0
  117. package/dist/dom/index.js +1 -1
  118. package/dist/dom/installFaviconOverride.d.ts.map +1 -1
  119. package/dist/dom/overlayFocusConstants.d.ts +4 -0
  120. package/dist/dom/overlayFocusConstants.d.ts.map +1 -0
  121. package/dist/dom/scroll-anchor/captureScrollAnchor.d.ts.map +1 -1
  122. package/dist/dom/useClickOutside.d.ts +1 -1
  123. package/dist/dom/useClickOutside.d.ts.map +1 -1
  124. package/dist/dom/useEscapeDismiss.d.ts +1 -1
  125. package/dist/dom/useEscapeDismiss.d.ts.map +1 -1
  126. package/dist/dom/useFocusTrap.d.ts.map +1 -1
  127. package/dist/dom/useIsTouchDevice.d.ts.map +1 -1
  128. package/dist/dom/useOverlayFocus.d.ts +3 -2
  129. package/dist/dom/useOverlayFocus.d.ts.map +1 -1
  130. package/dist/dom/visual-viewport/attachVisualViewportFrame.d.ts.map +1 -1
  131. package/dist/error-report/breadcrumbs.d.ts.map +1 -1
  132. package/dist/error-report/capture.d.ts.map +1 -1
  133. package/dist/error-report/captureOptions.d.ts +3 -2
  134. package/dist/error-report/captureOptions.d.ts.map +1 -1
  135. package/dist/error-report/capturePolicyConstants.d.ts +4 -0
  136. package/dist/error-report/capturePolicyConstants.d.ts.map +1 -0
  137. package/dist/error-report/dataPreview.d.ts.map +1 -1
  138. package/dist/error-report/diagnostics.d.ts.map +1 -1
  139. package/dist/error-report/drafts.d.ts.map +1 -1
  140. package/dist/error-report/environment.d.ts.map +1 -1
  141. package/dist/error-report/errorInfo.d.ts.map +1 -1
  142. package/dist/error-report/errorReportCaptureLimits.d.ts +26 -0
  143. package/dist/error-report/errorReportCaptureLimits.d.ts.map +1 -0
  144. package/dist/error-report/errorReportContractConstants.d.ts +32 -0
  145. package/dist/error-report/errorReportContractConstants.d.ts.map +1 -0
  146. package/dist/error-report/index.js +586 -587
  147. package/dist/error-report/index.js.map +1 -1
  148. package/dist/error-report/payload.d.ts.map +1 -1
  149. package/dist/error-report/queue.d.ts.map +1 -1
  150. package/dist/error-report/queueContract.d.ts +7 -6
  151. package/dist/error-report/queueContract.d.ts.map +1 -1
  152. package/dist/error-report/queueRecord.d.ts.map +1 -1
  153. package/dist/error-report/queueResultConstants.d.ts +14 -0
  154. package/dist/error-report/queueResultConstants.d.ts.map +1 -0
  155. package/dist/error-report/runtimeDeduplication.d.ts +2 -1
  156. package/dist/error-report/runtimeDeduplication.d.ts.map +1 -1
  157. package/dist/error-report/safeValue.d.ts.map +1 -1
  158. package/dist/error-report/safeValueMarkerConstants.d.ts +16 -0
  159. package/dist/error-report/safeValueMarkerConstants.d.ts.map +1 -0
  160. package/dist/error-report/schema.d.ts.map +1 -1
  161. package/dist/error-report/types.d.ts +10 -8
  162. package/dist/error-report/types.d.ts.map +1 -1
  163. package/dist/error-report-source-maps/archive.d.ts.map +1 -1
  164. package/dist/error-report-source-maps/artifact.d.ts.map +1 -1
  165. package/dist/error-report-source-maps/index.js +238 -238
  166. package/dist/error-report-source-maps/index.js.map +1 -1
  167. package/dist/error-report-source-maps/manifest.d.ts.map +1 -1
  168. package/dist/error-report-source-maps/package.d.ts.map +1 -1
  169. package/dist/error-report-source-maps/sourceMapArtifactConstants.d.ts +11 -0
  170. package/dist/error-report-source-maps/sourceMapArtifactConstants.d.ts.map +1 -0
  171. package/dist/error-report-source-maps/symbolicate.d.ts.map +1 -1
  172. package/dist/error-report-source-maps/symbolicationResultConstants.d.ts +6 -0
  173. package/dist/error-report-source-maps/symbolicationResultConstants.d.ts.map +1 -0
  174. package/dist/error-report-source-maps/types.d.ts +4 -2
  175. package/dist/error-report-source-maps/types.d.ts.map +1 -1
  176. package/dist/excel/excel.d.ts.map +1 -1
  177. package/dist/excel/excelWorkbookConstants.d.ts +6 -0
  178. package/dist/excel/excelWorkbookConstants.d.ts.map +1 -0
  179. package/dist/excel/index.js +121 -120
  180. package/dist/excel/index.js.map +1 -1
  181. package/dist/excel/matrixWorkbook.d.ts +6 -1
  182. package/dist/excel/matrixWorkbook.d.ts.map +1 -1
  183. package/dist/excel/tableExport.d.ts +2 -2
  184. package/dist/excel/tableExport.d.ts.map +1 -1
  185. package/dist/file/checkFileSignature.d.ts.map +1 -1
  186. package/dist/file/contentDisposition.d.ts.map +1 -1
  187. package/dist/file/fileSignatureConstants.d.ts +14 -18
  188. package/dist/file/fileSignatureConstants.d.ts.map +1 -1
  189. package/dist/file/fileSignatureTypes.d.ts +3 -3
  190. package/dist/file/fileSignatureTypes.d.ts.map +1 -1
  191. package/dist/file/image/imageReadConstants.d.ts +3 -0
  192. package/dist/file/image/imageReadConstants.d.ts.map +1 -0
  193. package/dist/file/image/readImageFile.d.ts +3 -2
  194. package/dist/file/image/readImageFile.d.ts.map +1 -1
  195. package/dist/file/image/types.d.ts +5 -3
  196. package/dist/file/image/types.d.ts.map +1 -1
  197. package/dist/file/index.js +139 -165
  198. package/dist/file/index.js.map +1 -1
  199. package/dist/file/mimeType.d.ts.map +1 -1
  200. package/dist/file/mimeTypeConstants.d.ts +18 -0
  201. package/dist/file/mimeTypeConstants.d.ts.map +1 -0
  202. package/dist/file/read-file/assert.d.ts.map +1 -1
  203. package/dist/file/read-file/readFile.d.ts +3 -11
  204. package/dist/file/read-file/readFile.d.ts.map +1 -1
  205. package/dist/file/read-file/readFileConstants.d.ts +13 -0
  206. package/dist/file/read-file/readFileConstants.d.ts.map +1 -0
  207. package/dist/file/read-file/types.d.ts +7 -6
  208. package/dist/file/read-file/types.d.ts.map +1 -1
  209. package/dist/file/signature/checkArchiveSignature.d.ts.map +1 -1
  210. package/dist/file-system/fileSystemConstants.d.ts +5 -0
  211. package/dist/file-system/fileSystemConstants.d.ts.map +1 -0
  212. package/dist/file-system/fileSystemTypes.d.ts +2 -1
  213. package/dist/file-system/fileSystemTypes.d.ts.map +1 -1
  214. package/dist/file-system/index.js +11 -10
  215. package/dist/file-system/index.js.map +1 -1
  216. package/dist/file-system/resolvePathInsideRoot.d.ts.map +1 -1
  217. package/dist/formatters/boolean/parseAbapBoolean.d.ts.map +1 -1
  218. package/dist/formatters/boolean/toAbapBoolean.d.ts.map +1 -1
  219. package/dist/formatters/date/calendarDate.d.ts.map +1 -1
  220. package/dist/formatters/date/calendarDateConstants.d.ts +13 -0
  221. package/dist/formatters/date/calendarDateConstants.d.ts.map +1 -0
  222. package/dist/formatters/date/calendarPeriod.d.ts +11 -2
  223. package/dist/formatters/date/calendarPeriod.d.ts.map +1 -1
  224. package/dist/formatters/date/dateFormatConstants.d.ts +17 -0
  225. package/dist/formatters/date/dateFormatConstants.d.ts.map +1 -0
  226. package/dist/formatters/date/datePatternConstants.d.ts +16 -0
  227. package/dist/formatters/date/datePatternConstants.d.ts.map +1 -0
  228. package/dist/formatters/date/datePresetNameConstants.d.ts +27 -0
  229. package/dist/formatters/date/datePresetNameConstants.d.ts.map +1 -0
  230. package/dist/formatters/date/dateRange.d.ts +3 -1
  231. package/dist/formatters/date/dateRange.d.ts.map +1 -1
  232. package/dist/formatters/date/dateValueConstants.d.ts +15 -0
  233. package/dist/formatters/date/dateValueConstants.d.ts.map +1 -0
  234. package/dist/formatters/date/educationDate.d.ts.map +1 -1
  235. package/dist/formatters/date/formatDate.d.ts.map +1 -1
  236. package/dist/formatters/date/formatInstantDateTime.d.ts.map +1 -1
  237. package/dist/formatters/date/parseDate.d.ts.map +1 -1
  238. package/dist/formatters/date/pattern.d.ts.map +1 -1
  239. package/dist/formatters/date/presets.d.ts.map +1 -1
  240. package/dist/formatters/date/types.d.ts +8 -6
  241. package/dist/formatters/date/types.d.ts.map +1 -1
  242. package/dist/formatters/formatDurationMinutes.d.ts.map +1 -1
  243. package/dist/formatters/formatFileSize.d.ts.map +1 -1
  244. package/dist/formatters/formatPhone.d.ts.map +1 -1
  245. package/dist/formatters/index.js +6 -5
  246. package/dist/formatters/normalizeLeadingZeros.d.ts.map +1 -1
  247. package/dist/formatters/number/compact.d.ts.map +1 -1
  248. package/dist/formatters/number/formatCompactNumber.d.ts.map +1 -1
  249. package/dist/formatters/number/formatNumber.d.ts.map +1 -1
  250. package/dist/formatters/number/numberFormatConstants.d.ts +11 -0
  251. package/dist/formatters/number/numberFormatConstants.d.ts.map +1 -0
  252. package/dist/formatters/number/numberPresetNameConstants.d.ts +16 -0
  253. package/dist/formatters/number/numberPresetNameConstants.d.ts.map +1 -0
  254. package/dist/formatters/number/parseNumber.d.ts.map +1 -1
  255. package/dist/formatters/number/presets.d.ts.map +1 -1
  256. package/dist/formatters/number/types.d.ts +2 -1
  257. package/dist/formatters/number/types.d.ts.map +1 -1
  258. package/dist/formatters/pipeline/clone.d.ts.map +1 -1
  259. package/dist/formatters/pipeline/definitions.d.ts.map +1 -1
  260. package/dist/formatters/pipeline/dependencies.d.ts.map +1 -1
  261. package/dist/formatters/pipeline/execute.d.ts +4 -1
  262. package/dist/formatters/pipeline/execute.d.ts.map +1 -1
  263. package/dist/formatters/pipeline/formattersPipelineConstants.d.ts +19 -0
  264. package/dist/formatters/pipeline/formattersPipelineConstants.d.ts.map +1 -0
  265. package/dist/formatters/pipeline/normalize.d.ts.map +1 -1
  266. package/dist/formatters/pipeline/pipelineValidationConstants.d.ts +40 -0
  267. package/dist/formatters/pipeline/pipelineValidationConstants.d.ts.map +1 -0
  268. package/dist/formatters/pipeline/registry.d.ts +1 -1
  269. package/dist/formatters/pipeline/registry.d.ts.map +1 -1
  270. package/dist/formatters/pipeline/rekey.d.ts.map +1 -1
  271. package/dist/formatters/pipeline/runtime.d.ts.map +1 -1
  272. package/dist/formatters/pipeline/types.d.ts +28 -25
  273. package/dist/formatters/pipeline/types.d.ts.map +1 -1
  274. package/dist/formatters/pipeline/validate.d.ts +2 -1
  275. package/dist/formatters/pipeline/validate.d.ts.map +1 -1
  276. package/dist/formatters/strings/spaceCharacterConstants.d.ts +5 -0
  277. package/dist/formatters/strings/spaceCharacterConstants.d.ts.map +1 -0
  278. package/dist/formatters/strings/stripInnerSpaces.d.ts.map +1 -1
  279. package/dist/formatters/strings/stripLeadingZeros.d.ts.map +1 -1
  280. package/dist/formatters/valueState/fixedValueStateResolver.d.ts.map +1 -1
  281. package/dist/formatters/valueState/presentation.d.ts.map +1 -1
  282. package/dist/formatters/valueState/resolveValueStateClassName.d.ts.map +1 -1
  283. package/dist/formatters/valueState/thresholdValueStateResolver.d.ts.map +1 -1
  284. package/dist/formatters/valueState/types.d.ts +2 -1
  285. package/dist/formatters/valueState/types.d.ts.map +1 -1
  286. package/dist/formatters/valueState/valueStateRegistry.d.ts.map +1 -1
  287. package/dist/formatters/valueState/valueStateResolverConstants.d.ts +6 -0
  288. package/dist/formatters/valueState/valueStateResolverConstants.d.ts.map +1 -0
  289. package/dist/formulas/execute.d.ts +3 -2
  290. package/dist/formulas/execute.d.ts.map +1 -1
  291. package/dist/formulas/index.js +1 -1
  292. package/dist/formulas/isTableFormulaDependency.d.ts.map +1 -1
  293. package/dist/formulas/tableFormulaConstants.d.ts +12 -0
  294. package/dist/formulas/tableFormulaConstants.d.ts.map +1 -0
  295. package/dist/formulas/types.d.ts +2 -1
  296. package/dist/formulas/types.d.ts.map +1 -1
  297. package/dist/formulas/validate.d.ts +2 -1
  298. package/dist/formulas/validate.d.ts.map +1 -1
  299. package/dist/hooks/index.js +110 -107
  300. package/dist/hooks/index.js.map +1 -1
  301. package/dist/hooks/useBlockBrowserZoom.d.ts.map +1 -1
  302. package/dist/hooks/useDndSortableSensors.d.ts.map +1 -1
  303. package/dist/hooks/useFloatingListbox.d.ts +15 -33
  304. package/dist/hooks/useFloatingListbox.d.ts.map +1 -1
  305. package/dist/http/index.js +8 -7
  306. package/dist/http/index.js.map +1 -1
  307. package/dist/http/textResponse.d.ts.map +1 -1
  308. package/dist/indexed-records/createIndexedRecordsSchema.d.ts.map +1 -1
  309. package/dist/indexed-records/schema.js +24 -23
  310. package/dist/indexed-records/schema.js.map +1 -1
  311. package/dist/media/breakpointConstants.d.ts +5 -0
  312. package/dist/media/breakpointConstants.d.ts.map +1 -0
  313. package/dist/media/breakpoints.d.ts +2 -1
  314. package/dist/media/breakpoints.d.ts.map +1 -1
  315. package/dist/media/createNotificationTonePlayer.d.ts.map +1 -1
  316. package/dist/media/getCurrentFontSize.d.ts.map +1 -1
  317. package/dist/media/index.js +1 -1
  318. package/dist/media/mediaQueryConstants.d.ts +3 -0
  319. package/dist/media/mediaQueryConstants.d.ts.map +1 -0
  320. package/dist/media/responsive.d.ts +1 -1
  321. package/dist/media/responsive.d.ts.map +1 -1
  322. package/dist/media/useMatchMedia.d.ts.map +1 -1
  323. package/dist/media/useMediaQuery.d.ts.map +1 -1
  324. package/dist/metadata/baseMetaTypes.d.ts +7 -0
  325. package/dist/metadata/baseMetaTypes.d.ts.map +1 -0
  326. package/dist/metadata/metadataTypes.d.ts +17 -0
  327. package/dist/metadata/metadataTypes.d.ts.map +1 -0
  328. package/dist/metadata/scalarTypeClassification.d.ts +8 -0
  329. package/dist/metadata/scalarTypeClassification.d.ts.map +1 -0
  330. package/dist/metadata/scalarTypeConstants.d.ts +21 -0
  331. package/dist/metadata/scalarTypeConstants.d.ts.map +1 -0
  332. package/dist/notifications/index.js +62 -62
  333. package/dist/notifications/index.js.map +1 -1
  334. package/dist/notifications/notificationTypeConstants.d.ts +6 -0
  335. package/dist/notifications/notificationTypeConstants.d.ts.map +1 -0
  336. package/dist/notifications/notify.d.ts.map +1 -1
  337. package/dist/notifications/store.d.ts.map +1 -1
  338. package/dist/notifications/types.d.ts +2 -1
  339. package/dist/notifications/types.d.ts.map +1 -1
  340. package/dist/number-scale/index.js +47 -46
  341. package/dist/number-scale/index.js.map +1 -1
  342. package/dist/number-scale/marksPositionConstants.d.ts +4 -0
  343. package/dist/number-scale/marksPositionConstants.d.ts.map +1 -0
  344. package/dist/number-scale/numberScale.d.ts +1 -1
  345. package/dist/number-scale/numberScale.d.ts.map +1 -1
  346. package/dist/number-scale/types.d.ts +2 -1
  347. package/dist/number-scale/types.d.ts.map +1 -1
  348. package/dist/odata-service/baseTypes.d.ts +1 -5
  349. package/dist/odata-service/baseTypes.d.ts.map +1 -1
  350. package/dist/odata-service/builder.d.ts.map +1 -1
  351. package/dist/odata-service/columns.d.ts.map +1 -1
  352. package/dist/odata-service/entityOperationConstants.d.ts +4 -0
  353. package/dist/odata-service/entityOperationConstants.d.ts.map +1 -0
  354. package/dist/odata-service/filterDefinitionConstants.d.ts +24 -0
  355. package/dist/odata-service/filterDefinitionConstants.d.ts.map +1 -0
  356. package/dist/odata-service/filterDefinitions.d.ts +19 -17
  357. package/dist/odata-service/filterDefinitions.d.ts.map +1 -1
  358. package/dist/odata-service/filterOperationConstants.d.ts +14 -0
  359. package/dist/odata-service/filterOperationConstants.d.ts.map +1 -0
  360. package/dist/odata-service/filters.d.ts.map +1 -1
  361. package/dist/odata-service/formatters.d.ts +1 -2
  362. package/dist/odata-service/formatters.d.ts.map +1 -1
  363. package/dist/odata-service/index.js +1317 -2
  364. package/dist/odata-service/index.js.map +1 -0
  365. package/dist/odata-service/odataMetadataConstants.d.ts +8 -0
  366. package/dist/odata-service/odataMetadataConstants.d.ts.map +1 -0
  367. package/dist/odata-service/parser.d.ts +1 -3
  368. package/dist/odata-service/parser.d.ts.map +1 -1
  369. package/dist/odata-service/schema.d.ts.map +1 -1
  370. package/dist/odata-service/sorts.d.ts.map +1 -1
  371. package/dist/odata-service/sqlFilters.d.ts +10 -5
  372. package/dist/odata-service/sqlFilters.d.ts.map +1 -1
  373. package/dist/odata-service/types.d.ts +13 -14
  374. package/dist/odata-service/types.d.ts.map +1 -1
  375. package/dist/odata-service/typesValidation.d.ts +1 -5
  376. package/dist/odata-service/typesValidation.d.ts.map +1 -1
  377. package/dist/pwa/index.js +72 -71
  378. package/dist/pwa/index.js.map +1 -1
  379. package/dist/pwa/sw-cache-policy.js +47 -47
  380. package/dist/pwa/sw-cache-policy.js.map +1 -1
  381. package/dist/pwa/swCachePolicy.d.ts +5 -1
  382. package/dist/pwa/swCachePolicy.d.ts.map +1 -1
  383. package/dist/pwa/useBrowserOnlineStatus.d.ts.map +1 -1
  384. package/dist/query-client/broadcast.d.ts +4 -3
  385. package/dist/query-client/broadcast.d.ts.map +1 -1
  386. package/dist/query-client/createQueryRestoreSchedulerGuard.d.ts.map +1 -1
  387. package/dist/query-client/createQueryRestoreStorage.d.ts.map +1 -1
  388. package/dist/query-client/index.js +1 -1
  389. package/dist/query-client/invalidationBroadcast.d.ts +2 -1
  390. package/dist/query-client/invalidationBroadcast.d.ts.map +1 -1
  391. package/dist/query-client/persistence.d.ts +9 -6
  392. package/dist/query-client/persistence.d.ts.map +1 -1
  393. package/dist/query-client/queryCacheEventConstants.d.ts +11 -0
  394. package/dist/query-client/queryCacheEventConstants.d.ts.map +1 -0
  395. package/dist/query-client/queryClient.d.ts +2 -1
  396. package/dist/query-client/queryClient.d.ts.map +1 -1
  397. package/dist/query-client/queryMeta.d.ts.map +1 -1
  398. package/dist/query-client/sessionPersistenceConstants.d.ts +5 -0
  399. package/dist/query-client/sessionPersistenceConstants.d.ts.map +1 -0
  400. package/dist/query-client/sessionScoped.d.ts.map +1 -1
  401. package/dist/query-client/sessionScopedResetConstants.d.ts +4 -0
  402. package/dist/query-client/sessionScopedResetConstants.d.ts.map +1 -0
  403. package/dist/query-client/sessionScopedResetLifecycleTypes.d.ts +2 -1
  404. package/dist/query-client/sessionScopedResetLifecycleTypes.d.ts.map +1 -1
  405. package/dist/seo/index.js +0 -1
  406. package/dist/seo/index.js.map +1 -1
  407. package/dist/seo/seo.d.ts +3 -2
  408. package/dist/seo/seo.d.ts.map +1 -1
  409. package/dist/seo/seoContentTypeConstants.d.ts +6 -0
  410. package/dist/seo/seoContentTypeConstants.d.ts.map +1 -0
  411. package/dist/seo/types.d.ts +2 -1
  412. package/dist/seo/types.d.ts.map +1 -1
  413. package/dist/session-storage/index.js +1 -1
  414. package/dist/table/cellSelection.d.ts.map +1 -1
  415. package/dist/table/index.js +83 -79
  416. package/dist/table/index.js.map +1 -1
  417. package/dist/table/odataAdapter.d.ts +3 -3
  418. package/dist/table/odataAdapter.d.ts.map +1 -1
  419. package/dist/table/selection.d.ts +2 -2
  420. package/dist/table/selection.d.ts.map +1 -1
  421. package/dist/table/tableColumnConstants.d.ts +5 -0
  422. package/dist/table/tableColumnConstants.d.ts.map +1 -0
  423. package/dist/table/tableSelectionConstants.d.ts +8 -0
  424. package/dist/table/tableSelectionConstants.d.ts.map +1 -0
  425. package/dist/table/tanStackFeatures.d.ts +8 -8
  426. package/dist/table/types.d.ts +5 -3
  427. package/dist/table/types.d.ts.map +1 -1
  428. package/dist/table/useTableRowSelection.d.ts +2 -2
  429. package/dist/table/useTableRowSelection.d.ts.map +1 -1
  430. package/dist/table-document/index.js +88 -87
  431. package/dist/table-document/index.js.map +1 -1
  432. package/dist/table-document/insertTableDocumentAxis.d.ts +2 -1
  433. package/dist/table-document/insertTableDocumentAxis.d.ts.map +1 -1
  434. package/dist/table-document/tableDocument.d.ts +2 -1
  435. package/dist/table-document/tableDocument.d.ts.map +1 -1
  436. package/dist/table-document/tableDocumentAxisGroups.d.ts +4 -3
  437. package/dist/table-document/tableDocumentAxisGroups.d.ts.map +1 -1
  438. package/dist/table-document/tableDocumentConstants.d.ts +8 -0
  439. package/dist/table-document/tableDocumentConstants.d.ts.map +1 -0
  440. package/dist/table-document/tableDocumentGeometry.d.ts.map +1 -1
  441. package/dist/three-scene/index.js +32 -32
  442. package/dist/three-scene/index.js.map +1 -1
  443. package/dist/three-scene/threeSceneAvailability.d.ts +4 -3
  444. package/dist/three-scene/threeSceneAvailability.d.ts.map +1 -1
  445. package/dist/three-scene/threeSceneConstants.d.ts +14 -0
  446. package/dist/three-scene/threeSceneConstants.d.ts.map +1 -0
  447. package/dist/three-scene/useThreeSceneAvailability.d.ts.map +1 -1
  448. package/dist/tree-table/index.js +1 -1
  449. package/dist/types/abapBooleanConstants.d.ts +4 -0
  450. package/dist/types/abapBooleanConstants.d.ts.map +1 -0
  451. package/dist/types/index.js.map +1 -1
  452. package/dist/types/types.d.ts +4 -2
  453. package/dist/types/types.d.ts.map +1 -1
  454. package/dist/types/valueStateConstants.d.ts +8 -0
  455. package/dist/types/valueStateConstants.d.ts.map +1 -0
  456. package/dist/utils/cloneFunctionStrategyConstants.d.ts +4 -0
  457. package/dist/utils/cloneFunctionStrategyConstants.d.ts.map +1 -0
  458. package/dist/utils/createLazyComponent.d.ts.map +1 -1
  459. package/dist/utils/deepCloneWithoutFunctions.d.ts +2 -1
  460. package/dist/utils/deepCloneWithoutFunctions.d.ts.map +1 -1
  461. package/dist/utils/deepCopyWithoutFunctions.d.ts +2 -1
  462. package/dist/utils/deepCopyWithoutFunctions.d.ts.map +1 -1
  463. package/dist/utils/index.js +2 -209
  464. package/dist/utils/keyboard.d.ts +2 -1
  465. package/dist/utils/keyboard.d.ts.map +1 -1
  466. package/dist/utils/keyboardConstants.d.ts +16 -0
  467. package/dist/utils/keyboardConstants.d.ts.map +1 -0
  468. package/dist/validators/index.js +3 -3
  469. package/dist/validators/index.js.map +1 -1
  470. package/dist/validators/validateUrl.d.ts.map +1 -1
  471. package/dist/value-transformers/execute.d.ts.map +1 -1
  472. package/dist/value-transformers/index.js +9 -6
  473. package/dist/value-transformers/index.js.map +1 -1
  474. package/dist/value-transformers/types.d.ts +3 -2
  475. package/dist/value-transformers/types.d.ts.map +1 -1
  476. package/dist/value-transformers/valueTransformerConstants.d.ts +4 -0
  477. package/dist/value-transformers/valueTransformerConstants.d.ts.map +1 -0
  478. package/package.json +6 -5
  479. package/src/binary/README.mdx +1 -1
  480. package/src/dom/README.mdx +1 -1
  481. package/src/formatters/README.mdx +5 -0
  482. package/src/foundationLib.mdx +8 -0
  483. package/src/metadata/README.md +35 -0
  484. package/src/odata-service/README.mdx +36 -1
  485. package/src/query-client/README.mdx +4 -4
  486. package/dist/chunks/dom-BK22UmgF.js.map +0 -1
  487. package/dist/chunks/formatters-CZnnbdud.js.map +0 -1
  488. package/dist/chunks/formulas-BXT_XBWI.js.map +0 -1
  489. package/dist/chunks/media-WK38KtMl.js +0 -191
  490. package/dist/chunks/media-WK38KtMl.js.map +0 -1
  491. package/dist/chunks/odata-service-tp2U5yIr.js +0 -2211
  492. package/dist/chunks/odata-service-tp2U5yIr.js.map +0 -1
  493. package/dist/chunks/query-client-CVRfrYZM.js.map +0 -1
  494. package/dist/chunks/uuid-CUJPAbRY.js.map +0 -1
  495. package/dist/chunks/validate-CEQHqevt.js +0 -608
  496. package/dist/chunks/validate-CEQHqevt.js.map +0 -1
  497. package/dist/utils/index.js.map +0 -1
@@ -1,10 +1,13 @@
1
+ //#region src/formulas/tableFormulaConstants.ts
2
+ var e = "formula_not_found", t = "runtime_error", n = "dependency_index_out_of_range", r = "unused_dependencies", i = "formula_does_not_use_dependencies", a = "formula_runtime_error";
3
+ //#endregion
1
4
  //#region src/formulas/isTableFormulaDependency.ts
2
- function e(e) {
5
+ function o(e) {
3
6
  return typeof e == "string" ? !0 : typeof e != "object" || !e || Array.isArray(e) ? !1 : "kind" in e && e.kind === "constant" && "value" in e && typeof e.value == "number" && Number.isFinite(e.value);
4
7
  }
5
8
  //#endregion
6
9
  //#region src/formulas/registry.ts
7
- function t(e) {
10
+ function s(e) {
8
11
  let t = /* @__PURE__ */ new Map(), n = [];
9
12
  for (let r of e) {
10
13
  let e = r.id.trim();
@@ -24,34 +27,34 @@ function t(e) {
24
27
  byId: t
25
28
  });
26
29
  }
27
- var n = t([]);
28
- function r(e) {
29
- n = e;
30
+ var c = s([]);
31
+ function l(e) {
32
+ c = e;
30
33
  }
31
- function i() {
32
- return n.list;
34
+ function u() {
35
+ return c.list;
33
36
  }
34
- function a(e) {
37
+ function d(e) {
35
38
  let t = e?.trim();
36
- if (t) return n.byId.get(t);
39
+ if (t) return c.byId.get(t);
37
40
  }
38
41
  //#endregion
39
42
  //#region src/formulas/execute.ts
40
- function o(e) {
43
+ function f(e) {
41
44
  let t = Number(e);
42
45
  return Number.isFinite(t) ? t : 0;
43
46
  }
44
- function s(t) {
45
- return t.map((t) => {
46
- if (!e(t)) throw TypeError("Аргумент формулы должен быть ID поля или конечной числовой константой.");
47
- return typeof t == "string" ? t : {
47
+ function p(e) {
48
+ return e.map((e) => {
49
+ if (!o(e)) throw TypeError("Аргумент формулы должен быть ID поля или конечной числовой константой.");
50
+ return typeof e == "string" ? e : {
48
51
  kind: "constant",
49
- value: t.value
52
+ value: e.value
50
53
  };
51
54
  });
52
55
  }
53
- function c(e) {
54
- let t = s(e.keys ?? []), n = (n) => {
56
+ function m(e) {
57
+ let t = p(e.keys ?? []), n = (n) => {
55
58
  if (!Number.isInteger(n) || n < 0) {
56
59
  e.instrumentation?.onOutOfRangeIndex?.(n);
57
60
  return;
@@ -71,50 +74,50 @@ function c(e) {
71
74
  return typeof t == "string" ? t : void 0;
72
75
  },
73
76
  value: r,
74
- num: (e) => o(r(e))
77
+ num: (e) => f(r(e))
75
78
  };
76
79
  }
77
- function l(e) {
78
- let t = a(e.formulaId);
79
- if (!t) return {
80
+ function h(n) {
81
+ let r = d(n.formulaId);
82
+ if (!r) return {
80
83
  ok: !1,
81
- reason: "formula_not_found"
84
+ reason: e
82
85
  };
83
- let n;
86
+ let i;
84
87
  try {
85
- n = s(e.keys ?? []);
88
+ i = p(n.keys ?? []);
86
89
  } catch {
87
90
  return {
88
91
  ok: !0,
89
92
  execute: () => ({
90
93
  ok: !1,
91
- reason: "runtime_error"
94
+ reason: t
92
95
  })
93
96
  };
94
97
  }
95
- let r = {}, i = {
98
+ let a = {}, o = {
96
99
  key: (e) => {
97
- if (!Number.isInteger(e) || e < 0 || e >= n.length) return;
98
- let t = n[e];
100
+ if (!Number.isInteger(e) || e < 0 || e >= i.length) return;
101
+ let t = i[e];
99
102
  return typeof t == "string" ? t : void 0;
100
103
  },
101
104
  value: (e) => {
102
- if (!Number.isInteger(e) || e < 0 || e >= n.length) return;
103
- let t = n[e];
104
- if (t) return typeof t == "string" ? r[t] : t.value;
105
+ if (!Number.isInteger(e) || e < 0 || e >= i.length) return;
106
+ let t = i[e];
107
+ if (t) return typeof t == "string" ? a[t] : t.value;
105
108
  },
106
109
  num: (e) => {
107
- if (!Number.isInteger(e) || e < 0 || e >= n.length) return 0;
108
- let t = n[e];
109
- return t ? typeof t == "string" ? o(r[t]) : t.value : 0;
110
+ if (!Number.isInteger(e) || e < 0 || e >= i.length) return 0;
111
+ let t = i[e];
112
+ return t ? typeof t == "string" ? f(a[t]) : t.value : 0;
110
113
  }
111
114
  };
112
115
  return {
113
116
  ok: !0,
114
117
  execute: (e) => {
115
- r = e;
118
+ a = e;
116
119
  try {
117
- let e = t.fn(i);
120
+ let e = r.fn(o);
118
121
  return Number.isFinite(e) ? {
119
122
  ok: !0,
120
123
  value: e
@@ -125,14 +128,14 @@ function l(e) {
125
128
  } catch {
126
129
  return {
127
130
  ok: !1,
128
- reason: "runtime_error"
131
+ reason: t
129
132
  };
130
133
  }
131
134
  }
132
135
  };
133
136
  }
134
- function u(e) {
135
- let t = l({
137
+ function g(e) {
138
+ let t = h({
136
139
  formulaId: e.formulaId,
137
140
  keys: e.keys
138
141
  });
@@ -143,94 +146,95 @@ function u(e) {
143
146
  }
144
147
  //#endregion
145
148
  //#region src/formulas/formatTableFormulaExpression.ts
146
- function d(t, n) {
147
- return t.replace(/\$([0-9]+)/g, (t, r) => {
148
- let i = n[Number(r)];
149
- return !e(i) || i === "" ? t : typeof i == "string" ? i : i.value < 0 || Object.is(i.value, -0) ? `(${i.value})` : String(i.value);
149
+ function _(e, t) {
150
+ return e.replace(/\$([0-9]+)/g, (e, n) => {
151
+ let r = t[Number(n)];
152
+ return !o(r) || r === "" ? e : typeof r == "string" ? r : r.value < 0 || Object.is(r.value, -0) ? `(${r.value})` : String(r.value);
150
153
  });
151
154
  }
152
155
  //#endregion
153
156
  //#region src/formulas/validate.ts
154
- function f(e) {
157
+ var v = 100;
158
+ function y(e) {
155
159
  return [...e].sort((e, t) => e - t);
156
160
  }
157
- function p(e, t) {
161
+ function b(e, t) {
158
162
  return e.reduce((e, n, r) => (typeof n == "string" && (e[n] = (r + 1) * t), e), {});
159
163
  }
160
- function m(t) {
161
- let n = [], r = [], i = a(t.formulaId), o = [...t.dependencies ?? []], s = t.availableColumnIds ?? [];
162
- if (!i) return n.push({
163
- code: "formula_not_found",
164
+ function x(t) {
165
+ let s = [], c = [], l = d(t.formulaId), u = [...t.dependencies ?? []], f = t.availableColumnIds ?? [];
166
+ if (!l) return s.push({
167
+ code: e,
164
168
  message: "Формула не найдена в реестре."
165
169
  }), {
166
170
  ok: !1,
167
- errors: n,
168
- warnings: r,
171
+ errors: s,
172
+ warnings: c,
169
173
  usage: {
170
174
  usedDependencyIndexes: [],
171
175
  usedDependencyIds: [],
172
176
  requiredDependencyCount: 0
173
177
  }
174
178
  };
175
- let l = new Set(s), u = o.filter((e) => typeof e == "string" && !l.has(e));
176
- u.length > 0 && n.push({
179
+ let p = new Set(f), h = u.filter((e) => typeof e == "string" && !p.has(e));
180
+ h.length > 0 && s.push({
177
181
  code: "dependency_not_available",
178
- message: `Не найдены среди доступных полей: ${u.join(", ")}.`
182
+ message: `Не найдены среди доступных полей: ${h.join(", ")}.`
179
183
  });
180
- let m = o.flatMap((t, n) => e(t) ? [] : [n]);
181
- m.length > 0 && n.push({
184
+ let g = u.flatMap((e, t) => o(e) ? [] : [t]);
185
+ g.length > 0 && s.push({
182
186
  code: "invalid_constant",
183
- message: `Ожидаются конечные числовые константы в позициях: ${m.map((e) => `$${e}`).join(", ")}.`
187
+ message: `Ожидаются конечные числовые константы в позициях: ${g.map((e) => `$${e}`).join(", ")}.`
184
188
  });
185
- let h = /* @__PURE__ */ new Set(), g = /* @__PURE__ */ new Set(), _ = 0, v = (e) => {
189
+ let x = /* @__PURE__ */ new Set(), S = /* @__PURE__ */ new Set(), C = 0, w = (e) => {
186
190
  try {
187
- let t = c({
191
+ let t = m({
188
192
  rowData: e,
189
- keys: o,
193
+ keys: u,
190
194
  instrumentation: {
191
195
  onReadIndex: (e) => {
192
- h.add(e);
196
+ x.add(e);
193
197
  },
194
198
  onOutOfRangeIndex: (e) => {
195
- g.add(e);
199
+ S.add(e);
196
200
  }
197
201
  }
198
202
  });
199
- i.fn(t);
203
+ l.fn(t);
200
204
  } catch {
201
- _ += 1;
205
+ C += 1;
202
206
  }
203
207
  };
204
- v(p(o, 100)), v(p(o, -100));
205
- let y = f(h), b = y.length > 0 ? y[y.length - 1] + 1 : 0;
206
- g.size > 0 && n.push({
207
- code: "dependency_index_out_of_range",
208
- message: `Формула обращается к несуществующим индексам. Минимально требуется зависимостей: ${b}, выбрано: ${o.length}.`
209
- }), y.length === 0 && r.push({
210
- code: "formula_does_not_use_dependencies",
208
+ w(b(u, v)), w(b(u, -100));
209
+ let T = y(x), E = T.length > 0 ? T[T.length - 1] + 1 : 0;
210
+ S.size > 0 && s.push({
211
+ code: n,
212
+ message: `Формула обращается к несуществующим индексам. Минимально требуется зависимостей: ${E}, выбрано: ${u.length}.`
213
+ }), T.length === 0 && c.push({
214
+ code: i,
211
215
  message: "Формула не использует dependencies."
212
216
  });
213
- let x = o.filter((e, t) => !h.has(t));
214
- x.length > 0 && r.push({
215
- code: "unused_dependencies",
216
- message: `Выбраны, но не используются формулой: ${x.map((e) => d("$0", [e])).join(", ")}.`
217
- }), _ > 0 && r.push({
218
- code: "formula_runtime_error",
217
+ let D = u.filter((e, t) => !x.has(t));
218
+ D.length > 0 && c.push({
219
+ code: r,
220
+ message: `Выбраны, но не используются формулой: ${D.map((e) => _("$0", [e])).join(", ")}.`
221
+ }), C > 0 && c.push({
222
+ code: a,
219
223
  message: "На тестовых данных формула завершилась с ошибкой."
220
224
  });
221
- let S = y.map((e) => o[e]).filter((e) => typeof e == "string" && e !== "");
225
+ let O = T.map((e) => u[e]).filter((e) => typeof e == "string" && e !== "");
222
226
  return {
223
- ok: n.length === 0,
224
- errors: n,
225
- warnings: r,
227
+ ok: s.length === 0,
228
+ errors: s,
229
+ warnings: c,
226
230
  usage: {
227
- usedDependencyIndexes: y,
228
- usedDependencyIds: S,
229
- requiredDependencyCount: b
231
+ usedDependencyIndexes: T,
232
+ usedDependencyIds: O,
233
+ requiredDependencyCount: E
230
234
  }
231
235
  };
232
236
  }
233
237
  //#endregion
234
- export { u as a, a as c, c as i, i as l, d as n, r as o, l as r, t as s, m as t };
238
+ export { g as a, d as c, i as d, e as f, m as i, u as l, a as m, _ as n, l as o, r as p, h as r, s, x as t, n as u };
235
239
 
236
- //# sourceMappingURL=formulas-BXT_XBWI.js.map
240
+ //# sourceMappingURL=formulas-Y0HOcFhe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formulas-Y0HOcFhe.js","names":[],"sources":["../../src/formulas/tableFormulaConstants.ts","../../src/formulas/isTableFormulaDependency.ts","../../src/formulas/registry.ts","../../src/formulas/execute.ts","../../src/formulas/formatTableFormulaExpression.ts","../../src/formulas/validate.ts"],"sourcesContent":["/** Виды аргументов и причины отказа общие для runtime, валидации и их литеральных контрактов. */\nexport const TABLE_FORMULA_DEPENDENCY_KIND_CONSTANT = \"constant\";\nexport const TABLE_FORMULA_NOT_FOUND = \"formula_not_found\";\nexport const TABLE_FORMULA_INVALID_RESULT = \"invalid_result\";\nexport const TABLE_FORMULA_RUNTIME_ERROR = \"runtime_error\";\nexport const TABLE_FORMULA_DEPENDENCY_INDEX_OUT_OF_RANGE = \"dependency_index_out_of_range\";\nexport const TABLE_FORMULA_DEPENDENCY_NOT_AVAILABLE = \"dependency_not_available\";\nexport const TABLE_FORMULA_INVALID_CONSTANT = \"invalid_constant\";\nexport const TABLE_FORMULA_UNUSED_DEPENDENCIES = \"unused_dependencies\";\nexport const TABLE_FORMULA_DOES_NOT_USE_DEPENDENCIES = \"formula_does_not_use_dependencies\";\nexport const TABLE_FORMULA_VALIDATION_RUNTIME_ERROR = \"formula_runtime_error\";\n","import { TABLE_FORMULA_DEPENDENCY_KIND_CONSTANT } from \"./tableFormulaConstants\";\nimport { type TableFormulaDependency } from \"./types\";\n\n/** Проверяет внешний аргумент без приведения пустых строк или нечисловых значений к нулю. */\nexport function isTableFormulaDependency(value: unknown): value is TableFormulaDependency {\n\tif (typeof value === \"string\") return true;\n\tif (typeof value !== \"object\" || value === null || Array.isArray(value)) return false;\n\n\treturn (\n\t\t\"kind\" in value &&\n\t\tvalue.kind === TABLE_FORMULA_DEPENDENCY_KIND_CONSTANT &&\n\t\t\"value\" in value &&\n\t\ttypeof value.value === \"number\" &&\n\t\tNumber.isFinite(value.value)\n\t);\n}\n","import type { TableFormulaDefinition } from \"./types\";\n\nexport type TableFormulaRegistry = Readonly<{\n\tlist: readonly TableFormulaDefinition[];\n\tbyId: ReadonlyMap<string, TableFormulaDefinition>;\n}>;\n\nexport function createTableFormulaRegistry(definitions: readonly TableFormulaDefinition[]): TableFormulaRegistry {\n\tconst byId = new Map<string, TableFormulaDefinition>();\n\tconst list: TableFormulaDefinition[] = [];\n\n\tfor (const definition of definitions) {\n\t\tconst normalizedId = definition.id.trim();\n\t\tif (!normalizedId) {\n\t\t\tthrow new Error(\"Formula id не может быть пустым\");\n\t\t}\n\n\t\tif (byId.has(normalizedId)) {\n\t\t\tthrow new Error(`Найден дублирующийся formulaId: ${normalizedId}`);\n\t\t}\n\n\t\tconst normalizedDefinition: TableFormulaDefinition = Object.freeze({\n\t\t\t...definition,\n\t\t\tid: normalizedId,\n\t\t\tname: definition.name.trim(),\n\t\t\tdescription: definition.description.trim(),\n\t\t\tkeywords: definition.keywords ? [...definition.keywords] : undefined\n\t\t});\n\n\t\tbyId.set(normalizedId, normalizedDefinition);\n\t\tlist.push(normalizedDefinition);\n\t}\n\n\treturn Object.freeze({\n\t\tlist: Object.freeze(list),\n\t\tbyId\n\t});\n}\n\nlet tableFormulaRegistry = createTableFormulaRegistry([]);\n\n/**\n * Устанавливает реестр формул host-приложения для всех formula runtime API.\n *\n * Конфигурация выполняется composition root до первого чтения, валидации или\n * компиляции формулы. Библиотека намеренно не содержит прикладной каталог.\n */\nexport function configureTableFormulaRegistry(registry: TableFormulaRegistry): void {\n\ttableFormulaRegistry = registry;\n}\n\nexport function getTableFormulaList(): readonly TableFormulaDefinition[] {\n\treturn tableFormulaRegistry.list;\n}\n\nexport function getTableFormulaById(formulaId: string | undefined): TableFormulaDefinition | undefined {\n\tconst normalizedId = formulaId?.trim();\n\tif (!normalizedId) return undefined;\n\treturn tableFormulaRegistry.byId.get(normalizedId);\n}\n","import { isTableFormulaDependency } from \"./isTableFormulaDependency\";\nimport { getTableFormulaById } from \"./registry\";\nimport {\n\tTABLE_FORMULA_DEPENDENCY_KIND_CONSTANT,\n\tTABLE_FORMULA_NOT_FOUND,\n\tTABLE_FORMULA_INVALID_RESULT,\n\tTABLE_FORMULA_RUNTIME_ERROR\n} from \"./tableFormulaConstants\";\nimport { type TableFormulaContext, type TableFormulaDependency, type TableFormulaRowData } from \"./types\";\n\ntype TableFormulaContextInstrumentation = {\n\tonReadIndex?: (index: number) => void;\n\tonOutOfRangeIndex?: (index: number) => void;\n};\n\nfunction toFiniteNumberOrZero(value: unknown): number {\n\tconst normalized = Number(value);\n\treturn Number.isFinite(normalized) ? normalized : 0;\n}\n\nfunction snapshotDependencies(dependencies: readonly TableFormulaDependency[]): TableFormulaDependency[] {\n\treturn dependencies.map((dependency) => {\n\t\tif (!isTableFormulaDependency(dependency)) {\n\t\t\tthrow new TypeError(\"Аргумент формулы должен быть ID поля или конечной числовой константой.\");\n\t\t}\n\n\t\t// Снимок не должен меняться при последующем редактировании исходной конфигурации.\n\t\treturn typeof dependency === \"string\" ? dependency : { kind: TABLE_FORMULA_DEPENDENCY_KIND_CONSTANT, value: dependency.value };\n\t});\n}\n\nexport function createTableFormulaContext(args: {\n\trowData: TableFormulaRowData;\n\tkeys?: readonly TableFormulaDependency[];\n\tinstrumentation?: TableFormulaContextInstrumentation;\n}): TableFormulaContext {\n\tconst keys = snapshotDependencies(args.keys ?? []);\n\n\tconst readDependency = (index: number): TableFormulaDependency | undefined => {\n\t\tif (!Number.isInteger(index) || index < 0) {\n\t\t\targs.instrumentation?.onOutOfRangeIndex?.(index);\n\t\t\treturn undefined;\n\t\t}\n\n\t\targs.instrumentation?.onReadIndex?.(index);\n\n\t\tif (index >= keys.length) {\n\t\t\targs.instrumentation?.onOutOfRangeIndex?.(index);\n\t\t\treturn undefined;\n\t\t}\n\n\t\treturn keys[index];\n\t};\n\n\tconst readValue = (index: number): unknown => {\n\t\tconst dependency = readDependency(index);\n\t\tif (!dependency) return undefined;\n\t\treturn typeof dependency === \"string\" ? args.rowData[dependency] : dependency.value;\n\t};\n\n\treturn {\n\t\tkey: (index) => {\n\t\t\tconst dependency = readDependency(index);\n\t\t\treturn typeof dependency === \"string\" ? dependency : undefined;\n\t\t},\n\t\tvalue: readValue,\n\t\tnum: (index) => toFiniteNumberOrZero(readValue(index))\n\t};\n}\n\nexport type TableFormulaExecutionResult =\n\t| {\n\t\t\tok: true;\n\t\t\tvalue: number;\n\t }\n\t| {\n\t\t\tok: false;\n\t\t\treason: typeof TABLE_FORMULA_NOT_FOUND | typeof TABLE_FORMULA_INVALID_RESULT | typeof TABLE_FORMULA_RUNTIME_ERROR;\n\t };\n\nexport type TableFormulaCompiledExecutor = (rowData: TableFormulaRowData) => TableFormulaExecutionResult;\n\ntype CompileTableFormulaResult =\n\t| {\n\t\t\tok: true;\n\t\t\texecute: TableFormulaCompiledExecutor;\n\t }\n\t| {\n\t\t\tok: false;\n\t\t\treason: typeof TABLE_FORMULA_NOT_FOUND;\n\t };\n\nexport function compileTableFormula(args: {\n\tformulaId: string | undefined;\n\tkeys?: readonly TableFormulaDependency[];\n}): CompileTableFormulaResult {\n\tconst formula = getTableFormulaById(args.formulaId);\n\tif (!formula) {\n\t\treturn { ok: false, reason: TABLE_FORMULA_NOT_FOUND };\n\t}\n\n\tlet keys: TableFormulaDependency[];\n\ttry {\n\t\tkeys = snapshotDependencies(args.keys ?? []);\n\t} catch {\n\t\t// Ошибка новых входов проходит через прежний execution-result, без успешного расчёта с нулём.\n\t\treturn { ok: true, execute: () => ({ ok: false, reason: TABLE_FORMULA_RUNTIME_ERROR }) };\n\t}\n\tlet rowDataRef: TableFormulaRowData = {};\n\tconst context: TableFormulaContext = {\n\t\tkey: (index) => {\n\t\t\tif (!Number.isInteger(index) || index < 0 || index >= keys.length) return undefined;\n\t\t\tconst dependency = keys[index];\n\t\t\treturn typeof dependency === \"string\" ? dependency : undefined;\n\t\t},\n\t\tvalue: (index) => {\n\t\t\tif (!Number.isInteger(index) || index < 0 || index >= keys.length) return undefined;\n\t\t\tconst dependency = keys[index];\n\t\t\tif (!dependency) return undefined;\n\t\t\treturn typeof dependency === \"string\" ? rowDataRef[dependency] : dependency.value;\n\t\t},\n\t\tnum: (index) => {\n\t\t\tif (!Number.isInteger(index) || index < 0 || index >= keys.length) return 0;\n\t\t\tconst dependency = keys[index];\n\t\t\tif (!dependency) return 0;\n\t\t\treturn typeof dependency === \"string\" ? toFiniteNumberOrZero(rowDataRef[dependency]) : dependency.value;\n\t\t}\n\t};\n\n\treturn {\n\t\tok: true,\n\t\texecute: (rowData) => {\n\t\t\trowDataRef = rowData;\n\n\t\t\ttry {\n\t\t\t\tconst value = formula.fn(context);\n\t\t\t\tif (!Number.isFinite(value)) {\n\t\t\t\t\treturn { ok: false, reason: TABLE_FORMULA_INVALID_RESULT };\n\t\t\t\t}\n\n\t\t\t\treturn { ok: true, value };\n\t\t\t} catch {\n\t\t\t\treturn { ok: false, reason: TABLE_FORMULA_RUNTIME_ERROR };\n\t\t\t}\n\t\t}\n\t};\n}\n\nexport function executeTableFormula(args: {\n\tformulaId: string | undefined;\n\trowData: TableFormulaRowData;\n\tkeys?: readonly TableFormulaDependency[];\n}): TableFormulaExecutionResult {\n\tconst compiled = compileTableFormula({\n\t\tformulaId: args.formulaId,\n\t\tkeys: args.keys\n\t});\n\tif (!compiled.ok) {\n\t\treturn { ok: false, reason: compiled.reason };\n\t}\n\n\treturn compiled.execute(args.rowData);\n}\n","import { isTableFormulaDependency } from \"./isTableFormulaDependency\";\nimport { type TableFormulaDependency } from \"./types\";\n\n/**\n * Подставляет ID полей и числовые константы в шаблон превью формулы.\n *\n * Незаданные позиции остаются в виде $n, чтобы редактор мог показывать неполный\n * черновик. Подстановка однопроходная: ID сохраняются буквально, а полученный\n * текст предназначен только для отображения и никогда не исполняется.\n */\nexport function formatTableFormulaExpression(expressionTemplate: string, dependencies: readonly TableFormulaDependency[]): string {\n\treturn expressionTemplate.replace(/\\$([0-9]+)/g, (placeholder: string, index: string) => {\n\t\tconst dependency = dependencies[Number(index)];\n\t\tif (!isTableFormulaDependency(dependency) || dependency === \"\") return placeholder;\n\t\tif (typeof dependency === \"string\") return dependency;\n\n\t\t// Скобки сохраняют смысл при вычитании, делении и возведении отрицательного значения в степень.\n\t\treturn dependency.value < 0 || Object.is(dependency.value, -0) ? `(${dependency.value})` : String(dependency.value);\n\t});\n}\n","import { createTableFormulaContext } from \"./execute\";\nimport { formatTableFormulaExpression } from \"./formatTableFormulaExpression\";\nimport { isTableFormulaDependency } from \"./isTableFormulaDependency\";\nimport { getTableFormulaById } from \"./registry\";\nimport {\n\tTABLE_FORMULA_NOT_FOUND,\n\tTABLE_FORMULA_DEPENDENCY_INDEX_OUT_OF_RANGE,\n\tTABLE_FORMULA_DEPENDENCY_NOT_AVAILABLE,\n\tTABLE_FORMULA_INVALID_CONSTANT,\n\tTABLE_FORMULA_UNUSED_DEPENDENCIES,\n\tTABLE_FORMULA_DOES_NOT_USE_DEPENDENCIES,\n\tTABLE_FORMULA_VALIDATION_RUNTIME_ERROR\n} from \"./tableFormulaConstants\";\nimport { type TableFormulaDependency } from \"./types\";\n\n/** Положительная и отрицательная пробы выявляют обращения к зависимостям в разных ветках формулы. */\nconst FORMULA_VALIDATION_PROBE_VALUE = 100;\n\ntype ValidationCode =\n\t| typeof TABLE_FORMULA_NOT_FOUND\n\t| typeof TABLE_FORMULA_DEPENDENCY_INDEX_OUT_OF_RANGE\n\t| typeof TABLE_FORMULA_DEPENDENCY_NOT_AVAILABLE\n\t| typeof TABLE_FORMULA_INVALID_CONSTANT\n\t| typeof TABLE_FORMULA_UNUSED_DEPENDENCIES\n\t| typeof TABLE_FORMULA_DOES_NOT_USE_DEPENDENCIES\n\t| typeof TABLE_FORMULA_VALIDATION_RUNTIME_ERROR;\n\nexport interface TableFormulaValidationMessage {\n\tcode: ValidationCode;\n\tmessage: string;\n}\nexport interface TableFormulaDependenciesValidationResult {\n\tok: boolean;\n\terrors: TableFormulaValidationMessage[];\n\twarnings: TableFormulaValidationMessage[];\n\tusage: {\n\t\tusedDependencyIndexes: number[];\n\t\tusedDependencyIds: string[];\n\t\trequiredDependencyCount: number;\n\t};\n}\n\nfunction toSortedArray(items: Set<number>): number[] {\n\treturn [...items].sort((left, right) => left - right);\n}\n\nfunction createSampleRowData(dependencies: readonly TableFormulaDependency[], multiplier: number): Record<string, unknown> {\n\treturn dependencies.reduce<Record<string, unknown>>((acc, dependency, index) => {\n\t\t// Константа сохраняет своё значение в каждом проходе и не создаёт виртуального поля строки.\n\t\tif (typeof dependency === \"string\") acc[dependency] = (index + 1) * multiplier;\n\t\treturn acc;\n\t}, {});\n}\n\nexport function validateTableFormulaDependencies(args: {\n\tformulaId: string | undefined;\n\tdependencies?: readonly TableFormulaDependency[];\n\tavailableColumnIds?: readonly string[];\n}): TableFormulaDependenciesValidationResult {\n\tconst errors: TableFormulaValidationMessage[] = [];\n\tconst warnings: TableFormulaValidationMessage[] = [];\n\n\tconst formula = getTableFormulaById(args.formulaId);\n\tconst dependencies = [...(args.dependencies ?? [])];\n\tconst availableColumnIds = args.availableColumnIds ?? [];\n\n\tif (!formula) {\n\t\terrors.push({\n\t\t\tcode: TABLE_FORMULA_NOT_FOUND,\n\t\t\tmessage: \"Формула не найдена в реестре.\"\n\t\t});\n\n\t\treturn {\n\t\t\tok: false,\n\t\t\terrors,\n\t\t\twarnings,\n\t\t\tusage: {\n\t\t\t\tusedDependencyIndexes: [],\n\t\t\t\tusedDependencyIds: [],\n\t\t\t\trequiredDependencyCount: 0\n\t\t\t}\n\t\t};\n\t}\n\n\tconst availableSet = new Set(availableColumnIds);\n\tconst missingDependencies = dependencies.filter((dependency) => typeof dependency === \"string\" && !availableSet.has(dependency));\n\tif (missingDependencies.length > 0) {\n\t\terrors.push({\n\t\t\tcode: TABLE_FORMULA_DEPENDENCY_NOT_AVAILABLE,\n\t\t\tmessage: `Не найдены среди доступных полей: ${missingDependencies.join(\", \")}.`\n\t\t});\n\t}\n\n\tconst invalidConstantIndexes = dependencies.flatMap((dependency, index) => (isTableFormulaDependency(dependency) ? [] : [index]));\n\tif (invalidConstantIndexes.length > 0) {\n\t\terrors.push({\n\t\t\tcode: TABLE_FORMULA_INVALID_CONSTANT,\n\t\t\tmessage: `Ожидаются конечные числовые константы в позициях: ${invalidConstantIndexes.map((index) => `$${index}`).join(\", \")}.`\n\t\t});\n\t}\n\n\tconst usedIndexes = new Set<number>();\n\tconst outOfRangeIndexes = new Set<number>();\n\tlet runtimeErrorCount = 0;\n\n\tconst runValidationPass = (sampleRowData: Record<string, unknown>) => {\n\t\ttry {\n\t\t\tconst context = createTableFormulaContext({\n\t\t\t\trowData: sampleRowData,\n\t\t\t\tkeys: dependencies,\n\t\t\t\tinstrumentation: {\n\t\t\t\t\tonReadIndex: (index) => {\n\t\t\t\t\t\tusedIndexes.add(index);\n\t\t\t\t\t},\n\t\t\t\t\tonOutOfRangeIndex: (index) => {\n\t\t\t\t\t\toutOfRangeIndexes.add(index);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\tformula.fn(context);\n\t\t} catch {\n\t\t\truntimeErrorCount += 1;\n\t\t}\n\t};\n\n\t// Несколько прогонов повышают шанс увидеть обращения к индексам в разных ветках формулы.\n\trunValidationPass(createSampleRowData(dependencies, FORMULA_VALIDATION_PROBE_VALUE));\n\trunValidationPass(createSampleRowData(dependencies, -FORMULA_VALIDATION_PROBE_VALUE));\n\n\tconst sortedUsedIndexes = toSortedArray(usedIndexes);\n\tconst requiredDependencyCount = sortedUsedIndexes.length > 0 ? sortedUsedIndexes[sortedUsedIndexes.length - 1] + 1 : 0;\n\n\tif (outOfRangeIndexes.size > 0) {\n\t\terrors.push({\n\t\t\tcode: TABLE_FORMULA_DEPENDENCY_INDEX_OUT_OF_RANGE,\n\t\t\tmessage: `Формула обращается к несуществующим индексам. Минимально требуется зависимостей: ${requiredDependencyCount}, выбрано: ${dependencies.length}.`\n\t\t});\n\t}\n\n\tif (sortedUsedIndexes.length === 0) {\n\t\twarnings.push({\n\t\t\tcode: TABLE_FORMULA_DOES_NOT_USE_DEPENDENCIES,\n\t\t\tmessage: \"Формула не использует dependencies.\"\n\t\t});\n\t}\n\n\tconst unusedDependencies = dependencies.filter((_, index) => !usedIndexes.has(index));\n\tif (unusedDependencies.length > 0) {\n\t\twarnings.push({\n\t\t\tcode: TABLE_FORMULA_UNUSED_DEPENDENCIES,\n\t\t\tmessage: `Выбраны, но не используются формулой: ${unusedDependencies.map((dependency) => formatTableFormulaExpression(\"$0\", [dependency])).join(\", \")}.`\n\t\t});\n\t}\n\n\tif (runtimeErrorCount > 0) {\n\t\twarnings.push({\n\t\t\tcode: TABLE_FORMULA_VALIDATION_RUNTIME_ERROR,\n\t\t\tmessage: \"На тестовых данных формула завершилась с ошибкой.\"\n\t\t});\n\t}\n\n\tconst usedDependencyIds = sortedUsedIndexes\n\t\t.map((index) => dependencies[index])\n\t\t.filter((dependency): dependency is string => typeof dependency === \"string\" && dependency !== \"\");\n\n\treturn {\n\t\tok: errors.length === 0,\n\t\terrors,\n\t\twarnings,\n\t\tusage: {\n\t\t\tusedDependencyIndexes: sortedUsedIndexes,\n\t\t\tusedDependencyIds,\n\t\t\trequiredDependencyCount\n\t\t}\n\t};\n}\n"],"mappings":";AACA,IACa,IAA0B,qBAE1B,IAA8B,iBAC9B,IAA8C,iCAG9C,IAAoC,uBACpC,IAA0C,qCAC1C,IAAyC;;;ACNtD,SAAgB,EAAyB,GAAiD;CAIzF,OAHI,OAAO,KAAU,WAAiB,KAClC,OAAO,KAAU,aAAY,KAAkB,MAAM,QAAQ,CAAK,IAAU,KAG/E,UAAU,KACV,EAAM,SAAA,cACN,WAAW,KACX,OAAO,EAAM,SAAU,YACvB,OAAO,SAAS,EAAM,KAAK;AAE7B;;;ACRA,SAAgB,EAA2B,GAAsE;CAChH,IAAM,oBAAO,IAAI,IAAoC,GAC/C,IAAiC,CAAC;CAExC,KAAK,IAAM,KAAc,GAAa;EACrC,IAAM,I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0B,EAAkB,SAAS,IAAI,EAAkB,EAAkB,SAAS,KAAK,IAAI;CASrH,AAPI,EAAkB,OAAO,KAC5B,EAAO,KAAK;EACX,MAAM;EACN,SAAS,oFAAoF,EAAwB,aAAa,EAAa,OAAO;CACvJ,CAAC,GAGE,EAAkB,WAAW,KAChC,EAAS,KAAK;EACb,MAAM;EACN,SAAS;CACV,CAAC;CAGF,IAAM,IAAqB,EAAa,QAAQ,GAAG,MAAU,CAAC,EAAY,IAAI,CAAK,CAAC;CAQpF,AAPI,EAAmB,SAAS,KAC/B,EAAS,KAAK;EACb,MAAM;EACN,SAAS,yCAAyC,EAAmB,KAAK,MAAe,EAA6B,MAAM,CAAC,CAAU,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE;CACvJ,CAAC,GAGE,IAAoB,KACvB,EAAS,KAAK;EACb,MAAM;EACN,SAAS;CACV,CAAC;CAGF,IAAM,IAAoB,EACxB,KAAK,MAAU,EAAa,EAAM,CAAC,CACnC,QAAQ,MAAqC,OAAO,KAAe,YAAY,MAAe,EAAE;CAElG,OAAO;EACN,IAAI,EAAO,WAAW;EACtB;EACA;EACA,OAAO;GACN,uBAAuB;GACvB;GACA;EACD;CACD;AACD"}
@@ -0,0 +1,11 @@
1
+ //#region src/file/signature/hasSignatureBytes.ts
2
+ function e(e, t, n = 0) {
3
+ return n + t.length > e.length ? !1 : t.every((t, r) => e[n + r] === t);
4
+ }
5
+ function t(e, t) {
6
+ return e.length < t.length && e.every((e, n) => e === t[n]);
7
+ }
8
+ //#endregion
9
+ export { t as n, e as t };
10
+
11
+ //# sourceMappingURL=hasSignatureBytes-D2wO_Myl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hasSignatureBytes-D2wO_Myl.js","names":[],"sources":["../../src/file/signature/hasSignatureBytes.ts"],"sourcesContent":["/** Читаем только переданный view: соседние bytes его backing buffer не участвуют. */\nexport function hasSignatureBytes(bytes: Uint8Array, signature: readonly number[], offset = 0): boolean {\n\tif (offset + signature.length > bytes.length) return false;\n\treturn signature.every((value, index) => bytes[offset + index] === value);\n}\n\n/** Точный оборванный prefix отличаем от неизвестного представления/SFX. */\nexport function isTruncatedSignature(bytes: Uint8Array, signature: readonly number[]): boolean {\n\treturn bytes.length < signature.length && bytes.every((value, index) => value === signature[index]);\n}\n"],"mappings":";AACA,SAAgB,EAAkB,GAAmB,GAA8B,IAAS,GAAY;CAEvG,OADI,IAAS,EAAU,SAAS,EAAM,SAAe,KAC9C,EAAU,OAAO,GAAO,MAAU,EAAM,IAAS,OAAW,CAAK;AACzE;AAGA,SAAgB,EAAqB,GAAmB,GAAuC;CAC9F,OAAO,EAAM,SAAS,EAAU,UAAU,EAAM,OAAO,GAAO,MAAU,MAAU,EAAU,EAAM;AACnG"}
@@ -0,0 +1,6 @@
1
+ //#region src/utils/keyboardConstants.ts
2
+ var e = "Enter", t = "Escape", n = "Home", r = "ArrowUp", i = "ArrowDown", a = "ArrowLeft", o = "ArrowRight";
3
+ //#endregion
4
+ export { e as a, r as i, a as n, t as o, o as r, n as s, i as t };
5
+
6
+ //# sourceMappingURL=keyboardConstants-BZKskWsm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keyboardConstants-BZKskWsm.js","names":[],"sources":["../../src/utils/keyboardConstants.ts"],"sourcesContent":["/** Значения KeyboardEvent.key общие для внутренней клавиатурной навигации пакета. */\nexport const KEYBOARD_KEY_ENTER = \"Enter\";\nexport const KEYBOARD_KEY_SPACE = \" \";\nexport const KEYBOARD_KEY_ESCAPE = \"Escape\";\nexport const KEYBOARD_KEY_TAB = \"Tab\";\nexport const KEYBOARD_KEY_HOME = \"Home\";\nexport const KEYBOARD_KEY_END = \"End\";\nexport const KEYBOARD_KEY_ARROW_UP = \"ArrowUp\";\nexport const KEYBOARD_KEY_ARROW_DOWN = \"ArrowDown\";\nexport const KEYBOARD_KEY_ARROW_LEFT = \"ArrowLeft\";\nexport const KEYBOARD_KEY_ARROW_RIGHT = \"ArrowRight\";\nexport const KEYBOARD_KEY_BACKSPACE = \"Backspace\";\nexport const KEYBOARD_KEY_DELETE = \"Delete\";\nexport const KEYBOARD_KEY_PAGE_UP = \"PageUp\";\nexport const KEYBOARD_KEY_PAGE_DOWN = \"PageDown\";\n"],"mappings":";AACA,IAAa,IAAqB,SAErB,IAAsB,UAEtB,IAAoB,QAEpB,IAAwB,WACxB,IAA0B,aAC1B,IAA0B,aAC1B,IAA2B"}
@@ -0,0 +1,192 @@
1
+ import { useCallback as e, useSyncExternalStore as t } from "react";
2
+ //#region src/media/breakpoints.ts
3
+ var n = 16, r = {
4
+ mobileMax: 479.98 / n,
5
+ tabletMin: 480 / n,
6
+ tabletMax: 1151.98 / n,
7
+ laptopMin: 1152 / n
8
+ }, i = "running", a = 8, o = 20, s = 2e4, c = .04, l = 1.5, u = .3, d = .025, f = 1e-4;
9
+ function p(e) {
10
+ if (e.length === 0 || e.length > a || e.some((e) => ![
11
+ e.frequency,
12
+ e.offset,
13
+ e.duration,
14
+ e.volume
15
+ ].every(Number.isFinite) || e.frequency < o || e.frequency > s || e.offset < 0 || e.duration < c || e.offset + e.duration > l || e.volume < 0 || e.volume > u)) throw Error("Параметры короткого звукового сигнала не прошли проверку.");
16
+ let t = null, n = !1, r = 0, p = /* @__PURE__ */ new Set();
17
+ return {
18
+ async activate() {
19
+ if (n || typeof AudioContext > "u") return !1;
20
+ try {
21
+ return t ??= new AudioContext(), await t.resume(), !n && t.state === i;
22
+ } catch {
23
+ return !1;
24
+ }
25
+ },
26
+ play() {
27
+ if (n || !t || t.state !== i || t.currentTime < r) return !1;
28
+ let a = t;
29
+ r = a.currentTime + Math.max(...e.map((e) => e.offset + e.duration));
30
+ for (let t of e) {
31
+ let e = a.createOscillator(), n = a.createGain(), r = a.currentTime + t.offset;
32
+ e.type = "sine", e.frequency.value = t.frequency, n.gain.setValueAtTime(0, r), n.gain.linearRampToValueAtTime(t.volume, r + d), n.gain.exponentialRampToValueAtTime(f, r + t.duration), e.connect(n), n.connect(a.destination), p.add(e), e.onended = () => {
33
+ p.delete(e), e.disconnect(), n.disconnect();
34
+ }, e.start(r), e.stop(r + t.duration);
35
+ }
36
+ return !0;
37
+ },
38
+ dispose() {
39
+ if (!n) {
40
+ n = !0;
41
+ for (let e of p) e.stop();
42
+ p.clear(), t && t.close().catch(() => void 0);
43
+ }
44
+ }
45
+ };
46
+ }
47
+ //#endregion
48
+ //#region src/media/getCurrentFontSize.ts
49
+ var m = 16, h = 1.2, g = 10;
50
+ function _(e) {
51
+ if (typeof window > "u" || typeof document > "u") return m;
52
+ let t = e ?? document.documentElement, n = window.getComputedStyle(t).fontSize, r = Number.parseFloat(n);
53
+ return !Number.isFinite(r) || r <= 0 ? m : r;
54
+ }
55
+ function v(e) {
56
+ if (typeof window > "u" || typeof document > "u") return h;
57
+ let t = e ?? document.documentElement, n = window.getComputedStyle(t).lineHeight, r = Number.parseFloat(n);
58
+ return !Number.isFinite(r) || r <= 0 ? h : r / m;
59
+ }
60
+ function y() {
61
+ return _() + v() * g;
62
+ }
63
+ //#endregion
64
+ //#region src/media/pxToEm.ts
65
+ function b(e, t) {
66
+ return (e / (t ?? _())).toString();
67
+ }
68
+ //#endregion
69
+ //#region src/media/breakpointConstants.ts
70
+ var x = "mobile", S = "tablet", C = "laptop";
71
+ //#endregion
72
+ //#region src/media/responsive.ts
73
+ function w(e) {
74
+ return typeof e != "object" || !e ? !1 : "mobile" in e || "tablet" in e || "laptop" in e || "desktop" in e;
75
+ }
76
+ function T(e, t) {
77
+ if (e !== void 0) return w(e) ? t === "mobile" ? e.mobile ?? e.tablet ?? e.laptop : t === "tablet" ? e.tablet ?? e.mobile ?? e.laptop : e.laptop ?? e.tablet ?? e.mobile : e;
78
+ }
79
+ function E(e, t, n) {
80
+ let r = { ...e };
81
+ for (let e of n) r[e] = T(r[e], t);
82
+ return r;
83
+ }
84
+ //#endregion
85
+ //#region src/media/mediaQueryConstants.ts
86
+ var D = "change", O = () => {};
87
+ function k(e, t) {
88
+ return typeof window > "u" || typeof window.matchMedia != "function" ? t : window.matchMedia(e).matches;
89
+ }
90
+ function A(e, t) {
91
+ if (typeof window > "u" || typeof window.matchMedia != "function") return O;
92
+ let n = window.matchMedia(e);
93
+ return typeof n.addEventListener == "function" ? (n.addEventListener(D, t), () => n.removeEventListener(D, t)) : (n.addListener(t), () => n.removeListener(t));
94
+ }
95
+ function j(n, { ssrFallback: r = !1 } = {}) {
96
+ let i = e((e) => A(n, e), [n]), a = e(() => k(n, r), [n, r]), o = e(() => r, [r]);
97
+ return t(i, a, o);
98
+ }
99
+ //#endregion
100
+ //#region src/media/useMatchMedia.ts
101
+ function M(e, t) {
102
+ return "addEventListener" in e ? (e.addEventListener(D, t), () => e.removeEventListener(D, t)) : (e.addListener(t), () => e.removeListener(t));
103
+ }
104
+ function N(e) {
105
+ let t = (t) => t * e, n = t(r.mobileMax), i = t(r.tabletMin), a = t(r.tabletMax), o = t(r.laptopMin);
106
+ return {
107
+ mobile: `(width <= ${n}px)`,
108
+ tablet: `(width >= ${i}px) and (width <= ${a}px)`,
109
+ laptop: `(width >= ${o}px)`
110
+ };
111
+ }
112
+ var P = {
113
+ matches: {
114
+ mobile: !1,
115
+ tablet: !1,
116
+ laptop: !1
117
+ },
118
+ activeBreakpoint: C
119
+ }, F = .25, I = 80, L = P, R = null, z = [], B = 0, V = !1, H = null, U = null, W = null, G = null, K = /* @__PURE__ */ new Set();
120
+ function q(e) {
121
+ return e.mobile ? x : e.tablet ? S : C;
122
+ }
123
+ function J(e, t) {
124
+ return e.mobile === t.mobile && e.tablet === t.tablet && e.laptop === t.laptop;
125
+ }
126
+ function Y(e) {
127
+ J(L.matches, e) || (L = {
128
+ matches: e,
129
+ activeBreakpoint: q(e)
130
+ }, K.forEach((e) => e()));
131
+ }
132
+ function X() {
133
+ R && Y({
134
+ mobile: R.mobile.matches,
135
+ tablet: R.tablet.matches,
136
+ laptop: R.laptop.matches
137
+ });
138
+ }
139
+ function Z() {
140
+ z.forEach((e) => e()), z = [];
141
+ }
142
+ function Q(e = !1) {
143
+ if (typeof window > "u" || typeof document > "u") return;
144
+ let t = _();
145
+ if (!e && R && Math.abs(t - B) < F) return;
146
+ B = t, Z();
147
+ let n = N(t);
148
+ R = {
149
+ mobile: window.matchMedia(n.mobile),
150
+ tablet: window.matchMedia(n.tablet),
151
+ laptop: window.matchMedia(n.laptop)
152
+ }, z = Object.keys(R).map((e) => M(R[e], X)), X();
153
+ }
154
+ function $() {
155
+ G && clearTimeout(G), G = setTimeout(() => {
156
+ G = null, Q();
157
+ }, I);
158
+ }
159
+ function ee() {
160
+ typeof window > "u" || typeof document > "u" || (H = new MutationObserver($), H.observe(document.documentElement, {
161
+ attributes: !0,
162
+ attributeFilter: [
163
+ "style",
164
+ "class",
165
+ "data-font-size"
166
+ ]
167
+ }), !(typeof ResizeObserver > "u") && (W = document.createElement("div"), W.style.position = "absolute", W.style.visibility = "hidden", W.style.pointerEvents = "none", W.style.width = "1em", W.style.height = "1px", W.style.overflow = "hidden", W.setAttribute("aria-hidden", "true"), (document.body ?? document.documentElement).appendChild(W), U = new ResizeObserver($), U.observe(W)));
168
+ }
169
+ function te() {
170
+ Z(), R = null, G &&= (clearTimeout(G), null), H &&= (H.disconnect(), null), U &&= (U.disconnect(), null), W?.parentNode && W.parentNode.removeChild(W), W = null, V = !1;
171
+ }
172
+ function ne() {
173
+ V || typeof window > "u" || typeof document > "u" || (V = !0, Q(!0), ee());
174
+ }
175
+ function re(e) {
176
+ return typeof window > "u" || typeof document > "u" ? () => {} : (K.add(e), ne(), () => {
177
+ K.delete(e), K.size === 0 && te();
178
+ });
179
+ }
180
+ function ie() {
181
+ return L;
182
+ }
183
+ function ae() {
184
+ return P;
185
+ }
186
+ function oe() {
187
+ return t(re, ie, ae);
188
+ }
189
+ //#endregion
190
+ export { T as a, _ as c, r as d, E as i, v as l, j as n, b as o, w as r, y as s, oe as t, p as u };
191
+
192
+ //# sourceMappingURL=media-imBOXWwa.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"media-imBOXWwa.js","names":[],"sources":["../../src/media/breakpoints.ts","../../src/media/createNotificationTonePlayer.ts","../../src/media/getCurrentFontSize.ts","../../src/media/pxToEm.ts","../../src/media/breakpointConstants.ts","../../src/media/responsive.ts","../../src/media/mediaQueryConstants.ts","../../src/media/useMediaQuery.ts","../../src/media/useMatchMedia.ts"],"sourcesContent":["import { type BREAKPOINT_MOBILE, type BREAKPOINT_TABLET, type BREAKPOINT_LAPTOP } from \"./breakpointConstants\";\n\n// Границы переведены из CSS px в em относительно базового размера браузерного шрифта.\nconst BREAKPOINT_BASE_FONT_SIZE_PX = 16;\n\nexport const BREAKPOINTS_EM = {\n\tmobileMax: 479.98 / BREAKPOINT_BASE_FONT_SIZE_PX,\n\ttabletMin: 480 / BREAKPOINT_BASE_FONT_SIZE_PX,\n\ttabletMax: 1151.98 / BREAKPOINT_BASE_FONT_SIZE_PX,\n\tlaptopMin: 1152 / BREAKPOINT_BASE_FONT_SIZE_PX\n} as const;\n\nexport type Breakpoint = typeof BREAKPOINT_MOBILE | typeof BREAKPOINT_TABLET | typeof BREAKPOINT_LAPTOP;\nexport type MediaMatches = Record<Breakpoint, boolean>;\n","import { type NotificationToneNote, type NotificationTonePlayer } from \"./notificationToneTypes\";\n\n// Пределы короткого сигнала и параметры его огибающей отделены от состояния AudioContext.\nconst AUDIO_CONTEXT_RUNNING_STATE = \"running\";\nconst NOTIFICATION_TONE_MAX_NOTES = 8;\nconst NOTIFICATION_TONE_MIN_FREQUENCY = 20;\nconst NOTIFICATION_TONE_MAX_FREQUENCY = 20_000;\nconst NOTIFICATION_TONE_MIN_DURATION_SECONDS = 0.04;\nconst NOTIFICATION_TONE_MAX_DURATION_SECONDS = 1.5;\nconst NOTIFICATION_TONE_MAX_VOLUME = 0.3;\nconst NOTIFICATION_TONE_ATTACK_SECONDS = 0.025;\nconst NOTIFICATION_TONE_SILENCE_GAIN = 0.0001;\n\n/**\n * Один AudioContext и ограниченный набор осцилляторов. activate вызывается из\n * жеста пользователя; доставка сама не пытается обойти autoplay policy.\n */\nexport function createNotificationTonePlayer(notes: readonly NotificationToneNote[]): NotificationTonePlayer {\n\tif (\n\t\tnotes.length === 0 ||\n\t\tnotes.length > NOTIFICATION_TONE_MAX_NOTES ||\n\t\tnotes.some(\n\t\t\t(note) =>\n\t\t\t\t![note.frequency, note.offset, note.duration, note.volume].every(Number.isFinite) ||\n\t\t\t\tnote.frequency < NOTIFICATION_TONE_MIN_FREQUENCY ||\n\t\t\t\tnote.frequency > NOTIFICATION_TONE_MAX_FREQUENCY ||\n\t\t\t\tnote.offset < 0 ||\n\t\t\t\tnote.duration < NOTIFICATION_TONE_MIN_DURATION_SECONDS ||\n\t\t\t\tnote.offset + note.duration > NOTIFICATION_TONE_MAX_DURATION_SECONDS ||\n\t\t\t\tnote.volume < 0 ||\n\t\t\t\tnote.volume > NOTIFICATION_TONE_MAX_VOLUME\n\t\t)\n\t)\n\t\tthrow new Error(\"Параметры короткого звукового сигнала не прошли проверку.\");\n\tlet context: AudioContext | null = null;\n\tlet disposed = false;\n\tlet playingUntil = 0;\n\tconst oscillators = new Set<OscillatorNode>();\n\treturn {\n\t\tasync activate() {\n\t\t\tif (disposed || typeof AudioContext === \"undefined\") return false;\n\t\t\ttry {\n\t\t\t\tcontext ??= new AudioContext();\n\t\t\t\tawait context.resume();\n\t\t\t\treturn !disposed && context.state === AUDIO_CONTEXT_RUNNING_STATE;\n\t\t\t} catch {\n\t\t\t\t// Отказ autoplay является ожидаемым результатом команды, а не ошибкой чата.\n\t\t\t\treturn false;\n\t\t\t}\n\t\t},\n\t\tplay() {\n\t\t\tif (disposed || !context || context.state !== AUDIO_CONTEXT_RUNNING_STATE || context.currentTime < playingUntil) return false;\n\t\t\tconst audio = context;\n\t\t\tplayingUntil = audio.currentTime + Math.max(...notes.map((note) => note.offset + note.duration));\n\t\t\tfor (const note of notes) {\n\t\t\t\tconst oscillator = audio.createOscillator();\n\t\t\t\tconst gain = audio.createGain();\n\t\t\t\tconst start = audio.currentTime + note.offset;\n\t\t\t\toscillator.type = \"sine\";\n\t\t\t\toscillator.frequency.value = note.frequency;\n\t\t\t\tgain.gain.setValueAtTime(0, start);\n\t\t\t\tgain.gain.linearRampToValueAtTime(note.volume, start + NOTIFICATION_TONE_ATTACK_SECONDS);\n\t\t\t\tgain.gain.exponentialRampToValueAtTime(NOTIFICATION_TONE_SILENCE_GAIN, start + note.duration);\n\t\t\t\toscillator.connect(gain);\n\t\t\t\tgain.connect(audio.destination);\n\t\t\t\toscillators.add(oscillator);\n\t\t\t\toscillator.onended = () => {\n\t\t\t\t\toscillators.delete(oscillator);\n\t\t\t\t\toscillator.disconnect();\n\t\t\t\t\tgain.disconnect();\n\t\t\t\t};\n\t\t\t\toscillator.start(start);\n\t\t\t\toscillator.stop(start + note.duration);\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\t\tdispose() {\n\t\t\tif (disposed) return;\n\t\t\tdisposed = true;\n\t\t\tfor (const oscillator of oscillators) oscillator.stop();\n\t\t\toscillators.clear();\n\t\t\tif (context) void context.close().catch(() => undefined); // Уже закрытый аппаратный audio backend больше не используется.\n\t\t}\n\t};\n}\n","const DEFAULT_FONT_SIZE = 16;\nconst DEFAULT_LINE_HEIGHT = 1.2;\nconst CONTROL_HEIGHT_LINE_HEIGHT_MULTIPLIER = 10;\n\nexport function getCurrentFontSize(element?: HTMLElement | null): number {\n\tif (typeof window === \"undefined\" || typeof document === \"undefined\") {\n\t\treturn DEFAULT_FONT_SIZE;\n\t}\n\n\tconst target = element ?? document.documentElement;\n\tconst rootFontSize = window.getComputedStyle(target).fontSize;\n\tconst fontSize = Number.parseFloat(rootFontSize);\n\n\tif (!Number.isFinite(fontSize) || fontSize <= 0) {\n\t\treturn DEFAULT_FONT_SIZE;\n\t}\n\n\treturn fontSize;\n}\n\nexport function getCurrentLineHeight(element?: HTMLElement | null): number {\n\tif (typeof window === \"undefined\" || typeof document === \"undefined\") {\n\t\treturn DEFAULT_LINE_HEIGHT;\n\t}\n\n\tconst target = element ?? document.documentElement;\n\tconst computedStyles = window.getComputedStyle(target);\n\tconst rootLineHeight = computedStyles.lineHeight;\n\tconst lineHeight = Number.parseFloat(rootLineHeight);\n\n\tif (!Number.isFinite(lineHeight) || lineHeight <= 0) {\n\t\treturn DEFAULT_LINE_HEIGHT;\n\t}\n\n\treturn lineHeight / DEFAULT_FONT_SIZE;\n}\n\nexport function getControlHeight() {\n\tconst fontSize = getCurrentFontSize();\n\tconst lineHeight = getCurrentLineHeight();\n\n\t// Правильно расчета --control-height\n\treturn fontSize + lineHeight * CONTROL_HEIGHT_LINE_HEIGHT_MULTIPLIER;\n}\n","import { getCurrentFontSize } from \"./getCurrentFontSize\";\n\nexport function pxToEm(px: number, baseEm?: number): string {\n\tconst emSize = baseEm ?? getCurrentFontSize(); // динамическая привязка\n\treturn (px / emSize).toString();\n}\n","/** Имена брейкпоинтов общие для типового контракта, responsive-значений и media store. */\nexport const BREAKPOINT_MOBILE = \"mobile\";\nexport const BREAKPOINT_TABLET = \"tablet\";\nexport const BREAKPOINT_LAPTOP = \"laptop\";\n","import { BREAKPOINT_MOBILE, BREAKPOINT_TABLET, BREAKPOINT_LAPTOP } from \"./breakpointConstants\";\nimport { type Breakpoint } from \"./breakpoints\";\n\nexport type ResponsiveMap<T> = {\n\tmobile?: T;\n\ttablet?: T;\n\tlaptop?: T;\n};\nexport type ResponsiveValue<T> = T | ResponsiveMap<T>;\nexport type UnwrapResponsive<T> = T extends ResponsiveValue<infer U> ? U : T;\n\nexport function isResponsiveMap<T>(v: ResponsiveValue<T>): v is ResponsiveMap<T> {\n\tif (typeof v !== \"object\" || v === null) return false;\n\n\t// ключевой момент: отличаем “responsive-map” от произвольного объекта T\n\treturn BREAKPOINT_MOBILE in v || BREAKPOINT_TABLET in v || BREAKPOINT_LAPTOP in v || \"desktop\" in v;\n}\n\n/**\n * Превращает объект пропсов, где некоторые поля ResponsiveValue<...>,\n * в объект, где эти поля уже \"плоские\" (U).\n */\nexport type ResolvedProps<T extends object> = {\n\t[K in keyof T]: UnwrapResponsive<T[K]>;\n};\n\n/**\n * Резолвит responsive значение под текущий брейкпоинт.\n * Приоритеты:\n * - exact match (mobile/tablet/laptop)\n * - fallback на \"первое определённое\" в предсказуемом порядке\n */\nexport function resolveResponsiveValue<T>(value: ResponsiveValue<T> | undefined, bp: Breakpoint): T | undefined {\n\tif (value === undefined) return undefined;\n\tif (!isResponsiveMap(value)) {\n\t\t// здесь value точно T (в т.ч. может быть объектом — и это ок)\n\t\treturn value;\n\t}\n\n\tif (bp === BREAKPOINT_MOBILE) return value.mobile ?? value.tablet ?? value.laptop;\n\tif (bp === BREAKPOINT_TABLET) return value.tablet ?? value.mobile ?? value.laptop;\n\n\treturn value.laptop ?? value.tablet ?? value.mobile;\n}\n\n/**\n * Типобезопасно резолвит все поля объекта по списку ключей, которые responsive.\n * (TS-магия: на выходе будет ResolvedProps<T>.)\n */\nexport function resolveProps<T extends object>(props: T, bp: Breakpoint, responsiveKeys: readonly (keyof T)[]): ResolvedProps<T> {\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tconst out: any = { ...props };\n\n\tfor (const key of responsiveKeys) {\n\t\tout[key] = resolveResponsiveValue(out[key], bp);\n\t}\n\n\treturn out as ResolvedProps<T>;\n}\n","/** Подписки разных media hooks используют одно имя события MediaQueryList. */\nexport const MEDIA_QUERY_CHANGE_EVENT = \"change\";\n","import { useCallback, useSyncExternalStore } from \"react\";\n\nimport { MEDIA_QUERY_CHANGE_EVENT } from \"./mediaQueryConstants\";\n\ntype UseMediaQueryOptions = {\n\treadonly ssrFallback?: boolean;\n};\n\nconst noop = () => {};\n\nfunction readMediaQuery(query: string, fallback: boolean): boolean {\n\tif (typeof window === \"undefined\" || typeof window.matchMedia !== \"function\") return fallback;\n\n\treturn window.matchMedia(query).matches;\n}\n\nfunction subscribeMediaQuery(query: string, listener: () => void): () => void {\n\tif (typeof window === \"undefined\" || typeof window.matchMedia !== \"function\") return noop;\n\n\tconst mql = window.matchMedia(query);\n\n\tif (typeof mql.addEventListener === \"function\") {\n\t\tmql.addEventListener(MEDIA_QUERY_CHANGE_EVENT, listener);\n\t\treturn () => mql.removeEventListener(MEDIA_QUERY_CHANGE_EVENT, listener);\n\t}\n\n\tmql.addListener(listener);\n\treturn () => mql.removeListener(listener);\n}\n\n/**\n * SSR-безопасная подписка на произвольный media query.\n * Используется для клиентских предпочтений, где значение должно совпадать с SSR fallback на гидрации.\n */\nexport function useMediaQuery(query: string, { ssrFallback = false }: UseMediaQueryOptions = {}) {\n\tconst subscribe = useCallback((listener: () => void) => subscribeMediaQuery(query, listener), [query]);\n\tconst getSnapshot = useCallback(() => readMediaQuery(query, ssrFallback), [query, ssrFallback]);\n\tconst getServerSnapshot = useCallback(() => ssrFallback, [ssrFallback]);\n\n\treturn useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n}\n","import { useSyncExternalStore } from \"react\";\n\nimport { BREAKPOINT_MOBILE, BREAKPOINT_TABLET, BREAKPOINT_LAPTOP } from \"./breakpointConstants\";\nimport { BREAKPOINTS_EM, type Breakpoint, type MediaMatches } from \"./breakpoints\";\nimport { getCurrentFontSize } from \"./getCurrentFontSize\";\nimport { MEDIA_QUERY_CHANGE_EVENT } from \"./mediaQueryConstants\";\n\n/**\n * Публичный снимок состояния, который возвращает хук/store.\n * Содержит сырые совпадения media query и вычисленный активный брейкпоинт.\n */\ntype MatchMediaSnapshot = {\n\tmatches: MediaMatches;\n\tactiveBreakpoint: Breakpoint;\n};\n\nfunction subscribeMql(mql: MediaQueryList, cb: () => void) {\n\tif (\"addEventListener\" in mql) {\n\t\tmql.addEventListener(MEDIA_QUERY_CHANGE_EVENT, cb);\n\t\treturn () => mql.removeEventListener(MEDIA_QUERY_CHANGE_EVENT, cb);\n\t}\n\t// Safari legacy\n\t// @ts-expect-error legacy api\n\tmql.addListener(cb);\n\t// @ts-expect-error legacy api\n\treturn () => mql.removeListener(cb);\n}\n\nfunction buildQueriesPx(emSize: number) {\n\tconst toPx = (em: number) => em * emSize;\n\n\tconst mobileMax = toPx(BREAKPOINTS_EM.mobileMax);\n\tconst tabletMin = toPx(BREAKPOINTS_EM.tabletMin);\n\tconst tabletMax = toPx(BREAKPOINTS_EM.tabletMax);\n\tconst laptopMin = toPx(BREAKPOINTS_EM.laptopMin);\n\n\treturn {\n\t\tmobile: `(width <= ${mobileMax}px)`,\n\t\ttablet: `(width >= ${tabletMin}px) and (width <= ${tabletMax}px)`,\n\t\tlaptop: `(width >= ${laptopMin}px)`\n\t} satisfies Record<Breakpoint, string>;\n}\n\nconst DEFAULT_MATCHES: MediaMatches = {\n\tmobile: false,\n\ttablet: false,\n\tlaptop: false\n};\n\nconst DEFAULT_SNAPSHOT: MatchMediaSnapshot = {\n\tmatches: DEFAULT_MATCHES,\n\tactiveBreakpoint: BREAKPOINT_LAPTOP\n};\n\n/**\n * Игнорируем микроколебания `em`, чтобы не перестраивать media query без необходимости.\n */\nconst EM_CHANGE_THRESHOLD = 0.25;\n/**\n * Склеиваем частые события observer-ов в одно перестроение.\n */\nconst EM_REBUILD_DEBOUNCE_MS = 80;\n\nlet snapshot: MatchMediaSnapshot = DEFAULT_SNAPSHOT;\nlet currentMql: Record<Breakpoint, MediaQueryList> | null = null;\nlet mqlUnsubs: Array<() => void> = [];\nlet emSizeRef = 0;\nlet initialized = false;\nlet mutationObserver: MutationObserver | null = null;\nlet resizeObserver: ResizeObserver | null = null;\nlet emProbeElement: HTMLDivElement | null = null;\nlet rebuildTimer: ReturnType<typeof setTimeout> | null = null;\n\nconst listeners = new Set<() => void>();\n\n/**\n * Выбирает один активный брейкпоинт по приоритету: mobile -> tablet -> laptop.\n */\nfunction getActiveBreakpoint(matches: MediaMatches): Breakpoint {\n\tif (matches.mobile) return BREAKPOINT_MOBILE;\n\tif (matches.tablet) return BREAKPOINT_TABLET;\n\treturn BREAKPOINT_LAPTOP;\n}\n\n/**\n * Поверхностное сравнение media-состояния, чтобы пропускать пустые уведомления.\n */\nfunction matchesEqual(a: MediaMatches, b: MediaMatches) {\n\treturn a.mobile === b.mobile && a.tablet === b.tablet && a.laptop === b.laptop;\n}\n\n/**\n * Обновляет глобальный snapshot и уведомляет подписчиков только при реальных изменениях.\n */\nfunction emitIfChanged(nextMatches: MediaMatches) {\n\tif (matchesEqual(snapshot.matches, nextMatches)) return;\n\tsnapshot = {\n\t\tmatches: nextMatches,\n\t\tactiveBreakpoint: getActiveBreakpoint(nextMatches)\n\t};\n\tlisteners.forEach((listener) => listener());\n}\n\n/**\n * Читает текущие значения `MediaQueryList` и публикует новый snapshot.\n */\nfunction recomputeFromMql() {\n\tif (!currentMql) return;\n\n\temitIfChanged({\n\t\tmobile: currentMql.mobile.matches,\n\t\ttablet: currentMql.tablet.matches,\n\t\tlaptop: currentMql.laptop.matches\n\t});\n}\n\n/**\n * Снимает активные mql-подписки перед перестроением/очисткой.\n */\nfunction clearMqlSubscriptions() {\n\tmqlUnsubs.forEach((unsubscribe) => unsubscribe());\n\tmqlUnsubs = [];\n}\n\n/**\n * Перестраивает media query, когда корневой `em` изменился достаточно сильно (или принудительно).\n * Это дорогой путь, поэтому он специально ограничен проверками.\n */\nfunction rebuildIfEmChanged(force = false) {\n\tif (typeof window === \"undefined\" || typeof document === \"undefined\") return;\n\n\tconst em = getCurrentFontSize();\n\tif (!force && currentMql && Math.abs(em - emSizeRef) < EM_CHANGE_THRESHOLD) return;\n\n\temSizeRef = em;\n\tclearMqlSubscriptions();\n\n\tconst queries = buildQueriesPx(em);\n\tcurrentMql = {\n\t\tmobile: window.matchMedia(queries.mobile),\n\t\ttablet: window.matchMedia(queries.tablet),\n\t\tlaptop: window.matchMedia(queries.laptop)\n\t};\n\n\tmqlUnsubs = (Object.keys(currentMql) as Breakpoint[]).map((key) => subscribeMql(currentMql![key], recomputeFromMql));\n\trecomputeFromMql();\n}\n\n/**\n * Дебаунс-обертка для перестроения query по событиям observer-ов.\n */\nfunction scheduleRebuild() {\n\tif (rebuildTimer) clearTimeout(rebuildTimer);\n\trebuildTimer = setTimeout(() => {\n\t\trebuildTimer = null;\n\t\trebuildIfEmChanged();\n\t}, EM_REBUILD_DEBOUNCE_MS);\n}\n\n/**\n * Наблюдает за изменением style/class у root и размером probe-элемента `1em`.\n * Это позволяет ловить изменения font-size/zoom без слушателя window resize.\n */\nfunction setupEmObservers() {\n\tif (typeof window === \"undefined\" || typeof document === \"undefined\") return;\n\n\tmutationObserver = new MutationObserver(scheduleRebuild);\n\tmutationObserver.observe(document.documentElement, {\n\t\tattributes: true,\n\t\tattributeFilter: [\"style\", \"class\", \"data-font-size\"]\n\t});\n\n\tif (typeof ResizeObserver === \"undefined\") return;\n\n\temProbeElement = document.createElement(\"div\");\n\temProbeElement.style.position = \"absolute\";\n\temProbeElement.style.visibility = \"hidden\";\n\temProbeElement.style.pointerEvents = \"none\";\n\temProbeElement.style.width = \"1em\";\n\temProbeElement.style.height = \"1px\";\n\temProbeElement.style.overflow = \"hidden\";\n\temProbeElement.setAttribute(\"aria-hidden\", \"true\");\n\n\t(document.body ?? document.documentElement).appendChild(emProbeElement);\n\n\tresizeObserver = new ResizeObserver(scheduleRebuild);\n\tresizeObserver.observe(emProbeElement);\n}\n\n/**\n * Полностью освобождает глобальные ресурсы, когда не осталось подписчиков.\n */\nfunction cleanupStore() {\n\tclearMqlSubscriptions();\n\tcurrentMql = null;\n\n\tif (rebuildTimer) {\n\t\tclearTimeout(rebuildTimer);\n\t\trebuildTimer = null;\n\t}\n\n\tif (mutationObserver) {\n\t\tmutationObserver.disconnect();\n\t\tmutationObserver = null;\n\t}\n\n\tif (resizeObserver) {\n\t\tresizeObserver.disconnect();\n\t\tresizeObserver = null;\n\t}\n\n\tif (emProbeElement?.parentNode) {\n\t\temProbeElement.parentNode.removeChild(emProbeElement);\n\t}\n\temProbeElement = null;\n\n\tinitialized = false;\n}\n\n/**\n * Лениво инициализирует singleton-store при первом подписчике.\n */\nfunction initializeStore() {\n\tif (initialized) return;\n\tif (typeof window === \"undefined\" || typeof document === \"undefined\") return;\n\n\tinitialized = true;\n\trebuildIfEmChanged(true);\n\tsetupEmObservers();\n}\n\n/**\n * API подписки для `useSyncExternalStore`.\n * Держит ровно один глобальный набор observer-ов и mql на всё приложение.\n */\nfunction subscribeStore(listener: () => void) {\n\tif (typeof window === \"undefined\" || typeof document === \"undefined\") {\n\t\treturn () => {};\n\t}\n\n\tlisteners.add(listener);\n\tinitializeStore();\n\n\treturn () => {\n\t\tlisteners.delete(listener);\n\t\tif (listeners.size === 0) {\n\t\t\tcleanupStore();\n\t\t}\n\t};\n}\n\n/**\n * Getter клиентского snapshot для `useSyncExternalStore`.\n */\nfunction getSnapshot() {\n\treturn snapshot;\n}\n\n/**\n * SSR-безопасный getter snapshot.\n */\nfunction getServerSnapshot() {\n\treturn DEFAULT_SNAPSHOT;\n}\n\n/**\n * Общий хук брейкпоинтов, работающий через singleton external store.\n */\nexport function useMatchMedia() {\n\treturn useSyncExternalStore(subscribeStore, getSnapshot, getServerSnapshot);\n}\n"],"mappings":";;AAGA,IAAM,IAA+B,IAExB,IAAiB;CAC7B,WAAW,SAAS;CACpB,WAAW,MAAM;CACjB,WAAW,UAAU;CACrB,WAAW,OAAO;AACnB,GCPM,IAA8B,WAC9B,IAA8B,GAC9B,IAAkC,IAClC,IAAkC,KAClC,IAAyC,KACzC,IAAyC,KACzC,IAA+B,IAC/B,IAAmC,MACnC,IAAiC;AAMvC,SAAgB,EAA6B,GAAgE;CAC5G,IACC,EAAM,WAAW,KACjB,EAAM,SAAS,KACf,EAAM,MACJ,MACA,CAAC;EAAC,EAAK;EAAW,EAAK;EAAQ,EAAK;EAAU,EAAK;CAAM,CAAC,CAAC,MAAM,OAAO,QAAQ,KAChF,EAAK,YAAY,KACjB,EAAK,YAAY,KACjB,EAAK,SAAS,KACd,EAAK,WAAW,KAChB,EAAK,SAAS,EAAK,WAAW,KAC9B,EAAK,SAAS,KACd,EAAK,SAAS,CAChB,GAEA,MAAU,MAAM,2DAA2D;CAC5E,IAAI,IAA+B,MAC/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Gf,EAAU,IAAI,CAAQ,GACtB,GAAgB,SAEH;EAEZ,AADA,EAAU,OAAO,CAAQ,GACrB,EAAU,SAAS,KACtB,GAAa;CAEf;AACD;AAKA,SAAS,KAAc;CACtB,OAAO;AACR;AAKA,SAAS,KAAoB;CAC5B,OAAO;AACR;AAKA,SAAgB,KAAgB;CAC/B,OAAO,EAAqB,IAAgB,IAAa,EAAiB;AAC3E"}
@@ -0,0 +1,6 @@
1
+ //#region src/file/mimeTypeConstants.ts
2
+ var e = "application/octet-stream", t = "application/pdf", n = "application/msword", r = "application/vnd.openxmlformats-officedocument.wordprocessingml.document", i = "application/vnd.ms-excel", a = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", o = "application/vnd.ms-powerpoint", s = "application/vnd.openxmlformats-officedocument.presentationml.presentation", c = "application/zip", l = "application/xml", u = "text/plain; charset=UTF-8", d = "image/jpeg", f = "image/png", p = "image/gif", m = "image/webp", h = "image/tiff";
3
+ //#endregion
4
+ export { h as a, e as c, s as d, u as f, c as g, l as h, f as i, t as l, a as m, p as n, m as o, i as p, d as r, n as s, r as t, o as u };
5
+
6
+ //# sourceMappingURL=mimeTypeConstants-BzONV-b1.js.map