@useinsider/guido 3.2.0-beta.7e0c6bd → 3.2.0-beta.7fb9b70

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 (337) hide show
  1. package/README.md +117 -1
  2. package/dist/@types/config/schemas.js +153 -95
  3. package/dist/@types/config/validator.js +34 -27
  4. package/dist/components/Guido.vue.js +4 -4
  5. package/dist/components/Guido.vue2.js +95 -88
  6. package/dist/components/organisms/AutoSaveController.vue.js +17 -0
  7. package/dist/components/organisms/AutoSaveController.vue2.js +13 -0
  8. package/dist/components/organisms/base/Toaster.vue2.js +11 -10
  9. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue2.js +12 -12
  10. package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue2.js +6 -6
  11. package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue2.js +15 -9
  12. package/dist/components/organisms/extensions/recommendation/FilterItem.vue2.js +40 -31
  13. package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue2.js +20 -19
  14. package/dist/components/organisms/extensions/recommendation/Filters.vue2.js +14 -11
  15. package/dist/components/organisms/header/AutoSaveToggle.vue.js +22 -0
  16. package/dist/components/organisms/header/AutoSaveToggle.vue2.js +19 -0
  17. package/dist/components/organisms/header/EditorActions.vue.js +12 -11
  18. package/dist/components/organisms/header/EditorActions.vue2.js +22 -18
  19. package/dist/components/organisms/header/HeaderWrapper.vue2.js +15 -12
  20. package/dist/components/organisms/header/LeftSlot.vue2.js +19 -16
  21. package/dist/components/organisms/header/MiddleSlot.vue2.js +11 -14
  22. package/dist/components/organisms/header/RightSlot.vue.js +8 -8
  23. package/dist/components/organisms/header/RightSlot.vue2.js +17 -13
  24. package/dist/components/organisms/onboarding/AMPOnboarding.vue.js +12 -11
  25. package/dist/components/organisms/onboarding/AMPOnboarding.vue2.js +26 -24
  26. package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +12 -11
  27. package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +44 -41
  28. package/dist/components/organisms/onboarding/ItemsOnboarding.vue.js +12 -11
  29. package/dist/components/organisms/onboarding/ItemsOnboarding.vue2.js +38 -36
  30. package/dist/components/organisms/onboarding/NewVersionPopup.vue2.js +21 -18
  31. package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +31 -27
  32. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +12 -11
  33. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue2.js +32 -30
  34. package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue.js +12 -11
  35. package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue2.js +23 -21
  36. package/dist/components/organisms/save-as-template/SaveAsTemplateDrawer.vue2.js +9 -8
  37. package/dist/components/organisms/unsubscribe/UnsubscribeWrapper.vue.js +10 -9
  38. package/dist/composables/useActionsApi.js +38 -37
  39. package/dist/composables/useAutoSave.js +71 -0
  40. package/dist/composables/useBlocksConfig.js +26 -26
  41. package/dist/composables/useFullStoryBridge.js +9 -8
  42. package/dist/composables/useHtmlCompiler.js +26 -34
  43. package/dist/composables/useHtmlValidator.js +109 -101
  44. package/dist/composables/useHttp.js +30 -30
  45. package/dist/composables/usePartner.js +1 -1
  46. package/dist/composables/useRecommendation.js +46 -25
  47. package/dist/composables/useRibbonOffset.js +15 -15
  48. package/dist/composables/useSave.js +25 -21
  49. package/dist/composables/useStripo.js +48 -53
  50. package/dist/composables/useSyncModuleExtractor.js +29 -31
  51. package/dist/composables/useTimerClone.js +25 -24
  52. package/dist/composables/useTranslations.js +16 -23
  53. package/dist/composables/useValidation.js +8 -7
  54. package/dist/composables/validators/useCouponBlockValidator.js +24 -0
  55. package/dist/composables/validators/useLiquidValidator.js +13 -13
  56. package/dist/config/compiler/recommendationCompilerRules.js +25 -25
  57. package/dist/config/compiler/unsubscribeCompilerRules.js +19 -17
  58. package/dist/config/compiler/utils/recommendationCompilerUtils.js +105 -71
  59. package/dist/config/migrator/checkboxMigrator.js +21 -20
  60. package/dist/config/migrator/couponBlockMigrator.js +19 -18
  61. package/dist/config/migrator/index.js +9 -9
  62. package/dist/config/migrator/itemsBlockMigrator.js +89 -87
  63. package/dist/config/migrator/radioButtonMigrator.js +63 -42
  64. package/dist/config/migrator/recommendation/compositionMapper.js +98 -0
  65. package/dist/config/migrator/recommendation/extractors.js +27 -0
  66. package/dist/config/migrator/recommendation/htmlBuilder.js +496 -0
  67. package/dist/config/migrator/recommendation/parseLegacyConfig.js +33 -0
  68. package/dist/config/migrator/recommendation/settingsMapper.js +70 -0
  69. package/dist/config/migrator/recommendation/themeMapper.js +93 -0
  70. package/dist/config/migrator/recommendationMigrator.js +74 -287
  71. package/dist/config/migrator/unsubscribeMigrator.js +11 -10
  72. package/dist/enums/extensions/recommendationBlock.js +2 -1
  73. package/dist/enums/unsubscribe.js +19 -18
  74. package/dist/extensions/Blocks/Items/block.js +9 -9
  75. package/dist/extensions/Blocks/Items/controls/button/link.js +14 -14
  76. package/dist/extensions/Blocks/Items/controls/cardComposition.js +97 -89
  77. package/dist/extensions/Blocks/Items/controls/image/link.js +14 -14
  78. package/dist/extensions/Blocks/Items/controls/name/trimming.js +24 -23
  79. package/dist/extensions/Blocks/Items/controls/price/currencyLocation.js +14 -13
  80. package/dist/extensions/Blocks/Items/controls/price/currencySymbol.js +47 -44
  81. package/dist/extensions/Blocks/Items/controls/price/formattedPrice.js +38 -38
  82. package/dist/extensions/Blocks/Items/controls/price/hideDiscount.js +11 -11
  83. package/dist/extensions/Blocks/Items/controls/price/priceOrientation.js +40 -38
  84. package/dist/extensions/Blocks/Items/controls/price/singlePrice.js +35 -35
  85. package/dist/extensions/Blocks/Items/controls/settingsControl.js +162 -155
  86. package/dist/extensions/Blocks/Items/enums/productEnums.js +14 -9
  87. package/dist/extensions/Blocks/Items/template.js +210 -210
  88. package/dist/extensions/Blocks/RadioButton/template.js +1 -1
  89. package/dist/extensions/Blocks/Recommendation/block.js +35 -32
  90. package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +5 -5
  91. package/dist/extensions/Blocks/Recommendation/controls/button/index.js +36 -36
  92. package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +133 -128
  93. package/dist/extensions/Blocks/Recommendation/controls/customAttribute/index.js +9 -9
  94. package/dist/extensions/Blocks/Recommendation/controls/customAttribute/textTrim.js +10 -10
  95. package/dist/extensions/Blocks/Recommendation/controls/image/index.js +9 -9
  96. package/dist/extensions/Blocks/Recommendation/controls/main/algorithm.js +34 -32
  97. package/dist/extensions/Blocks/Recommendation/controls/main/filters.js +6 -4
  98. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +90 -82
  99. package/dist/extensions/Blocks/Recommendation/controls/main/layoutOrientation.js +18 -18
  100. package/dist/extensions/Blocks/Recommendation/controls/main/productCount.js +4 -4
  101. package/dist/extensions/Blocks/Recommendation/controls/main/productLayout.js +36 -35
  102. package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +240 -192
  103. package/dist/extensions/Blocks/Recommendation/controls/name/index.js +24 -24
  104. package/dist/extensions/Blocks/Recommendation/controls/name/textTrim.js +10 -10
  105. package/dist/extensions/Blocks/Recommendation/controls/oldPrice/index.js +24 -24
  106. package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/index.js +24 -24
  107. package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/textAfter.js +4 -4
  108. package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscount/textBefore.js +4 -4
  109. package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/index.js +24 -24
  110. package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/textAfter.js +4 -4
  111. package/dist/extensions/Blocks/Recommendation/controls/omnibusPrice/textBefore.js +4 -4
  112. package/dist/extensions/Blocks/Recommendation/controls/price/index.js +24 -24
  113. package/dist/extensions/Blocks/Recommendation/controls/spacing/index.js +32 -32
  114. package/dist/extensions/Blocks/Recommendation/controls/syncInfoMessage.js +20 -18
  115. package/dist/extensions/Blocks/Recommendation/extension.js +32 -31
  116. package/dist/extensions/Blocks/Recommendation/services/configService.js +65 -29
  117. package/dist/extensions/Blocks/Recommendation/settingsPanel.js +16 -8
  118. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +150 -109
  119. package/dist/extensions/Blocks/Recommendation/templates/grid/elementRenderer.js +37 -27
  120. package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +10 -10
  121. package/dist/extensions/Blocks/Recommendation/templates/index.js +6 -6
  122. package/dist/extensions/Blocks/Recommendation/templates/list/elementRenderer.js +37 -26
  123. package/dist/extensions/Blocks/Recommendation/templates/list/template.js +1 -1
  124. package/dist/extensions/Blocks/Recommendation/templates/utils.js +47 -45
  125. package/dist/extensions/Blocks/Recommendation/utils/legacyStrategyMap.js +21 -0
  126. package/dist/extensions/Blocks/Recommendation/utils/preserveTextStyles.js +13 -22
  127. package/dist/extensions/Blocks/Recommendation/validation/filterSchema.js +16 -13
  128. package/dist/extensions/Blocks/Unsubscribe/control.js +13 -11
  129. package/dist/extensions/Blocks/Unsubscribe/elements/preview.js +18 -16
  130. package/dist/extensions/Blocks/common-control.js +26 -25
  131. package/dist/extensions/DynamicContent/dynamic-content.js +58 -53
  132. package/dist/guido.css +1 -1
  133. package/dist/library.js +12 -11
  134. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +234 -233
  135. package/dist/node_modules/lodash-es/_DataView.js +6 -0
  136. package/dist/node_modules/lodash-es/_Hash.js +20 -0
  137. package/dist/node_modules/lodash-es/_ListCache.js +20 -0
  138. package/dist/node_modules/lodash-es/_Map.js +6 -0
  139. package/dist/node_modules/lodash-es/_MapCache.js +20 -0
  140. package/dist/node_modules/lodash-es/_Promise.js +6 -0
  141. package/dist/node_modules/lodash-es/_Set.js +6 -0
  142. package/dist/node_modules/lodash-es/_SetCache.js +13 -0
  143. package/dist/node_modules/lodash-es/_Stack.js +18 -0
  144. package/dist/node_modules/lodash-es/_Symbol.js +5 -0
  145. package/dist/node_modules/lodash-es/_Uint8Array.js +5 -0
  146. package/dist/node_modules/lodash-es/_WeakMap.js +6 -0
  147. package/dist/node_modules/lodash-es/_arrayFilter.js +10 -0
  148. package/dist/node_modules/lodash-es/_arrayLikeKeys.js +20 -0
  149. package/dist/node_modules/lodash-es/_arrayMap.js +8 -0
  150. package/dist/node_modules/lodash-es/_arrayPush.js +8 -0
  151. package/dist/node_modules/lodash-es/_arraySome.js +9 -0
  152. package/dist/node_modules/lodash-es/_assocIndexOf.js +10 -0
  153. package/dist/node_modules/lodash-es/_baseEach.js +6 -0
  154. package/dist/node_modules/lodash-es/_baseFlatten.js +13 -0
  155. package/dist/node_modules/lodash-es/_baseFor.js +5 -0
  156. package/dist/node_modules/lodash-es/_baseForOwn.js +8 -0
  157. package/dist/node_modules/lodash-es/_baseGet.js +11 -0
  158. package/dist/node_modules/lodash-es/_baseGetAllKeys.js +9 -0
  159. package/dist/node_modules/lodash-es/_baseGetTag.js +10 -0
  160. package/dist/node_modules/lodash-es/_baseHasIn.js +6 -0
  161. package/dist/node_modules/lodash-es/_baseIsArguments.js +9 -0
  162. package/dist/node_modules/lodash-es/_baseIsEqual.js +8 -0
  163. package/dist/node_modules/lodash-es/_baseIsEqualDeep.js +32 -0
  164. package/dist/node_modules/lodash-es/_baseIsMatch.js +29 -0
  165. package/dist/node_modules/lodash-es/_baseIsNative.js +16 -0
  166. package/dist/node_modules/lodash-es/_baseIsTypedArray.js +12 -0
  167. package/dist/node_modules/lodash-es/_baseIteratee.js +11 -0
  168. package/dist/node_modules/lodash-es/_baseKeys.js +14 -0
  169. package/dist/node_modules/lodash-es/_baseMap.js +11 -0
  170. package/dist/node_modules/lodash-es/_baseMatches.js +12 -0
  171. package/dist/node_modules/lodash-es/_baseMatchesProperty.js +17 -0
  172. package/dist/node_modules/lodash-es/_baseProperty.js +8 -0
  173. package/dist/node_modules/lodash-es/_basePropertyDeep.js +9 -0
  174. package/dist/node_modules/lodash-es/_baseRange.js +9 -0
  175. package/dist/node_modules/lodash-es/_baseTimes.js +8 -0
  176. package/dist/node_modules/lodash-es/_baseToString.js +18 -0
  177. package/dist/node_modules/lodash-es/_baseTrim.js +8 -0
  178. package/dist/node_modules/lodash-es/_baseUnary.js +8 -0
  179. package/dist/node_modules/lodash-es/_cacheHas.js +6 -0
  180. package/dist/node_modules/lodash-es/_castPath.js +10 -0
  181. package/dist/node_modules/lodash-es/_coreJsData.js +5 -0
  182. package/dist/node_modules/lodash-es/_createBaseEach.js +15 -0
  183. package/dist/node_modules/lodash-es/_createBaseFor.js +13 -0
  184. package/dist/node_modules/lodash-es/_createRange.js +11 -0
  185. package/dist/node_modules/lodash-es/_equalArrays.js +40 -0
  186. package/dist/node_modules/lodash-es/_equalByTag.js +45 -0
  187. package/dist/node_modules/lodash-es/_equalObjects.js +36 -0
  188. package/dist/node_modules/lodash-es/_freeGlobal.js +4 -0
  189. package/dist/node_modules/lodash-es/_getAllKeys.js +9 -0
  190. package/dist/node_modules/lodash-es/_getMapData.js +8 -0
  191. package/dist/node_modules/lodash-es/_getMatchData.js +12 -0
  192. package/dist/node_modules/lodash-es/_getNative.js +9 -0
  193. package/dist/node_modules/lodash-es/_getRawTag.js +15 -0
  194. package/dist/node_modules/lodash-es/_getSymbols.js +10 -0
  195. package/dist/node_modules/lodash-es/_getTag.js +28 -0
  196. package/dist/node_modules/lodash-es/_getValue.js +6 -0
  197. package/dist/node_modules/lodash-es/_hasPath.js +19 -0
  198. package/dist/node_modules/lodash-es/_hashClear.js +7 -0
  199. package/dist/node_modules/lodash-es/_hashDelete.js +7 -0
  200. package/dist/node_modules/lodash-es/_hashGet.js +13 -0
  201. package/dist/node_modules/lodash-es/_hashHas.js +9 -0
  202. package/dist/node_modules/lodash-es/_hashSet.js +9 -0
  203. package/dist/node_modules/lodash-es/_isFlattenable.js +10 -0
  204. package/dist/node_modules/lodash-es/_isIndex.js +8 -0
  205. package/dist/node_modules/lodash-es/_isIterateeCall.js +13 -0
  206. package/dist/node_modules/lodash-es/_isKey.js +12 -0
  207. package/dist/node_modules/lodash-es/_isKeyable.js +7 -0
  208. package/dist/node_modules/lodash-es/_isMasked.js +11 -0
  209. package/dist/node_modules/lodash-es/_isPrototype.js +8 -0
  210. package/dist/node_modules/lodash-es/_isStrictComparable.js +7 -0
  211. package/dist/node_modules/lodash-es/_listCacheClear.js +6 -0
  212. package/dist/node_modules/lodash-es/_listCacheDelete.js +12 -0
  213. package/dist/node_modules/lodash-es/_listCacheGet.js +8 -0
  214. package/dist/node_modules/lodash-es/_listCacheHas.js +7 -0
  215. package/dist/node_modules/lodash-es/_listCacheSet.js +8 -0
  216. package/dist/node_modules/lodash-es/_mapCacheClear.js +13 -0
  217. package/dist/node_modules/lodash-es/_mapCacheDelete.js +8 -0
  218. package/dist/node_modules/lodash-es/_mapCacheGet.js +7 -0
  219. package/dist/node_modules/lodash-es/_mapCacheHas.js +7 -0
  220. package/dist/node_modules/lodash-es/_mapCacheSet.js +8 -0
  221. package/dist/node_modules/lodash-es/_mapToArray.js +9 -0
  222. package/dist/node_modules/lodash-es/_matchesStrictComparable.js +8 -0
  223. package/dist/node_modules/lodash-es/_memoizeCapped.js +11 -0
  224. package/dist/node_modules/lodash-es/_nativeCreate.js +5 -0
  225. package/dist/node_modules/lodash-es/_nativeKeys.js +5 -0
  226. package/dist/node_modules/lodash-es/_nodeUtil.js +11 -0
  227. package/dist/node_modules/lodash-es/_objectToString.js +7 -0
  228. package/dist/node_modules/lodash-es/_overArg.js +8 -0
  229. package/dist/node_modules/lodash-es/_root.js +5 -0
  230. package/dist/node_modules/lodash-es/_setCacheAdd.js +7 -0
  231. package/dist/node_modules/lodash-es/_setCacheHas.js +6 -0
  232. package/dist/node_modules/lodash-es/_setToArray.js +9 -0
  233. package/dist/node_modules/lodash-es/_stackClear.js +7 -0
  234. package/dist/node_modules/lodash-es/_stackDelete.js +7 -0
  235. package/dist/node_modules/lodash-es/_stackGet.js +6 -0
  236. package/dist/node_modules/lodash-es/_stackHas.js +6 -0
  237. package/dist/node_modules/lodash-es/_stackSet.js +17 -0
  238. package/dist/node_modules/lodash-es/_stringToPath.js +10 -0
  239. package/dist/node_modules/lodash-es/_toKey.js +10 -0
  240. package/dist/node_modules/lodash-es/_toSource.js +17 -0
  241. package/dist/node_modules/lodash-es/_trimmedEndIndex.js +9 -0
  242. package/dist/node_modules/lodash-es/eq.js +6 -0
  243. package/dist/node_modules/lodash-es/flatMap.js +8 -0
  244. package/dist/node_modules/lodash-es/get.js +8 -0
  245. package/dist/node_modules/lodash-es/hasIn.js +8 -0
  246. package/dist/node_modules/lodash-es/identity.js +6 -0
  247. package/dist/node_modules/lodash-es/isArguments.js +10 -0
  248. package/dist/node_modules/lodash-es/isArray.js +4 -0
  249. package/dist/node_modules/lodash-es/isArrayLike.js +8 -0
  250. package/dist/node_modules/lodash-es/isBuffer.js +6 -0
  251. package/dist/node_modules/lodash-es/isFunction.js +12 -0
  252. package/dist/node_modules/lodash-es/isLength.js +7 -0
  253. package/dist/node_modules/lodash-es/isObject.js +7 -0
  254. package/dist/node_modules/lodash-es/isObjectLike.js +6 -0
  255. package/dist/node_modules/lodash-es/isSymbol.js +9 -0
  256. package/dist/node_modules/lodash-es/isTypedArray.js +7 -0
  257. package/dist/node_modules/lodash-es/keys.js +9 -0
  258. package/dist/node_modules/lodash-es/map.js +11 -0
  259. package/dist/node_modules/lodash-es/memoize.js +18 -0
  260. package/dist/node_modules/lodash-es/property.js +10 -0
  261. package/dist/node_modules/lodash-es/range.js +5 -0
  262. package/dist/node_modules/lodash-es/stubArray.js +6 -0
  263. package/dist/node_modules/lodash-es/stubFalse.js +6 -0
  264. package/dist/node_modules/lodash-es/toFinite.js +14 -0
  265. package/dist/node_modules/lodash-es/toNumber.js +22 -0
  266. package/dist/node_modules/lodash-es/toString.js +7 -0
  267. package/dist/node_modules/valibot/dist/index.js +458 -239
  268. package/dist/services/recommendationApi.js +17 -14
  269. package/dist/services/templateLibraryApi.js +40 -38
  270. package/dist/src/@types/config/defaults.d.ts +5 -1
  271. package/dist/src/@types/config/index.d.ts +3 -3
  272. package/dist/src/@types/config/schemas.d.ts +217 -0
  273. package/dist/src/@types/config/types.d.ts +9 -1
  274. package/dist/src/components/Guido.vue.d.ts +1 -1
  275. package/dist/src/components/organisms/AutoSaveController.vue.d.ts +2 -0
  276. package/dist/src/components/organisms/header/AutoSaveToggle.vue.d.ts +2 -0
  277. package/dist/src/components/organisms/header/EditorActions.vue.d.ts +1 -1
  278. package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +1 -1
  279. package/dist/src/components/organisms/header/RightSlot.vue.d.ts +1 -1
  280. package/dist/src/components/wrappers/WpModal.vue.d.ts +2 -2
  281. package/dist/src/composables/useAutoSave.d.ts +3 -0
  282. package/dist/src/composables/useConfig.d.ts +58 -0
  283. package/dist/src/composables/useHtmlCompiler.d.ts +2 -1
  284. package/dist/src/composables/useRecommendation.d.ts +10 -1
  285. package/dist/src/composables/useRecommendation.test.d.ts +1 -0
  286. package/dist/src/composables/useSave.d.ts +1 -1
  287. package/dist/src/composables/useTranslations.d.ts +1 -1
  288. package/dist/src/composables/validators/useCouponBlockValidator.d.ts +3 -0
  289. package/dist/src/config/migrator/index.d.ts +2 -1
  290. package/dist/src/config/migrator/recommendation/compositionMapper.d.ts +2 -0
  291. package/dist/src/config/migrator/recommendation/compositionMapper.test.d.ts +1 -0
  292. package/dist/src/config/migrator/recommendation/extractors.d.ts +7 -0
  293. package/dist/src/config/migrator/recommendation/extractors.test.d.ts +1 -0
  294. package/dist/src/config/migrator/recommendation/htmlBuilder.d.ts +11 -0
  295. package/dist/src/config/migrator/recommendation/parseLegacyConfig.d.ts +15 -0
  296. package/dist/src/config/migrator/recommendation/parseLegacyConfig.test.d.ts +1 -0
  297. package/dist/src/config/migrator/recommendation/settingsMapper.d.ts +7 -0
  298. package/dist/src/config/migrator/recommendation/settingsMapper.test.d.ts +1 -0
  299. package/dist/src/config/migrator/recommendation/themeMapper.d.ts +5 -0
  300. package/dist/src/config/migrator/recommendation/themeMapper.test.d.ts +1 -0
  301. package/dist/src/config/migrator/recommendation/types.d.ts +205 -0
  302. package/dist/src/config/migrator/recommendationMigrator.d.ts +13 -1
  303. package/dist/src/config/migrator/recommendationMigrator.test.d.ts +1 -0
  304. package/dist/src/extensions/Blocks/RadioButton/template.d.ts +1 -1
  305. package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.test.d.ts +1 -0
  306. package/dist/src/extensions/Blocks/Recommendation/services/configService.d.ts +10 -0
  307. package/dist/src/extensions/Blocks/Recommendation/services/configService.test.d.ts +1 -0
  308. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +34 -0
  309. package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +1 -1
  310. package/dist/src/extensions/Blocks/Recommendation/utils/legacyStrategyMap.d.ts +21 -0
  311. package/dist/src/extensions/Blocks/Recommendation/utils/legacyStrategyMap.test.d.ts +1 -0
  312. package/dist/src/extensions/Blocks/Recommendation/utils/preserveTextStyles.d.ts +0 -3
  313. package/dist/src/library.d.ts +1 -1
  314. package/dist/src/stores/autosave.d.ts +12 -0
  315. package/dist/src/stores/config.d.ts +522 -0
  316. package/dist/src/stores/dynamic-content.d.ts +3 -3
  317. package/dist/src/stores/editor.d.ts +23 -0
  318. package/dist/src/utils/htmlEscape.d.ts +5 -0
  319. package/dist/src/utils/htmlEscape.test.d.ts +1 -0
  320. package/dist/src/utils/timeUtil.d.ts +8 -0
  321. package/dist/stores/autosave.js +17 -0
  322. package/dist/stores/config.js +81 -25
  323. package/dist/stores/dynamic-content.js +11 -6
  324. package/dist/stores/editor.js +3 -1
  325. package/dist/stores/onboarding.js +1 -1
  326. package/dist/stores/preview.js +9 -6
  327. package/dist/stores/unsubscribe.js +4 -1
  328. package/dist/utils/dateUtil.js +10 -7
  329. package/dist/utils/genericUtil.js +13 -10
  330. package/dist/utils/htmlEscape.js +13 -0
  331. package/dist/utils/pairProductVariables.js +89 -87
  332. package/dist/utils/templatePreparation.js +72 -32
  333. package/dist/utils/timeUtil.js +19 -0
  334. package/package.json +7 -6
  335. package/dist/enums/displayConditions.js +0 -80
  336. package/dist/extensions/Blocks/Recommendation/templates/grid/migration.js +0 -251
  337. package/dist/src/enums/displayConditions.d.ts +0 -2
