@baseplate-dev/plugin-auth 0.6.15 → 0.6.17

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 (147) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/admin-crud-manage-roles-action.generator.d.ts +14 -28
  3. package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/generated/index.d.ts +14 -28
  4. package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/generated/template-renderers.d.ts +7 -14
  5. package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/generated/typed-templates.d.ts +7 -14
  6. package/dist/better-auth/admin/generators/admin-crud-reset-password-action/admin-crud-reset-password-action.generator.d.ts +14 -28
  7. package/dist/better-auth/admin/generators/admin-crud-reset-password-action/generated/index.d.ts +14 -28
  8. package/dist/better-auth/admin/generators/admin-crud-reset-password-action/generated/template-renderers.d.ts +7 -14
  9. package/dist/better-auth/admin/generators/admin-crud-reset-password-action/generated/typed-templates.d.ts +14 -28
  10. package/dist/better-auth/admin/generators/admin-crud-roles-column/admin-crud-roles-column.generator.d.ts +7 -14
  11. package/dist/better-auth/generators/fastify/better-auth-module/better-auth-module.generator.d.ts +9 -2
  12. package/dist/better-auth/generators/fastify/better-auth-module/better-auth-module.generator.js +6 -2
  13. package/dist/better-auth/generators/fastify/better-auth-module/generated/index.d.ts +16 -2
  14. package/dist/better-auth/generators/fastify/better-auth-module/generated/template-renderers.d.ts +8 -1
  15. package/dist/better-auth/generators/fastify/better-auth-module/generated/typed-templates.d.ts +8 -1
  16. package/dist/better-auth/generators/fastify/better-auth-module/templates/module/services/auth.ts +5 -1
  17. package/dist/better-auth/generators/react/better-auth-pages/better-auth-pages.generator.d.ts +7 -14
  18. package/dist/better-auth/generators/react/better-auth-pages/generated/index.d.ts +42 -84
  19. package/dist/better-auth/generators/react/better-auth-pages/generated/template-renderers.d.ts +7 -14
  20. package/dist/better-auth/generators/react/better-auth-pages/generated/typed-templates.d.ts +70 -140
  21. package/dist/better-auth/generators/react/react-better-auth/generated/index.d.ts +14 -28
  22. package/dist/better-auth/generators/react/react-better-auth/generated/template-renderers.d.ts +7 -14
  23. package/dist/better-auth/generators/react/react-better-auth/generated/typed-templates.d.ts +7 -14
  24. package/dist/better-auth/generators/react/react-better-auth/react-better-auth.generator.d.ts +7 -14
  25. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/admin-crud-manage-roles-action.generator.d.ts +14 -28
  26. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/index.d.ts +14 -28
  27. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/template-renderers.d.ts +7 -14
  28. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/typed-templates.d.ts +7 -14
  29. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/admin-crud-reset-password-action.generator.d.ts +14 -28
  30. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/index.d.ts +14 -28
  31. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/template-renderers.d.ts +7 -14
  32. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/typed-templates.d.ts +14 -28
  33. package/dist/local-auth/admin/generators/admin-crud-roles-column/admin-crud-roles-column.generator.d.ts +7 -14
  34. package/dist/local-auth/core/generators/auth-apollo/auth-apollo.generator.d.ts +1 -0
  35. package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.d.ts +2 -1
  36. package/dist/local-auth/core/generators/auth-email-password/generated/index.d.ts +6 -3
  37. package/dist/local-auth/core/generators/auth-email-password/generated/template-renderers.d.ts +2 -1
  38. package/dist/local-auth/core/generators/auth-email-password/generated/typed-templates.d.ts +6 -3
  39. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/email-verification.service.js +2 -2
  40. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/email-verification.service.ts +2 -2
  41. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/password-reset.service.js +2 -2
  42. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/password-reset.service.ts +2 -2
  43. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.js +6 -3
  44. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.ts +6 -3
  45. package/dist/local-auth/core/generators/auth-module/auth-module.generator.d.ts +7 -2
  46. package/dist/local-auth/core/generators/auth-module/auth-module.generator.js +3 -1
  47. package/dist/local-auth/core/generators/auth-module/generated/index.d.ts +18 -3
  48. package/dist/local-auth/core/generators/auth-module/generated/template-renderers.d.ts +6 -1
  49. package/dist/local-auth/core/generators/auth-module/generated/typed-templates.d.ts +14 -3
  50. package/dist/local-auth/core/generators/auth-module/templates/module/services/user-session.service.js +18 -16
  51. package/dist/local-auth/core/generators/auth-module/templates/module/services/user-session.service.ts +18 -16
  52. package/dist/local-auth/core/generators/auth-module/templates/module/utils/session-cookie.js +6 -6
  53. package/dist/local-auth/core/generators/auth-module/templates/module/utils/session-cookie.ts +6 -6
  54. package/dist/local-auth/core/generators/auth-routes/auth-routes.generator.d.ts +7 -14
  55. package/dist/local-auth/core/generators/auth-routes/generated/index.d.ts +42 -84
  56. package/dist/local-auth/core/generators/auth-routes/generated/template-renderers.d.ts +7 -14
  57. package/dist/local-auth/core/generators/auth-routes/generated/typed-templates.d.ts +63 -126
  58. package/dist/local-auth/core/generators/react-session/generated/index.d.ts +14 -28
  59. package/dist/local-auth/core/generators/react-session/generated/template-renderers.d.ts +7 -14
  60. package/dist/local-auth/core/generators/react-session/generated/typed-templates.d.ts +14 -28
  61. package/dist/local-auth/core/generators/react-session/react-session.generator.d.ts +7 -14
  62. package/dist/placeholder-auth/core/generators/placeholder-auth-module/placeholder-auth-module.generator.d.ts +1 -1
  63. package/dist/placeholder-auth/core/generators/placeholder-auth-module/placeholder-auth-module.generator.js +3 -1
  64. package/dist/web/assets/{_virtual_mf-localSharedImportMap___mfe_internal__plugin_mf_2_auth-D2O_GHnM.js → _virtual_mf-localSharedImportMap___mfe_internal__plugin_mf_2_auth-ChkXxpXe.js} +24 -24
  65. package/dist/web/assets/{_virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare___mf_0_baseplate_mf_2_dev_mf_1_project_mf_2_builder_mf_2_lib__loadShare__.js-DPxqayXr.js → _virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare___mf_0_baseplate_mf_2_dev_mf_1_project_mf_2_builder_mf_2_lib__loadShare__.js-CO5Pvo0y.js} +6 -5
  66. package/dist/web/assets/{_virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare___mf_0_baseplate_mf_2_dev_mf_1_project_mf_2_builder_mf_2_lib_mf_1_web__loadShare__.js-DGL7vJhO.js → _virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare___mf_0_baseplate_mf_2_dev_mf_1_project_mf_2_builder_mf_2_lib_mf_1_web__loadShare__.js-37vlYRxk.js} +2 -2
  67. package/dist/web/assets/{_virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare___mf_0_baseplate_mf_2_dev_mf_1_ui_mf_2_components__loadShare__.js-IL2CfUDN.js → _virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare___mf_0_baseplate_mf_2_dev_mf_1_ui_mf_2_components__loadShare__.js-DRSNXPPo.js} +11120 -4828
  68. package/dist/web/assets/{_virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare___mf_0_tanstack_mf_1_react_mf_2_router__loadShare__.js-olZgW088.js → _virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare___mf_0_tanstack_mf_1_react_mf_2_router__loadShare__.js-DfiQqvVC.js} +4179 -2900
  69. package/dist/web/assets/{_virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare__zod__loadShare__.js-Do-7VDVw.js → _virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare__zod__loadShare__.js-BEZ7A-cz.js} +2 -3
  70. package/dist/web/assets/arduino-BXtgMpyb.js +21 -0
  71. package/dist/web/assets/auth-BxAE0rgh.js +1 -0
  72. package/dist/web/assets/bash-Zh_IyzBN.js +192 -0
  73. package/dist/web/assets/basic-3mvohyEL.js +28 -0
  74. package/dist/web/assets/c-6gdx-Hqg.js +74 -0
  75. package/dist/web/assets/clike-Ds9lUsCq.js +41 -0
  76. package/dist/web/assets/{common-2qsch56z.js → common-ByxS61u8.js} +8 -6
  77. package/dist/web/assets/{common-D-CUPN3f.js → common-CKl_XlvH.js} +3 -3
  78. package/dist/web/assets/{common-BJslFOaI.js → common-TDf_PrjX.js} +3 -3
  79. package/dist/web/assets/{common-2sTWj7X2.js → common-UpVCKZeW.js} +8 -6
  80. package/dist/web/assets/{common-DtVPzGI9.js → common-crSwCD36.js} +3 -3
  81. package/dist/web/assets/{common-BY8yEk1M.js → common-iHaemino.js} +3 -3
  82. package/dist/web/assets/cpp-DRYAY5P6.js +82 -0
  83. package/dist/web/assets/csharp-RJBSoHJ6.js +301 -0
  84. package/dist/web/assets/css-D7TbgetL.js +70 -0
  85. package/dist/web/assets/diff-CtSa_15w.js +54 -0
  86. package/dist/web/assets/{dist-SBfmsOB2.js → dist-CrLSslv6.js} +2 -2
  87. package/dist/web/assets/{dist-DiQ4J8N0.js → dist-DY7ZXvq4.js} +1408 -916
  88. package/dist/web/assets/{get-auth-plugin-definition-gCzcUybB.js → get-auth-plugin-definition-kDCtXq_6.js} +2 -2
  89. package/dist/web/assets/go-D9nlw8GJ.js +36 -0
  90. package/dist/web/assets/{hostInit-BPDI3Q4j.js → hostInit-Cruek6c6.js} +2 -2
  91. package/dist/web/assets/ini-CU-wHLTy.js +51 -0
  92. package/dist/web/assets/java-Asfw0WtJ.js +116 -0
  93. package/dist/web/assets/javascript-fpnGEVws.js +124 -0
  94. package/dist/web/assets/json-DN8T4yFI.js +38 -0
  95. package/dist/web/assets/kotlin-zNWfDPVY.js +83 -0
  96. package/dist/web/assets/less-ZXX1tgaG.js +42 -0
  97. package/dist/web/assets/lua-D9bD4wrb.js +28 -0
  98. package/dist/web/assets/makefile-CKoRpler.js +40 -0
  99. package/dist/web/assets/markdown-ewV-vLcZ.js +278 -0
  100. package/dist/web/assets/markup-D2krQlDZ.js +176 -0
  101. package/dist/web/assets/markup-templating-c_XBo6vX.js +94 -0
  102. package/dist/web/assets/mf-entry-bootstrap-0-dfed0275.js +35 -0
  103. package/dist/web/assets/mf-entry-bootstrap-1-5275674a.js +35 -0
  104. package/dist/web/assets/{mf-entry-bootstrap-0-b337c957.js → mf-entry-bootstrap-2-39fb9255.js} +2 -2
  105. package/dist/web/assets/mf-entry-bootstrap-3-49e64336.js +35 -0
  106. package/dist/web/assets/{model-utils-BoeoBppL.js → model-utils-C0WDb_Ec.js} +269 -26
  107. package/dist/web/assets/{models-Bb8Sa9xa.js → models-BZmCbizK.js} +3 -3
  108. package/dist/web/assets/{models-CExR9mVk.js → models-DSvs_3bA.js} +3 -3
  109. package/dist/web/assets/objectivec-PkUOhxeb.js +25 -0
  110. package/dist/web/assets/perl-Cul_ma_h.js +92 -0
  111. package/dist/web/assets/php-CfWLJZIj.js +298 -0
  112. package/dist/web/assets/{plugin-definition-BSgRuyCf.js → plugin-definition-CYj29S3q.js} +3 -3
  113. package/dist/web/assets/{plugin-definition-DoLu-enC.js → plugin-definition-DOMmPL2Z.js} +3 -3
  114. package/dist/web/assets/python-CURlmZ7M.js +73 -0
  115. package/dist/web/assets/r-8lr7pbGm.js +30 -0
  116. package/dist/web/assets/regex-CxQ7DXCx.js +96 -0
  117. package/dist/web/assets/{rolldown-runtime-FZ4Itg2g.js → rolldown-runtime-7_rZTKki.js} +1 -1
  118. package/dist/web/assets/ruby-BlM93DKO.js +175 -0
  119. package/dist/web/assets/rust-CpZXpaj0.js +107 -0
  120. package/dist/web/assets/sass-DG0YAnL7.js +65 -0
  121. package/dist/web/assets/scss-BDRIqhak.js +70 -0
  122. package/dist/web/assets/sql-C-bL8_gT.js +40 -0
  123. package/dist/web/assets/{styles-Cc26Bbxc.css → styles-DIj1cIPB.css} +119 -1
  124. package/dist/web/assets/{styles-DWNihayS.js → styles-yjbHBTlw.js} +8 -8
  125. package/dist/web/assets/swift-rQ52kfab.js +107 -0
  126. package/dist/web/assets/typescript-C5BVqltI.js +57 -0
  127. package/dist/web/assets/vbnet-_PL7-T9d.js +32 -0
  128. package/dist/web/assets/{virtualExposes-ZQ3-2Iup.js → virtualExposes-CbPBmicF.js} +1 -1
  129. package/dist/web/assets/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__plugin-auth__remoteEntry_js-joyeTHHj.js → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__plugin-auth__remoteEntry_js-XM6iYVxf.js} +5 -5
  130. package/dist/web/assets/{virtual_mf-exposes-ssr___mfe_internal__plugin-auth__remoteEntry_js-Cxtxsg7w.js → virtual_mf-exposes-ssr___mfe_internal__plugin-auth__remoteEntry_js-DGjg7Brm.js} +15 -15
  131. package/dist/web/assets/{virtual_mf-exposes___mfe_internal__plugin-auth__remoteEntry_js-BzJkYZS3.js → virtual_mf-exposes___mfe_internal__plugin-auth__remoteEntry_js-B6BXIeF1.js} +15 -15
  132. package/dist/web/assets/{vite-preload-helper-iIio8xkS.js → vite-preload-helper-ARKYL6bp.js} +5 -1
  133. package/dist/web/assets/{web-pdVFZ-id.js → web-1eTcxMhf.js} +3 -3
  134. package/dist/web/assets/{web-sVeHdqQo.js → web-CDAKPPK9.js} +13 -13
  135. package/dist/web/assets/{web-CbftiK5A.js → web-CXAHKjIY.js} +19 -19
  136. package/dist/web/assets/{web-DUQ-iyMI.js → web-D0MSKfyv.js} +31 -30
  137. package/dist/web/assets/{web-BbZNg5Ko.js → web-DbeAaDTV.js} +16 -16
  138. package/dist/web/assets/{web-QvGnMr85.js → web-VqBA3jxZ.js} +13 -13
  139. package/dist/web/assets/{web-BWF6Fc7g.js → web-miDovYk_.js} +3 -3
  140. package/dist/web/assets/workerBundle-BjsY-uXx.js +10 -0
  141. package/dist/web/assets/yaml-C9m3vuV5.js +90 -0
  142. package/dist/web/index.html +5 -2
  143. package/dist/web/remoteEntry.js +1 -1
  144. package/dist/web/remoteEntry.ssr.js +2 -2
  145. package/package.json +38 -41
  146. package/dist/web/assets/auth-BA-e6ORB.js +0 -1
  147. package/dist/web/assets/index-BocHdii2.js +0 -2
@@ -1,7 +1,7 @@
1
- import { t as __commonJSMin } from "./rolldown-runtime-FZ4Itg2g.js";
2
- import { q as stringifyPrettyStable } from "./_virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare___mf_0_baseplate_mf_2_dev_mf_1_ui_mf_2_components__loadShare__.js-IL2CfUDN.js";
3
- import { n as __mf_0, t as __mfDefaultExport } from "./_virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare__zod__loadShare__.js-Do-7VDVw.js";
4
- import { $ as getTag, A as isPlainObject$1, B as int32ArrayTag, C as createPluginFieldMap, D as validationHintRegistry, E as CASE_VALIDATORS, F as dataViewTag, G as regexpTag, H as mapTag, I as dateTag, J as symbolTag, K as setTag, L as float32ArrayTag, M as arrayBufferTag, N as arrayTag, O as isEqual, P as booleanTag, Q as uint8ClampedArrayTag, R as float64ArrayTag, S as createFieldMapSpec, T as runInPluginContext, U as numberTag, V as int8ArrayTag, W as objectTag, X as uint32ArrayTag, Y as uint16ArrayTag, Z as uint8ArrayTag, _ as createRefContextSlot, a as featureEntityType, b as expressionParserSpec, c as createEntityType, d as definitionSchemaWithSlots, et as getSymbols, f as withPlaceholderSlots, g as withRef, h as withEnt, i as createFeaturesSchema, j as argumentsTag, k as isEqualsSameValueZero, l as createDefinitionSchemaParserContext, m as definitionDefaultRegistry, n as FeatureUtils, nt as createPluginSpec, o as featureNameSchema, p as withDefault, q as stringTag, r as createFeatureSchema, s as DefinitionEntityType, t as ModelUtils, tt as sortBy, u as definitionSchema, v as createRefContextSlotMap, w as getPluginContext, x as definitionRefRegistry, y as RefExpressionParser, z as int16ArrayTag } from "./model-utils-BoeoBppL.js";
1
+ import { t as __commonJSMin } from "./rolldown-runtime-7_rZTKki.js";
2
+ import { q as stringifyPrettyStable } from "./_virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare___mf_0_baseplate_mf_2_dev_mf_1_ui_mf_2_components__loadShare__.js-DRSNXPPo.js";
3
+ import { n as __mf_0, t as __mfDefaultExport } from "./_virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare__zod__loadShare__.js-BEZ7A-cz.js";
4
+ import { $ as getTag, A as isPlainObject$1, B as int32ArrayTag, C as createPluginFieldMap, D as validationHintRegistry, E as CASE_VALIDATORS, F as dataViewTag, G as regexpTag, H as mapTag, I as dateTag, J as symbolTag, K as setTag, L as float32ArrayTag, M as arrayBufferTag, N as arrayTag, O as isEqual, P as booleanTag, Q as uint8ClampedArrayTag, R as float64ArrayTag, S as createFieldMapSpec, T as runInPluginContext, U as numberTag, V as int8ArrayTag, W as objectTag, X as uint32ArrayTag, Y as uint16ArrayTag, Z as uint8ArrayTag, _ as createRefContextSlot, a as featureEntityType, b as expressionParserSpec, c as createEntityType, d as definitionSchemaWithSlots, et as getSymbols, f as withPlaceholderSlots, g as withRef, h as withEnt, i as createFeaturesSchema, j as argumentsTag, k as eq, l as createDefinitionSchemaParserContext, m as definitionDefaultRegistry, n as FeatureUtils, nt as sortBy, o as featureNameSchema, p as withDefault, q as stringTag, r as createFeatureSchema, rt as createPluginSpec, s as DefinitionEntityType, t as ModelUtils, tt as isBuffer, u as definitionSchema, v as createRefContextSlotMap, w as getPluginContext, x as definitionRefRegistry, y as RefExpressionParser, z as int16ArrayTag } from "./model-utils-C0WDb_Ec.js";
5
5
  //#region ../../packages/utils/dist/arrays/assert-no-duplicates.js
6
6
  /**
7
7
  * Asserts that an array has no duplicate values based on an optional key function.
@@ -43,7 +43,45 @@ function enhanceErrorWithContext(originalError, contextMessage) {
43
43
  return enhancedError;
44
44
  }
45
45
  //#endregion
46
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/groupBy.mjs
46
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/array/groupBy.mjs
47
+ /**
48
+ * Groups the elements of an array based on a provided key-generating function.
49
+ *
50
+ * This function takes an array and a function that generates a key from each element. It returns
51
+ * an object where the keys are the generated keys and the values are arrays of elements that share
52
+ * the same key.
53
+ *
54
+ * @template T - The type of elements in the array.
55
+ * @template K - The type of keys.
56
+ * @param arr - The array to group.
57
+ * @param getKeyFromItem - A function that generates a key from an element, its index, and the array.
58
+ * @returns An object where each key is associated with an array of elements that
59
+ * share that key.
60
+ *
61
+ * @example
62
+ * const array = [
63
+ * { category: 'fruit', name: 'apple' },
64
+ * { category: 'fruit', name: 'banana' },
65
+ * { category: 'vegetable', name: 'carrot' }
66
+ * ];
67
+ * const result = groupBy(array, item => item.category);
68
+ * // result will be:
69
+ * // {
70
+ * // fruit: [
71
+ * // { category: 'fruit', name: 'apple' },
72
+ * // { category: 'fruit', name: 'banana' }
73
+ * // ],
74
+ * // vegetable: [
75
+ * // { category: 'vegetable', name: 'carrot' }
76
+ * // ]
77
+ * // }
78
+ *
79
+ * @example
80
+ * // Using index parameter
81
+ * const items = ['a', 'b', 'c', 'd'];
82
+ * const result = groupBy(items, (item, index) => index % 2 === 0 ? 'even' : 'odd');
83
+ * // result will be: { even: ['a', 'c'], odd: ['b', 'd'] }
84
+ */
47
85
  function groupBy$1(arr, getKeyFromItem) {
48
86
  const result = {};
49
87
  for (let i = 0; i < arr.length; i++) {
@@ -55,7 +93,40 @@ function groupBy$1(arr, getKeyFromItem) {
55
93
  return result;
56
94
  }
57
95
  //#endregion
58
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/keyBy.mjs
96
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/array/keyBy.mjs
97
+ /**
98
+ * Maps each element of an array based on a provided key-generating function.
99
+ *
100
+ * This function takes an array and a function that generates a key from each element. It returns
101
+ * an object where the keys are the generated keys and the values are the corresponding elements.
102
+ * If there are multiple elements generating the same key, the last element among them is used
103
+ * as the value.
104
+ *
105
+ * @template T - The type of elements in the array.
106
+ * @template K - The type of keys.
107
+ * @param arr - The array of elements to be mapped.
108
+ * @param getKeyFromItem - A function that generates a key from an element, its index, and the array.
109
+ * @returns An object where keys are mapped to each element of an array.
110
+ *
111
+ * @example
112
+ * const array = [
113
+ * { category: 'fruit', name: 'apple' },
114
+ * { category: 'fruit', name: 'banana' },
115
+ * { category: 'vegetable', name: 'carrot' }
116
+ * ];
117
+ * const result = keyBy(array, item => item.category);
118
+ * // result will be:
119
+ * // {
120
+ * // fruit: { category: 'fruit', name: 'banana' },
121
+ * // vegetable: { category: 'vegetable', name: 'carrot' }
122
+ * // }
123
+ *
124
+ * @example
125
+ * // Using index parameter
126
+ * const items = ['a', 'b', 'c'];
127
+ * const result = keyBy(items, (item, index) => index);
128
+ * // result will be: { 0: 'a', 1: 'b', 2: 'c' }
129
+ */
59
130
  function keyBy(arr, getKeyFromItem) {
60
131
  const result = {};
61
132
  for (let i = 0; i < arr.length; i++) {
@@ -66,17 +137,42 @@ function keyBy(arr, getKeyFromItem) {
66
137
  return result;
67
138
  }
68
139
  //#endregion
69
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/predicate/isSymbol.mjs
70
- function isSymbol(value) {
71
- return typeof value === "symbol" || value instanceof Symbol;
72
- }
73
- //#endregion
74
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/uniq.mjs
140
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/array/uniq.mjs
141
+ /**
142
+ * Creates a duplicate-free version of an array.
143
+ *
144
+ * This function takes an array and returns a new array containing only the unique values
145
+ * from the original array, preserving the order of first occurrence.
146
+ *
147
+ * @template T - The type of elements in the array.
148
+ * @param arr - The array to process.
149
+ * @returns A new array with only unique values from the original array.
150
+ *
151
+ * @example
152
+ * const array = [1, 2, 2, 3, 4, 4, 5];
153
+ * const result = uniq(array);
154
+ * // result will be [1, 2, 3, 4, 5]
155
+ */
75
156
  function uniq(arr) {
76
157
  return [...new Set(arr)];
77
158
  }
78
159
  //#endregion
79
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/function/flow.mjs
160
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/function/flow.mjs
161
+ /**
162
+ * Creates a new function that executes the given functions in sequence. The return value of the previous function is passed as an argument to the next function.
163
+ *
164
+ * The `this` context of the returned function is also passed to the functions provided as parameters.
165
+ *
166
+ * @param funcs The functions to invoke.
167
+ * @returns Returns the new composite function.
168
+ *
169
+ * @example
170
+ * const add = (x: number, y: number) => x + y;
171
+ * const square = (n: number) => n * n;
172
+ *
173
+ * const combined = flow(add, square);
174
+ * console.log(combined(1, 2)); // 9
175
+ */
80
176
  function flow(...funcs) {
81
177
  return function(...args) {
82
178
  let result = funcs.length ? funcs[0].apply(this, args) : args[0];
@@ -85,22 +181,105 @@ function flow(...funcs) {
85
181
  };
86
182
  }
87
183
  //#endregion
88
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/function/identity.mjs
184
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/function/identity.mjs
185
+ /**
186
+ * Returns the input value unchanged.
187
+ *
188
+ * @template T - The type of the input value.
189
+ * @param x - The value to be returned.
190
+ * @returns The input value.
191
+ *
192
+ * @example
193
+ * // Returns 5
194
+ * identity(5);
195
+ *
196
+ * @example
197
+ * // Returns 'hello'
198
+ * identity('hello');
199
+ *
200
+ * @example
201
+ * // Returns { key: 'value' }
202
+ * identity({ key: 'value' });
203
+ */
89
204
  function identity$1(x) {
90
205
  return x;
91
206
  }
92
207
  //#endregion
93
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/predicate/isPrimitive.mjs
208
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/predicate/isPrimitive.mjs
209
+ /**
210
+ * Checks whether a value is a JavaScript primitive.
211
+ * JavaScript primitives include null, undefined, strings, numbers, booleans, symbols, and bigints.
212
+ *
213
+ * @param value The value to check.
214
+ * @returns Returns true if `value` is a primitive, false otherwise.
215
+ *
216
+ * @example
217
+ * isPrimitive(null); // true
218
+ * isPrimitive(undefined); // true
219
+ * isPrimitive('123'); // true
220
+ * isPrimitive(false); // true
221
+ * isPrimitive(true); // true
222
+ * isPrimitive(Symbol('a')); // true
223
+ * isPrimitive(123n); // true
224
+ * isPrimitive({}); // false
225
+ * isPrimitive(new Date()); // false
226
+ * isPrimitive(new Map()); // false
227
+ * isPrimitive(new Set()); // false
228
+ * isPrimitive([1, 2, 3]); // false
229
+ */
94
230
  function isPrimitive(value) {
95
231
  return value == null || typeof value !== "object" && typeof value !== "function";
96
232
  }
97
233
  //#endregion
98
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/predicate/isTypedArray.mjs
234
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/predicate/isTypedArray.mjs
235
+ /**
236
+ * Checks if a value is a TypedArray.
237
+ * @param x The value to check.
238
+ * @returns Returns true if `x` is a TypedArray, false otherwise.
239
+ *
240
+ * @example
241
+ * const arr = new Uint8Array([1, 2, 3]);
242
+ * isTypedArray(arr); // true
243
+ *
244
+ * const regularArray = [1, 2, 3];
245
+ * isTypedArray(regularArray); // false
246
+ *
247
+ * const buffer = new ArrayBuffer(16);
248
+ * isTypedArray(buffer); // false
249
+ */
99
250
  function isTypedArray(x) {
100
251
  return ArrayBuffer.isView(x) && !(x instanceof DataView);
101
252
  }
102
253
  //#endregion
103
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/object/clone.mjs
254
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/object/clone.mjs
255
+ /**
256
+ * Creates a shallow clone of the given object.
257
+ *
258
+ * @template T - The type of the object.
259
+ * @param obj - The object to clone.
260
+ * @returns A shallow clone of the given object.
261
+ *
262
+ * @example
263
+ * // Clone a primitive value
264
+ * const num = 29;
265
+ * const clonedNum = clone(num);
266
+ * console.log(clonedNum); // 29
267
+ * console.log(clonedNum === num); // true
268
+ *
269
+ * @example
270
+ * // Clone an array
271
+ * const arr = [1, 2, 3];
272
+ * const clonedArr = clone(arr);
273
+ * console.log(clonedArr); // [1, 2, 3]
274
+ * console.log(clonedArr === arr); // false
275
+ *
276
+ * @example
277
+ * // Clone an object
278
+ * const obj = { a: 1, b: 'es-toolkit', c: [1, 2, 3] };
279
+ * const clonedObj = clone(obj);
280
+ * console.log(clonedObj); // { a: 1, b: 'es-toolkit', c: [1, 2, 3] }
281
+ * console.log(clonedObj === obj); // false
282
+ */
104
283
  function clone(obj) {
105
284
  if (isPrimitive(obj)) return obj;
106
285
  if (Array.isArray(obj) || isTypedArray(obj) || obj instanceof ArrayBuffer || typeof SharedArrayBuffer !== "undefined" && obj instanceof SharedArrayBuffer) return obj.slice(0);
@@ -126,14 +305,51 @@ function clone(obj) {
126
305
  type: obj.type,
127
306
  lastModified: obj.lastModified
128
307
  });
129
- if (typeof obj === "object") {
130
- const newObject = Object.create(prototype);
131
- return Object.assign(newObject, obj);
132
- }
308
+ if (typeof obj === "object") return Object.assign(Object.create(prototype), obj);
133
309
  return obj;
134
310
  }
135
311
  //#endregion
136
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/object/cloneDeepWith.mjs
312
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/object/cloneDeepWith.mjs
313
+ /**
314
+ * Deeply clones the given object.
315
+ *
316
+ * You can customize the deep cloning process using the `cloneValue` function.
317
+ * The function takes the current value `value`, the property name `key`, and the entire object `obj` as arguments.
318
+ * If the function returns a value, that value is used;
319
+ * if it returns `undefined`, the default cloning method is used.
320
+ *
321
+ * @template T - The type of the object.
322
+ * @param obj - The object to clone.
323
+ * @param [cloneValue] - A function to customize the cloning process.
324
+ * @returns A deep clone of the given object.
325
+ *
326
+ * @example
327
+ * // Clone a primitive value
328
+ * const num = 29;
329
+ * const clonedNum = cloneDeepWith(num);
330
+ * console.log(clonedNum); // 29
331
+ * console.log(clonedNum === num); // true
332
+ *
333
+ * @example
334
+ * // Clone an object with a customizer
335
+ * const obj = { a: 1, b: 2 };
336
+ * const clonedObj = cloneDeepWith(obj, (value) => {
337
+ * if (typeof value === 'number') {
338
+ * return value * 2; // Double the number
339
+ * }
340
+ * });
341
+ * console.log(clonedObj); // { a: 2, b: 4 }
342
+ * console.log(clonedObj === obj); // false
343
+ *
344
+ * @example
345
+ * // Clone an array with a customizer
346
+ * const arr = [1, 2, 3];
347
+ * const clonedArr = cloneDeepWith(arr, (value) => {
348
+ * return value + 1; // Increment each value
349
+ * });
350
+ * console.log(clonedArr); // [2, 3, 4]
351
+ * console.log(clonedArr === arr); // false
352
+ */
137
353
  function cloneDeepWith$1(obj, cloneValue) {
138
354
  return cloneDeepWithImpl(obj, void 0, obj, /* @__PURE__ */ new Map(), cloneValue);
139
355
  }
@@ -168,7 +384,7 @@ function cloneDeepWithImpl(valueToClone, keyToClone, objectToClone, stack = /* @
168
384
  for (const value of valueToClone) result.add(cloneDeepWithImpl(value, void 0, objectToClone, stack, cloneValue));
169
385
  return result;
170
386
  }
171
- if (typeof Buffer !== "undefined" && Buffer.isBuffer(valueToClone)) return valueToClone.subarray();
387
+ if (isBuffer(valueToClone)) return valueToClone.subarray();
172
388
  if (isTypedArray(valueToClone)) {
173
389
  const result = new (Object.getPrototypeOf(valueToClone)).constructor(valueToClone.length);
174
390
  stack.set(valueToClone, result);
@@ -195,12 +411,13 @@ function cloneDeepWithImpl(valueToClone, keyToClone, objectToClone, stack = /* @
195
411
  return result;
196
412
  }
197
413
  if (valueToClone instanceof Error) {
198
- const result = new valueToClone.constructor();
414
+ const result = structuredClone(valueToClone);
199
415
  stack.set(valueToClone, result);
200
416
  result.message = valueToClone.message;
201
417
  result.name = valueToClone.name;
202
418
  result.stack = valueToClone.stack;
203
419
  result.cause = valueToClone.cause;
420
+ result.constructor = valueToClone.constructor;
204
421
  copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
205
422
  return result;
206
423
  }
@@ -266,12 +483,76 @@ function isCloneableObject(object) {
266
483
  }
267
484
  }
268
485
  //#endregion
269
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/object/cloneDeep.mjs
486
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/object/cloneDeep.mjs
487
+ /**
488
+ * Creates a deep clone of the given object.
489
+ *
490
+ * @template T - The type of the object.
491
+ * @param obj - The object to clone.
492
+ * @returns A deep clone of the given object.
493
+ *
494
+ * @example
495
+ * // Clone a primitive value
496
+ * const num = 29;
497
+ * const clonedNum = cloneDeep(num);
498
+ * console.log(clonedNum); // 29
499
+ * console.log(clonedNum === num); // true
500
+ *
501
+ * @example
502
+ * // Clone an array
503
+ * const arr = [1, 2, 3];
504
+ * const clonedArr = cloneDeep(arr);
505
+ * console.log(clonedArr); // [1, 2, 3]
506
+ * console.log(clonedArr === arr); // false
507
+ *
508
+ * @example
509
+ * // Clone an array with nested objects
510
+ * const arr = [1, { a: 1 }, [1, 2, 3]];
511
+ * const clonedArr = cloneDeep(arr);
512
+ * arr[1].a = 2;
513
+ * console.log(arr); // [1, { a: 2 }, [1, 2, 3]]
514
+ * console.log(clonedArr); // [1, { a: 1 }, [1, 2, 3]]
515
+ * console.log(clonedArr === arr); // false
516
+ *
517
+ * @example
518
+ * // Clone an object
519
+ * const obj = { a: 1, b: 'es-toolkit', c: [1, 2, 3] };
520
+ * const clonedObj = cloneDeep(obj);
521
+ * console.log(clonedObj); // { a: 1, b: 'es-toolkit', c: [1, 2, 3] }
522
+ * console.log(clonedObj === obj); // false
523
+ *
524
+ * @example
525
+ * // Clone an object with nested objects
526
+ * const obj = { a: 1, b: { c: 1 } };
527
+ * const clonedObj = cloneDeep(obj);
528
+ * obj.b.c = 2;
529
+ * console.log(obj); // { a: 1, b: { c: 2 } }
530
+ * console.log(clonedObj); // { a: 1, b: { c: 1 } }
531
+ * console.log(clonedObj === obj); // false
532
+ */
270
533
  function cloneDeep$1(obj) {
271
534
  return cloneDeepWithImpl(obj, void 0, obj, /* @__PURE__ */ new Map(), void 0);
272
535
  }
273
536
  //#endregion
274
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/object/mapValues.mjs
537
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/object/mapValues.mjs
538
+ /**
539
+ * Creates a new object with the same keys as the given object, but with values generated
540
+ * by running each own enumerable property of the object through the iteratee function.
541
+ *
542
+ * @template T - The type of the object.
543
+ * @template K - The type of the keys in the object.
544
+ * @template V - The type of the new values generated by the iteratee function.
545
+ *
546
+ * @param object - The object to iterate over.
547
+ * @param getNewValue - The function invoked per own enumerable property.
548
+ * @returns Returns the new mapped object.
549
+ *
550
+ * @example
551
+ * // Example usage:
552
+ * const obj = { a: 1, b: 2 };
553
+ * const result = mapValues(obj, (value) => value * 2);
554
+ * console.log(result); // { a: 2, b: 4 }
555
+ */
275
556
  function mapValues(object, getNewValue) {
276
557
  const result = {};
277
558
  const keys = Object.keys(object);
@@ -283,12 +564,70 @@ function mapValues(object, getNewValue) {
283
564
  return result;
284
565
  }
285
566
  //#endregion
286
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/_internal/isUnsafeProperty.mjs
567
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/_internal/isUnsafeProperty.mjs
568
+ /**
569
+ * Checks if a property key is unsafe to modify directly.
570
+ *
571
+ * This function is used in functions like `merge` to prevent prototype pollution attacks
572
+ * by identifying property keys that could modify the object's prototype chain or constructor.
573
+ *
574
+ * @param key - The property key to check
575
+ * @returns `true` if the property is unsafe to modify directly, `false` otherwise
576
+ * @internal
577
+ */
287
578
  function isUnsafeProperty(key) {
288
579
  return key === "__proto__";
289
580
  }
290
581
  //#endregion
291
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/object/mergeWith.mjs
582
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/object/mergeWith.mjs
583
+ /**
584
+ * Merges the properties of the source object into the target object.
585
+ *
586
+ * You can provide a custom `merge` function to control how properties are merged. It should return the value to be set in the target object.
587
+ *
588
+ * If it returns `undefined`, a default deep merge will be applied for arrays and objects:
589
+ *
590
+ * - If a property in the source object is an array or an object and the corresponding property in the target object is also an array or object, they will be merged.
591
+ * - If a property in the source object is undefined, it will not overwrite a defined property in the target object.
592
+ *
593
+ * Note that this function mutates the target object.
594
+ *
595
+ * @param target - The target object into which the source object properties will be merged. This object is modified in place.
596
+ * @param source - The source object whose properties will be merged into the target object.
597
+ * @param merge - A custom merge function that defines how properties should be combined. It receives the following arguments:
598
+ * - `targetValue`: The current value of the property in the target object.
599
+ * - `sourceValue`: The value of the property in the source object.
600
+ * - `key`: The key of the property being merged.
601
+ * - `target`: The target object.
602
+ * - `source`: The source object.
603
+ *
604
+ * @returns The updated target object with properties from the source object merged in.
605
+ *
606
+ * @template T - Type of the target object.
607
+ * @template S - Type of the source object.
608
+ *
609
+ * @example
610
+ * const target = { a: 1, b: 2 };
611
+ * const source = { b: 3, c: 4 };
612
+ *
613
+ * mergeWith(target, source, (targetValue, sourceValue) => {
614
+ * if (typeof targetValue === 'number' && typeof sourceValue === 'number') {
615
+ * return targetValue + sourceValue;
616
+ * }
617
+ * });
618
+ * // Returns { a: 1, b: 5, c: 4 }
619
+ * @example
620
+ * const target = { a: [1], b: [2] };
621
+ * const source = { a: [3], b: [4] };
622
+ *
623
+ * const result = mergeWith(target, source, (objValue, srcValue) => {
624
+ * if (Array.isArray(objValue)) {
625
+ * return objValue.concat(srcValue);
626
+ * }
627
+ * });
628
+ *
629
+ * expect(result).toEqual({ a: [1, 3], b: [2, 4] });
630
+ */
292
631
  function mergeWith(target, source, merge) {
293
632
  const sourceKeys = Object.keys(source);
294
633
  for (let i = 0; i < sourceKeys.length; i++) {
@@ -307,7 +646,24 @@ function mergeWith(target, source, merge) {
307
646
  return target;
308
647
  }
309
648
  //#endregion
310
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/object/omit.mjs
649
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/object/omit.mjs
650
+ /**
651
+ * Creates a new object with specified keys omitted.
652
+ *
653
+ * This function takes an object and an array of keys, and returns a new object that
654
+ * excludes the properties corresponding to the specified keys.
655
+ *
656
+ * @template T - The type of object.
657
+ * @template K - The type of keys in object.
658
+ * @param obj - The object to omit keys from.
659
+ * @param keys - An array of keys to be omitted from the object.
660
+ * @returns A new object with the specified keys omitted.
661
+ *
662
+ * @example
663
+ * const obj = { a: 1, b: 2, c: 3 };
664
+ * const result = omit(obj, ['b', 'c']);
665
+ * // result will be { a: 1 }
666
+ */
311
667
  function omit(obj, keys) {
312
668
  const result = { ...obj };
313
669
  for (let i = 0; i < keys.length; i++) {
@@ -317,7 +673,26 @@ function omit(obj, keys) {
317
673
  return result;
318
674
  }
319
675
  //#endregion
320
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/object/pickBy.mjs
676
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/object/pickBy.mjs
677
+ /**
678
+ * Creates a new object composed of the properties that satisfy the predicate function.
679
+ *
680
+ * This function takes an object and a predicate function, and returns a new object that
681
+ * includes only the properties for which the predicate function returns true.
682
+ *
683
+ * @template T - The type of object.
684
+ * @param obj - The object to pick properties from.
685
+ * @param shouldPick - A predicate function that determines
686
+ * whether a property should be picked. It takes the property's key and value as arguments and returns `true`
687
+ * if the property should be picked, and `false` otherwise.
688
+ * @returns A new object with the properties that satisfy the predicate function.
689
+ *
690
+ * @example
691
+ * const obj = { a: 1, b: 'pick', c: 3 };
692
+ * const shouldPick = (value) => typeof value === 'string';
693
+ * const result = pickBy(obj, shouldPick);
694
+ * // result will be { b: 'pick' }
695
+ */
321
696
  function pickBy(obj, shouldPick) {
322
697
  const result = {};
323
698
  const keys = Object.keys(obj);
@@ -329,14 +704,67 @@ function pickBy(obj, shouldPick) {
329
704
  return result;
330
705
  }
331
706
  //#endregion
332
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/string/capitalize.mjs
707
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/string/capitalize.mjs
708
+ /**
709
+ * Converts the first character of string to upper case and the remaining to lower case.
710
+ *
711
+ * @template T - Literal type of the string.
712
+ * @param str - The string to be converted to uppercase.
713
+ * @returns The capitalized string.
714
+ *
715
+ * @example
716
+ * const result = capitalize('fred') // returns 'Fred'
717
+ * const result2 = capitalize('FRED') // returns 'Fred'
718
+ */
333
719
  function capitalize$1(str) {
334
720
  return str.charAt(0).toUpperCase() + str.slice(1).toLowerCase();
335
721
  }
336
722
  //#endregion
337
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/object/toMerged.mjs
723
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/object/toMerged.mjs
724
+ /**
725
+ * Merges the properties of the source object into a deep clone of the target object.
726
+ * Unlike `merge`, This function does not modify the original target object.
727
+ *
728
+ * This function performs a deep merge, meaning nested objects and arrays are merged recursively.
729
+ *
730
+ * - If a property in the source object is an array or object and the corresponding property in the target object is also an array or object, they will be merged.
731
+ * - If a property in the source object is undefined, it will not overwrite a defined property in the target object.
732
+ *
733
+ * Note that this function does not mutate the target object.
734
+ *
735
+ * @param target - The target object to be cloned and merged into. This object is not modified directly.
736
+ * @param source - The source object whose properties will be merged into the cloned target object.
737
+ * @returns A new object with properties from the source object merged into a deep clone of the target object.
738
+ *
739
+ * @template T - Type of the target object.
740
+ * @template S - Type of the source object.
741
+ *
742
+ * @example
743
+ * const target = { a: 1, b: { x: 1, y: 2 } };
744
+ * const source = { b: { y: 3, z: 4 }, c: 5 };
745
+ *
746
+ * const result = toMerged(target, source);
747
+ * console.log(result);
748
+ * // Output: { a: 1, b: { x: 1, y: 3, z: 4 }, c: 5 }
749
+ *
750
+ * @example
751
+ * const target = { a: [1, 2], b: { x: 1 } };
752
+ * const source = { a: [3], b: { y: 2 } };
753
+ *
754
+ * const result = toMerged(target, source);
755
+ * console.log(result);
756
+ * // Output: { a: [3, 2], b: { x: 1, y: 2 } }
757
+ *
758
+ * @example
759
+ * const target = { a: null };
760
+ * const source = { a: [1, 2, 3] };
761
+ *
762
+ * const result = toMerged(target, source);
763
+ * console.log(result);
764
+ * // Output: { a: [1, 2, 3] }
765
+ */
338
766
  function toMerged(target, source) {
339
- return mergeWith(clone(target), source, function mergeRecursively(targetValue, sourceValue) {
767
+ return mergeWith(cloneDeep$1(target), source, function mergeRecursively(targetValue, sourceValue) {
340
768
  if (Array.isArray(sourceValue)) if (Array.isArray(targetValue)) return mergeWith(clone(targetValue), sourceValue, mergeRecursively);
341
769
  else return mergeWith([], sourceValue, mergeRecursively);
342
770
  else if (isPlainObject$1(sourceValue)) if (isPlainObject$1(targetValue)) return mergeWith(clone(targetValue), sourceValue, mergeRecursively);
@@ -344,7 +772,28 @@ function toMerged(target, source) {
344
772
  });
345
773
  }
346
774
  //#endregion
347
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/predicate/isLength.mjs
775
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/predicate/isLength.mjs
776
+ /**
777
+ * Checks if a given value is a valid length.
778
+ *
779
+ * A valid length is of type `number`, is a non-negative integer, and is less than or equal to
780
+ * JavaScript's maximum safe integer (`Number.MAX_SAFE_INTEGER`).
781
+ * It returns `true` if the value is a valid length, and `false` otherwise.
782
+ *
783
+ * This function can also serve as a type predicate in TypeScript, narrowing the type of the
784
+ * argument to a valid length (`number`).
785
+ *
786
+ * @param value The value to check.
787
+ * @returns Returns `true` if `value` is a valid length, else `false`.
788
+ *
789
+ * @example
790
+ * isLength(0); // true
791
+ * isLength(42); // true
792
+ * isLength(-1); // false
793
+ * isLength(1.5); // false
794
+ * isLength(Number.MAX_SAFE_INTEGER); // true
795
+ * isLength(Number.MAX_SAFE_INTEGER + 1); // false
796
+ */
348
797
  function isLength(value) {
349
798
  return Number.isSafeInteger(value) && value >= 0;
350
799
  }
@@ -1319,28 +1768,47 @@ function createDefinitionEntityNameResolver(entityNameResolver) {
1319
1768
  return entityNameResolver;
1320
1769
  }
1321
1770
  //#endregion
1322
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/predicate/isArrayLike.mjs
1771
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/predicate/isArrayLike.mjs
1772
+ /**
1773
+ * Checks if `value` is array-like.
1774
+ *
1775
+ * @param value The value to check.
1776
+ * @returns Returns `true` if `value` is array-like, else `false`.
1777
+ *
1778
+ * @example
1779
+ * isArrayLike([1, 2, 3]); // true
1780
+ * isArrayLike('abc'); // true
1781
+ * isArrayLike({ 0: 'a', length: 1 }); // true
1782
+ * isArrayLike({}); // false
1783
+ * isArrayLike(null); // false
1784
+ * isArrayLike(undefined); // false
1785
+ */
1323
1786
  function isArrayLike(value) {
1324
1787
  return value != null && typeof value !== "function" && isLength(value.length);
1325
1788
  }
1326
1789
  //#endregion
1327
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/_internal/isDeepKey.mjs
1328
- function isDeepKey(key) {
1329
- switch (typeof key) {
1330
- case "number":
1331
- case "symbol": return false;
1332
- case "string": return key.includes(".") || key.includes("[") || key.includes("]");
1333
- }
1334
- }
1335
- //#endregion
1336
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/_internal/toKey.mjs
1337
- function toKey(value) {
1338
- if (typeof value === "string" || typeof value === "symbol") return value;
1339
- if (Object.is(value?.valueOf?.(), -0)) return "-0";
1340
- return String(value);
1790
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/_internal/toArray.mjs
1791
+ function toArray(value) {
1792
+ return Array.isArray(value) ? value : Array.from(value);
1341
1793
  }
1342
1794
  //#endregion
1343
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/util/toString.mjs
1795
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/util/toString.mjs
1796
+ /**
1797
+ * Converts `value` to a string.
1798
+ *
1799
+ * An empty string is returned for `null` and `undefined` values.
1800
+ * The sign of `-0` is preserved.
1801
+ *
1802
+ * @param value - The value to convert.
1803
+ * @returns Returns the converted string.
1804
+ *
1805
+ * @example
1806
+ * toString(null) // returns ''
1807
+ * toString(undefined) // returns ''
1808
+ * toString(-0) // returns '-0'
1809
+ * toString([1, 2, -0]) // returns '1,2,-0'
1810
+ * toString([Symbol('a'), Symbol('b')]) // returns 'Symbol(a),Symbol(b)'
1811
+ */
1344
1812
  function toString$1(value) {
1345
1813
  if (value == null) return "";
1346
1814
  if (typeof value === "string") return value;
@@ -1350,7 +1818,38 @@ function toString$1(value) {
1350
1818
  return result;
1351
1819
  }
1352
1820
  //#endregion
1353
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/util/toPath.mjs
1821
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/_internal/toKey.mjs
1822
+ /**
1823
+ * Converts `value` to a string key if it's not a string or symbol.
1824
+ *
1825
+ * @private
1826
+ * @param {*} value The value to inspect.
1827
+ * @returns {string|symbol} Returns the key.
1828
+ */
1829
+ function toKey(value) {
1830
+ if (typeof value === "string" || typeof value === "symbol") return value;
1831
+ if (Object.is(value?.valueOf?.(), -0)) return "-0";
1832
+ return String(value);
1833
+ }
1834
+ //#endregion
1835
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/util/toPath.mjs
1836
+ /**
1837
+ * Converts a deep key string into an array of path segments.
1838
+ *
1839
+ * This function takes a string representing a deep key (e.g., 'a.b.c' or 'a[b][c]') and breaks it down into an array of strings, each representing a segment of the path.
1840
+ *
1841
+ * @param deepKey - The deep key string to convert.
1842
+ * @returns An array of strings, each representing a segment of the path.
1843
+ *
1844
+ * Examples:
1845
+ *
1846
+ * toPath('a.b.c') // Returns ['a', 'b', 'c']
1847
+ * toPath('a[b][c]') // Returns ['a', 'b', 'c']
1848
+ * toPath('.a.b.c') // Returns ['', 'a', 'b', 'c']
1849
+ * toPath('a["b.c"].d') // Returns ['a', 'b.c', 'd']
1850
+ * toPath('') // Returns []
1851
+ * toPath('.a[b].c.d[e]["f.g"].h') // Returns ['', 'a', 'b', 'c', 'd', 'e', 'f.g', 'h']
1852
+ */
1354
1853
  function toPath(deepKey) {
1355
1854
  if (Array.isArray(deepKey)) return deepKey.map(toKey);
1356
1855
  if (typeof deepKey === "symbol") return [deepKey];
@@ -1362,10 +1861,7 @@ function toPath(deepKey) {
1362
1861
  let key = "";
1363
1862
  let quoteChar = "";
1364
1863
  let bracket = false;
1365
- if (deepKey.charCodeAt(0) === 46) {
1366
- result.push("");
1367
- index++;
1368
- }
1864
+ if (deepKey.charCodeAt(0) === 46) result.push("");
1369
1865
  while (index < length) {
1370
1866
  const char = deepKey[index];
1371
1867
  if (quoteChar) if (char === "\\" && index + 1 < length) {
@@ -1390,6 +1886,8 @@ function toPath(deepKey) {
1390
1886
  result.push(key);
1391
1887
  key = "";
1392
1888
  }
1889
+ const next = deepKey[index + 1];
1890
+ if (next === void 0 || next === ".") result.push("");
1393
1891
  } else key += char;
1394
1892
  index++;
1395
1893
  }
@@ -1397,14 +1895,72 @@ function toPath(deepKey) {
1397
1895
  return result;
1398
1896
  }
1399
1897
  //#endregion
1400
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/object/get.mjs
1898
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/_internal/isDeepKey.mjs
1899
+ /** Matches any deep property path. Examples: `a.b`, `a[0]`, `a["b"]` */
1900
+ var regexIsDeepProp$1 = /\.|(\[(?:[^[\]]*|(["'])(?:(?!\2)[^\\]|\\.)*?\2)\])/;
1901
+ /**
1902
+ * Checks if a given key is a deep key.
1903
+ *
1904
+ * A deep key is a string that contains a dot (.) or square brackets with a property accessor.
1905
+ *
1906
+ * @param {PropertyKey} key - The key to check.
1907
+ * @returns {boolean} - Returns true if the key is a deep key, otherwise false.
1908
+ *
1909
+ * Examples:
1910
+ *
1911
+ * isDeepKey('a.b') // true
1912
+ * isDeepKey('a[b]') // true
1913
+ * isDeepKey('a') // false
1914
+ * isDeepKey(123) // false
1915
+ * isDeepKey('a.b.c') // true
1916
+ * isDeepKey('a[b][c]') // true
1917
+ * isDeepKey('a.') // false
1918
+ * isDeepKey('.a') // false
1919
+ * isDeepKey('a[b') // false
1920
+ * isDeepKey('a]b]') // false
1921
+ * isDeepKey('a][b') // false
1922
+ * isDeepKey('') // false
1923
+ * isDeepKey('a[0]') // true
1924
+ *
1925
+ */
1926
+ function isDeepKey(key) {
1927
+ switch (typeof key) {
1928
+ case "number":
1929
+ case "symbol": return false;
1930
+ case "string":
1931
+ if (key === "" || key.startsWith(".") || key.endsWith(".")) return false;
1932
+ return regexIsDeepProp$1.test(key);
1933
+ default: return false;
1934
+ }
1935
+ }
1936
+ //#endregion
1937
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/object/get.mjs
1938
+ /**
1939
+ * Retrieves the value at a given path from an object. If the resolved value is undefined, the defaultValue is returned instead.
1940
+ *
1941
+ * @param object - The object to query.
1942
+ * @param path - The path of the property to get.
1943
+ * @param [defaultValue] - The value returned if the resolved value is undefined.
1944
+ * @returns Returns the resolved value.
1945
+ *
1946
+ * @example
1947
+ * const object = { a: { b: { c: 1 } } };
1948
+ * get(object, 'a.b.c');
1949
+ * // => 1
1950
+ *
1951
+ * get(object, ['a', 'b', 'c']);
1952
+ * // => 1
1953
+ *
1954
+ * get(object, 'a.b.d', 'default');
1955
+ * // => 'default'
1956
+ */
1401
1957
  function get$1(object, path, defaultValue) {
1402
1958
  if (object == null) return defaultValue;
1403
1959
  switch (typeof path) {
1404
1960
  case "string": {
1405
1961
  if (isUnsafeProperty(path)) return defaultValue;
1406
1962
  const result = object[path];
1407
- if (result === void 0) if (isDeepKey(path)) return get$1(object, toPath(path), defaultValue);
1963
+ if (result === void 0) if (isDeepKey(path) && !Object.hasOwn(object, path)) return get$1(object, toPath(path), defaultValue);
1408
1964
  else return defaultValue;
1409
1965
  return result;
1410
1966
  }
@@ -1438,38 +1994,151 @@ function getWithPath(object, path, defaultValue) {
1438
1994
  return current;
1439
1995
  }
1440
1996
  //#endregion
1441
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/object/property.mjs
1997
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/object/property.mjs
1998
+ /**
1999
+ * Creates a function that returns the value at a given path of an object.
2000
+ *
2001
+ * @template T - The type of object.
2002
+ * @template R - The type of the value to return.
2003
+ * @param path - The path of the property to get.
2004
+ * @returns Returns a new function that takes an object and returns the value at the specified path.
2005
+ *
2006
+ * @example
2007
+ * const getObjectValue = property('a.b.c');
2008
+ * const result = getObjectValue({ a: { b: { c: 3 } } });
2009
+ * console.log(result); // => 3
2010
+ *
2011
+ * @example
2012
+ * const getObjectValue = property(['a', 'b', 'c']);
2013
+ * const result = getObjectValue({ a: { b: { c: 3 } } });
2014
+ * console.log(result); // => 3
2015
+ */
1442
2016
  function property(path) {
1443
2017
  return function(object) {
1444
2018
  return get$1(object, path);
1445
2019
  };
1446
2020
  }
1447
2021
  //#endregion
1448
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/predicate/isObject.mjs
2022
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/predicate/isObject.mjs
2023
+ /**
2024
+ * Checks if the given value is an object. An object is a value that is
2025
+ * not a primitive type (string, number, boolean, symbol, null, or undefined).
2026
+ *
2027
+ * This function tests whether the provided value is an object or not.
2028
+ * It returns `true` if the value is an object, and `false` otherwise.
2029
+ *
2030
+ * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to an object value.
2031
+ *
2032
+ * @param value - The value to check if it is an object.
2033
+ * @returns `true` if the value is an object, `false` otherwise.
2034
+ *
2035
+ * @example
2036
+ * const value1 = {};
2037
+ * const value2 = [1, 2, 3];
2038
+ * const value3 = () => {};
2039
+ * const value4 = null;
2040
+ *
2041
+ * console.log(isObject(value1)); // true
2042
+ * console.log(isObject(value2)); // true
2043
+ * console.log(isObject(value3)); // true
2044
+ * console.log(isObject(value4)); // false
2045
+ */
1449
2046
  function isObject(value) {
1450
2047
  return value !== null && (typeof value === "object" || typeof value === "function");
1451
2048
  }
1452
2049
  //#endregion
1453
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/predicate/isMatchWith.mjs
2050
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/predicate/isMatchWith.mjs
2051
+ /**
2052
+ * Performs a deep comparison between a target value and a source pattern to determine if they match,
2053
+ * using a custom comparison function for fine-grained control over the matching logic.
2054
+ *
2055
+ * This function recursively traverses both values, calling the custom compare function for each
2056
+ * property/element pair. If the compare function returns a boolean, that result is used directly.
2057
+ * If it returns undefined, the default matching behavior continues recursively.
2058
+ *
2059
+ * The matching behavior varies by data type:
2060
+ * - **Objects**: Matches if all properties in the source exist in the target and match
2061
+ * - **Arrays**: Matches if all elements in the source array can be found in the target array (order-independent)
2062
+ * - **Maps**: Matches if all key-value pairs in the source Map exist and match in the target Map
2063
+ * - **Sets**: Matches if all elements in the source Set can be found in the target Set
2064
+ * - **Functions**: Matches using strict equality, or object comparison if the function has properties
2065
+ * - **Primitives**: Matches using strict equality
2066
+ *
2067
+ * Special cases:
2068
+ * - Empty objects, arrays, Maps, and Sets always match any target
2069
+ * - `null` and `undefined` source values have specific matching rules
2070
+ * - Circular references are handled using an internal stack to prevent infinite recursion
2071
+ *
2072
+ * @param target - The value to be tested for matching
2073
+ * @param source - The pattern/template to match against
2074
+ * @param [compare] - Optional custom comparison function that receives:
2075
+ * - `objValue` - The value from the target at the current path
2076
+ * - `srcValue` - The value from the source at the current path
2077
+ * - `key` - The property key or array index being compared
2078
+ * - `object` - The parent object/array from the target
2079
+ * - `source` - The parent object/array from the source
2080
+ * - `stack` - Internal Map used for circular reference detection
2081
+ * Should return `true` for a match, `false` for no match, or `undefined` to continue with default behavior
2082
+ *
2083
+ * @returns `true` if the target matches the source pattern, `false` otherwise
2084
+ *
2085
+ * @example
2086
+ * // Basic matching without custom comparator
2087
+ * isMatchWith({ a: 1, b: 2 }, { a: 1 }); // true
2088
+ * isMatchWith([1, 2, 3], [1, 3]); // true
2089
+ *
2090
+ * @example
2091
+ * // Custom comparison for case-insensitive string matching
2092
+ * const caseInsensitiveCompare = (objVal, srcVal) => {
2093
+ * if (typeof objVal === 'string' && typeof srcVal === 'string') {
2094
+ * return objVal.toLowerCase() === srcVal.toLowerCase();
2095
+ * }
2096
+ * return undefined; // Use default behavior for non-strings
2097
+ * };
2098
+ *
2099
+ * isMatchWith(
2100
+ * { name: 'JOHN', age: 30 },
2101
+ * { name: 'john' },
2102
+ * caseInsensitiveCompare
2103
+ * ); // true
2104
+ *
2105
+ * @example
2106
+ * // Custom comparison for range matching
2107
+ * const rangeCompare = (objVal, srcVal, key) => {
2108
+ * if (key === 'age' && typeof srcVal === 'object' && srcVal.min !== undefined) {
2109
+ * return objVal >= srcVal.min && objVal <= srcVal.max;
2110
+ * }
2111
+ * return undefined;
2112
+ * };
2113
+ *
2114
+ * isMatchWith(
2115
+ * { name: 'John', age: 25 },
2116
+ * { age: { min: 18, max: 30 } },
2117
+ * rangeCompare
2118
+ * ); // true
2119
+ */
1454
2120
  function isMatchWith(target, source, compare) {
1455
2121
  if (typeof compare !== "function") return isMatchWith(target, source, () => void 0);
1456
2122
  return isMatchWithInternal(target, source, function doesMatch(objValue, srcValue, key, object, source, stack) {
1457
2123
  const isEqual = compare(objValue, srcValue, key, object, source, stack);
1458
2124
  if (isEqual !== void 0) return Boolean(isEqual);
1459
- return isMatchWithInternal(objValue, srcValue, doesMatch, stack);
1460
- }, /* @__PURE__ */ new Map());
2125
+ return isMatchWithInternal(objValue, srcValue, doesMatch, stack, false);
2126
+ }, /* @__PURE__ */ new Map(), true);
1461
2127
  }
1462
- function isMatchWithInternal(target, source, compare, stack) {
2128
+ function isMatchWithInternal(target, source, compare, stack, isRoot = false) {
1463
2129
  if (source === target) return true;
1464
2130
  switch (typeof source) {
1465
2131
  case "object": return isObjectMatch(target, source, compare, stack);
1466
2132
  case "function":
1467
- if (Object.keys(source).length > 0) return isMatchWithInternal(target, { ...source }, compare, stack);
1468
- return isEqualsSameValueZero(target, source);
2133
+ if (Object.keys(source).length > 0) return isMatchWithInternal(target, { ...source }, compare, stack, isRoot);
2134
+ return eq(target, source);
1469
2135
  default:
1470
- if (!isObject(target)) return isEqualsSameValueZero(target, source);
1471
- if (typeof source === "string") return source === "";
1472
- return true;
2136
+ if (!isObject(target)) return eq(target, source);
2137
+ if (isRoot) {
2138
+ if (typeof source === "string") return source === "";
2139
+ return true;
2140
+ }
2141
+ return eq(target, source);
1473
2142
  }
1474
2143
  }
1475
2144
  function isObjectMatch(target, source, compare, stack) {
@@ -1529,12 +2198,66 @@ function isSetMatch(target, source, compare, stack) {
1529
2198
  return isArrayMatch([...target], [...source], compare, stack);
1530
2199
  }
1531
2200
  //#endregion
1532
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/predicate/isMatch.mjs
2201
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/predicate/isMatch.mjs
2202
+ /**
2203
+ * Checks if the target matches the source by comparing their structures and values.
2204
+ * This function supports deep comparison for objects, arrays, maps, and sets.
2205
+ *
2206
+ * @param target - The target value to match against.
2207
+ * @param source - The source value to match with.
2208
+ * @returns Returns `true` if the target matches the source, otherwise `false`.
2209
+ *
2210
+ * @example
2211
+ * // Basic usage
2212
+ * isMatch({ a: 1, b: 2 }, { a: 1 }); // true
2213
+ *
2214
+ * @example
2215
+ * // Matching arrays
2216
+ * isMatch([1, 2, 3], [1, 2, 3]); // true
2217
+ *
2218
+ * @example
2219
+ * // Matching maps
2220
+ * const targetMap = new Map([['key1', 'value1'], ['key2', 'value2']]);
2221
+ * const sourceMap = new Map([['key1', 'value1']]);
2222
+ * isMatch(targetMap, sourceMap); // true
2223
+ *
2224
+ * @example
2225
+ * // Matching sets
2226
+ * const targetSet = new Set([1, 2, 3]);
2227
+ * const sourceSet = new Set([1, 2]);
2228
+ * isMatch(targetSet, sourceSet); // true
2229
+ */
1533
2230
  function isMatch(target, source) {
1534
2231
  return isMatchWith(target, source, () => void 0);
1535
2232
  }
1536
2233
  //#endregion
1537
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/predicate/matches.mjs
2234
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/predicate/matches.mjs
2235
+ /**
2236
+ * Creates a function that performs a deep comparison between a given target and the source object.
2237
+ *
2238
+ * @template T
2239
+ * @template V
2240
+ * @param source - The source object to create the matcher from.
2241
+ * @returns Returns a function that takes a target object and returns `true` if the target matches the source, otherwise `false`.
2242
+ *
2243
+ * @example
2244
+ * // Basic usage
2245
+ * const matcher = matches({ a: 1, b: 2 });
2246
+ * matcher({ a: 1, b: 2, c: 3 }); // true
2247
+ * matcher({ a: 1, c: 3 }); // false
2248
+ *
2249
+ * @example
2250
+ * // Matching arrays
2251
+ * const arrayMatcher = matches([1, 2, 3]);
2252
+ * arrayMatcher([1, 2, 3, 4]); // true
2253
+ * arrayMatcher([4, 5, 6]); // false
2254
+ *
2255
+ * @example
2256
+ * // Matching objects with nested structures
2257
+ * const nestedMatcher = matches({ a: { b: 2 } });
2258
+ * nestedMatcher({ a: { b: 2, c: 3 } }); // true
2259
+ * nestedMatcher({ a: { c: 3 } }); // false
2260
+ */
1538
2261
  function matches(source) {
1539
2262
  source = cloneDeep$1(source);
1540
2263
  return (target) => {
@@ -1542,7 +2265,42 @@ function matches(source) {
1542
2265
  };
1543
2266
  }
1544
2267
  //#endregion
1545
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/object/cloneDeepWith.mjs
2268
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/object/cloneDeepWith.mjs
2269
+ /**
2270
+ * Creates a deep clone of the given object using a customizer function.
2271
+ *
2272
+ * @template T - The type of the object.
2273
+ * @param obj - The object to clone.
2274
+ * @param [cloneValue] - A function to customize the cloning process.
2275
+ * @returns A deep clone of the given object.
2276
+ *
2277
+ * @example
2278
+ * // Clone a primitive value
2279
+ * const num = 29;
2280
+ * const clonedNum = cloneDeepWith(num);
2281
+ * console.log(clonedNum); // 29
2282
+ * console.log(clonedNum === num); // true
2283
+ *
2284
+ * @example
2285
+ * // Clone an object with a customizer
2286
+ * const obj = { a: 1, b: 2 };
2287
+ * const clonedObj = cloneDeepWith(obj, (value) => {
2288
+ * if (typeof value === 'number') {
2289
+ * return value * 2; // Double the number
2290
+ * }
2291
+ * });
2292
+ * console.log(clonedObj); // { a: 2, b: 4 }
2293
+ * console.log(clonedObj === obj); // false
2294
+ *
2295
+ * @example
2296
+ * // Clone an array with a customizer
2297
+ * const arr = [1, 2, 3];
2298
+ * const clonedArr = cloneDeepWith(arr, (value) => {
2299
+ * return value + 1; // Increment each value
2300
+ * });
2301
+ * console.log(clonedArr); // [2, 3, 4]
2302
+ * console.log(clonedArr === arr); // false
2303
+ */
1546
2304
  function cloneDeepWith(obj, customizer) {
1547
2305
  return cloneDeepWith$1(obj, (value, key, object, stack) => {
1548
2306
  const cloned = customizer?.(value, key, object, stack);
@@ -1574,12 +2332,83 @@ function cloneDeepWith(obj, customizer) {
1574
2332
  });
1575
2333
  }
1576
2334
  //#endregion
1577
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/object/cloneDeep.mjs
2335
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/object/cloneDeep.mjs
2336
+ /**
2337
+ * Creates a deep clone of the given object.
2338
+ *
2339
+ * @template T - The type of the object.
2340
+ * @param obj - The object to clone.
2341
+ * @returns A deep clone of the given object.
2342
+ *
2343
+ * @example
2344
+ * // Clone a primitive value
2345
+ * const num = 29;
2346
+ * const clonedNum = clone(num);
2347
+ * console.log(clonedNum); // 29
2348
+ * console.log(clonedNum === num); // true
2349
+ *
2350
+ * @example
2351
+ * // Clone an array
2352
+ * const arr = [1, 2, 3];
2353
+ * const clonedArr = clone(arr);
2354
+ * console.log(clonedArr); // [1, 2, 3]
2355
+ * console.log(clonedArr === arr); // false
2356
+ *
2357
+ * @example
2358
+ * // Clone an array with nested objects
2359
+ * const arr = [1, { a: 1 }, [1, 2, 3]];
2360
+ * const clonedArr = clone(arr);
2361
+ * arr[1].a = 2;
2362
+ * console.log(arr); // [2, { a: 2 }, [1, 2, 3]]
2363
+ * console.log(clonedArr); // [1, { a: 1 }, [1, 2, 3]]
2364
+ * console.log(clonedArr === arr); // false
2365
+ *
2366
+ * @example
2367
+ * // Clone an object
2368
+ * const obj = { a: 1, b: 'es-toolkit', c: [1, 2, 3] };
2369
+ * const clonedObj = clone(obj);
2370
+ * console.log(clonedObj); // { a: 1, b: 'es-toolkit', c: [1, 2, 3] }
2371
+ * console.log(clonedObj === obj); // false
2372
+ *
2373
+ * @example
2374
+ * // Clone an object with nested objects
2375
+ * const obj = { a: 1, b: { c: 1 } };
2376
+ * const clonedObj = clone(obj);
2377
+ * obj.b.c = 2;
2378
+ * console.log(obj); // { a: 1, b: { c: 2 } }
2379
+ * console.log(clonedObj); // { a: 1, b: { c: 1 } }
2380
+ * console.log(clonedObj === obj); // false
2381
+ */
1578
2382
  function cloneDeep(obj) {
1579
2383
  return cloneDeepWith(obj);
1580
2384
  }
1581
2385
  //#endregion
1582
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/_internal/isIndex.mjs
2386
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/predicate/isArguments.mjs
2387
+ /**
2388
+ * Checks if the given value is an arguments object.
2389
+ *
2390
+ * This function tests whether the provided value is an arguments object or not.
2391
+ * It returns `true` if the value is an arguments object, and `false` otherwise.
2392
+ *
2393
+ * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to an arguments object.
2394
+ *
2395
+ * @param value - The value to test if it is an arguments object.
2396
+ * @returns `true` if the value is an arguments, `false` otherwise.
2397
+ *
2398
+ * @example
2399
+ * const args = (function() { return arguments; })();
2400
+ * const strictArgs = (function() { 'use strict'; return arguments; })();
2401
+ * const value = [1, 2, 3];
2402
+ *
2403
+ * console.log(isArguments(args)); // true
2404
+ * console.log(isArguments(strictArgs)); // true
2405
+ * console.log(isArguments(value)); // false
2406
+ */
2407
+ function isArguments(value) {
2408
+ return value !== null && typeof value === "object" && getTag(value) === "[object Arguments]";
2409
+ }
2410
+ //#endregion
2411
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/_internal/isIndex.mjs
1583
2412
  var IS_UNSIGNED_INTEGER = /^(?:0|[1-9]\d*)$/;
1584
2413
  function isIndex(value, length = Number.MAX_SAFE_INTEGER) {
1585
2414
  switch (typeof value) {
@@ -1589,16 +2418,40 @@ function isIndex(value, length = Number.MAX_SAFE_INTEGER) {
1589
2418
  }
1590
2419
  }
1591
2420
  //#endregion
1592
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/predicate/isArguments.mjs
1593
- function isArguments(value) {
1594
- return value !== null && typeof value === "object" && getTag(value) === "[object Arguments]";
1595
- }
1596
- //#endregion
1597
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/object/has.mjs
2421
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/object/has.mjs
2422
+ /**
2423
+ * Checks if a given path exists within an object.
2424
+ *
2425
+ * You can provide the path as a single property key, an array of property keys,
2426
+ * or a string representing a deep path.
2427
+ *
2428
+ * If the path is an index and the object is an array or an arguments object, the function will verify
2429
+ * if the index is valid and within the bounds of the array or arguments object, even if the array or
2430
+ * arguments object is sparse (i.e., not all indexes are defined).
2431
+ *
2432
+ * @param object - The object to query.
2433
+ * @param path - The path to check. This can be a single property key,
2434
+ * an array of property keys, or a string representing a deep path.
2435
+ * @returns Returns `true` if the path exists in the object, `false` otherwise.
2436
+ *
2437
+ * @example
2438
+ *
2439
+ * const obj = { a: { b: { c: 3 } } };
2440
+ *
2441
+ * has(obj, 'a'); // true
2442
+ * has(obj, ['a', 'b']); // true
2443
+ * has(obj, ['a', 'b', 'c']); // true
2444
+ * has(obj, 'a.b.c'); // true
2445
+ * has(obj, 'a.b.d'); // false
2446
+ * has(obj, ['a', 'b', 'c', 'd']); // false
2447
+ * has([], 0); // false
2448
+ * has([1, 2, 3], 2); // true
2449
+ * has([1, 2, 3], 5); // false
2450
+ */
1598
2451
  function has$1(object, path) {
1599
2452
  let resolvedPath;
1600
2453
  if (Array.isArray(path)) resolvedPath = path;
1601
- else if (typeof path === "string" && isDeepKey(path) && object?.[path] == null) resolvedPath = toPath(path);
2454
+ else if (typeof path === "string" && isDeepKey(path) && !(path in Object(object))) resolvedPath = toPath(path);
1602
2455
  else resolvedPath = [path];
1603
2456
  if (resolvedPath.length === 0) return false;
1604
2457
  let current = object;
@@ -1612,15 +2465,38 @@ function has$1(object, path) {
1612
2465
  return true;
1613
2466
  }
1614
2467
  //#endregion
1615
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/predicate/matchesProperty.mjs
2468
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/predicate/matchesProperty.mjs
2469
+ /**
2470
+ * Creates a function that checks if a given target object matches a specific property value.
2471
+ *
2472
+ * The returned function takes a target object and determines if the property at the
2473
+ * specified path within the target object is equal to the given value.
2474
+ *
2475
+ * @param property - The property path to check within the target object.
2476
+ * This can be a single property key or an array of property keys.
2477
+ * @param source - The value to compare against the property value in the target object.
2478
+ *
2479
+ * @returns A function that takes a target object and returns
2480
+ * `true` if the property value at the given path in the target object matches the provided value,
2481
+ * otherwise returns `false`.
2482
+ *
2483
+ * @example
2484
+ * // Using a single property key
2485
+ * const checkName = matchesProperty('name', 'Alice');
2486
+ * console.log(checkName({ name: 'Alice' })); // true
2487
+ * console.log(checkName({ name: 'Bob' })); // false
2488
+ *
2489
+ * // Using an array of property keys
2490
+ * const checkNested = matchesProperty(['address', 'city'], 'New York');
2491
+ * console.log(checkNested({ address: { city: 'New York' } })); // true
2492
+ * console.log(checkNested({ address: { city: 'Los Angeles' } })); // false
2493
+ */
1616
2494
  function matchesProperty(property, source) {
1617
2495
  switch (typeof property) {
1618
2496
  case "object":
1619
2497
  if (Object.is(property?.valueOf(), -0)) property = "-0";
1620
2498
  break;
1621
- case "number":
1622
- property = toKey(property);
1623
- break;
2499
+ case "number": property = toKey(property);
1624
2500
  }
1625
2501
  source = cloneDeep(source);
1626
2502
  return function(target) {
@@ -1631,7 +2507,37 @@ function matchesProperty(property, source) {
1631
2507
  };
1632
2508
  }
1633
2509
  //#endregion
1634
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/util/iteratee.mjs
2510
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/util/iteratee.mjs
2511
+ /**
2512
+ * Creates a function that returns a value from an element in a collection.
2513
+ *
2514
+ * You can call `iteratee` with the following types of arguments:
2515
+ *
2516
+ * - **Function**: Returns the function as-is, which will be called with the element from the collection.
2517
+ * - **Property name**: Returns the value of the specified property from the element.
2518
+ * - **Property-value pair**: Returns a boolean indicating whether the element's property matches the given value.
2519
+ * - **Partial object**: Returns a boolean indicating whether the element matches the properties of the partial object.
2520
+ *
2521
+ * If you don't provide any arguments or pass `null`, this function will return a function that simply returns its input unchanged.
2522
+ *
2523
+ * @param value - The value to convert to an iteratee.
2524
+ * @returns Returns the new iteratee function.
2525
+ * @example
2526
+ * const func = iteratee();
2527
+ * [{ a: 1 }, { a: 2 }, { a: 3 }].map(func) // => [{ a: 1 }, { a: 2 }, { a: 3 }]
2528
+ *
2529
+ * const func = iteratee((object) => object.a);
2530
+ * [{ a: 1 }, { a: 2 }, { a: 3 }].map(func) // => [1, 2, 3]
2531
+ *
2532
+ * const func = iteratee('a');
2533
+ * [{ a: 1 }, { a: 2 }, { a: 3 }].map(func) // => [1, 2, 3]
2534
+ *
2535
+ * const func = iteratee({ a: 1 });
2536
+ * [{ a: 1 }, { a: 2 }, { a: 3 }].find(func) // => { a: 1 }
2537
+ *
2538
+ * const func = iteratee(['a', 1]);
2539
+ * [{ a: 1 }, { a: 2 }, { a: 3 }].find(func) // => { a: 1 }
2540
+ */
1635
2541
  function iteratee(value) {
1636
2542
  if (value == null) return identity$1;
1637
2543
  switch (typeof value) {
@@ -1645,28 +2551,109 @@ function iteratee(value) {
1645
2551
  }
1646
2552
  }
1647
2553
  //#endregion
1648
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/array/groupBy.mjs
1649
- function groupBy(source, _getKeyFromItem) {
2554
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/predicate/isSymbol.mjs
2555
+ /**
2556
+ * Check whether a value is a symbol.
2557
+ *
2558
+ * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to `symbol`.
2559
+ *
2560
+ * @param value The value to check.
2561
+ * @returns Returns `true` if `value` is a symbol, else `false`.
2562
+ * @example
2563
+ * isSymbol(Symbol.iterator);
2564
+ * // => true
2565
+ *
2566
+ * isSymbol('abc');
2567
+ * // => false
2568
+ */
2569
+ function isSymbol(value) {
2570
+ return typeof value === "symbol" || value instanceof Symbol;
2571
+ }
2572
+ //#endregion
2573
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/array/groupBy.mjs
2574
+ /**
2575
+ * Groups the elements of an array or object based on a provided key-generating function.
2576
+ *
2577
+ * This function takes an array or object and a function that generates a key from each element or value.
2578
+ * It returns an object where the keys are the generated keys and the values are arrays of elements that
2579
+ * share the same key.
2580
+ *
2581
+ * @template T - The type of elements in the array or values in the object.
2582
+ * @template K - The type of keys.
2583
+ * @param source - The collection to group.
2584
+ * @param [_getKeyFromItem=identity] - The iteratee to transform keys.
2585
+ * - If a function is provided, it's invoked for each element in the collection.
2586
+ * - If a property name (string) is provided, that property of each element is used as the key.
2587
+ * - If a property-value pair (array) is provided, elements with matching property values are used.
2588
+ * - If a partial object is provided, elements with matching properties are used.
2589
+ * @returns An object where each key is associated with an array of elements that
2590
+ * share that key.
2591
+ *
2592
+ * @example
2593
+ * // Using an array
2594
+ * const array = [6.1, 4.2, 6.3];
2595
+ * const result = groupBy(array, Math.floor);
2596
+ * // => { 4: [4.2], 6: [6.1, 6.3] }
2597
+ *
2598
+ * @example
2599
+ * // Using a property name
2600
+ * const array = ['one', 'two', 'three'];
2601
+ * const result = groupBy(array, 'length');
2602
+ * // => { 3: ['one', 'two'], 5: ['three'] }
2603
+ */
2604
+ function groupBy(source, _getKeyFromItem = identity$1) {
1650
2605
  if (source == null) return {};
1651
- return groupBy$1(isArrayLike(source) ? Array.from(source) : Object.values(source), iteratee(_getKeyFromItem ?? identity$1));
2606
+ return groupBy$1(isArrayLike(source) ? toArray(source) : Object.values(source), iteratee(_getKeyFromItem));
1652
2607
  }
1653
2608
  //#endregion
1654
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/_internal/isKey.mjs
2609
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/_internal/isKey.mjs
2610
+ /** Matches any deep property path. (e.g. `a.b[0].c`)*/
1655
2611
  var regexIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/;
2612
+ /** Matches any word character (alphanumeric & underscore).*/
1656
2613
  var regexIsPlainProp = /^\w*$/;
2614
+ /**
2615
+ * Checks if `value` is a property name and not a property path. (It's ok that the `value` is not in the keys of the `object`)
2616
+ * @param {unknown} value The value to check.
2617
+ * @param {unknown} object The object to query.
2618
+ * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
2619
+ *
2620
+ * @example
2621
+ * isKey('a', { a: 1 });
2622
+ * // => true
2623
+ *
2624
+ * isKey('a.b', { a: { b: 2 } });
2625
+ * // => false
2626
+ */
1657
2627
  function isKey(value, object) {
1658
2628
  if (Array.isArray(value)) return false;
1659
2629
  if (typeof value === "number" || typeof value === "boolean" || value == null || isSymbol(value)) return true;
1660
2630
  return typeof value === "string" && (regexIsPlainProp.test(value) || !regexIsDeepProp.test(value)) || object != null && Object.hasOwn(object, value);
1661
2631
  }
1662
2632
  //#endregion
1663
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/_internal/assignValue.mjs
2633
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/_internal/assignValue.mjs
1664
2634
  var assignValue = (object, key, value) => {
1665
2635
  const objValue = object[key];
1666
- if (!(Object.hasOwn(object, key) && isEqualsSameValueZero(objValue, value)) || value === void 0 && !(key in object)) object[key] = value;
2636
+ if (!(Object.hasOwn(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) object[key] = value;
1667
2637
  };
1668
2638
  //#endregion
1669
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/object/updateWith.mjs
2639
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/object/updateWith.mjs
2640
+ /**
2641
+ * Updates the value at the specified path of the given object using an updater function and a customizer.
2642
+ * If any part of the path does not exist, it will be created.
2643
+ *
2644
+ * @template T - The type of the object.
2645
+ * @template R - The type of the return value.
2646
+ * @param obj - The object to modify.
2647
+ * @param path - The path of the property to update.
2648
+ * @param updater - The function to produce the updated value.
2649
+ * @param customizer - The function to customize the update process.
2650
+ * @returns The modified object.
2651
+ *
2652
+ * @example
2653
+ * const object = { 'a': [{ 'b': { 'c': 3 } }] };
2654
+ * updateWith(object, 'a[0].b.c', (n) => n * n);
2655
+ * // => { 'a': [{ 'b': { 'c': 9 } }] }
2656
+ */
1670
2657
  function updateWith(obj, path, updater, customizer) {
1671
2658
  if (obj == null && !isObject(obj)) return obj;
1672
2659
  let resolvedPath;
@@ -1691,12 +2678,50 @@ function updateWith(obj, path, updater, customizer) {
1691
2678
  return obj;
1692
2679
  }
1693
2680
  //#endregion
1694
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/object/set.mjs
2681
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/object/set.mjs
2682
+ /**
2683
+ * Sets the value at the specified path of the given object. If any part of the path does not exist, it will be created.
2684
+ *
2685
+ * @template T - The type of the object.
2686
+ * @param obj - The object to modify.
2687
+ * @param path - The path of the property to set.
2688
+ * @param value - The value to set.
2689
+ * @returns The modified object.
2690
+ *
2691
+ * @example
2692
+ * // Set a value in a nested object
2693
+ * const obj = { a: { b: { c: 3 } } };
2694
+ * set(obj, 'a.b.c', 4);
2695
+ * console.log(obj.a.b.c); // 4
2696
+ *
2697
+ * @example
2698
+ * // Set a value in an array
2699
+ * const arr = [1, 2, 3];
2700
+ * set(arr, 1, 4);
2701
+ * console.log(arr[1]); // 4
2702
+ *
2703
+ * @example
2704
+ * // Create non-existent path and set value
2705
+ * const obj = {};
2706
+ * set(obj, 'a.b.c', 4);
2707
+ * console.log(obj); // { a: { b: { c: 4 } } }
2708
+ */
1695
2709
  function set$1(obj, path, value) {
1696
2710
  return updateWith(obj, path, () => value, () => void 0);
1697
2711
  }
1698
2712
  //#endregion
1699
- //#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/string/capitalize.mjs
2713
+ //#region ../../node_modules/.pnpm/es-toolkit@1.50.0/node_modules/es-toolkit/dist/compat/string/capitalize.mjs
2714
+ /**
2715
+ * Converts the first character of string to upper case and the remaining to lower case.
2716
+ *
2717
+ * @param string - The string to capitalize.
2718
+ * @returns The capitalized string.
2719
+ *
2720
+ * @example
2721
+ * const convertedStr1 = capitalize('fred') // returns 'Fred'
2722
+ * const convertedStr2 = capitalize('FRED') // returns 'Fred'
2723
+ * const convertedStr3 = capitalize('') // returns ''
2724
+ */
1700
2725
  function capitalize(str) {
1701
2726
  return capitalize$1(toString$1(str));
1702
2727
  }
@@ -1919,7 +2944,6 @@ function walkNode$1(schema, data, path, visitors, entityCtx) {
1919
2944
  case "intersection":
1920
2945
  walkNode$1(children.left, data, path, visitors, entityCtx);
1921
2946
  walkNode$1(children.right, data, path, visitors, entityCtx);
1922
- break;
1923
2947
  }
1924
2948
  for (const cleanup of cleanups.toReversed()) cleanup();
1925
2949
  if (entityRestore) entityRestore();
@@ -2482,7 +3506,7 @@ function fixDefinitionRefs(schema, value, options) {
2482
3506
  return fixRefDeletions(schema, modified ? renamedValue : newRefPayload.data);
2483
3507
  }
2484
3508
  //#endregion
2485
- //#region ../../node_modules/.pnpm/immer@11.1.4/node_modules/immer/dist/immer.mjs
3509
+ //#region ../../node_modules/.pnpm/immer@11.1.15/node_modules/immer/dist/immer.mjs
2486
3510
  var NOTHING = Symbol.for("immer-nothing");
2487
3511
  var DRAFTABLE = Symbol.for("immer-draftable");
2488
3512
  var DRAFT_STATE = Symbol.for("immer-state");
@@ -2802,7 +3826,7 @@ var objectTraps = {
2802
3826
  const value = source[prop];
2803
3827
  if (state.finalized_ || !isDraftable(value)) return value;
2804
3828
  if (isArrayWithStringProp && state.operationMethod && arrayPlugin?.isMutatingArrayMethod(state.operationMethod) && isArrayIndex(prop)) return value;
2805
- if (value === peek(state.base_, prop)) {
3829
+ if (value === peek(state.base_, prop) || isRelocatedBaseRef(state, prop, value)) {
2806
3830
  prepareCopy(state);
2807
3831
  const childKey = state.type_ === 1 ? +prop : prop;
2808
3832
  const childDraft = createProxy(state.scope_, value, state, childKey);
@@ -2834,7 +3858,7 @@ var objectTraps = {
2834
3858
  prepareCopy(state);
2835
3859
  markChanged(state);
2836
3860
  }
2837
- if (state.copy_[prop] === value && (value !== void 0 || prop in state.copy_) || Number.isNaN(value) && Number.isNaN(state.copy_[prop])) return true;
3861
+ if (state.copy_[prop] === value && (value !== void 0 || has(state.copy_, prop, state.type_)) || Number.isNaN(value) && Number.isNaN(state.copy_[prop])) return true;
2838
3862
  state.copy_[prop] = value;
2839
3863
  state.assigned_.set(prop, true);
2840
3864
  handleCrossReference(state, prop, value);
@@ -2889,6 +3913,10 @@ function peek(draft, prop) {
2889
3913
  const state = draft[DRAFT_STATE];
2890
3914
  return (state ? latest(state) : draft)[prop];
2891
3915
  }
3916
+ function isRelocatedBaseRef(state, prop, value) {
3917
+ if (state.type_ !== 1 || !state.allIndicesReassigned_ || state.assigned_?.get(prop) || !isDraftable(value) || value[DRAFT_STATE]) return false;
3918
+ return state.baseRefs_.has(value);
3919
+ }
2892
3920
  function readPropFromProto(state, source, prop) {
2893
3921
  const desc = getDescriptorFromProto(source, prop);
2894
3922
  return desc ? VALUE in desc ? desc[VALUE] : desc.get?.call(state.draft_) : void 0;
@@ -3315,7 +4343,7 @@ var createModelAuthorizerSchema = definitionSchemaWithSlots({ modelSlot: modelEn
3315
4343
  */
3316
4344
  roles: __mf_0.array(createAuthorizerRoleSchema(ctx, { modelSlot })).default([]) }));
3317
4345
  //#endregion
3318
- //#region ../../node_modules/.pnpm/acorn@8.15.0/node_modules/acorn/dist/acorn.mjs
4346
+ //#region ../../node_modules/.pnpm/acorn@8.18.0/node_modules/acorn/dist/acorn.mjs
3319
4347
  var astralIdentifierCodes = [
3320
4348
  509,
3321
4349
  0,
@@ -3347,8 +4375,8 @@ var astralIdentifierCodes = [
3347
4375
  4,
3348
4376
  318,
3349
4377
  1,
3350
- 80,
3351
- 3,
4378
+ 78,
4379
+ 5,
3352
4380
  71,
3353
4381
  10,
3354
4382
  50,
@@ -3493,7 +4521,9 @@ var astralIdentifierCodes = [
3493
4521
  10,
3494
4522
  47,
3495
4523
  15,
3496
- 343,
4524
+ 199,
4525
+ 7,
4526
+ 137,
3497
4527
  9,
3498
4528
  54,
3499
4529
  7,
@@ -3525,7 +4555,9 @@ var astralIdentifierCodes = [
3525
4555
  4,
3526
4556
  9,
3527
4557
  9,
3528
- 330,
4558
+ 55,
4559
+ 9,
4560
+ 266,
3529
4561
  3,
3530
4562
  10,
3531
4563
  1,
@@ -3625,7 +4657,15 @@ var astralIdentifierCodes = [
3625
4657
  1,
3626
4658
  2,
3627
4659
  9,
3628
- 726,
4660
+ 233,
4661
+ 0,
4662
+ 3,
4663
+ 0,
4664
+ 8,
4665
+ 1,
4666
+ 6,
4667
+ 0,
4668
+ 475,
3629
4669
  6,
3630
4670
  110,
3631
4671
  6,
@@ -3735,7 +4775,9 @@ var astralIdentifierStartCodes = [
3735
4775
  21,
3736
4776
  11,
3737
4777
  25,
3738
- 71,
4778
+ 7,
4779
+ 25,
4780
+ 39,
3739
4781
  55,
3740
4782
  7,
3741
4783
  1,
@@ -3780,8 +4822,8 @@ var astralIdentifierStartCodes = [
3780
4822
  7,
3781
4823
  1,
3782
4824
  17,
3783
- 2,
3784
- 60,
4825
+ 5,
4826
+ 57,
3785
4827
  28,
3786
4828
  11,
3787
4829
  0,
@@ -3965,7 +5007,9 @@ var astralIdentifierStartCodes = [
3965
5007
  31,
3966
5008
  15,
3967
5009
  0,
3968
- 328,
5010
+ 24,
5011
+ 43,
5012
+ 261,
3969
5013
  18,
3970
5014
  16,
3971
5015
  0,
@@ -4013,7 +5057,11 @@ var astralIdentifierStartCodes = [
4013
5057
  44,
4014
5058
  212,
4015
5059
  63,
4016
- 129,
5060
+ 33,
5061
+ 24,
5062
+ 3,
5063
+ 24,
5064
+ 45,
4017
5065
  74,
4018
5066
  6,
4019
5067
  0,
@@ -4023,13 +5071,15 @@ var astralIdentifierStartCodes = [
4023
5071
  1,
4024
5072
  2,
4025
5073
  0,
4026
- 29,
4027
- 6135,
4028
- 9,
4029
- 1237,
5074
+ 15,
5075
+ 4,
5076
+ 10,
5077
+ 7381,
4030
5078
  42,
4031
- 9,
4032
- 8936,
5079
+ 31,
5080
+ 98,
5081
+ 114,
5082
+ 8702,
4033
5083
  3,
4034
5084
  2,
4035
5085
  6,
@@ -4137,7 +5187,19 @@ var astralIdentifierStartCodes = [
4137
5187
  29,
4138
5188
  3,
4139
5189
  0,
4140
- 496,
5190
+ 208,
5191
+ 30,
5192
+ 2,
5193
+ 2,
5194
+ 2,
5195
+ 1,
5196
+ 2,
5197
+ 6,
5198
+ 3,
5199
+ 4,
5200
+ 10,
5201
+ 1,
5202
+ 225,
4141
5203
  6,
4142
5204
  2,
4143
5205
  3,
@@ -4220,12 +5282,10 @@ var astralIdentifierStartCodes = [
4220
5282
  4421,
4221
5283
  42719,
4222
5284
  33,
4223
- 4153,
4224
- 7,
4225
- 221,
5285
+ 4381,
5286
+ 3,
5287
+ 5773,
4226
5288
  3,
4227
- 5761,
4228
- 15,
4229
5289
  7472,
4230
5290
  16,
4231
5291
  621,
@@ -4234,10 +5294,10 @@ var astralIdentifierStartCodes = [
4234
5294
  1507,
4235
5295
  4938,
4236
5296
  6,
4237
- 4191
5297
+ 8489
4238
5298
  ];
4239
- var nonASCIIidentifierChars = "‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・";
4240
- var nonASCIIidentifierStartChars = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟍꟐꟑꟓꟕ-Ƛꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ";
5299
+ var nonASCIIidentifierChars = "‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-᫝᫠-᫫ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・";
5300
+ var nonASCIIidentifierStartChars = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-࢏ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚ౜ౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ೜-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ƛ꟱-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ";
4241
5301
  var reservedWords = {
4242
5302
  3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",
4243
5303
  5: "class enum extends super const export import",
@@ -4502,6 +5562,7 @@ function getLineInfo(input, offset) {
4502
5562
  var defaultOptions = {
4503
5563
  ecmaVersion: null,
4504
5564
  sourceType: "script",
5565
+ strict: false,
4505
5566
  onInsertedSemicolon: null,
4506
5567
  onTrailingComma: null,
4507
5568
  allowReserved: null,
@@ -4512,6 +5573,7 @@ var defaultOptions = {
4512
5573
  allowHashBang: false,
4513
5574
  checkPrivateFields: true,
4514
5575
  locations: false,
5576
+ startLocation: null,
4515
5577
  onToken: null,
4516
5578
  onComment: null,
4517
5579
  ranges: false,
@@ -4541,6 +5603,7 @@ function getOptions(opts) {
4541
5603
  };
4542
5604
  }
4543
5605
  if (isArray(options.onComment)) options.onComment = pushComment(options, options.onComment);
5606
+ if (options.sourceType === "commonjs" && options.allowAwaitOutsideFunction) throw new Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");
4544
5607
  return options;
4545
5608
  }
4546
5609
  function pushComment(options, array) {
@@ -4566,6 +5629,7 @@ var SCOPE_SUPER = 64;
4566
5629
  var SCOPE_DIRECT_SUPER = 128;
4567
5630
  var SCOPE_CLASS_STATIC_BLOCK = 256;
4568
5631
  var SCOPE_CLASS_FIELD_INIT = 512;
5632
+ var SCOPE_SWITCH = 1024;
4569
5633
  var SCOPE_VAR = SCOPE_TOP | SCOPE_FUNCTION | SCOPE_CLASS_STATIC_BLOCK;
4570
5634
  function functionFlags(async, generator) {
4571
5635
  return SCOPE_FUNCTION | (async ? SCOPE_ASYNC : 0) | (generator ? SCOPE_GENERATOR : 0);
@@ -4591,14 +5655,15 @@ var Parser = function Parser(options, input, startPos) {
4591
5655
  this.reservedWordsStrictBind = wordsRegexp(reservedStrict + " " + reservedWords.strictBind);
4592
5656
  this.input = String(input);
4593
5657
  this.containsEsc = false;
4594
- if (startPos) {
4595
- this.pos = startPos;
5658
+ this.pos = startPos || 0;
5659
+ this.curLine = 1;
5660
+ if (options.startLocation) {
5661
+ this.lineStart = this.pos - options.startLocation.column;
5662
+ this.curLine = options.startLocation.line;
5663
+ } else if (startPos) {
4596
5664
  this.lineStart = this.input.lastIndexOf("\n", startPos - 1) + 1;
4597
- this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length;
4598
- } else {
4599
- this.pos = this.lineStart = 0;
4600
- this.curLine = 1;
4601
- }
5665
+ if (this.options.locations) this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length;
5666
+ } else this.lineStart = 0;
4602
5667
  this.type = types$1.eof;
4603
5668
  this.value = null;
4604
5669
  this.start = this.end = this.pos;
@@ -4608,7 +5673,7 @@ var Parser = function Parser(options, input, startPos) {
4608
5673
  this.context = this.initialContext();
4609
5674
  this.exprAllowed = true;
4610
5675
  this.inModule = options.sourceType === "module";
4611
- this.strict = this.inModule || this.strictDirective(this.pos);
5676
+ this.strict = this.inModule || options.strict === true || this.strictDirective(this.pos);
4612
5677
  this.potentialArrowAt = -1;
4613
5678
  this.potentialArrowInForAwait = false;
4614
5679
  this.yieldPos = this.awaitPos = this.awaitIdentPos = 0;
@@ -4616,7 +5681,7 @@ var Parser = function Parser(options, input, startPos) {
4616
5681
  this.undefinedExports = Object.create(null);
4617
5682
  if (this.pos === 0 && options.allowHashBang && this.input.slice(0, 2) === "#!") this.skipLineComment(2);
4618
5683
  this.scopeStack = [];
4619
- this.enterScope(SCOPE_TOP);
5684
+ this.enterScope(this.options.sourceType === "commonjs" ? SCOPE_FUNCTION : SCOPE_TOP);
4620
5685
  this.regexpState = null;
4621
5686
  this.privateNameStack = [];
4622
5687
  };
@@ -4625,16 +5690,21 @@ var prototypeAccessors = {
4625
5690
  inGenerator: { configurable: true },
4626
5691
  inAsync: { configurable: true },
4627
5692
  canAwait: { configurable: true },
5693
+ allowReturn: { configurable: true },
4628
5694
  allowSuper: { configurable: true },
4629
5695
  allowDirectSuper: { configurable: true },
4630
5696
  treatFunctionsAsVar: { configurable: true },
4631
5697
  allowNewDotTarget: { configurable: true },
5698
+ allowUsing: { configurable: true },
4632
5699
  inClassStaticBlock: { configurable: true }
4633
5700
  };
4634
5701
  Parser.prototype.parse = function parse() {
5702
+ var this$1$1 = this;
4635
5703
  var node = this.options.program || this.startNode();
4636
5704
  this.nextToken();
4637
- return this.parseTopLevel(node);
5705
+ return this.catchStackOverflow(function() {
5706
+ return this$1$1.parseTopLevel(node);
5707
+ });
4638
5708
  };
4639
5709
  prototypeAccessors.inFunction.get = function() {
4640
5710
  return (this.currentVarScope().flags & SCOPE_FUNCTION) > 0;
@@ -4653,6 +5723,11 @@ prototypeAccessors.canAwait.get = function() {
4653
5723
  }
4654
5724
  return this.inModule && this.options.ecmaVersion >= 13 || this.options.allowAwaitOutsideFunction;
4655
5725
  };
5726
+ prototypeAccessors.allowReturn.get = function() {
5727
+ if (this.inFunction) return true;
5728
+ if (this.options.allowReturnOutsideFunction && this.currentVarScope().flags & SCOPE_TOP) return true;
5729
+ return false;
5730
+ };
4656
5731
  prototypeAccessors.allowSuper.get = function() {
4657
5732
  return (this.currentThisScope().flags & SCOPE_SUPER) > 0 || this.options.allowSuperOutsideMethod;
4658
5733
  };
@@ -4669,6 +5744,12 @@ prototypeAccessors.allowNewDotTarget.get = function() {
4669
5744
  }
4670
5745
  return false;
4671
5746
  };
5747
+ prototypeAccessors.allowUsing.get = function() {
5748
+ var flags = this.currentScope().flags;
5749
+ if (flags & SCOPE_SWITCH) return false;
5750
+ if (!this.inModule && flags & SCOPE_TOP) return false;
5751
+ return true;
5752
+ };
4672
5753
  prototypeAccessors.inClassStaticBlock.get = function() {
4673
5754
  return (this.currentVarScope().flags & SCOPE_CLASS_STATIC_BLOCK) > 0;
4674
5755
  };
@@ -4726,6 +5807,14 @@ pp$9.eatContextual = function(name) {
4726
5807
  this.next();
4727
5808
  return true;
4728
5809
  };
5810
+ pp$9.catchStackOverflow = function(f) {
5811
+ try {
5812
+ return f();
5813
+ } catch (e) {
5814
+ if (e instanceof Error && (/\bstack\b.*\b(exceeded|overflow)\b/i.test(e.message) || /\btoo much recursion\b/i.test(e.message))) this.raise(this.start, "Not enough stack space to parse input");
5815
+ else throw e;
5816
+ }
5817
+ };
4729
5818
  pp$9.expectContextual = function(name) {
4730
5819
  if (!this.eatContextual(name)) this.unexpected();
4731
5820
  };
@@ -4781,10 +5870,10 @@ pp$9.isSimpleAssignTarget = function(expr) {
4781
5870
  };
4782
5871
  var pp$8 = Parser.prototype;
4783
5872
  pp$8.parseTopLevel = function(node) {
4784
- var exports = Object.create(null);
5873
+ var exports$1 = Object.create(null);
4785
5874
  if (!node.body) node.body = [];
4786
5875
  while (this.type !== types$1.eof) {
4787
- var stmt = this.parseStatement(null, true, exports);
5876
+ var stmt = this.parseStatement(null, true, exports$1);
4788
5877
  node.body.push(stmt);
4789
5878
  }
4790
5879
  if (this.inModule) for (var i = 0, list = Object.keys(this.undefinedExports); i < list.length; i += 1) {
@@ -4793,7 +5882,7 @@ pp$8.parseTopLevel = function(node) {
4793
5882
  }
4794
5883
  this.adaptDirectivePrologue(node.body);
4795
5884
  this.next();
4796
- node.sourceType = this.options.sourceType;
5885
+ node.sourceType = this.options.sourceType === "commonjs" ? "script" : this.options.sourceType;
4797
5886
  return this.finishNode(node, "Program");
4798
5887
  };
4799
5888
  var loopLabel = { kind: "loop" };
@@ -4802,15 +5891,17 @@ pp$8.isLet = function(context) {
4802
5891
  if (this.options.ecmaVersion < 6 || !this.isContextual("let")) return false;
4803
5892
  skipWhiteSpace.lastIndex = this.pos;
4804
5893
  var skip = skipWhiteSpace.exec(this.input);
4805
- var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next);
5894
+ var next = this.pos + skip[0].length, nextCh = this.fullCharCodeAt(next);
4806
5895
  if (nextCh === 91 || nextCh === 92) return true;
4807
5896
  if (context) return false;
4808
- if (nextCh === 123 || nextCh > 55295 && nextCh < 56320) return true;
4809
- if (isIdentifierStart(nextCh, true)) {
4810
- var pos = next + 1;
4811
- while (isIdentifierChar(nextCh = this.input.charCodeAt(pos), true)) ++pos;
4812
- if (nextCh === 92 || nextCh > 55295 && nextCh < 56320) return true;
4813
- var ident = this.input.slice(next, pos);
5897
+ if (nextCh === 123) return true;
5898
+ if (isIdentifierStart(nextCh)) {
5899
+ var start = next;
5900
+ do
5901
+ next += nextCh <= 65535 ? 1 : 2;
5902
+ while (isIdentifierChar(nextCh = this.fullCharCodeAt(next)));
5903
+ if (nextCh === 92) return true;
5904
+ var ident = this.input.slice(start, next);
4814
5905
  if (!keywordRelationalOperator.test(ident)) return true;
4815
5906
  }
4816
5907
  return false;
@@ -4820,7 +5911,7 @@ pp$8.isAsyncFunction = function() {
4820
5911
  skipWhiteSpace.lastIndex = this.pos;
4821
5912
  var skip = skipWhiteSpace.exec(this.input);
4822
5913
  var next = this.pos + skip[0].length, after;
4823
- return !lineBreak.test(this.input.slice(this.pos, next)) && this.input.slice(next, next + 8) === "function" && (next + 8 === this.input.length || !(isIdentifierChar(after = this.input.charCodeAt(next + 8)) || after > 55295 && after < 56320));
5914
+ return !lineBreak.test(this.input.slice(this.pos, next)) && this.input.slice(next, next + 8) === "function" && (next + 8 === this.input.length || !(isIdentifierChar(after = this.fullCharCodeAt(next + 8)) || after === 92));
4824
5915
  };
4825
5916
  pp$8.isUsingKeyword = function(isAwaitUsing, isFor) {
4826
5917
  if (this.options.ecmaVersion < 17 || !this.isContextual(isAwaitUsing ? "await" : "using")) return false;
@@ -4829,20 +5920,29 @@ pp$8.isUsingKeyword = function(isAwaitUsing, isFor) {
4829
5920
  var next = this.pos + skip[0].length;
4830
5921
  if (lineBreak.test(this.input.slice(this.pos, next))) return false;
4831
5922
  if (isAwaitUsing) {
4832
- var awaitEndPos = next + 5, after;
4833
- if (this.input.slice(next, awaitEndPos) !== "using" || awaitEndPos === this.input.length || isIdentifierChar(after = this.input.charCodeAt(awaitEndPos)) || after > 55295 && after < 56320) return false;
4834
- skipWhiteSpace.lastIndex = awaitEndPos;
5923
+ var usingEndPos = next + 5, after;
5924
+ if (this.input.slice(next, usingEndPos) !== "using" || usingEndPos === this.input.length || isIdentifierChar(after = this.fullCharCodeAt(usingEndPos)) || after === 92) return false;
5925
+ skipWhiteSpace.lastIndex = usingEndPos;
4835
5926
  var skipAfterUsing = skipWhiteSpace.exec(this.input);
4836
- if (skipAfterUsing && lineBreak.test(this.input.slice(awaitEndPos, awaitEndPos + skipAfterUsing[0].length))) return false;
5927
+ next = usingEndPos + skipAfterUsing[0].length;
5928
+ if (skipAfterUsing && lineBreak.test(this.input.slice(usingEndPos, next))) return false;
5929
+ }
5930
+ var ch = this.fullCharCodeAt(next);
5931
+ if (!isIdentifierStart(ch) && ch !== 92) return false;
5932
+ var idStart = next;
5933
+ do
5934
+ next += ch <= 65535 ? 1 : 2;
5935
+ while (isIdentifierChar(ch = this.fullCharCodeAt(next)));
5936
+ if (ch === 92) return true;
5937
+ var id = this.input.slice(idStart, next);
5938
+ if (keywordRelationalOperator.test(id)) return false;
5939
+ if (isFor && !isAwaitUsing && id === "of") {
5940
+ skipWhiteSpace.lastIndex = next;
5941
+ var skipAfterOf = skipWhiteSpace.exec(this.input);
5942
+ next = next + skipAfterOf[0].length;
5943
+ if (this.input.charCodeAt(next) !== 61 || (ch = this.input.charCodeAt(next + 1)) === 61 || ch === 62) return false;
4837
5944
  }
4838
- if (isFor) {
4839
- var ofEndPos = next + 2, after$1;
4840
- if (this.input.slice(next, ofEndPos) === "of") {
4841
- if (ofEndPos === this.input.length || !isIdentifierChar(after$1 = this.input.charCodeAt(ofEndPos)) && !(after$1 > 55295 && after$1 < 56320)) return false;
4842
- }
4843
- }
4844
- var ch = this.input.charCodeAt(next);
4845
- return isIdentifierStart(ch, true) || ch === 92;
5945
+ return true;
4846
5946
  };
4847
5947
  pp$8.isAwaitUsing = function(isFor) {
4848
5948
  return this.isUsingKeyword(true, isFor);
@@ -4850,7 +5950,7 @@ pp$8.isAwaitUsing = function(isFor) {
4850
5950
  pp$8.isUsing = function(isFor) {
4851
5951
  return this.isUsingKeyword(false, isFor);
4852
5952
  };
4853
- pp$8.parseStatement = function(context, topLevel, exports) {
5953
+ pp$8.parseStatement = function(context, topLevel, exports$1) {
4854
5954
  var starttype = this.type, node = this.startNode(), kind;
4855
5955
  if (this.isLet(context)) {
4856
5956
  starttype = types$1._var;
@@ -4894,7 +5994,7 @@ pp$8.parseStatement = function(context, topLevel, exports) {
4894
5994
  if (!topLevel) this.raise(this.start, "'import' and 'export' may only appear at the top level");
4895
5995
  if (!this.inModule) this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'");
4896
5996
  }
4897
- return starttype === types$1._import ? this.parseImport(node) : this.parseExport(node, exports);
5997
+ return starttype === types$1._import ? this.parseImport(node) : this.parseExport(node, exports$1);
4898
5998
  default:
4899
5999
  if (this.isAsyncFunction()) {
4900
6000
  if (context) this.unexpected();
@@ -4903,7 +6003,8 @@ pp$8.parseStatement = function(context, topLevel, exports) {
4903
6003
  }
4904
6004
  var usingKind = this.isAwaitUsing(false) ? "await using" : this.isUsing(false) ? "using" : null;
4905
6005
  if (usingKind) {
4906
- if (topLevel && this.options.sourceType === "script") this.raise(this.start, "Using declaration cannot appear in the top level when source type is `script`");
6006
+ if (!this.allowUsing) this.raise(this.start, "Using declaration cannot appear in the top level when source type is `script` or in the bare case statement");
6007
+ if (context) this.raise(this.start, "Using declaration is not allowed in single-statement positions");
4907
6008
  if (usingKind === "await using") {
4908
6009
  if (!this.canAwait) this.raise(this.start, "Await using cannot appear outside of async function");
4909
6010
  this.next();
@@ -4977,7 +6078,10 @@ pp$8.parseForStatement = function(node) {
4977
6078
  if (usingKind) {
4978
6079
  var init$2 = this.startNode();
4979
6080
  this.next();
4980
- if (usingKind === "await using") this.next();
6081
+ if (usingKind === "await using") {
6082
+ if (!this.canAwait) this.raise(this.start, "Await using cannot appear outside of async function");
6083
+ this.next();
6084
+ }
4981
6085
  this.parseVar(init$2, true, usingKind);
4982
6086
  this.finishNode(init$2, "VariableDeclaration");
4983
6087
  return this.parseForAfterInit(node, init$2, awaitAt);
@@ -5004,9 +6108,10 @@ pp$8.parseForStatement = function(node) {
5004
6108
  };
5005
6109
  pp$8.parseForAfterInit = function(node, init, awaitAt) {
5006
6110
  if ((this.type === types$1._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && init.declarations.length === 1) {
5007
- if (this.options.ecmaVersion >= 9) if (this.type === types$1._in) {
5008
- if (awaitAt > -1) this.unexpected(awaitAt);
5009
- } else node.await = awaitAt > -1;
6111
+ if (this.type === types$1._in) {
6112
+ if ((init.kind === "using" || init.kind === "await using") && !init.declarations[0].init) this.raise(this.start, "Using declaration is not allowed in for-in loops");
6113
+ if (this.options.ecmaVersion >= 9 && awaitAt > -1) this.unexpected(awaitAt);
6114
+ } else if (this.options.ecmaVersion >= 9) node.await = awaitAt > -1;
5010
6115
  return this.parseForIn(node, init);
5011
6116
  }
5012
6117
  if (awaitAt > -1) this.unexpected(awaitAt);
@@ -5024,7 +6129,7 @@ pp$8.parseIfStatement = function(node) {
5024
6129
  return this.finishNode(node, "IfStatement");
5025
6130
  };
5026
6131
  pp$8.parseReturnStatement = function(node) {
5027
- if (!this.inFunction && !this.options.allowReturnOutsideFunction) this.raise(this.start, "'return' outside of function");
6132
+ if (!this.allowReturn) this.raise(this.start, "'return' outside of function");
5028
6133
  this.next();
5029
6134
  if (this.eat(types$1.semi) || this.insertSemicolon()) node.argument = null;
5030
6135
  else {
@@ -5039,7 +6144,7 @@ pp$8.parseSwitchStatement = function(node) {
5039
6144
  node.cases = [];
5040
6145
  this.expect(types$1.braceL);
5041
6146
  this.labels.push(switchLabel);
5042
- this.enterScope(0);
6147
+ this.enterScope(SCOPE_SWITCH);
5043
6148
  var cur;
5044
6149
  for (var sawDefault = false; this.type !== types$1.braceR;) if (this.type === types$1._case || this.type === types$1._default) {
5045
6150
  var isCase = this.type === types$1._case;
@@ -5408,10 +6513,10 @@ function checkKeyName(node, name) {
5408
6513
  var key = node.key;
5409
6514
  return !computed && (key.type === "Identifier" && key.name === name || key.type === "Literal" && key.value === name);
5410
6515
  }
5411
- pp$8.parseExportAllDeclaration = function(node, exports) {
6516
+ pp$8.parseExportAllDeclaration = function(node, exports$1) {
5412
6517
  if (this.options.ecmaVersion >= 11) if (this.eatContextual("as")) {
5413
6518
  node.exported = this.parseModuleExportName();
5414
- this.checkExport(exports, node.exported, this.lastTokStart);
6519
+ this.checkExport(exports$1, node.exported, this.lastTokStart);
5415
6520
  } else node.exported = null;
5416
6521
  this.expectContextual("from");
5417
6522
  if (this.type !== types$1.string) this.unexpected();
@@ -5420,24 +6525,24 @@ pp$8.parseExportAllDeclaration = function(node, exports) {
5420
6525
  this.semicolon();
5421
6526
  return this.finishNode(node, "ExportAllDeclaration");
5422
6527
  };
5423
- pp$8.parseExport = function(node, exports) {
6528
+ pp$8.parseExport = function(node, exports$1) {
5424
6529
  this.next();
5425
- if (this.eat(types$1.star)) return this.parseExportAllDeclaration(node, exports);
6530
+ if (this.eat(types$1.star)) return this.parseExportAllDeclaration(node, exports$1);
5426
6531
  if (this.eat(types$1._default)) {
5427
- this.checkExport(exports, "default", this.lastTokStart);
6532
+ this.checkExport(exports$1, "default", this.lastTokStart);
5428
6533
  node.declaration = this.parseExportDefaultDeclaration();
5429
6534
  return this.finishNode(node, "ExportDefaultDeclaration");
5430
6535
  }
5431
6536
  if (this.shouldParseExportStatement()) {
5432
6537
  node.declaration = this.parseExportDeclaration(node);
5433
- if (node.declaration.type === "VariableDeclaration") this.checkVariableExport(exports, node.declaration.declarations);
5434
- else this.checkExport(exports, node.declaration.id, node.declaration.id.start);
6538
+ if (node.declaration.type === "VariableDeclaration") this.checkVariableExport(exports$1, node.declaration.declarations);
6539
+ else this.checkExport(exports$1, node.declaration.id, node.declaration.id.start);
5435
6540
  node.specifiers = [];
5436
6541
  node.source = null;
5437
6542
  if (this.options.ecmaVersion >= 16) node.attributes = [];
5438
6543
  } else {
5439
6544
  node.declaration = null;
5440
- node.specifiers = this.parseExportSpecifiers(exports);
6545
+ node.specifiers = this.parseExportSpecifiers(exports$1);
5441
6546
  if (this.eatContextual("from")) {
5442
6547
  if (this.type !== types$1.string) this.unexpected();
5443
6548
  node.source = this.parseExprAtom();
@@ -5475,45 +6580,45 @@ pp$8.parseExportDefaultDeclaration = function() {
5475
6580
  return declaration;
5476
6581
  }
5477
6582
  };
5478
- pp$8.checkExport = function(exports, name, pos) {
5479
- if (!exports) return;
6583
+ pp$8.checkExport = function(exports$1, name, pos) {
6584
+ if (!exports$1) return;
5480
6585
  if (typeof name !== "string") name = name.type === "Identifier" ? name.name : name.value;
5481
- if (hasOwn(exports, name)) this.raiseRecoverable(pos, "Duplicate export '" + name + "'");
5482
- exports[name] = true;
6586
+ if (hasOwn(exports$1, name)) this.raiseRecoverable(pos, "Duplicate export '" + name + "'");
6587
+ exports$1[name] = true;
5483
6588
  };
5484
- pp$8.checkPatternExport = function(exports, pat) {
6589
+ pp$8.checkPatternExport = function(exports$1, pat) {
5485
6590
  var type = pat.type;
5486
- if (type === "Identifier") this.checkExport(exports, pat, pat.start);
6591
+ if (type === "Identifier") this.checkExport(exports$1, pat, pat.start);
5487
6592
  else if (type === "ObjectPattern") for (var i = 0, list = pat.properties; i < list.length; i += 1) {
5488
6593
  var prop = list[i];
5489
- this.checkPatternExport(exports, prop);
6594
+ this.checkPatternExport(exports$1, prop);
5490
6595
  }
5491
6596
  else if (type === "ArrayPattern") for (var i$1 = 0, list$1 = pat.elements; i$1 < list$1.length; i$1 += 1) {
5492
6597
  var elt = list$1[i$1];
5493
- if (elt) this.checkPatternExport(exports, elt);
6598
+ if (elt) this.checkPatternExport(exports$1, elt);
5494
6599
  }
5495
- else if (type === "Property") this.checkPatternExport(exports, pat.value);
5496
- else if (type === "AssignmentPattern") this.checkPatternExport(exports, pat.left);
5497
- else if (type === "RestElement") this.checkPatternExport(exports, pat.argument);
6600
+ else if (type === "Property") this.checkPatternExport(exports$1, pat.value);
6601
+ else if (type === "AssignmentPattern") this.checkPatternExport(exports$1, pat.left);
6602
+ else if (type === "RestElement") this.checkPatternExport(exports$1, pat.argument);
5498
6603
  };
5499
- pp$8.checkVariableExport = function(exports, decls) {
5500
- if (!exports) return;
6604
+ pp$8.checkVariableExport = function(exports$1, decls) {
6605
+ if (!exports$1) return;
5501
6606
  for (var i = 0, list = decls; i < list.length; i += 1) {
5502
6607
  var decl = list[i];
5503
- this.checkPatternExport(exports, decl.id);
6608
+ this.checkPatternExport(exports$1, decl.id);
5504
6609
  }
5505
6610
  };
5506
6611
  pp$8.shouldParseExportStatement = function() {
5507
6612
  return this.type.keyword === "var" || this.type.keyword === "const" || this.type.keyword === "class" || this.type.keyword === "function" || this.isLet() || this.isAsyncFunction();
5508
6613
  };
5509
- pp$8.parseExportSpecifier = function(exports) {
6614
+ pp$8.parseExportSpecifier = function(exports$1) {
5510
6615
  var node = this.startNode();
5511
6616
  node.local = this.parseModuleExportName();
5512
6617
  node.exported = this.eatContextual("as") ? this.parseModuleExportName() : node.local;
5513
- this.checkExport(exports, node.exported, node.exported.start);
6618
+ this.checkExport(exports$1, node.exported, node.exported.start);
5514
6619
  return this.finishNode(node, "ExportSpecifier");
5515
6620
  };
5516
- pp$8.parseExportSpecifiers = function(exports) {
6621
+ pp$8.parseExportSpecifiers = function(exports$1) {
5517
6622
  var nodes = [], first = true;
5518
6623
  this.expect(types$1.braceL);
5519
6624
  while (!this.eat(types$1.braceR)) {
@@ -5521,7 +6626,7 @@ pp$8.parseExportSpecifiers = function(exports) {
5521
6626
  this.expect(types$1.comma);
5522
6627
  if (this.afterTrailingComma(types$1.braceR)) break;
5523
6628
  } else first = false;
5524
- nodes.push(this.parseExportSpecifier(exports));
6629
+ nodes.push(this.parseExportSpecifier(exports$1));
5525
6630
  }
5526
6631
  return nodes;
5527
6632
  };
@@ -5952,15 +7057,18 @@ pp$5.checkPropClash = function(prop, propHash, refDestructuringErrors) {
5952
7057
  other[kind] = true;
5953
7058
  };
5954
7059
  pp$5.parseExpression = function(forInit, refDestructuringErrors) {
5955
- var startPos = this.start, startLoc = this.startLoc;
5956
- var expr = this.parseMaybeAssign(forInit, refDestructuringErrors);
5957
- if (this.type === types$1.comma) {
5958
- var node = this.startNodeAt(startPos, startLoc);
5959
- node.expressions = [expr];
5960
- while (this.eat(types$1.comma)) node.expressions.push(this.parseMaybeAssign(forInit, refDestructuringErrors));
5961
- return this.finishNode(node, "SequenceExpression");
5962
- }
5963
- return expr;
7060
+ var this$1$1 = this;
7061
+ return this.catchStackOverflow(function() {
7062
+ var startPos = this$1$1.start, startLoc = this$1$1.startLoc;
7063
+ var expr = this$1$1.parseMaybeAssign(forInit, refDestructuringErrors);
7064
+ if (this$1$1.type === types$1.comma) {
7065
+ var node = this$1$1.startNodeAt(startPos, startLoc);
7066
+ node.expressions = [expr];
7067
+ while (this$1$1.eat(types$1.comma)) node.expressions.push(this$1$1.parseMaybeAssign(forInit, refDestructuringErrors));
7068
+ return this$1$1.finishNode(node, "SequenceExpression");
7069
+ }
7070
+ return expr;
7071
+ });
5964
7072
  };
5965
7073
  pp$5.parseMaybeAssign = function(forInit, refDestructuringErrors, afterLeftParse) {
5966
7074
  if (this.isContextual("yield")) if (this.inGenerator) return this.parseYield(forInit);
@@ -6004,7 +7112,7 @@ pp$5.parseMaybeConditional = function(forInit, refDestructuringErrors) {
6004
7112
  var startPos = this.start, startLoc = this.startLoc;
6005
7113
  var expr = this.parseExprOps(forInit, refDestructuringErrors);
6006
7114
  if (this.checkExpressionErrors(refDestructuringErrors)) return expr;
6007
- if (this.eat(types$1.question)) {
7115
+ if (!(expr.type === "ArrowFunctionExpression" && expr.start === startPos) && this.eat(types$1.question)) {
6008
7116
  var node = this.startNodeAt(startPos, startLoc);
6009
7117
  node.test = expr;
6010
7118
  node.consequent = this.parseMaybeAssign();
@@ -6080,7 +7188,7 @@ pp$5.parseMaybeUnary = function(refDestructuringErrors, sawUnary, incDec, forIni
6080
7188
  expr = this.finishNode(node$1, "UpdateExpression");
6081
7189
  }
6082
7190
  }
6083
- if (!incDec && this.eat(types$1.starstar)) if (sawUnary) this.unexpected(this.lastTokStart);
7191
+ if (!incDec && !(expr.type === "ArrowFunctionExpression" && expr.start === startPos) && this.eat(types$1.starstar)) if (sawUnary) this.unexpected(this.lastTokStart);
6084
7192
  else return this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, false, false, forInit), "**", false);
6085
7193
  else return expr;
6086
7194
  };
@@ -6383,6 +7491,7 @@ pp$5.parseNew = function() {
6383
7491
  }
6384
7492
  var startPos = this.start, startLoc = this.startLoc;
6385
7493
  node.callee = this.parseSubscripts(this.parseExprAtom(null, false, true), startPos, startLoc, true, false);
7494
+ if (node.callee.type === "Super") this.raiseRecoverable(startPos, "Invalid use of 'super'");
6386
7495
  if (this.eat(types$1.parenL)) node.arguments = this.parseExprList(types$1.parenR, this.options.ecmaVersion >= 8, false);
6387
7496
  else node.arguments = empty;
6388
7497
  return this.finishNode(node, "NewExpression");
@@ -6782,7 +7891,7 @@ pp$2.copyNode = function(node) {
6782
7891
  for (var prop in node) newNode[prop] = node[prop];
6783
7892
  return newNode;
6784
7893
  };
6785
- var scriptValuesAddedInUnicode = "Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sunu Sunuwar Todhri Todr Tulu_Tigalari Tutg Unknown Zzzz";
7894
+ var scriptValuesAddedInUnicode = "Berf Beria_Erfe Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sidetic Sidt Sunu Sunuwar Tai_Yo Tayo Todhri Todr Tolong_Siki Tols Tulu_Tigalari Tutg Unknown Zzzz";
6786
7895
  var ecma9BinaryProperties = "ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS";
6787
7896
  var ecma10BinaryProperties = ecma9BinaryProperties + " Extended_Pictographic";
6788
7897
  var ecma11BinaryProperties = ecma10BinaryProperties;
@@ -7785,12 +8894,15 @@ pp.readToken = function(code) {
7785
8894
  if (isIdentifierStart(code, this.options.ecmaVersion >= 6) || code === 92) return this.readWord();
7786
8895
  return this.getTokenFromCode(code);
7787
8896
  };
7788
- pp.fullCharCodeAtPos = function() {
7789
- var code = this.input.charCodeAt(this.pos);
8897
+ pp.fullCharCodeAt = function(pos) {
8898
+ var code = this.input.charCodeAt(pos);
7790
8899
  if (code <= 55295 || code >= 56320) return code;
7791
- var next = this.input.charCodeAt(this.pos + 1);
8900
+ var next = this.input.charCodeAt(pos + 1);
7792
8901
  return next <= 56319 || next >= 57344 ? code : (code << 10) + next - 56613888;
7793
8902
  };
8903
+ pp.fullCharCodeAtPos = function() {
8904
+ return this.fullCharCodeAt(this.pos);
8905
+ };
7794
8906
  pp.skipBlockComment = function() {
7795
8907
  var startLoc = this.options.onComment && this.curPosition();
7796
8908
  var start = this.pos, end = this.input.indexOf("*/", this.pos += 2);
@@ -8222,9 +9334,7 @@ pp.readTmplToken = function() {
8222
9334
  case 10:
8223
9335
  out += "\n";
8224
9336
  break;
8225
- default:
8226
- out += String.fromCharCode(ch);
8227
- break;
9337
+ default: out += String.fromCharCode(ch);
8228
9338
  }
8229
9339
  if (this.options.locations) {
8230
9340
  ++this.curLine;
@@ -8247,7 +9357,6 @@ pp.readInvalidTemplateToken = function() {
8247
9357
  case "\u2029":
8248
9358
  ++this.curLine;
8249
9359
  this.lineStart = this.pos + 1;
8250
- break;
8251
9360
  }
8252
9361
  this.raise(this.start, "Unterminated template");
8253
9362
  };
@@ -8336,7 +9445,7 @@ pp.readWord = function() {
8336
9445
  };
8337
9446
  Parser.acorn = {
8338
9447
  Parser,
8339
- version: "8.15.0",
9448
+ version: "8.18.0",
8340
9449
  defaultOptions,
8341
9450
  Position,
8342
9451
  SourceLocation,
@@ -10437,6 +11546,9 @@ function getWebAppPluginData(webApp, pluginKey) {
10437
11546
  return webApp.pluginData?.[pluginKey];
10438
11547
  }
10439
11548
  //#endregion
11549
+ //#region ../../packages/project-builder-lib/dist/schema/libraries/types.js
11550
+ var libraryEntityType = createEntityType("library");
11551
+ //#endregion
10440
11552
  //#region ../../packages/project-builder-lib/dist/schema/apps/web/web-app.js
10441
11553
  var createWebAppSchema = definitionSchemaWithSlots({ appSlot: appEntityType }, (ctx, { appSlot }) => {
10442
11554
  const pluginKeys = ctx.plugins.getPluginKeys();
@@ -10450,14 +11562,24 @@ var createWebAppSchema = definitionSchemaWithSlots({ appSlot: appEntityType }, (
10450
11562
  description: __mf_0.string().default(""),
10451
11563
  enableSubscriptions: ctx.withDefault(__mf_0.boolean(), false),
10452
11564
  pluginData: pluginDataSchema.optional(),
10453
- adminApp: createAdminAppSchema(ctx, { appSlot })
11565
+ adminApp: createAdminAppSchema(ctx, { appSlot }),
11566
+ libraryRefs: __mf_0.array(ctx.withRef({
11567
+ type: libraryEntityType,
11568
+ onDelete: "RESTRICT"
11569
+ })).apply(withDefault([])),
11570
+ /**
11571
+ * Optional reference to a `react-library` package that supplies the
11572
+ * shared `react-components` UI primitive set (Button, Dialog, Toaster,
11573
+ * etc.) instead of generating them locally in this app.
11574
+ */
11575
+ componentsLibraryRef: __mf_0.optional(ctx.withRef({
11576
+ type: libraryEntityType,
11577
+ onDelete: "RESTRICT"
11578
+ }))
10454
11579
  });
10455
11580
  });
10456
11581
  var webAppEntryType = createAppEntryType("web");
10457
11582
  //#endregion
10458
- //#region ../../packages/project-builder-lib/dist/schema/libraries/types.js
10459
- var libraryEntityType = createEntityType("library");
10460
- //#endregion
10461
11583
  //#region ../../packages/project-builder-lib/dist/schema/libraries/base.js
10462
11584
  var baseLibraryValidators = {
10463
11585
  id: __mf_0.string().default(libraryEntityType.generateNewId()),
@@ -10899,6 +12021,13 @@ var nodeLibraryDefinitionSchemaEntry = {
10899
12021
  type: __mfDefaultExport.literal("node-library")
10900
12022
  }))
10901
12023
  };
12024
+ var reactLibraryDefinitionSchemaEntry = {
12025
+ name: "react-library",
12026
+ definitionSchema: definitionSchemaWithSlots({ librarySlot: libraryEntityType }, () => __mfDefaultExport.object({
12027
+ ...baseLibraryValidators,
12028
+ type: __mfDefaultExport.literal("react-library")
12029
+ }))
12030
+ };
10902
12031
  /**
10903
12032
  * Creates a typed library web config
10904
12033
  */
@@ -10909,7 +12038,7 @@ function createLibraryWebConfig(config) {
10909
12038
  * Package type spec for registering package schemas, compilers, and web configs.
10910
12039
  */
10911
12040
  var libraryTypeSpec = createFieldMapSpec("core/library-type", (t) => ({
10912
- schemaCreators: t.namedArrayToMap([nodeLibraryDefinitionSchemaEntry]),
12041
+ schemaCreators: t.namedArrayToMap([nodeLibraryDefinitionSchemaEntry, reactLibraryDefinitionSchemaEntry]),
10913
12042
  compilerCreators: t.namedArrayToMap(),
10914
12043
  webConfigs: t.namedArrayToMap()
10915
12044
  }));
@@ -11315,10 +12444,24 @@ function byUniqueTypeOrThrow(projectDefinition, type) {
11315
12444
  function getLibraryDirectory(libraryConfig, monorepoSettings) {
11316
12445
  return `${monorepoSettings?.librariesFolder ?? "libs"}/${libraryConfig.name}`;
11317
12446
  }
12447
+ /**
12448
+ * Given a library config and the app importing it, get the path to the
12449
+ * library's `src` directory relative to the app's `src` root (where
12450
+ * `styles.css` is rendered), for use in a Tailwind `@source` directive.
12451
+ *
12452
+ * @param libraryConfig The library config being imported
12453
+ * @param appConfig The app importing the library
12454
+ * @param monorepoSettings Optional monorepo settings to determine folder locations
12455
+ * @returns The relative path from the app's `src` root to the library's `src` directory
12456
+ */
12457
+ function getLibraryRelativeSourcePath(libraryConfig, appConfig, monorepoSettings) {
12458
+ return computeRelativePath(`${AppUtils.getAppDirectory(appConfig, monorepoSettings)}/src`, `${getLibraryDirectory(libraryConfig, monorepoSettings)}/src`);
12459
+ }
11318
12460
  var LibraryUtils = {
11319
12461
  byId,
11320
12462
  byUniqueTypeOrThrow,
11321
- getLibraryDirectory
12463
+ getLibraryDirectory,
12464
+ getLibraryRelativeSourcePath
11322
12465
  };
11323
12466
  //#endregion
11324
12467
  //#region ../../packages/project-builder-lib/dist/parser/parser.js
@@ -11375,7 +12518,8 @@ function createPluginImplementationStoreWithNewPlugins(pluginStore, plugins, pro
11375
12518
  */
11376
12519
  function createProjectDefinitionSchemaWithContext(projectDefinition, context) {
11377
12520
  const { pluginStore } = context;
11378
- return createProjectDefinitionSchema(createDefinitionSchemaParserContext({ plugins: createPluginSpecStore(pluginStore, projectDefinition) }));
12521
+ const pluginSpecStore = createPluginSpecStore(pluginStore, projectDefinition);
12522
+ return createProjectDefinitionSchema(createDefinitionSchemaParserContext({ plugins: pluginSpecStore }));
11379
12523
  }
11380
12524
  function parseProjectDefinitionWithContext(projectDefinition, context) {
11381
12525
  return createProjectDefinitionSchemaWithContext(projectDefinition, context).parse(projectDefinition);
@@ -11557,7 +12701,6 @@ function walkNode(schema, path, visitors, visited) {
11557
12701
  case "intersection":
11558
12702
  walkNode(children.left, path, visitors, visited);
11559
12703
  walkNode(children.right, path, visitors, visited);
11560
- break;
11561
12704
  }
11562
12705
  for (const cleanup of cleanups.toReversed()) cleanup();
11563
12706
  visited.delete(schema);
@@ -11792,7 +12935,8 @@ var ProjectDefinitionContainer = class ProjectDefinitionContainer {
11792
12935
  */
11793
12936
  toSerializedContents() {
11794
12937
  const serializedContents = serializeSchema(this.schema, this.definition);
11795
- return stringifyPrettyStable(sortEntityArrays(this.schema, serializedContents));
12938
+ const sortedContents = sortEntityArrays(this.schema, serializedContents);
12939
+ return stringifyPrettyStable(sortedContents);
11796
12940
  }
11797
12941
  /**
11798
12942
  * Creates a new ProjectDefinitionContainer from a serialized configuration.
@@ -13087,7 +14231,7 @@ var convertLab65ToDlch = ({ l, a, b, alpha }) => {
13087
14231
  let res = {
13088
14232
  mode: "dlch",
13089
14233
  l: factor / 1 * Math.log(1 + .0039 * l),
13090
- c: Math.log(1 + .075 * G) / (.0435 * 1 * 1)
14234
+ c: Math.log(1 + .075 * G) / .0435
13091
14235
  };
13092
14236
  if (res.c) res.h = normalizeHue((Math.atan2(f, e) + θ) / Math.PI * 180);
13093
14237
  if (alpha !== void 0) res.alpha = alpha;
@@ -14841,7 +15985,7 @@ var α$1 = 1.09929682680944;
14841
15985
  var β$1 = .018053968510807;
14842
15986
  var gamma = (v) => {
14843
15987
  const abs = Math.abs(v);
14844
- if (abs > β$1) return (Math.sign(v) || 1) * (α$1 * Math.pow(abs, .45) - (α$1 - 1));
15988
+ if (abs > β$1) return (Math.sign(v) || 1) * (α$1 * Math.pow(abs, .45) - .09929682680944008);
14845
15989
  return 4.5 * v;
14846
15990
  };
14847
15991
  var convertXyz65ToRec2020 = ({ x, y, z, alpha }) => {
@@ -16552,7 +17696,6 @@ function walkSchemaNode(schema, pathParts, result, visited) {
16552
17696
  case "intersection":
16553
17697
  walkSchemaNode(children.left, pathParts, result, visited);
16554
17698
  walkSchemaNode(children.right, pathParts, result, visited);
16555
- break;
16556
17699
  }
16557
17700
  visited.delete(schema);
16558
17701
  }
@@ -16788,6 +17931,37 @@ function previewIssueFix(issue, container) {
16788
17931
  return diffSerializedDefinitions(schema, serializeSchema(schema, definition), serializeSchema(schema, fixedDefinition));
16789
17932
  }
16790
17933
  //#endregion
17934
+ //#region ../../packages/project-builder-lib/dist/parser/definition-issue-checkers/library-ref-type-checker.js
17935
+ /**
17936
+ * Checks that web apps only reference libraries of type `react-library`.
17937
+ *
17938
+ * `libraryRefs` and `componentsLibraryRef` accept any library entity, but
17939
+ * only a react-library package can be imported by a web app's generated code.
17940
+ */
17941
+ function checkLibraryRefType(container) {
17942
+ const { apps, libraries } = container.definition;
17943
+ const issues = [];
17944
+ const webApps = apps.filter((app) => app.type === "web");
17945
+ for (const app of webApps) {
17946
+ for (const [refIndex, libraryId] of app.libraryRefs.entries()) {
17947
+ const library = libraries.find((lib) => lib.id === libraryId);
17948
+ if (!library || library.type === "react-library") continue;
17949
+ issues.push(createEntityIssue(container, app.id, ["libraryRefs", refIndex], {
17950
+ message: `App '${app.name}' references library '${library.name}' which is not a React library and cannot be imported`,
17951
+ severity: "error"
17952
+ }));
17953
+ }
17954
+ if (app.componentsLibraryRef) {
17955
+ const library = libraries.find((lib) => lib.id === app.componentsLibraryRef);
17956
+ if (library && library.type !== "react-library") issues.push(createEntityIssue(container, app.id, ["componentsLibraryRef"], {
17957
+ message: `App '${app.name}' references library '${library.name}' as its components library, which is not a React library`,
17958
+ severity: "error"
17959
+ }));
17960
+ }
17961
+ }
17962
+ return issues;
17963
+ }
17964
+ //#endregion
16791
17965
  //#region ../../packages/project-builder-lib/dist/parser/definition-issue-checkers/mutation-roles-checker.js
16792
17966
  var MUTATION_METHODS = [
16793
17967
  "create",
@@ -16977,7 +18151,8 @@ var BUILT_IN_CHECKERS = [
16977
18151
  checkRelationTypeMismatch,
16978
18152
  checkMutationRoles,
16979
18153
  checkPluginDependencies,
16980
- checkPluginImplementations
18154
+ checkPluginImplementations,
18155
+ checkLibraryRefType
16981
18156
  ];
16982
18157
  /**
16983
18158
  * Splits issues into errors (block save) and warnings (block sync only).
@@ -17488,9 +18663,7 @@ var DefinitionDiffKeyedArrayField = class extends DefinitionDiffField {
17488
18663
  items[index] = toMerged(existingItem, item);
17489
18664
  break;
17490
18665
  }
17491
- case "remove":
17492
- if (index !== -1) items.splice(index, 1);
17493
- break;
18666
+ case "remove": if (index !== -1) items.splice(index, 1);
17494
18667
  }
17495
18668
  }
17496
18669
  return items;
@@ -17597,215 +18770,8 @@ function applyDefinitionDiff(current, diff, configuration) {
17597
18770
  //#region ../../packages/project-builder-lib/dist/utils/theme.js
17598
18771
  var import_inflection = (/* @__PURE__ */ __commonJSMin(((exports) => {
17599
18772
  Object.defineProperty(exports, "__esModule", { value: true });
17600
- exports.transform = exports.ordinalize = exports.foreignKey = exports.classify = exports.tableize = exports.demodulize = exports.titleize = exports.dasherize = exports.capitalize = exports.humanize = exports.underscore = exports.camelize = exports.inflect = exports.singularize = exports.pluralize = void 0;
17601
- /**
17602
- * @description This is a list of nouns that use the same form for both singular and plural.
17603
- * This list should remain entirely in lower case to correctly match Strings.
17604
- */
17605
- var uncountableWords = [
17606
- "accommodation",
17607
- "adulthood",
17608
- "advertising",
17609
- "advice",
17610
- "aggression",
17611
- "aid",
17612
- "air",
17613
- "aircraft",
17614
- "alcohol",
17615
- "anger",
17616
- "applause",
17617
- "arithmetic",
17618
- "assistance",
17619
- "athletics",
17620
- "bacon",
17621
- "baggage",
17622
- "beef",
17623
- "biology",
17624
- "blood",
17625
- "botany",
17626
- "bread",
17627
- "butter",
17628
- "carbon",
17629
- "cardboard",
17630
- "cash",
17631
- "chalk",
17632
- "chaos",
17633
- "chess",
17634
- "crossroads",
17635
- "countryside",
17636
- "dancing",
17637
- "deer",
17638
- "dignity",
17639
- "dirt",
17640
- "dust",
17641
- "economics",
17642
- "education",
17643
- "electricity",
17644
- "engineering",
17645
- "enjoyment",
17646
- "envy",
17647
- "equipment",
17648
- "ethics",
17649
- "evidence",
17650
- "evolution",
17651
- "fame",
17652
- "fiction",
17653
- "flour",
17654
- "flu",
17655
- "food",
17656
- "fuel",
17657
- "fun",
17658
- "furniture",
17659
- "gallows",
17660
- "garbage",
17661
- "garlic",
17662
- "genetics",
17663
- "gold",
17664
- "golf",
17665
- "gossip",
17666
- "gratitude",
17667
- "grief",
17668
- "guilt",
17669
- "gymnastics",
17670
- "happiness",
17671
- "hardware",
17672
- "harm",
17673
- "hate",
17674
- "hatred",
17675
- "health",
17676
- "heat",
17677
- "help",
17678
- "homework",
17679
- "honesty",
17680
- "honey",
17681
- "hospitality",
17682
- "housework",
17683
- "humour",
17684
- "hunger",
17685
- "hydrogen",
17686
- "ice",
17687
- "importance",
17688
- "inflation",
17689
- "information",
17690
- "innocence",
17691
- "iron",
17692
- "irony",
17693
- "jam",
17694
- "jewelry",
17695
- "judo",
17696
- "karate",
17697
- "knowledge",
17698
- "lack",
17699
- "laughter",
17700
- "lava",
17701
- "leather",
17702
- "leisure",
17703
- "lightning",
17704
- "linguine",
17705
- "linguini",
17706
- "linguistics",
17707
- "literature",
17708
- "litter",
17709
- "livestock",
17710
- "logic",
17711
- "loneliness",
17712
- "luck",
17713
- "luggage",
17714
- "macaroni",
17715
- "machinery",
17716
- "magic",
17717
- "management",
17718
- "mankind",
17719
- "marble",
17720
- "mathematics",
17721
- "mayonnaise",
17722
- "measles",
17723
- "methane",
17724
- "milk",
17725
- "minus",
17726
- "money",
17727
- "mud",
17728
- "music",
17729
- "mumps",
17730
- "nature",
17731
- "news",
17732
- "nitrogen",
17733
- "nonsense",
17734
- "nurture",
17735
- "nutrition",
17736
- "obedience",
17737
- "obesity",
17738
- "oxygen",
17739
- "pasta",
17740
- "patience",
17741
- "physics",
17742
- "poetry",
17743
- "pollution",
17744
- "poverty",
17745
- "pride",
17746
- "psychology",
17747
- "publicity",
17748
- "punctuation",
17749
- "quartz",
17750
- "racism",
17751
- "relaxation",
17752
- "reliability",
17753
- "research",
17754
- "respect",
17755
- "revenge",
17756
- "rice",
17757
- "rubbish",
17758
- "rum",
17759
- "safety",
17760
- "scenery",
17761
- "seafood",
17762
- "seaside",
17763
- "series",
17764
- "shame",
17765
- "sheep",
17766
- "shopping",
17767
- "sleep",
17768
- "smoke",
17769
- "smoking",
17770
- "snow",
17771
- "soap",
17772
- "software",
17773
- "soil",
17774
- "spaghetti",
17775
- "species",
17776
- "steam",
17777
- "stuff",
17778
- "stupidity",
17779
- "sunshine",
17780
- "symmetry",
17781
- "tennis",
17782
- "thirst",
17783
- "thunder",
17784
- "timber",
17785
- "traffic",
17786
- "transportation",
17787
- "trust",
17788
- "underwear",
17789
- "unemployment",
17790
- "unity",
17791
- "validity",
17792
- "veal",
17793
- "vegetation",
17794
- "vegetarianism",
17795
- "vengeance",
17796
- "violence",
17797
- "vitality",
17798
- "warmth",
17799
- "wealth",
17800
- "weather",
17801
- "welfare",
17802
- "wheat",
17803
- "wildlife",
17804
- "wisdom",
17805
- "yoga",
17806
- "zinc",
17807
- "zoology"
17808
- ];
18773
+ exports.underscore = underscore;
18774
+ exports.dasherize = dasherize;
17809
18775
  /**
17810
18776
  * @description These rules translate from the singular form of a noun to its plural form.
17811
18777
  */
@@ -17863,6 +18829,7 @@ var import_inflection = (/* @__PURE__ */ __commonJSMin(((exports) => {
17863
18829
  tium: /* @__PURE__ */ new RegExp("([ti])um$", "gi"),
17864
18830
  sis: /* @__PURE__ */ new RegExp("sis$", "gi"),
17865
18831
  ffe: /* @__PURE__ */ new RegExp("(?:([^f])fe|([lr])f)$", "gi"),
18832
+ focus: /* @__PURE__ */ new RegExp("^(focus)$", "gi"),
17866
18833
  hive: /* @__PURE__ */ new RegExp("(hi|ti)ve$", "gi"),
17867
18834
  aeiouyy: /* @__PURE__ */ new RegExp("([^aeiouy]|qu)y$", "gi"),
17868
18835
  x: /* @__PURE__ */ new RegExp("(x|ch|ss|sh)$", "gi"),
@@ -17880,290 +18847,12 @@ var import_inflection = (/* @__PURE__ */ __commonJSMin(((exports) => {
17880
18847
  common: /* @__PURE__ */ new RegExp("$", "gi")
17881
18848
  }
17882
18849
  };
17883
- var pluralRules = [
17884
- [regex.plural.men],
17885
- [regex.plural.people],
17886
- [regex.plural.children],
17887
- [regex.plural.tia],
17888
- [regex.plural.analyses],
17889
- [regex.plural.databases],
17890
- [regex.plural.drives],
17891
- [regex.plural.hives],
17892
- [regex.plural.curves],
17893
- [regex.plural.lrves],
17894
- [regex.plural.foves],
17895
- [regex.plural.aeiouyies],
17896
- [regex.plural.series],
17897
- [regex.plural.movies],
17898
- [regex.plural.xes],
17899
- [regex.plural.mice],
17900
- [regex.plural.buses],
17901
- [regex.plural.oes],
17902
- [regex.plural.shoes],
17903
- [regex.plural.crises],
17904
- [regex.plural.octopuses],
17905
- [regex.plural.aliases],
17906
- [regex.plural.summonses],
17907
- [regex.plural.oxen],
17908
- [regex.plural.matrices],
17909
- [regex.plural.feet],
17910
- [regex.plural.teeth],
17911
- [regex.plural.geese],
17912
- [regex.plural.quizzes],
17913
- [regex.plural.whereases],
17914
- [regex.plural.criteria],
17915
- [regex.plural.genera],
17916
- [regex.singular.man, "$1en"],
17917
- [regex.singular.person, "$1ople"],
17918
- [regex.singular.child, "$1ren"],
17919
- [regex.singular.drive, "$1s"],
17920
- [regex.singular.ox, "$1en"],
17921
- [regex.singular.axis, "$1es"],
17922
- [regex.singular.octopus, "$1uses"],
17923
- [regex.singular.alias, "$1es"],
17924
- [regex.singular.summons, "$1es"],
17925
- [regex.singular.bus, "$1ses"],
17926
- [regex.singular.buffalo, "$1oes"],
17927
- [regex.singular.tium, "$1a"],
17928
- [regex.singular.sis, "ses"],
17929
- [regex.singular.ffe, "$1$2ves"],
17930
- [regex.singular.hive, "$1ves"],
17931
- [regex.singular.aeiouyy, "$1ies"],
17932
- [regex.singular.matrix, "$1ices"],
17933
- [regex.singular.vertex, "$1ices"],
17934
- [regex.singular.x, "$1es"],
17935
- [regex.singular.mouse, "$1ice"],
17936
- [regex.singular.foot, "feet"],
17937
- [regex.singular.tooth, "teeth"],
17938
- [regex.singular.goose, "geese"],
17939
- [regex.singular.quiz, "$1zes"],
17940
- [regex.singular.whereas, "$1es"],
17941
- [regex.singular.criterion, "$1a"],
17942
- [regex.singular.genus, "genera"],
17943
- [regex.singular.s, "s"],
17944
- [regex.singular.common, "s"]
17945
- ];
17946
- /**
17947
- * @description These rules translate from the plural form of a noun to its singular form.
17948
- */
17949
- var singularRules = [
17950
- [regex.singular.man],
17951
- [regex.singular.person],
17952
- [regex.singular.child],
17953
- [regex.singular.drive],
17954
- [regex.singular.ox],
17955
- [regex.singular.axis],
17956
- [regex.singular.octopus],
17957
- [regex.singular.alias],
17958
- [regex.singular.summons],
17959
- [regex.singular.bus],
17960
- [regex.singular.buffalo],
17961
- [regex.singular.tium],
17962
- [regex.singular.sis],
17963
- [regex.singular.ffe],
17964
- [regex.singular.hive],
17965
- [regex.singular.aeiouyy],
17966
- [regex.singular.x],
17967
- [regex.singular.matrix],
17968
- [regex.singular.mouse],
17969
- [regex.singular.foot],
17970
- [regex.singular.tooth],
17971
- [regex.singular.goose],
17972
- [regex.singular.quiz],
17973
- [regex.singular.whereas],
17974
- [regex.singular.criterion],
17975
- [regex.singular.genus],
17976
- [regex.plural.men, "$1an"],
17977
- [regex.plural.people, "$1rson"],
17978
- [regex.plural.children, "$1"],
17979
- [regex.plural.databases, "$1"],
17980
- [regex.plural.drives, "$1"],
17981
- [regex.plural.genera, "genus"],
17982
- [regex.plural.criteria, "$1on"],
17983
- [regex.plural.tia, "$1um"],
17984
- [regex.plural.analyses, "$1$2sis"],
17985
- [regex.plural.hives, "$1ve"],
17986
- [regex.plural.curves, "$1"],
17987
- [regex.plural.lrves, "$1f"],
17988
- [regex.plural.aves, "$1ve"],
17989
- [regex.plural.foves, "$1fe"],
17990
- [regex.plural.movies, "$1ovie"],
17991
- [regex.plural.aeiouyies, "$1y"],
17992
- [regex.plural.series, "$1eries"],
17993
- [regex.plural.xes, "$1"],
17994
- [regex.plural.mice, "$1ouse"],
17995
- [regex.plural.buses, "$1"],
17996
- [regex.plural.oes, "$1"],
17997
- [regex.plural.shoes, "$1"],
17998
- [regex.plural.crises, "$1is"],
17999
- [regex.plural.octopuses, "$1us"],
18000
- [regex.plural.aliases, "$1"],
18001
- [regex.plural.summonses, "$1"],
18002
- [regex.plural.oxen, "$1"],
18003
- [regex.plural.matrices, "$1ix"],
18004
- [regex.plural.vertices, "$1ex"],
18005
- [regex.plural.feet, "foot"],
18006
- [regex.plural.teeth, "tooth"],
18007
- [regex.plural.geese, "goose"],
18008
- [regex.plural.quizzes, "$1"],
18009
- [regex.plural.whereases, "$1"],
18010
- [regex.plural.ss, "ss"],
18011
- [regex.plural.s, ""]
18012
- ];
18013
- /**
18014
- * @description This is a list of words that should not be capitalized for title case.
18015
- */
18016
- var nonTitlecasedWords = [
18017
- "and",
18018
- "or",
18019
- "nor",
18020
- "a",
18021
- "an",
18022
- "the",
18023
- "so",
18024
- "but",
18025
- "to",
18026
- "of",
18027
- "at",
18028
- "by",
18029
- "from",
18030
- "into",
18031
- "on",
18032
- "onto",
18033
- "off",
18034
- "out",
18035
- "in",
18036
- "over",
18037
- "with",
18038
- "for"
18039
- ];
18040
- /**
18041
- * @description These are regular expressions used for converting between String formats.
18042
- */
18043
- var idSuffix = /* @__PURE__ */ new RegExp("(_ids|_id)$", "g");
18044
- var underbar = /* @__PURE__ */ new RegExp("_", "g");
18850
+ regex.plural.men, regex.plural.people, regex.plural.children, regex.plural.tia, regex.plural.analyses, regex.plural.databases, regex.plural.drives, regex.plural.hives, regex.plural.curves, regex.plural.lrves, regex.plural.foves, regex.plural.aeiouyies, regex.plural.series, regex.plural.movies, regex.plural.xes, regex.plural.mice, regex.plural.buses, regex.plural.oes, regex.plural.shoes, regex.plural.crises, regex.plural.octopuses, regex.plural.aliases, regex.plural.summonses, regex.plural.oxen, regex.plural.matrices, regex.plural.feet, regex.plural.teeth, regex.plural.geese, regex.plural.quizzes, regex.plural.whereases, regex.plural.criteria, regex.plural.genera, regex.singular.man, regex.singular.person, regex.singular.child, regex.singular.drive, regex.singular.ox, regex.singular.axis, regex.singular.octopus, regex.singular.alias, regex.singular.summons, regex.singular.bus, regex.singular.buffalo, regex.singular.tium, regex.singular.sis, regex.singular.ffe, regex.singular.focus, regex.singular.hive, regex.singular.aeiouyy, regex.singular.matrix, regex.singular.vertex, regex.singular.x, regex.singular.mouse, regex.singular.foot, regex.singular.tooth, regex.singular.goose, regex.singular.quiz, regex.singular.whereas, regex.singular.criterion, regex.singular.genus, regex.singular.s, regex.singular.common;
18851
+ regex.singular.man, regex.singular.person, regex.singular.child, regex.singular.drive, regex.singular.ox, regex.singular.axis, regex.singular.octopus, regex.singular.alias, regex.singular.summons, regex.singular.bus, regex.singular.buffalo, regex.singular.tium, regex.singular.sis, regex.singular.ffe, regex.singular.focus, regex.singular.hive, regex.singular.aeiouyy, regex.singular.x, regex.singular.matrix, regex.singular.mouse, regex.singular.foot, regex.singular.tooth, regex.singular.goose, regex.singular.quiz, regex.singular.whereas, regex.singular.criterion, regex.singular.genus, regex.plural.men, regex.plural.people, regex.plural.children, regex.plural.databases, regex.plural.drives, regex.plural.genera, regex.plural.criteria, regex.plural.tia, regex.plural.analyses, regex.plural.hives, regex.plural.curves, regex.plural.lrves, regex.plural.aves, regex.plural.foves, regex.plural.movies, regex.plural.aeiouyies, regex.plural.series, regex.plural.xes, regex.plural.mice, regex.plural.buses, regex.plural.oes, regex.plural.shoes, regex.plural.crises, regex.plural.octopuses, regex.plural.aliases, regex.plural.summonses, regex.plural.oxen, regex.plural.matrices, regex.plural.vertices, regex.plural.feet, regex.plural.teeth, regex.plural.geese, regex.plural.quizzes, regex.plural.whereases, regex.plural.ss, regex.plural.s;
18045
18852
  var spaceOrUnderbar = /* @__PURE__ */ new RegExp("[ _]", "g");
18046
18853
  var uppercase = /* @__PURE__ */ new RegExp("([A-Z])", "g");
18047
18854
  var underbarPrefix = /* @__PURE__ */ new RegExp("^_");
18048
18855
  /**
18049
- * A helper method that applies rules based replacement to a String.
18050
- * @param str String to modify and return based on the passed rules.
18051
- * @param rules Regexp to match paired with String to use for replacement
18052
- * @param skip Strings to skip if they match
18053
- * @param override String to return as though this method succeeded (used to conform to APIs)
18054
- * @returns Return passed String modified by passed rules.
18055
- * @example
18056
- *
18057
- * applyRules( 'cows', singular_rules ); // === 'cow'
18058
- */
18059
- function applyRules(str, rules, skip, override) {
18060
- if (override) return override;
18061
- else {
18062
- if (skip.includes(str.toLocaleLowerCase())) return str;
18063
- for (const rule of rules) if (str.match(rule[0])) {
18064
- if (rule[1] !== void 0) return str.replace(rule[0], rule[1]);
18065
- return str;
18066
- }
18067
- }
18068
- return str;
18069
- }
18070
- /**
18071
- * This function adds pluralization support to every String object.
18072
- * @param str The subject string.
18073
- * @param plural Overrides normal output with said String.(optional)
18074
- * @returns Singular English language nouns are returned in plural form.
18075
- * @example
18076
- *
18077
- * const inflection = require( 'inflection' );
18078
- *
18079
- * inflection.pluralize( 'person' ); // === 'people'
18080
- * inflection.pluralize( 'octopus' ); // === 'octopuses'
18081
- * inflection.pluralize( 'Hat' ); // === 'Hats'
18082
- * inflection.pluralize( 'person', 'guys' ); // === 'guys'
18083
- */
18084
- function pluralize(str, plural) {
18085
- return applyRules(str, pluralRules, uncountableWords, plural);
18086
- }
18087
- exports.pluralize = pluralize;
18088
- /**
18089
- * This function adds singularization support to every String object.
18090
- * @param str The subject string.
18091
- * @param singular Overrides normal output with said String.(optional)
18092
- * @returns Plural English language nouns are returned in singular form.
18093
- * @example
18094
- *
18095
- * const inflection = require( 'inflection' );
18096
- *
18097
- * inflection.singularize( 'people' ); // === 'person'
18098
- * inflection.singularize( 'octopuses' ); // === 'octopus'
18099
- * inflection.singularize( 'Hats' ); // === 'Hat'
18100
- * inflection.singularize( 'guys', 'person' ); // === 'person'
18101
- */
18102
- function singularize(str, singular) {
18103
- return applyRules(str, singularRules, uncountableWords, singular);
18104
- }
18105
- exports.singularize = singularize;
18106
- /**
18107
- * This function will pluralize or singularlize a String appropriately based on a number value
18108
- * @param str The subject string.
18109
- * @param count The number to base pluralization off of.
18110
- * @param singular Overrides normal output with said String.(optional)
18111
- * @param plural Overrides normal output with said String.(optional)
18112
- * @returns English language nouns are returned in the plural or singular form based on the count.
18113
- * @example
18114
- *
18115
- * const inflection = require( 'inflection' );
18116
- *
18117
- * inflection.inflect( 'people' 1 ); // === 'person'
18118
- * inflection.inflect( 'octopuses' 1 ); // === 'octopus'
18119
- * inflection.inflect( 'Hats' 1 ); // === 'Hat'
18120
- * inflection.inflect( 'guys', 1 , 'person' ); // === 'person'
18121
- * inflection.inflect( 'inches', 1.5 ); // === 'inches'
18122
- * inflection.inflect( 'person', 2 ); // === 'people'
18123
- * inflection.inflect( 'octopus', 2 ); // === 'octopuses'
18124
- * inflection.inflect( 'Hat', 2 ); // === 'Hats'
18125
- * inflection.inflect( 'person', 2, null, 'guys' ); // === 'guys'
18126
- */
18127
- function inflect(str, count, singular, plural) {
18128
- if (isNaN(count)) return str;
18129
- if (count === 1) return applyRules(str, singularRules, uncountableWords, singular);
18130
- else return applyRules(str, pluralRules, uncountableWords, plural);
18131
- }
18132
- exports.inflect = inflect;
18133
- /**
18134
- * This function adds camelization support to every String object.
18135
- * @param str The subject string.
18136
- * @param lowFirstLetter Default is to capitalize the first letter of the results.(optional)
18137
- * Passing true will lowercase it.
18138
- * @returns Lower case underscored words will be returned in camel case.
18139
- * additionally '/' is translated to '::'
18140
- * @example
18141
- *
18142
- * const inflection = require( 'inflection' );
18143
- *
18144
- * inflection.camelize( 'message_properties' ); // === 'MessageProperties'
18145
- * inflection.camelize( 'message_properties', true ); // === 'messageProperties'
18146
- */
18147
- function camelize(str, lowFirstLetter) {
18148
- const strPath = str.split("/");
18149
- const j = strPath.length;
18150
- let strArr, k, l, first;
18151
- for (let i = 0; i < j; i++) {
18152
- strArr = strPath[i].split("_");
18153
- k = 0;
18154
- l = strArr.length;
18155
- for (; k < l; k++) {
18156
- if (k !== 0) strArr[k] = strArr[k].toLowerCase();
18157
- first = strArr[k].charAt(0);
18158
- first = lowFirstLetter && i === 0 && k === 0 ? first.toLowerCase() : first.toUpperCase();
18159
- strArr[k] = first + strArr[k].substring(1);
18160
- }
18161
- strPath[i] = strArr.join("");
18162
- }
18163
- return strPath.join("::");
18164
- }
18165
- exports.camelize = camelize;
18166
- /**
18167
18856
  * This function adds underscore support to every String object.
18168
18857
  * @param str The subject string.
18169
18858
  * @param allUpperCase Default is to lowercase and add underscore prefix.(optional)
@@ -18188,44 +18877,6 @@ var import_inflection = (/* @__PURE__ */ __commonJSMin(((exports) => {
18188
18877
  }
18189
18878
  return strPath.join("/").toLowerCase();
18190
18879
  }
18191
- exports.underscore = underscore;
18192
- /**
18193
- * This function adds humanize support to every String object.
18194
- * @param str The subject string.
18195
- * @param lowFirstLetter Default is to capitalize the first letter of the results.(optional)
18196
- * Passing true will lowercase it.
18197
- * @returns Lower case underscored words will be returned in humanized form.
18198
- * @example
18199
- *
18200
- * const inflection = require( 'inflection' );
18201
- *
18202
- * inflection.humanize( 'message_properties' ); // === 'Message properties'
18203
- * inflection.humanize( 'message_properties', true ); // === 'message properties'
18204
- */
18205
- function humanize(str, lowFirstLetter) {
18206
- str = str.toLowerCase();
18207
- str = str.replace(idSuffix, "");
18208
- str = str.replace(underbar, " ");
18209
- if (!lowFirstLetter) str = capitalize(str);
18210
- return str;
18211
- }
18212
- exports.humanize = humanize;
18213
- /**
18214
- * This function adds capitalization support to every String object.
18215
- * @param str The subject string.
18216
- * @returns All characters will be lower case and the first will be upper.
18217
- * @example
18218
- *
18219
- * const inflection = require( 'inflection' );
18220
- *
18221
- * inflection.capitalize( 'message_properties' ); // === 'Message_properties'
18222
- * inflection.capitalize( 'message properties', true ); // === 'Message properties'
18223
- */
18224
- function capitalize(str) {
18225
- str = str.toLowerCase();
18226
- return str.substring(0, 1).toUpperCase() + str.substring(1);
18227
- }
18228
- exports.capitalize = capitalize;
18229
18880
  /**
18230
18881
  * This function replaces underscores with dashes in the string.
18231
18882
  * @param str The subject string.
@@ -18240,165 +18891,6 @@ var import_inflection = (/* @__PURE__ */ __commonJSMin(((exports) => {
18240
18891
  function dasherize(str) {
18241
18892
  return str.replace(spaceOrUnderbar, "-");
18242
18893
  }
18243
- exports.dasherize = dasherize;
18244
- /**
18245
- * This function adds titleize support to every String object.
18246
- * @param str The subject string.
18247
- * @returns Capitalizes words as you would for a book title.
18248
- * @example
18249
- *
18250
- * const inflection = require( 'inflection' );
18251
- *
18252
- * inflection.titleize( 'message_properties' ); // === 'Message Properties'
18253
- * inflection.titleize( 'message properties to keep' ); // === 'Message Properties to Keep'
18254
- */
18255
- function titleize(str) {
18256
- str = str.toLowerCase().replace(underbar, " ");
18257
- const strArr = str.split(" ");
18258
- const j = strArr.length;
18259
- let d, l;
18260
- for (let i = 0; i < j; i++) {
18261
- d = strArr[i].split("-");
18262
- l = d.length;
18263
- for (let k = 0; k < l; k++) if (nonTitlecasedWords.indexOf(d[k].toLowerCase()) < 0) d[k] = capitalize(d[k]);
18264
- strArr[i] = d.join("-");
18265
- }
18266
- str = strArr.join(" ");
18267
- str = str.substring(0, 1).toUpperCase() + str.substring(1);
18268
- return str;
18269
- }
18270
- exports.titleize = titleize;
18271
- /**
18272
- * This function adds demodulize support to every String object.
18273
- * @param str The subject string.
18274
- * @returns Removes module names leaving only class names.(Ruby style)
18275
- * @example
18276
- *
18277
- * const inflection = require( 'inflection' );
18278
- *
18279
- * inflection.demodulize( 'Message::Bus::Properties' ); // === 'Properties'
18280
- */
18281
- function demodulize(str) {
18282
- const strArr = str.split("::");
18283
- return strArr[strArr.length - 1];
18284
- }
18285
- exports.demodulize = demodulize;
18286
- /**
18287
- * This function adds tableize support to every String object.
18288
- * @param str The subject string.
18289
- * @returns Return camel cased words into their underscored plural form.
18290
- * @example
18291
- *
18292
- * const inflection = require( 'inflection' );
18293
- *
18294
- * inflection.tableize( 'MessageBusProperty' ); // === 'message_bus_properties'
18295
- */
18296
- function tableize(str) {
18297
- str = underscore(str);
18298
- str = pluralize(str);
18299
- return str;
18300
- }
18301
- exports.tableize = tableize;
18302
- /**
18303
- * This function adds classification support to every String object.
18304
- * @param str The subject string.
18305
- * @returns Underscored plural nouns become the camel cased singular form.
18306
- * @example
18307
- *
18308
- * const inflection = require( 'inflection' );
18309
- *
18310
- * inflection.classify( 'message_bus_properties' ); // === 'MessageBusProperty'
18311
- */
18312
- function classify(str) {
18313
- str = camelize(str);
18314
- str = singularize(str);
18315
- return str;
18316
- }
18317
- exports.classify = classify;
18318
- /**
18319
- * This function adds foreign key support to every String object.
18320
- * @param str The subject string.
18321
- * @param dropIdUbar Default is to seperate id with an underbar at the end of the class name,
18322
- you can pass true to skip it.(optional)
18323
- * @returns Underscored plural nouns become the camel cased singular form.
18324
- * @example
18325
- *
18326
- * const inflection = require( 'inflection' );
18327
- *
18328
- * inflection.foreign_key( 'MessageBusProperty' ); // === 'message_bus_property_id'
18329
- * inflection.foreign_key( 'MessageBusProperty', true ); // === 'message_bus_propertyid'
18330
- */
18331
- function foreignKey(str, dropIdUbar) {
18332
- str = demodulize(str);
18333
- str = underscore(str) + (dropIdUbar ? "" : "_") + "id";
18334
- return str;
18335
- }
18336
- exports.foreignKey = foreignKey;
18337
- /**
18338
- * This function adds ordinalize support to every String object.
18339
- * @param str The subject string.
18340
- * @returns Return all found numbers their sequence like '22nd'.
18341
- * @example
18342
- *
18343
- * const inflection = require( 'inflection' );
18344
- *
18345
- * inflection.ordinalize( 'the 1 pitch' ); // === 'the 1st pitch'
18346
- */
18347
- function ordinalize(str) {
18348
- const strArr = str.split(" ");
18349
- const j = strArr.length;
18350
- for (let i = 0; i < j; i++) {
18351
- const k = parseInt(strArr[i], 10);
18352
- if (!isNaN(k)) {
18353
- const ltd = strArr[i].substring(strArr[i].length - 2);
18354
- const ld = strArr[i].substring(strArr[i].length - 1);
18355
- let suf = "th";
18356
- if (ltd != "11" && ltd != "12" && ltd != "13") {
18357
- if (ld === "1") suf = "st";
18358
- else if (ld === "2") suf = "nd";
18359
- else if (ld === "3") suf = "rd";
18360
- }
18361
- strArr[i] += suf;
18362
- }
18363
- }
18364
- return strArr.join(" ");
18365
- }
18366
- exports.ordinalize = ordinalize;
18367
- var transformFunctions = {
18368
- pluralize,
18369
- singularize,
18370
- camelize,
18371
- underscore,
18372
- humanize,
18373
- capitalize,
18374
- dasherize,
18375
- titleize,
18376
- demodulize,
18377
- tableize,
18378
- classify,
18379
- foreignKey,
18380
- ordinalize
18381
- };
18382
- /**
18383
- * This function performs multiple inflection methods on a string
18384
- * @param str The subject string.
18385
- * @param arr An array of inflection methods.
18386
- * @returns
18387
- * @example
18388
- *
18389
- * const inflection = require( 'inflection' );
18390
- *
18391
- * inflection.transform( 'all job', [ 'pluralize', 'capitalize', 'dasherize' ]); // === 'All-jobs'
18392
- */
18393
- function transform(str, arr) {
18394
- const j = arr.length;
18395
- for (let i = 0; i < j; i++) {
18396
- const methodFn = transformFunctions[arr[i]];
18397
- if (methodFn) str = methodFn(str);
18398
- }
18399
- return str;
18400
- }
18401
- exports.transform = transform;
18402
18894
  })))();
18403
18895
  function getDefaultOklch(palettes, color) {
18404
18896
  if ("color" in color) return convertColorNameToOklch(color.color);
@@ -18448,6 +18940,6 @@ function generateDefaultTheme() {
18448
18940
  };
18449
18941
  }
18450
18942
  //#endregion
18451
- export { AVAILABLE_FLAGS, AppUtils, AuthorizerExpressionParseError, AuthorizerExpressionParser, BUILT_IN_ADMIN_CRUD_ACTIONS, BUILT_IN_ADMIN_CRUD_COLUMNS, BUILT_IN_ADMIN_CRUD_INPUTS, BUILT_IN_TRANSFORMERS, COLOR_PALETTES, DEFAULT_APPS_FOLDER, DEFAULT_LIBRARIES_FOLDER, DefinitionDiffArrayIncludesField, DefinitionDiffKeyedArrayField, DefinitionDiffReplacementField, DefinitionEntityType, EnumUtils, FIXED_COLOR_MAPPINGS, FeatureUtils, LibraryCompiler, LibraryUtils, ModelFieldUtils, ModelTransformerUtils, ModelUtils, PALETTE_SHADES, PackageCompiler, PluginSpecStore, PluginUtils, ProjectDefinitionContainer, REFERENTIAL_ACTIONS, RefExpressionParser, SCALAR_FIELD_TYPES, SCHEMA_MIGRATIONS, SchemaMigrationError, THEME_COLORS, THEME_COLOR_KEYS, VALIDATORS, adminCrudActionCompilerSpec, adminCrudActionEntityType, adminCrudActionSpec, adminCrudColumnCompilerSpec, adminCrudColumnEntityType, adminCrudColumnSpec, adminCrudEmbeddedFormEntityType, adminCrudEmbeddedInputType, adminCrudEmbeddedLocalInputType, adminCrudInputCompilerSpec, adminCrudInputEntityType, adminCrudInputSpec, adminCrudSectionColumnEntityType, adminSectionEntityType, appCompilerSpec, appEntityType, applyDefinitionDiff, applyDefinitionFixes, applyExpressionRenames, applyMergedDefinition, assignEntityIds, authConfigSpec, authModelsSpec, authRoleEntityType, backendAppEntryType, baseAdminCrudActionSchema, baseAdminCrudColumnSchema, baseAdminCrudInputSchema, baseAppSchema, baseAppValidators, baseLibrarySchema, baseLibraryValidators, basePluginDefinitionSchema, baseTransformerFields, baseTransformerSchema, buildEnabledPluginFqnSet, buildModelExpressionContext, buildPackageName, checkUniqueField, checkUniqueFieldValue, cleanDefaultValues, collectDefinitionIssues, collectEntityArrays, collectEntityMetadata, collectExpressionIssues, collectFieldIssues, convertColorNameToOklch, convertHexToOklch, convertOklchToColorName, convertOklchToHex, createAdminAppSchema, createAdminCrudActionSchema, createAdminCrudActionType, createAdminCrudColumnCompiler, createAdminCrudColumnSchema, createAdminCrudColumnType, createAdminCrudDeleteActionSchema, createAdminCrudEditActionSchema, createAdminCrudEmbeddedFormSchema, createAdminCrudEmbeddedInputSchema, createAdminCrudEmbeddedLocalInputSchema, createAdminCrudEnumInputSchema, createAdminCrudForeignColumnSchema, createAdminCrudForeignInputSchema, createAdminCrudInputSchema, createAdminCrudInputType, createAdminCrudPasswordInputSchema, createAdminCrudSectionSchema, createAdminCrudTextColumnSchema, createAdminCrudTextInputSchema, createAppCompiler, createAppEntryType, createAppSchema, createAuthorizerRoleSchema, createBackendAppSchema, createBaseAdminSectionValidators, createDefinitionDiff, createDefinitionDiffConfig, createDefinitionEntityNameResolver, createDefinitionSchemaParserContext, createEmbeddedRelationTransformerSchema, createEntity, createEntityIssue, createEntityType, createEnumBaseSchema, createEnumSchema, createEnumValueSchema, createExpressionParserRef, createFeatureSchema, createFeaturesSchema, createFieldMapSpec, createIssueFixSetter, createLibraryWebConfig, createModelAuthorizerSchema, createModelBaseSchema, createModelGraphqlSchema, createModelIndexSchema, createModelRelationFieldSchema, createModelScalarFieldSchema, createModelSchema, createModelServiceSchema, createModelTransformerType, createModelUniqueConstraintSchema, createPluginFieldMap, createPluginImplementationStoreWithNewPlugins, createPluginModelSyncChecker, createPluginModule, createPluginSpec, createPluginSpecStore, createPluginWithConfigSchema, createPluginsSchema, createProjectDefinitionSchema, createProjectDefinitionSchemaWithContext, createRefContextSlot, createRefContextSlotMap, createRefSchemaCollector, createRefSchemaVisitor, createSettingsSchema, createTemplateExtractorSchema, createThemeSchema, createTransformerSchema, createWebAdminSectionSchema, createWebAppSchema, definitionFieldIssueRegistry, definitionFixRegistry, definitionIssueCheckerSpec, definitionRefRegistry, definitionSchema, definitionSchemaWithSlots, deleteEntity, deserializeSchemaWithTransformedReferences, diffDefinition, diffSerializedDefinitions, expressionParserCoreModule, expressionParserSpec, extractDefinitionRefs, featureEntityType, featureNameSchema, findDiscriminatedUnionMatch, findOrphanedUnionItems, fixDefinitionRefs, fixRefDeletions, formatOklch, generalSettingsSchema, generateCssBlockFromThemeColors, generateCssFromThemeConfig, generateDefaultTheme, generateThemeColorsFromShade, getBackendRelativePath, getDefaultThemeColorFromShade, getEntity, getEntityName, getLatestMigrationVersion, getManagedPluginsForPlugin, getMergeRule, getPackageDirectory, getPluginContext, getPluginDependencies, getPluginMetadataByKey, getPluginMetadataByKeyOrThrow, getUnmetPluginDependencies, getWebAppPluginData, infrastructureSettingsSchema, initializePlugins, isMigrateableProjectDefinition, libraryEntityType, libraryTypeSpec, listEntities, mergeDataWithSchema, mergeDefinition, mergeDefinitionContainer, modelAuthorizerRoleEntityType, modelEntityType, modelEnumEntityType, modelEnumValueEntityType, modelForeignRelationEntityType, modelIndexEntityType, modelLocalRelationEntityType, modelScalarFieldEntityType, modelTransformerCompilerSpec, modelTransformerEntityType, modelTransformerSpec, modelUniqueConstraintEntityType, monorepoSettingsSchema, nodeLibraryDefinitionSchemaEntry, normalizeOklch, oklchColor, paletteSchema, palettesSchema, parseAuthorizerExpression, parseOklch, parseProjectDefinitionWithContext, parseProjectDefinitionWithReferences, partitionIssuesBySeverity, patchEntity, pluginAppCompiler, pluginConfigSpec, pluginDefaultsSpec, pluginDependencySchema, pluginEntityType, pluginMetadataSchema, pluginSpecDependencySchema, pluginSpecSupportSchema, previewIssueFix, resolveIssuePath, rootCompilerSpec, runInPluginContext, runPluginMigrations, runSchemaMigrations, serializeSchema, serializeSchemaFromRefPayload, sortEntityArrays, stripEmptyGeneratorChildren, stripUndefinedValues, themeColorSchema, transformDataWithSchema, undefinedIfEmpty, undefinedIfFalsy, updateEntity, validateAuthorizerExpression, validatePluginDependencyGraph, visitAuthorizerExpression, walkDataWithSchema, walkSchemaStructure, webAppEntryType, webAppSchemaExtensionSpec, webConfigSpec, withByKeyMergeRule, withDefault, withEnt, withFix, withIssueChecker, withMergeRule, withPlaceholderSlots, withRef };
18943
+ export { AVAILABLE_FLAGS, AppUtils, AuthorizerExpressionParseError, AuthorizerExpressionParser, BUILT_IN_ADMIN_CRUD_ACTIONS, BUILT_IN_ADMIN_CRUD_COLUMNS, BUILT_IN_ADMIN_CRUD_INPUTS, BUILT_IN_TRANSFORMERS, COLOR_PALETTES, DEFAULT_APPS_FOLDER, DEFAULT_LIBRARIES_FOLDER, DefinitionDiffArrayIncludesField, DefinitionDiffKeyedArrayField, DefinitionDiffReplacementField, DefinitionEntityType, EnumUtils, FIXED_COLOR_MAPPINGS, FeatureUtils, LibraryCompiler, LibraryUtils, ModelFieldUtils, ModelTransformerUtils, ModelUtils, PALETTE_SHADES, PackageCompiler, PluginSpecStore, PluginUtils, ProjectDefinitionContainer, REFERENTIAL_ACTIONS, RefExpressionParser, SCALAR_FIELD_TYPES, SCHEMA_MIGRATIONS, SchemaMigrationError, THEME_COLORS, THEME_COLOR_KEYS, VALIDATORS, adminCrudActionCompilerSpec, adminCrudActionEntityType, adminCrudActionSpec, adminCrudColumnCompilerSpec, adminCrudColumnEntityType, adminCrudColumnSpec, adminCrudEmbeddedFormEntityType, adminCrudEmbeddedInputType, adminCrudEmbeddedLocalInputType, adminCrudInputCompilerSpec, adminCrudInputEntityType, adminCrudInputSpec, adminCrudSectionColumnEntityType, adminSectionEntityType, appCompilerSpec, appEntityType, applyDefinitionDiff, applyDefinitionFixes, applyExpressionRenames, applyMergedDefinition, assignEntityIds, authConfigSpec, authModelsSpec, authRoleEntityType, backendAppEntryType, baseAdminCrudActionSchema, baseAdminCrudColumnSchema, baseAdminCrudInputSchema, baseAppSchema, baseAppValidators, baseLibrarySchema, baseLibraryValidators, basePluginDefinitionSchema, baseTransformerFields, baseTransformerSchema, buildEnabledPluginFqnSet, buildModelExpressionContext, buildPackageName, checkUniqueField, checkUniqueFieldValue, cleanDefaultValues, collectDefinitionIssues, collectEntityArrays, collectEntityMetadata, collectExpressionIssues, collectFieldIssues, convertColorNameToOklch, convertHexToOklch, convertOklchToColorName, convertOklchToHex, createAdminAppSchema, createAdminCrudActionSchema, createAdminCrudActionType, createAdminCrudColumnCompiler, createAdminCrudColumnSchema, createAdminCrudColumnType, createAdminCrudDeleteActionSchema, createAdminCrudEditActionSchema, createAdminCrudEmbeddedFormSchema, createAdminCrudEmbeddedInputSchema, createAdminCrudEmbeddedLocalInputSchema, createAdminCrudEnumInputSchema, createAdminCrudForeignColumnSchema, createAdminCrudForeignInputSchema, createAdminCrudInputSchema, createAdminCrudInputType, createAdminCrudPasswordInputSchema, createAdminCrudSectionSchema, createAdminCrudTextColumnSchema, createAdminCrudTextInputSchema, createAppCompiler, createAppEntryType, createAppSchema, createAuthorizerRoleSchema, createBackendAppSchema, createBaseAdminSectionValidators, createDefinitionDiff, createDefinitionDiffConfig, createDefinitionEntityNameResolver, createDefinitionSchemaParserContext, createEmbeddedRelationTransformerSchema, createEntity, createEntityIssue, createEntityType, createEnumBaseSchema, createEnumSchema, createEnumValueSchema, createExpressionParserRef, createFeatureSchema, createFeaturesSchema, createFieldMapSpec, createIssueFixSetter, createLibraryWebConfig, createModelAuthorizerSchema, createModelBaseSchema, createModelGraphqlSchema, createModelIndexSchema, createModelRelationFieldSchema, createModelScalarFieldSchema, createModelSchema, createModelServiceSchema, createModelTransformerType, createModelUniqueConstraintSchema, createPluginFieldMap, createPluginImplementationStoreWithNewPlugins, createPluginModelSyncChecker, createPluginModule, createPluginSpec, createPluginSpecStore, createPluginWithConfigSchema, createPluginsSchema, createProjectDefinitionSchema, createProjectDefinitionSchemaWithContext, createRefContextSlot, createRefContextSlotMap, createRefSchemaCollector, createRefSchemaVisitor, createSettingsSchema, createTemplateExtractorSchema, createThemeSchema, createTransformerSchema, createWebAdminSectionSchema, createWebAppSchema, definitionFieldIssueRegistry, definitionFixRegistry, definitionIssueCheckerSpec, definitionRefRegistry, definitionSchema, definitionSchemaWithSlots, deleteEntity, deserializeSchemaWithTransformedReferences, diffDefinition, diffSerializedDefinitions, expressionParserCoreModule, expressionParserSpec, extractDefinitionRefs, featureEntityType, featureNameSchema, findDiscriminatedUnionMatch, findOrphanedUnionItems, fixDefinitionRefs, fixRefDeletions, formatOklch, generalSettingsSchema, generateCssBlockFromThemeColors, generateCssFromThemeConfig, generateDefaultTheme, generateThemeColorsFromShade, getBackendRelativePath, getDefaultThemeColorFromShade, getEntity, getEntityName, getLatestMigrationVersion, getManagedPluginsForPlugin, getMergeRule, getPackageDirectory, getPluginContext, getPluginDependencies, getPluginMetadataByKey, getPluginMetadataByKeyOrThrow, getUnmetPluginDependencies, getWebAppPluginData, infrastructureSettingsSchema, initializePlugins, isMigrateableProjectDefinition, libraryEntityType, libraryTypeSpec, listEntities, mergeDataWithSchema, mergeDefinition, mergeDefinitionContainer, modelAuthorizerRoleEntityType, modelEntityType, modelEnumEntityType, modelEnumValueEntityType, modelForeignRelationEntityType, modelIndexEntityType, modelLocalRelationEntityType, modelScalarFieldEntityType, modelTransformerCompilerSpec, modelTransformerEntityType, modelTransformerSpec, modelUniqueConstraintEntityType, monorepoSettingsSchema, nodeLibraryDefinitionSchemaEntry, normalizeOklch, oklchColor, paletteSchema, palettesSchema, parseAuthorizerExpression, parseOklch, parseProjectDefinitionWithContext, parseProjectDefinitionWithReferences, partitionIssuesBySeverity, patchEntity, pluginAppCompiler, pluginConfigSpec, pluginDefaultsSpec, pluginDependencySchema, pluginEntityType, pluginMetadataSchema, pluginSpecDependencySchema, pluginSpecSupportSchema, previewIssueFix, reactLibraryDefinitionSchemaEntry, resolveIssuePath, rootCompilerSpec, runInPluginContext, runPluginMigrations, runSchemaMigrations, serializeSchema, serializeSchemaFromRefPayload, sortEntityArrays, stripEmptyGeneratorChildren, stripUndefinedValues, themeColorSchema, transformDataWithSchema, undefinedIfEmpty, undefinedIfFalsy, updateEntity, validateAuthorizerExpression, validatePluginDependencyGraph, visitAuthorizerExpression, walkDataWithSchema, walkSchemaStructure, webAppEntryType, webAppSchemaExtensionSpec, webConfigSpec, withByKeyMergeRule, withDefault, withEnt, withFix, withIssueChecker, withMergeRule, withPlaceholderSlots, withRef };
18452
18944
 
18453
- //# sourceMappingURL=dist-DiQ4J8N0.js.map
18945
+ //# sourceMappingURL=dist-DY7ZXvq4.js.map