@@ -1,139 +1,145 @@
1
- var g;
1
+ var m;
2
2
  // @__NO_SIDE_EFFECTS__
3
- function b(n) {
3
+ function j(n) {
4
4
  return {
5
- lang: n?.lang ?? g?.lang,
6
- message: n?.message,
7
- abortEarly: n?.abortEarly ?? g?.abortEarly,
8
- abortPipeEarly: n?.abortPipeEarly ?? g?.abortPipeEarly
5
+ lang: (n == null ? void 0 : n.lang) ?? (m == null ? void 0 : m.lang),
6
+ message: n == null ? void 0 : n.message,
7
+ abortEarly: (n == null ? void 0 : n.abortEarly) ?? (m == null ? void 0 : m.abortEarly),
8
+ abortPipeEarly: (n == null ? void 0 : n.abortPipeEarly) ?? (m == null ? void 0 : m.abortPipeEarly)
9
9
  };
10
10
  }
11
- var P;
11
+ var d;
12
12
  // @__NO_SIDE_EFFECTS__
13
- function S(n) {
14
- return P?.get(n);
13
+ function I(n) {
14
+ return d == null ? void 0 : d.get(n);
15
15
  }
16
- var _;
16
+ var x;
17
17
  // @__NO_SIDE_EFFECTS__
18
- function D(n) {
19
- return _?.get(n);
18
+ function A(n) {
19
+ return x == null ? void 0 : x.get(n);
20
20
  }
21
- var w;
21
+ var E;
22
22
  // @__NO_SIDE_EFFECTS__
23
- function A(n, r) {
24
- return w?.get(n)?.get(r);
23
+ function q(n, s) {
24
+ var e;
25
+ return (e = E == null ? void 0 : E.get(n)) == null ? void 0 : e.get(s);
25
26
  }
26
27
  // @__NO_SIDE_EFFECTS__
27
- function k(n) {
28
- const r = typeof n;
29
- return r === "string" ? `"${n}"` : r === "number" || r === "bigint" || r === "boolean" ? `${n}` : r === "object" || r === "function" ? (n && Object.getPrototypeOf(n)?.constructor?.name) ?? "null" : r;
28
+ function _(n) {
29
+ var e, r;
30
+ const s = typeof n;
31
+ return s === "string" ? `"${n}"` : s === "number" || s === "bigint" || s === "boolean" ? `${n}` : s === "object" || s === "function" ? (n && ((r = (e = Object.getPrototypeOf(n)) == null ? void 0 : e.constructor) == null ? void 0 : r.name)) ?? "null" : s;
30
32
  }
31
- function c(n, r, e, t, s) {
32
- const i = s && "input" in s ? s.input : e.value, u = s?.expected ?? n.expects ?? null, a = s?.received ?? /* @__PURE__ */ k(i), l = {
33
+ function y(n, s, e, r, t) {
34
+ const l = t && "input" in t ? t.input : e.value, i = (t == null ? void 0 : t.expected) ?? n.expects ?? null, p = (t == null ? void 0 : t.received) ?? /* @__PURE__ */ _(l), u = {
33
35
  kind: n.kind,
34
36
  type: n.type,
35
- input: i,
36
- expected: u,
37
- received: a,
38
- message: `Invalid ${r}: ${u ? `Expected ${u} but r` : "R"}eceived ${a}`,
37
+ input: l,
38
+ expected: i,
39
+ received: p,
40
+ message: `Invalid ${s}: ${i ? `Expected ${i} but r` : "R"}eceived ${p}`,
39
41
  requirement: n.requirement,
40
- path: s?.path,
41
- issues: s?.issues,
42
- lang: t.lang,
43
- abortEarly: t.abortEarly,
44
- abortPipeEarly: t.abortPipeEarly
45
- }, o = n.kind === "schema", p = s?.message ?? n.message ?? /* @__PURE__ */ A(n.reference, l.lang) ?? (o ? /* @__PURE__ */ D(l.lang) : null) ?? t.message ?? /* @__PURE__ */ S(l.lang);
46
- p !== void 0 && (l.message = typeof p == "function" ? (
42
+ path: t == null ? void 0 : t.path,
43
+ issues: t == null ? void 0 : t.issues,
44
+ lang: r.lang,
45
+ abortEarly: r.abortEarly,
46
+ abortPipeEarly: r.abortPipeEarly
47
+ }, a = n.kind === "schema", c = (t == null ? void 0 : t.message) ?? n.message ?? /* @__PURE__ */ q(n.reference, u.lang) ?? (a ? /* @__PURE__ */ A(u.lang) : null) ?? r.message ?? /* @__PURE__ */ I(u.lang);
48
+ c !== void 0 && (u.message = typeof c == "function" ? (
47
49
  // @ts-expect-error
48
- p(l)
49
- ) : p), o && (e.typed = !1), e.issues ? e.issues.push(l) : e.issues = [l];
50
+ c(u)
51
+ ) : c), a && (e.typed = !1), e.issues ? e.issues.push(u) : e.issues = [u];
50
52
  }
51
53
  // @__NO_SIDE_EFFECTS__
52
- function f(n) {
54
+ function o(n) {
53
55
  return {
54
56
  version: 1,
55
57
  vendor: "valibot",
56
- validate(r) {
57
- return n["~run"]({ value: r }, /* @__PURE__ */ b());
58
+ validate(s) {
59
+ return n["~run"]({ value: s }, /* @__PURE__ */ j());
58
60
  }
59
61
  };
60
62
  }
61
63
  // @__NO_SIDE_EFFECTS__
62
- function E(n, r) {
64
+ function O(n, s) {
65
+ return Object.hasOwn(n, s) && s !== "__proto__" && s !== "prototype" && s !== "constructor";
66
+ }
67
+ // @__NO_SIDE_EFFECTS__
68
+ function $(n, s) {
63
69
  const e = [...new Set(n)];
64
- return e.length > 1 ? `(${e.join(` ${r} `)})` : e[0] ?? "never";
70
+ return e.length > 1 ? `(${e.join(` ${s} `)})` : e[0] ?? "never";
65
71
  }
66
72
  // @__NO_SIDE_EFFECTS__
67
- function O(n, r) {
73
+ function K(n, s) {
68
74
  return {
69
75
  kind: "validation",
70
76
  type: "check",
71
- reference: O,
77
+ reference: K,
72
78
  async: !0,
73
79
  expects: null,
74
80
  requirement: n,
75
- message: r,
76
- async "~run"(e, t) {
77
- return e.typed && !await this.requirement(e.value) && c(this, "input", e, t), e;
81
+ message: s,
82
+ async "~run"(e, r) {
83
+ return e.typed && !await this.requirement(e.value) && y(this, "input", e, r), e;
78
84
  }
79
85
  };
80
86
  }
81
87
  // @__NO_SIDE_EFFECTS__
82
- function I(n, r) {
88
+ function M(n, s) {
83
89
  return {
84
90
  kind: "validation",
85
91
  type: "max_length",
86
- reference: I,
92
+ reference: M,
87
93
  async: !1,
88
94
  expects: `<=${n}`,
89
95
  requirement: n,
90
- message: r,
91
- "~run"(e, t) {
92
- return e.typed && e.value.length > this.requirement && c(this, "length", e, t, {
96
+ message: s,
97
+ "~run"(e, r) {
98
+ return e.typed && e.value.length > this.requirement && y(this, "length", e, r, {
93
99
  received: `${e.value.length}`
94
100
  }), e;
95
101
  }
96
102
  };
97
103
  }
98
104
  // @__NO_SIDE_EFFECTS__
99
- function q(n, r) {
105
+ function V(n, s) {
100
106
  return {
101
107
  kind: "validation",
102
108
  type: "min_length",
103
- reference: q,
109
+ reference: V,
104
110
  async: !1,
105
111
  expects: `>=${n}`,
106
112
  requirement: n,
107
- message: r,
108
- "~run"(e, t) {
109
- return e.typed && e.value.length < this.requirement && c(this, "length", e, t, {
113
+ message: s,
114
+ "~run"(e, r) {
115
+ return e.typed && e.value.length < this.requirement && y(this, "length", e, r, {
110
116
  received: `${e.value.length}`
111
117
  }), e;
112
118
  }
113
119
  };
114
120
  }
115
121
  // @__NO_SIDE_EFFECTS__
116
- function M(n) {
122
+ function G(n) {
117
123
  return {
118
124
  kind: "validation",
119
125
  type: "non_empty",
120
- reference: M,
126
+ reference: G,
121
127
  async: !1,
122
128
  expects: "!0",
123
129
  message: n,
124
- "~run"(r, e) {
125
- return r.typed && r.value.length === 0 && c(this, "length", r, e, {
130
+ "~run"(s, e) {
131
+ return s.typed && s.value.length === 0 && y(this, "length", s, e, {
126
132
  received: "0"
127
- }), r;
133
+ }), s;
128
134
  }
129
135
  };
130
136
  }
131
137
  // @__NO_SIDE_EFFECTS__
132
- function G() {
138
+ function L() {
133
139
  return {
134
140
  kind: "transformation",
135
141
  type: "trim",
136
- reference: G,
142
+ reference: L,
137
143
  async: !1,
138
144
  "~run"(n) {
139
145
  return n.value = n.value.trim(), n;
@@ -141,27 +147,27 @@ function G() {
141
147
  };
142
148
  }
143
149
  // @__NO_SIDE_EFFECTS__
144
- function L(n, r, e) {
150
+ function S(n, s, e) {
145
151
  return typeof n.fallback == "function" ? (
146
152
  // @ts-expect-error
147
- n.fallback(r, e)
153
+ n.fallback(s, e)
148
154
  ) : (
149
155
  // @ts-expect-error
150
156
  n.fallback
151
157
  );
152
158
  }
153
159
  // @__NO_SIDE_EFFECTS__
154
- function $(n, r, e) {
160
+ function D(n, s, e) {
155
161
  return typeof n.default == "function" ? (
156
162
  // @ts-expect-error
157
- n.default(r, e)
163
+ n.default(s, e)
158
164
  ) : (
159
165
  // @ts-expect-error
160
166
  n.default
161
167
  );
162
168
  }
163
169
  // @__NO_SIDE_EFFECTS__
164
- function N(n, r) {
170
+ function N(n, s) {
165
171
  return {
166
172
  kind: "schema",
167
173
  type: "array",
@@ -169,35 +175,36 @@ function N(n, r) {
169
175
  expects: "Array",
170
176
  async: !1,
171
177
  item: n,
172
- message: r,
178
+ message: s,
173
179
  get "~standard"() {
174
- return /* @__PURE__ */ f(this);
180
+ return /* @__PURE__ */ o(this);
175
181
  },
176
- "~run"(e, t) {
177
- const s = e.value;
178
- if (Array.isArray(s)) {
182
+ "~run"(e, r) {
183
+ var l;
184
+ const t = e.value;
185
+ if (Array.isArray(t)) {
179
186
  e.typed = !0, e.value = [];
180
- for (let i = 0; i < s.length; i++) {
181
- const u = s[i], a = this.item["~run"]({ value: u }, t);
182
- if (a.issues) {
183
- const l = {
187
+ for (let i = 0; i < t.length; i++) {
188
+ const p = t[i], u = this.item["~run"]({ value: p }, r);
189
+ if (u.issues) {
190
+ const a = {
184
191
  type: "array",
185
192
  origin: "value",
186
- input: s,
193
+ input: t,
187
194
  key: i,
188
- value: u
195
+ value: p
189
196
  };
190
- for (const o of a.issues)
191
- o.path ? o.path.unshift(l) : o.path = [l], e.issues?.push(o);
192
- if (e.issues || (e.issues = a.issues), t.abortEarly) {
197
+ for (const c of u.issues)
198
+ c.path ? c.path.unshift(a) : c.path = [a], (l = e.issues) == null || l.push(c);
199
+ if (e.issues || (e.issues = u.issues), r.abortEarly) {
193
200
  e.typed = !1;
194
201
  break;
195
202
  }
196
203
  }
197
- a.typed || (e.typed = !1), e.value.push(a.value);
204
+ u.typed || (e.typed = !1), e.value.push(u.value);
198
205
  }
199
206
  } else
200
- c(this, "type", e, t);
207
+ y(this, "type", e, r);
201
208
  return e;
202
209
  }
203
210
  };
@@ -212,15 +219,15 @@ function C(n) {
212
219
  async: !1,
213
220
  message: n,
214
221
  get "~standard"() {
215
- return /* @__PURE__ */ f(this);
222
+ return /* @__PURE__ */ o(this);
216
223
  },
217
- "~run"(r, e) {
218
- return typeof r.value == "boolean" ? r.typed = !0 : c(this, "type", r, e), r;
224
+ "~run"(s, e) {
225
+ return typeof s.value == "boolean" ? s.typed = !0 : y(this, "type", s, e), s;
219
226
  }
220
227
  };
221
228
  }
222
229
  // @__NO_SIDE_EFFECTS__
223
- function F(n, r) {
230
+ function F(n, s) {
224
231
  return {
225
232
  kind: "schema",
226
233
  type: "custom",
@@ -228,332 +235,544 @@ function F(n, r) {
228
235
  expects: "unknown",
229
236
  async: !1,
230
237
  check: n,
231
- message: r,
238
+ message: s,
232
239
  get "~standard"() {
233
- return /* @__PURE__ */ f(this);
240
+ return /* @__PURE__ */ o(this);
234
241
  },
235
- "~run"(e, t) {
236
- return this.check(e.value) ? e.typed = !0 : c(this, "type", e, t), e;
242
+ "~run"(e, r) {
243
+ return this.check(e.value) ? e.typed = !0 : y(this, "type", e, r), e;
237
244
  }
238
245
  };
239
246
  }
240
247
  // @__NO_SIDE_EFFECTS__
241
- function K(n, r) {
248
+ function R(n, s) {
242
249
  return {
243
250
  kind: "schema",
244
251
  type: "literal",
245
- reference: K,
246
- expects: /* @__PURE__ */ k(n),
252
+ reference: R,
253
+ expects: /* @__PURE__ */ _(n),
247
254
  async: !1,
248
255
  literal: n,
249
- message: r,
256
+ message: s,
250
257
  get "~standard"() {
251
- return /* @__PURE__ */ f(this);
258
+ return /* @__PURE__ */ o(this);
252
259
  },
253
- "~run"(e, t) {
254
- return e.value === this.literal ? e.typed = !0 : c(this, "type", e, t), e;
260
+ "~run"(e, r) {
261
+ return e.value === this.literal ? e.typed = !0 : y(this, "type", e, r), e;
262
+ }
263
+ };
264
+ }
265
+ // @__NO_SIDE_EFFECTS__
266
+ function z(n, s) {
267
+ return {
268
+ kind: "schema",
269
+ type: "loose_object",
270
+ reference: z,
271
+ expects: "Object",
272
+ async: !1,
273
+ entries: n,
274
+ message: s,
275
+ get "~standard"() {
276
+ return /* @__PURE__ */ o(this);
277
+ },
278
+ "~run"(e, r) {
279
+ var l;
280
+ const t = e.value;
281
+ if (t && typeof t == "object") {
282
+ e.typed = !0, e.value = {};
283
+ for (const i in this.entries) {
284
+ const p = this.entries[i];
285
+ if (i in t || (p.type === "exact_optional" || p.type === "optional" || p.type === "nullish") && // @ts-expect-error
286
+ p.default !== void 0) {
287
+ const u = i in t ? (
288
+ // @ts-expect-error
289
+ t[i]
290
+ ) : /* @__PURE__ */ D(p), a = p["~run"]({ value: u }, r);
291
+ if (a.issues) {
292
+ const c = {
293
+ type: "object",
294
+ origin: "value",
295
+ input: t,
296
+ key: i,
297
+ value: u
298
+ };
299
+ for (const f of a.issues)
300
+ f.path ? f.path.unshift(c) : f.path = [c], (l = e.issues) == null || l.push(f);
301
+ if (e.issues || (e.issues = a.issues), r.abortEarly) {
302
+ e.typed = !1;
303
+ break;
304
+ }
305
+ }
306
+ a.typed || (e.typed = !1), e.value[i] = a.value;
307
+ } else if (p.fallback !== void 0)
308
+ e.value[i] = /* @__PURE__ */ S(p);
309
+ else if (p.type !== "exact_optional" && p.type !== "optional" && p.type !== "nullish" && (y(this, "key", e, r, {
310
+ input: void 0,
311
+ expected: `"${i}"`,
312
+ path: [
313
+ {
314
+ type: "object",
315
+ origin: "key",
316
+ input: t,
317
+ key: i,
318
+ // @ts-expect-error
319
+ value: t[i]
320
+ }
321
+ ]
322
+ }), r.abortEarly))
323
+ break;
324
+ }
325
+ if (!e.issues || !r.abortEarly)
326
+ for (const i in t)
327
+ /* @__PURE__ */ O(t, i) && !(i in this.entries) && (e.value[i] = t[i]);
328
+ } else
329
+ y(this, "type", e, r);
330
+ return e;
255
331
  }
256
332
  };
257
333
  }
258
334
  // @__NO_SIDE_EFFECTS__
259
- function R(n) {
335
+ function B(n) {
260
336
  return {
261
337
  kind: "schema",
262
338
  type: "number",
263
- reference: R,
339
+ reference: B,
264
340
  expects: "number",
265
341
  async: !1,
266
342
  message: n,
267
343
  get "~standard"() {
268
- return /* @__PURE__ */ f(this);
344
+ return /* @__PURE__ */ o(this);
269
345
  },
270
- "~run"(r, e) {
271
- return typeof r.value == "number" && !isNaN(r.value) ? r.typed = !0 : c(this, "type", r, e), r;
346
+ "~run"(s, e) {
347
+ return typeof s.value == "number" && !isNaN(s.value) ? s.typed = !0 : y(this, "type", s, e), s;
272
348
  }
273
349
  };
274
350
  }
275
351
  // @__NO_SIDE_EFFECTS__
276
- function V(n, r) {
352
+ function H(n, s) {
277
353
  return {
278
354
  kind: "schema",
279
355
  type: "object",
280
- reference: V,
356
+ reference: H,
281
357
  expects: "Object",
282
358
  async: !1,
283
359
  entries: n,
284
- message: r,
360
+ message: s,
285
361
  get "~standard"() {
286
- return /* @__PURE__ */ f(this);
362
+ return /* @__PURE__ */ o(this);
287
363
  },
288
- "~run"(e, t) {
289
- const s = e.value;
290
- if (s && typeof s == "object") {
364
+ "~run"(e, r) {
365
+ var l;
366
+ const t = e.value;
367
+ if (t && typeof t == "object") {
291
368
  e.typed = !0, e.value = {};
292
369
  for (const i in this.entries) {
293
- const u = this.entries[i];
294
- if (i in s || (u.type === "exact_optional" || u.type === "optional" || u.type === "nullish") && // @ts-expect-error
295
- u.default !== void 0) {
296
- const a = i in s ? (
370
+ const p = this.entries[i];
371
+ if (i in t || (p.type === "exact_optional" || p.type === "optional" || p.type === "nullish") && // @ts-expect-error
372
+ p.default !== void 0) {
373
+ const u = i in t ? (
297
374
  // @ts-expect-error
298
- s[i]
299
- ) : /* @__PURE__ */ $(u), l = u["~run"]({ value: a }, t);
300
- if (l.issues) {
301
- const o = {
375
+ t[i]
376
+ ) : /* @__PURE__ */ D(p), a = p["~run"]({ value: u }, r);
377
+ if (a.issues) {
378
+ const c = {
302
379
  type: "object",
303
380
  origin: "value",
304
- input: s,
381
+ input: t,
305
382
  key: i,
306
- value: a
383
+ value: u
307
384
  };
308
- for (const p of l.issues)
309
- p.path ? p.path.unshift(o) : p.path = [o], e.issues?.push(p);
310
- if (e.issues || (e.issues = l.issues), t.abortEarly) {
385
+ for (const f of a.issues)
386
+ f.path ? f.path.unshift(c) : f.path = [c], (l = e.issues) == null || l.push(f);
387
+ if (e.issues || (e.issues = a.issues), r.abortEarly) {
311
388
  e.typed = !1;
312
389
  break;
313
390
  }
314
391
  }
315
- l.typed || (e.typed = !1), e.value[i] = l.value;
316
- } else if (u.fallback !== void 0)
317
- e.value[i] = /* @__PURE__ */ L(u);
318
- else if (u.type !== "exact_optional" && u.type !== "optional" && u.type !== "nullish" && (c(this, "key", e, t, {
392
+ a.typed || (e.typed = !1), e.value[i] = a.value;
393
+ } else if (p.fallback !== void 0)
394
+ e.value[i] = /* @__PURE__ */ S(p);
395
+ else if (p.type !== "exact_optional" && p.type !== "optional" && p.type !== "nullish" && (y(this, "key", e, r, {
319
396
  input: void 0,
320
397
  expected: `"${i}"`,
321
398
  path: [
322
399
  {
323
400
  type: "object",
324
401
  origin: "key",
325
- input: s,
402
+ input: t,
326
403
  key: i,
327
404
  // @ts-expect-error
328
- value: s[i]
405
+ value: t[i]
329
406
  }
330
407
  ]
331
- }), t.abortEarly))
408
+ }), r.abortEarly))
332
409
  break;
333
410
  }
334
411
  } else
335
- c(this, "type", e, t);
412
+ y(this, "type", e, r);
336
413
  return e;
337
414
  }
338
415
  };
339
416
  }
340
417
  // @__NO_SIDE_EFFECTS__
341
- function z(n, r) {
418
+ function J(n, s) {
342
419
  return {
343
420
  kind: "schema",
344
421
  type: "optional",
345
- reference: z,
422
+ reference: J,
346
423
  expects: `(${n.expects} | undefined)`,
347
424
  async: !1,
348
425
  wrapped: n,
349
- default: r,
426
+ default: s,
350
427
  get "~standard"() {
351
- return /* @__PURE__ */ f(this);
428
+ return /* @__PURE__ */ o(this);
352
429
  },
353
- "~run"(e, t) {
354
- return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */ $(this, e, t)), e.value === void 0) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
430
+ "~run"(e, r) {
431
+ return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */ D(this, e, r)), e.value === void 0) ? (e.typed = !0, e) : this.wrapped["~run"](e, r);
355
432
  }
356
433
  };
357
434
  }
358
435
  // @__NO_SIDE_EFFECTS__
359
- function B(n, r) {
436
+ function Q(n, s) {
360
437
  return {
361
438
  kind: "schema",
362
439
  type: "picklist",
363
- reference: B,
364
- expects: /* @__PURE__ */ E(n.map(k), "|"),
440
+ reference: Q,
441
+ expects: /* @__PURE__ */ $(n.map(_), "|"),
365
442
  async: !1,
366
443
  options: n,
367
- message: r,
444
+ message: s,
445
+ get "~standard"() {
446
+ return /* @__PURE__ */ o(this);
447
+ },
448
+ "~run"(e, r) {
449
+ return this.options.includes(e.value) ? e.typed = !0 : y(this, "type", e, r), e;
450
+ }
451
+ };
452
+ }
453
+ // @__NO_SIDE_EFFECTS__
454
+ function T(n, s, e) {
455
+ return {
456
+ kind: "schema",
457
+ type: "record",
458
+ reference: T,
459
+ expects: "Object",
460
+ async: !1,
461
+ key: n,
462
+ value: s,
463
+ message: e,
368
464
  get "~standard"() {
369
- return /* @__PURE__ */ f(this);
465
+ return /* @__PURE__ */ o(this);
370
466
  },
371
- "~run"(e, t) {
372
- return this.options.includes(e.value) ? e.typed = !0 : c(this, "type", e, t), e;
467
+ "~run"(r, t) {
468
+ var i, p;
469
+ const l = r.value;
470
+ if (l && typeof l == "object") {
471
+ r.typed = !0, r.value = {};
472
+ for (const u in l)
473
+ if (/* @__PURE__ */ O(l, u)) {
474
+ const a = l[u], c = this.key["~run"]({ value: u }, t);
475
+ if (c.issues) {
476
+ const b = {
477
+ type: "object",
478
+ origin: "key",
479
+ input: l,
480
+ key: u,
481
+ value: a
482
+ };
483
+ for (const h of c.issues)
484
+ h.path = [b], (i = r.issues) == null || i.push(h);
485
+ if (r.issues || (r.issues = c.issues), t.abortEarly) {
486
+ r.typed = !1;
487
+ break;
488
+ }
489
+ }
490
+ const f = this.value["~run"](
491
+ { value: a },
492
+ t
493
+ );
494
+ if (f.issues) {
495
+ const b = {
496
+ type: "object",
497
+ origin: "value",
498
+ input: l,
499
+ key: u,
500
+ value: a
501
+ };
502
+ for (const h of f.issues)
503
+ h.path ? h.path.unshift(b) : h.path = [b], (p = r.issues) == null || p.push(h);
504
+ if (r.issues || (r.issues = f.issues), t.abortEarly) {
505
+ r.typed = !1;
506
+ break;
507
+ }
508
+ }
509
+ (!c.typed || !f.typed) && (r.typed = !1), c.typed && (r.value[c.value] = f.value);
510
+ }
511
+ } else
512
+ y(this, "type", r, t);
513
+ return r;
373
514
  }
374
515
  };
375
516
  }
376
517
  // @__NO_SIDE_EFFECTS__
377
- function H(n) {
518
+ function U(n) {
378
519
  return {
379
520
  kind: "schema",
380
521
  type: "string",
381
- reference: H,
522
+ reference: U,
382
523
  expects: "string",
383
524
  async: !1,
384
525
  message: n,
385
526
  get "~standard"() {
386
- return /* @__PURE__ */ f(this);
527
+ return /* @__PURE__ */ o(this);
528
+ },
529
+ "~run"(s, e) {
530
+ return typeof s.value == "string" ? s.typed = !0 : y(this, "type", s, e), s;
531
+ }
532
+ };
533
+ }
534
+ // @__NO_SIDE_EFFECTS__
535
+ function w(n) {
536
+ let s;
537
+ if (n)
538
+ for (const e of n)
539
+ s ? s.push(...e.issues) : s = e.issues;
540
+ return s;
541
+ }
542
+ // @__NO_SIDE_EFFECTS__
543
+ function W(n, s) {
544
+ return {
545
+ kind: "schema",
546
+ type: "union",
547
+ reference: W,
548
+ expects: /* @__PURE__ */ $(
549
+ n.map((e) => e.expects),
550
+ "|"
551
+ ),
552
+ async: !1,
553
+ options: n,
554
+ message: s,
555
+ get "~standard"() {
556
+ return /* @__PURE__ */ o(this);
387
557
  },
388
- "~run"(r, e) {
389
- return typeof r.value == "string" ? r.typed = !0 : c(this, "type", r, e), r;
558
+ "~run"(e, r) {
559
+ let t, l, i;
560
+ for (const p of this.options) {
561
+ const u = p["~run"]({ value: e.value }, r);
562
+ if (u.typed)
563
+ if (u.issues)
564
+ l ? l.push(u) : l = [u];
565
+ else {
566
+ t = u;
567
+ break;
568
+ }
569
+ else
570
+ i ? i.push(u) : i = [u];
571
+ }
572
+ if (t)
573
+ return t;
574
+ if (l) {
575
+ if (l.length === 1)
576
+ return l[0];
577
+ y(this, "type", e, r, {
578
+ issues: /* @__PURE__ */ w(l)
579
+ }), e.typed = !0;
580
+ } else {
581
+ if ((i == null ? void 0 : i.length) === 1)
582
+ return i[0];
583
+ y(this, "type", e, r, {
584
+ issues: /* @__PURE__ */ w(i)
585
+ });
586
+ }
587
+ return e;
390
588
  }
391
589
  };
392
590
  }
393
591
  // @__NO_SIDE_EFFECTS__
394
- function J(n, r, e) {
592
+ function X() {
593
+ return {
594
+ kind: "schema",
595
+ type: "unknown",
596
+ reference: X,
597
+ expects: "unknown",
598
+ async: !1,
599
+ get "~standard"() {
600
+ return /* @__PURE__ */ o(this);
601
+ },
602
+ "~run"(n) {
603
+ return n.typed = !0, n;
604
+ }
605
+ };
606
+ }
607
+ // @__NO_SIDE_EFFECTS__
608
+ function Y(n, s, e) {
395
609
  return {
396
610
  kind: "schema",
397
611
  type: "variant",
398
- reference: J,
612
+ reference: Y,
399
613
  expects: "Object",
400
614
  async: !1,
401
615
  key: n,
402
- options: r,
616
+ options: s,
403
617
  message: e,
404
618
  get "~standard"() {
405
- return /* @__PURE__ */ f(this);
619
+ return /* @__PURE__ */ o(this);
406
620
  },
407
- "~run"(t, s) {
408
- const i = t.value;
409
- if (i && typeof i == "object") {
410
- let u, a = 0, l = this.key, o = [];
411
- const p = (j, d) => {
412
- for (const h of j.options) {
621
+ "~run"(r, t) {
622
+ const l = r.value;
623
+ if (l && typeof l == "object") {
624
+ let i, p = 0, u = this.key, a = [];
625
+ const c = (f, b) => {
626
+ for (const h of f.options) {
413
627
  if (h.type === "variant")
414
- p(h, new Set(d).add(h.key));
628
+ c(h, new Set(b).add(h.key));
415
629
  else {
416
- let x = !0, v = 0;
417
- for (const y of d) {
418
- const m = h.entries[y];
419
- if (y in i ? m["~run"](
630
+ let P = !0, k = 0;
631
+ for (const v of b) {
632
+ const g = h.entries[v];
633
+ if (v in l ? g["~run"](
420
634
  // @ts-expect-error
421
- { typed: !1, value: i[y] },
635
+ { typed: !1, value: l[v] },
422
636
  { abortEarly: !0 }
423
- ).issues : m.type !== "exact_optional" && m.type !== "optional" && m.type !== "nullish") {
424
- x = !1, l !== y && (a < v || a === v && y in i && !(l in i)) && (a = v, l = y, o = []), l === y && o.push(
425
- h.entries[y].expects
637
+ ).issues : g.type !== "exact_optional" && g.type !== "optional" && g.type !== "nullish") {
638
+ P = !1, u !== v && (p < k || p === k && v in l && !(u in l)) && (p = k, u = v, a = []), u === v && a.push(
639
+ h.entries[v].expects
426
640
  );
427
641
  break;
428
642
  }
429
- v++;
643
+ k++;
430
644
  }
431
- if (x) {
432
- const y = h["~run"]({ value: i }, s);
433
- (!u || !u.typed && y.typed) && (u = y);
645
+ if (P) {
646
+ const v = h["~run"]({ value: l }, t);
647
+ (!i || !i.typed && v.typed) && (i = v);
434
648
  }
435
649
  }
436
- if (u && !u.issues)
650
+ if (i && !i.issues)
437
651
  break;
438
652
  }
439
653
  };
440
- if (p(this, /* @__PURE__ */ new Set([this.key])), u)
441
- return u;
442
- c(this, "type", t, s, {
654
+ if (c(this, /* @__PURE__ */ new Set([this.key])), i)
655
+ return i;
656
+ y(this, "type", r, t, {
443
657
  // @ts-expect-error
444
- input: i[l],
445
- expected: /* @__PURE__ */ E(o, "|"),
658
+ input: l[u],
659
+ expected: /* @__PURE__ */ $(a, "|"),
446
660
  path: [
447
661
  {
448
662
  type: "object",
449
663
  origin: "value",
450
- input: i,
451
- key: l,
664
+ input: l,
665
+ key: u,
452
666
  // @ts-expect-error
453
- value: i[l]
667
+ value: l[u]
454
668
  }
455
669
  ]
456
670
  });
457
671
  } else
458
- c(this, "type", t, s);
459
- return t;
672
+ y(this, "type", r, t);
673
+ return r;
460
674
  }
461
675
  };
462
676
  }
463
677
  // @__NO_SIDE_EFFECTS__
464
- function Q(...n) {
678
+ function Z(...n) {
465
679
  return {
466
680
  ...n[0],
467
681
  pipe: n,
468
682
  get "~standard"() {
469
- return /* @__PURE__ */ f(this);
683
+ return /* @__PURE__ */ o(this);
470
684
  },
471
- "~run"(r, e) {
472
- for (const t of n)
473
- if (t.kind !== "metadata") {
474
- if (r.issues && (t.kind === "schema" || t.kind === "transformation")) {
475
- r.typed = !1;
685
+ "~run"(s, e) {
686
+ for (const r of n)
687
+ if (r.kind !== "metadata") {
688
+ if (s.issues && (r.kind === "schema" || r.kind === "transformation")) {
689
+ s.typed = !1;
476
690
  break;
477
691
  }
478
- (!r.issues || !e.abortEarly && !e.abortPipeEarly) && (r = t["~run"](r, e));
692
+ (!s.issues || !e.abortEarly && !e.abortPipeEarly) && (s = r["~run"](s, e));
479
693
  }
480
- return r;
694
+ return s;
481
695
  }
482
696
  };
483
697
  }
484
698
  // @__NO_SIDE_EFFECTS__
485
- function T(...n) {
699
+ function ee(...n) {
486
700
  return {
487
701
  ...n[0],
488
702
  pipe: n,
489
703
  async: !0,
490
704
  get "~standard"() {
491
- return /* @__PURE__ */ f(this);
705
+ return /* @__PURE__ */ o(this);
492
706
  },
493
- async "~run"(r, e) {
494
- for (const t of n)
495
- if (t.kind !== "metadata") {
496
- if (r.issues && (t.kind === "schema" || t.kind === "transformation")) {
497
- r.typed = !1;
707
+ async "~run"(s, e) {
708
+ for (const r of n)
709
+ if (r.kind !== "metadata") {
710
+ if (s.issues && (r.kind === "schema" || r.kind === "transformation")) {
711
+ s.typed = !1;
498
712
  break;
499
713
  }
500
- (!r.issues || !e.abortEarly && !e.abortPipeEarly) && (r = await t["~run"](r, e));
714
+ (!s.issues || !e.abortEarly && !e.abortPipeEarly) && (s = await r["~run"](s, e));
501
715
  }
502
- return r;
716
+ return s;
503
717
  }
504
718
  };
505
719
  }
506
720
  // @__NO_SIDE_EFFECTS__
507
- function U(n, r, e) {
508
- const t = n["~run"]({ value: r }, /* @__PURE__ */ b(e));
721
+ function ne(n, s, e) {
722
+ const r = n["~run"]({ value: s }, /* @__PURE__ */ j(e));
509
723
  return {
510
- typed: t.typed,
511
- success: !t.issues,
512
- output: t.value,
513
- issues: t.issues
724
+ typed: r.typed,
725
+ success: !r.issues,
726
+ output: r.value,
727
+ issues: r.issues
514
728
  };
515
729
  }
516
730
  // @__NO_SIDE_EFFECTS__
517
- async function W(n, r, e) {
518
- const t = await n["~run"](
519
- { value: r },
520
- /* @__PURE__ */ b(e)
731
+ async function se(n, s, e) {
732
+ const r = await n["~run"](
733
+ { value: s },
734
+ /* @__PURE__ */ j(e)
521
735
  );
522
736
  return {
523
- typed: t.typed,
524
- success: !t.issues,
525
- output: t.value,
526
- issues: t.issues
737
+ typed: r.typed,
738
+ success: !r.issues,
739
+ output: r.value,
740
+ issues: r.issues
527
741
  };
528
742
  }
529
743
  export {
530
- c as _addIssue,
531
- f as _getStandardProps,
532
- E as _joinExpects,
533
- k as _stringify,
744
+ y as _addIssue,
745
+ o as _getStandardProps,
746
+ O as _isValidObjectKey,
747
+ $ as _joinExpects,
748
+ _ as _stringify,
534
749
  N as array,
535
750
  C as boolean,
536
- O as checkAsync,
751
+ K as checkAsync,
537
752
  F as custom,
538
- $ as getDefault,
539
- L as getFallback,
540
- b as getGlobalConfig,
541
- S as getGlobalMessage,
542
- D as getSchemaMessage,
543
- A as getSpecificMessage,
544
- K as literal,
545
- I as maxLength,
546
- q as minLength,
547
- M as nonEmpty,
548
- R as number,
549
- V as object,
550
- z as optional,
551
- B as picklist,
552
- Q as pipe,
553
- T as pipeAsync,
554
- U as safeParse,
555
- W as safeParseAsync,
556
- H as string,
557
- G as trim,
558
- J as variant
753
+ D as getDefault,
754
+ S as getFallback,
755
+ j as getGlobalConfig,
756
+ I as getGlobalMessage,
757
+ A as getSchemaMessage,
758
+ q as getSpecificMessage,
759
+ R as literal,
760
+ z as looseObject,
761
+ M as maxLength,
762
+ V as minLength,
763
+ G as nonEmpty,
764
+ B as number,
765
+ H as object,
766
+ J as optional,
767
+ Q as picklist,
768
+ Z as pipe,
769
+ ee as pipeAsync,
770
+ T as record,
771
+ ne as safeParse,
772
+ se as safeParseAsync,
773
+ U as string,
774
+ L as trim,
775
+ W as union,
776
+ X as unknown,
777
+ Y as variant
559
778
  };