@convertcom/js-sdk-rules 2.1.0 → 2.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (214) hide show
  1. package/lib/enums/src/dictionary.d.ts +3 -0
  2. package/lib/index.d.ts +2 -1
  3. package/lib/index.js +196 -157
  4. package/lib/index.js.map +1 -1
  5. package/lib/index.min.js +1 -1
  6. package/lib/index.min.js.map +1 -1
  7. package/lib/index.min.mjs +1 -1
  8. package/lib/index.min.mjs.map +1 -1
  9. package/lib/index.mjs +196 -157
  10. package/lib/index.mjs.map +1 -1
  11. package/lib/legacy/index.js +173 -134
  12. package/lib/legacy/index.js.map +1 -1
  13. package/lib/legacy/index.min.js +1 -1
  14. package/lib/legacy/index.min.js.map +1 -1
  15. package/lib/package.json +5 -5
  16. package/lib/rules/src/interfaces/rule-manager.d.ts +1 -0
  17. package/lib/rules/src/rule-manager.d.ts +1 -1
  18. package/lib/types/index.d.ts +1 -0
  19. package/lib/types/src/config/index.d.ts +1 -192
  20. package/lib/types/src/config/types.gen.d.ts +2387 -0
  21. package/lib/utils/src/string-utils.d.ts +12 -0
  22. package/package.json +5 -5
  23. package/lib/types/src/config/models/Base64Image.d.ts +0 -6
  24. package/lib/types/src/config/models/BaseMatch.d.ts +0 -8
  25. package/lib/types/src/config/models/BaseRule.d.ts +0 -6
  26. package/lib/types/src/config/models/BaseRuleWithBooleanValue.d.ts +0 -7
  27. package/lib/types/src/config/models/BaseRuleWithBrowserNameValue.d.ts +0 -21
  28. package/lib/types/src/config/models/BaseRuleWithCountryCodeValue.d.ts +0 -7
  29. package/lib/types/src/config/models/BaseRuleWithDayOfWeekValue.d.ts +0 -7
  30. package/lib/types/src/config/models/BaseRuleWithExperienceBucketedValue.d.ts +0 -7
  31. package/lib/types/src/config/models/BaseRuleWithGoalTriggeredValue.d.ts +0 -7
  32. package/lib/types/src/config/models/BaseRuleWithHourOfDayValue.d.ts +0 -7
  33. package/lib/types/src/config/models/BaseRuleWithJsCodeValue.d.ts +0 -9
  34. package/lib/types/src/config/models/BaseRuleWithLanguageCodeValue.d.ts +0 -7
  35. package/lib/types/src/config/models/BaseRuleWithMinuteOfHourValue.d.ts +0 -7
  36. package/lib/types/src/config/models/BaseRuleWithNumericValue.d.ts +0 -7
  37. package/lib/types/src/config/models/BaseRuleWithOsValue.d.ts +0 -21
  38. package/lib/types/src/config/models/BaseRuleWithSegmentBucketedValue.d.ts +0 -7
  39. package/lib/types/src/config/models/BaseRuleWithStringValue.d.ts +0 -7
  40. package/lib/types/src/config/models/BaseRuleWithVisitorTypeValue.d.ts +0 -16
  41. package/lib/types/src/config/models/BaseRuleWithWeatherConditionValue.d.ts +0 -34
  42. package/lib/types/src/config/models/BoolMatchRulesTypes.d.ts +0 -6
  43. package/lib/types/src/config/models/BrowserNameMatchRule.d.ts +0 -10
  44. package/lib/types/src/config/models/BrowserNameMatchRulesTypes.d.ts +0 -3
  45. package/lib/types/src/config/models/BucketingEvent.d.ts +0 -15
  46. package/lib/types/src/config/models/ChoiceContainsOptions.d.ts +0 -3
  47. package/lib/types/src/config/models/ChoiceMatchingOptions.d.ts +0 -3
  48. package/lib/types/src/config/models/ClicksElementGoal.d.ts +0 -11
  49. package/lib/types/src/config/models/ClicksElementGoalSettings.d.ts +0 -6
  50. package/lib/types/src/config/models/ClicksLinkGoal.d.ts +0 -11
  51. package/lib/types/src/config/models/ClicksLinkGoalSettings.d.ts +0 -6
  52. package/lib/types/src/config/models/ConfigAudience.d.ts +0 -21
  53. package/lib/types/src/config/models/ConfigAudienceTypes.d.ts +0 -10
  54. package/lib/types/src/config/models/ConfigExperience.d.ts +0 -98
  55. package/lib/types/src/config/models/ConfigFeature.d.ts +0 -22
  56. package/lib/types/src/config/models/ConfigGoal.d.ts +0 -9
  57. package/lib/types/src/config/models/ConfigGoalBase.d.ts +0 -24
  58. package/lib/types/src/config/models/ConfigLocation.d.ts +0 -21
  59. package/lib/types/src/config/models/ConfigProject.d.ts +0 -151
  60. package/lib/types/src/config/models/ConfigResponseData.d.ts +0 -45
  61. package/lib/types/src/config/models/ConfigSegment.d.ts +0 -19
  62. package/lib/types/src/config/models/ConversionEvent.d.ts +0 -30
  63. package/lib/types/src/config/models/CookieMatchRule.d.ts +0 -14
  64. package/lib/types/src/config/models/CookieMatchRulesTypes.d.ts +0 -3
  65. package/lib/types/src/config/models/CountryMatchRule.d.ts +0 -10
  66. package/lib/types/src/config/models/CountryMatchRulesTypes.d.ts +0 -3
  67. package/lib/types/src/config/models/DayOfWeekMatchRule.d.ts +0 -10
  68. package/lib/types/src/config/models/DayOfWeekMatchRulesTypes.d.ts +0 -4
  69. package/lib/types/src/config/models/DomInteractionGoal.d.ts +0 -11
  70. package/lib/types/src/config/models/DomInteractionGoalSettings.d.ts +0 -15
  71. package/lib/types/src/config/models/ErrorData.d.ts +0 -5
  72. package/lib/types/src/config/models/ExperienceBucketedMatchRule.d.ts +0 -9
  73. package/lib/types/src/config/models/ExperienceChange.d.ts +0 -10
  74. package/lib/types/src/config/models/ExperienceChangeAdd.d.ts +0 -10
  75. package/lib/types/src/config/models/ExperienceChangeBase.d.ts +0 -27
  76. package/lib/types/src/config/models/ExperienceChangeCustomCodeData.d.ts +0 -6
  77. package/lib/types/src/config/models/ExperienceChangeCustomCodeDataAdd.d.ts +0 -6
  78. package/lib/types/src/config/models/ExperienceChangeCustomCodeDataBase.d.ts +0 -29
  79. package/lib/types/src/config/models/ExperienceChangeCustomCodeDataUpdate.d.ts +0 -6
  80. package/lib/types/src/config/models/ExperienceChangeCustomCodeDataUpdateNoId.d.ts +0 -5
  81. package/lib/types/src/config/models/ExperienceChangeDefaultCodeData.d.ts +0 -6
  82. package/lib/types/src/config/models/ExperienceChangeDefaultCodeDataAdd.d.ts +0 -6
  83. package/lib/types/src/config/models/ExperienceChangeDefaultCodeDataBase.d.ts +0 -29
  84. package/lib/types/src/config/models/ExperienceChangeDefaultCodeDataUpdate.d.ts +0 -6
  85. package/lib/types/src/config/models/ExperienceChangeDefaultCodeDataUpdateNoId.d.ts +0 -5
  86. package/lib/types/src/config/models/ExperienceChangeDefaultCodeMultipageData.d.ts +0 -6
  87. package/lib/types/src/config/models/ExperienceChangeDefaultCodeMultipageDataAdd.d.ts +0 -6
  88. package/lib/types/src/config/models/ExperienceChangeDefaultCodeMultipageDataBase.d.ts +0 -33
  89. package/lib/types/src/config/models/ExperienceChangeDefaultCodeMultipageDataUpdate.d.ts +0 -6
  90. package/lib/types/src/config/models/ExperienceChangeDefaultCodeMultipageDataUpdateNoId.d.ts +0 -5
  91. package/lib/types/src/config/models/ExperienceChangeDefaultRedirectData.d.ts +0 -6
  92. package/lib/types/src/config/models/ExperienceChangeDefaultRedirectDataAdd.d.ts +0 -6
  93. package/lib/types/src/config/models/ExperienceChangeDefaultRedirectDataBase.d.ts +0 -29
  94. package/lib/types/src/config/models/ExperienceChangeDefaultRedirectDataUpdate.d.ts +0 -6
  95. package/lib/types/src/config/models/ExperienceChangeDefaultRedirectDataUpdateNoId.d.ts +0 -5
  96. package/lib/types/src/config/models/ExperienceChangeFullStackFeature.d.ts +0 -6
  97. package/lib/types/src/config/models/ExperienceChangeFullStackFeatureAdd.d.ts +0 -6
  98. package/lib/types/src/config/models/ExperienceChangeFullStackFeatureBase.d.ts +0 -25
  99. package/lib/types/src/config/models/ExperienceChangeFullStackFeatureUpdate.d.ts +0 -6
  100. package/lib/types/src/config/models/ExperienceChangeFullStackFeatureUpdateNoId.d.ts +0 -5
  101. package/lib/types/src/config/models/ExperienceChangeId.d.ts +0 -9
  102. package/lib/types/src/config/models/ExperienceChangeIdReadOnly.d.ts +0 -9
  103. package/lib/types/src/config/models/ExperienceChangeRichStructureData.d.ts +0 -6
  104. package/lib/types/src/config/models/ExperienceChangeRichStructureDataAdd.d.ts +0 -6
  105. package/lib/types/src/config/models/ExperienceChangeRichStructureDataBase.d.ts +0 -16
  106. package/lib/types/src/config/models/ExperienceChangeRichStructureDataUpdate.d.ts +0 -6
  107. package/lib/types/src/config/models/ExperienceChangeRichStructureDataUpdateNoId.d.ts +0 -5
  108. package/lib/types/src/config/models/ExperienceChangeUpdate.d.ts +0 -10
  109. package/lib/types/src/config/models/ExperienceChangeUpdateNoId.d.ts +0 -10
  110. package/lib/types/src/config/models/ExperienceIntegrationBaidu.d.ts +0 -7
  111. package/lib/types/src/config/models/ExperienceIntegrationBase.d.ts +0 -10
  112. package/lib/types/src/config/models/ExperienceIntegrationClicktale.d.ts +0 -2
  113. package/lib/types/src/config/models/ExperienceIntegrationClicky.d.ts +0 -2
  114. package/lib/types/src/config/models/ExperienceIntegrationCnzz.d.ts +0 -7
  115. package/lib/types/src/config/models/ExperienceIntegrationCrazyegg.d.ts +0 -9
  116. package/lib/types/src/config/models/ExperienceIntegrationEconda.d.ts +0 -2
  117. package/lib/types/src/config/models/ExperienceIntegrationEulerian.d.ts +0 -2
  118. package/lib/types/src/config/models/ExperienceIntegrationGA3.d.ts +0 -9
  119. package/lib/types/src/config/models/ExperienceIntegrationGA4.d.ts +0 -8
  120. package/lib/types/src/config/models/ExperienceIntegrationGA4Base.d.ts +0 -4
  121. package/lib/types/src/config/models/ExperienceIntegrationGAServing.d.ts +0 -3
  122. package/lib/types/src/config/models/ExperienceIntegrationGoogleAnalytics.d.ts +0 -3
  123. package/lib/types/src/config/models/ExperienceIntegrationGosquared.d.ts +0 -2
  124. package/lib/types/src/config/models/ExperienceIntegrationHeapanalytics.d.ts +0 -2
  125. package/lib/types/src/config/models/ExperienceIntegrationHotjar.d.ts +0 -2
  126. package/lib/types/src/config/models/ExperienceIntegrationMixpanel.d.ts +0 -2
  127. package/lib/types/src/config/models/ExperienceIntegrationMouseflow.d.ts +0 -2
  128. package/lib/types/src/config/models/ExperienceIntegrationPiwik.d.ts +0 -7
  129. package/lib/types/src/config/models/ExperienceIntegrationSegmentio.d.ts +0 -2
  130. package/lib/types/src/config/models/ExperienceIntegrationSitecatalyst.d.ts +0 -7
  131. package/lib/types/src/config/models/ExperienceIntegrationWoopra.d.ts +0 -2
  132. package/lib/types/src/config/models/ExperienceIntegrationYsance.d.ts +0 -7
  133. package/lib/types/src/config/models/ExperienceTypes.d.ts +0 -8
  134. package/lib/types/src/config/models/ExperienceVariationConfig.d.ts +0 -30
  135. package/lib/types/src/config/models/Extra.d.ts +0 -4
  136. package/lib/types/src/config/models/FeatureVariableItemData.d.ts +0 -25
  137. package/lib/types/src/config/models/GA_Settings.d.ts +0 -3
  138. package/lib/types/src/config/models/GA_SettingsBase.d.ts +0 -6
  139. package/lib/types/src/config/models/GaGoal.d.ts +0 -11
  140. package/lib/types/src/config/models/GaGoalSettings.d.ts +0 -6
  141. package/lib/types/src/config/models/GenericBoolKeyValueMatchRule.d.ts +0 -11
  142. package/lib/types/src/config/models/GenericBoolKeyValueMatchRulesTypes.d.ts +0 -3
  143. package/lib/types/src/config/models/GenericBoolMatchRule.d.ts +0 -10
  144. package/lib/types/src/config/models/GenericKey.d.ts +0 -6
  145. package/lib/types/src/config/models/GenericNumericKeyValueMatchRule.d.ts +0 -11
  146. package/lib/types/src/config/models/GenericNumericKeyValueMatchRulesTypes.d.ts +0 -3
  147. package/lib/types/src/config/models/GenericNumericMatchRule.d.ts +0 -10
  148. package/lib/types/src/config/models/GenericSetMatchRule.d.ts +0 -9
  149. package/lib/types/src/config/models/GenericTextKeyValueMatchRule.d.ts +0 -11
  150. package/lib/types/src/config/models/GenericTextKeyValueMatchRulesTypes.d.ts +0 -3
  151. package/lib/types/src/config/models/GenericTextMatchRule.d.ts +0 -10
  152. package/lib/types/src/config/models/GoalTriggeredMatchRule.d.ts +0 -10
  153. package/lib/types/src/config/models/GoalTriggeredMatchRulesTypes.d.ts +0 -3
  154. package/lib/types/src/config/models/GoalTypes.d.ts +0 -10
  155. package/lib/types/src/config/models/HourOfDayMatchRule.d.ts +0 -10
  156. package/lib/types/src/config/models/HourOfDayMatchRulesTypes.d.ts +0 -4
  157. package/lib/types/src/config/models/IntegrationGA3.d.ts +0 -12
  158. package/lib/types/src/config/models/IntegrationGA4.d.ts +0 -7
  159. package/lib/types/src/config/models/IntegrationGA4Base.d.ts +0 -12
  160. package/lib/types/src/config/models/IntegrationProvider.d.ts +0 -23
  161. package/lib/types/src/config/models/JsConditionMatchRule.d.ts +0 -10
  162. package/lib/types/src/config/models/JsConditionMatchRulesTypes.d.ts +0 -3
  163. package/lib/types/src/config/models/KeyValueMatchRulesTypes.d.ts +0 -4
  164. package/lib/types/src/config/models/LanguageMatchRule.d.ts +0 -10
  165. package/lib/types/src/config/models/LanguageMatchRulesTypes.d.ts +0 -3
  166. package/lib/types/src/config/models/LocationTrigger.d.ts +0 -5
  167. package/lib/types/src/config/models/LocationTriggerBase.d.ts +0 -14
  168. package/lib/types/src/config/models/LocationTriggerCallback.d.ts +0 -13
  169. package/lib/types/src/config/models/LocationTriggerDomChange.d.ts +0 -17
  170. package/lib/types/src/config/models/LocationTriggerManual.d.ts +0 -9
  171. package/lib/types/src/config/models/LocationTriggerUrlChange.d.ts +0 -9
  172. package/lib/types/src/config/models/MinuteOfHourMatchRule.d.ts +0 -10
  173. package/lib/types/src/config/models/MinuteOfHourMatchRulesTypes.d.ts +0 -4
  174. package/lib/types/src/config/models/NoSettingsGoal.d.ts +0 -11
  175. package/lib/types/src/config/models/NumericMatchRulesTypes.d.ts +0 -8
  176. package/lib/types/src/config/models/NumericMatchingOptions.d.ts +0 -5
  177. package/lib/types/src/config/models/OnlyCount.d.ts +0 -7
  178. package/lib/types/src/config/models/OsMatchRule.d.ts +0 -10
  179. package/lib/types/src/config/models/OsMatchRulesTypes.d.ts +0 -3
  180. package/lib/types/src/config/models/PageNumber.d.ts +0 -9
  181. package/lib/types/src/config/models/Pagination.d.ts +0 -18
  182. package/lib/types/src/config/models/ProjectGASettingsBase.d.ts +0 -7
  183. package/lib/types/src/config/models/ProjectIntegrationGA3.d.ts +0 -3
  184. package/lib/types/src/config/models/ProjectIntegrationGA4.d.ts +0 -8
  185. package/lib/types/src/config/models/ResultsPerPage.d.ts +0 -10
  186. package/lib/types/src/config/models/RevenueGoal.d.ts +0 -11
  187. package/lib/types/src/config/models/RevenueGoalSettings.d.ts +0 -25
  188. package/lib/types/src/config/models/RuleElement.d.ts +0 -20
  189. package/lib/types/src/config/models/RuleElementNoUrl.d.ts +0 -20
  190. package/lib/types/src/config/models/RuleObject.d.ts +0 -20
  191. package/lib/types/src/config/models/RuleObjectNoUrl.d.ts +0 -20
  192. package/lib/types/src/config/models/RulesTypes.d.ts +0 -17
  193. package/lib/types/src/config/models/ScrollPercentageGoal.d.ts +0 -11
  194. package/lib/types/src/config/models/ScrollPercentageGoalSettings.d.ts +0 -6
  195. package/lib/types/src/config/models/SegmentBucketedMatchRule.d.ts +0 -10
  196. package/lib/types/src/config/models/SegmentBucketedMatchRulesTypes.d.ts +0 -3
  197. package/lib/types/src/config/models/SendTrackingEventsRequestData.d.ts +0 -39
  198. package/lib/types/src/config/models/SetMatchingOptions.d.ts +0 -3
  199. package/lib/types/src/config/models/SortDirection.d.ts +0 -21
  200. package/lib/types/src/config/models/SubmitsFormGoal.d.ts +0 -11
  201. package/lib/types/src/config/models/SubmitsFormGoalSettings.d.ts +0 -6
  202. package/lib/types/src/config/models/SuccessData.d.ts +0 -4
  203. package/lib/types/src/config/models/TextMatchRulesTypes.d.ts +0 -23
  204. package/lib/types/src/config/models/TextMatchingOptions.d.ts +0 -7
  205. package/lib/types/src/config/models/UTC_Offset.d.ts +0 -4
  206. package/lib/types/src/config/models/UpdateExperienceChangeRequestData.d.ts +0 -2
  207. package/lib/types/src/config/models/VariationStatuses.d.ts +0 -7
  208. package/lib/types/src/config/models/VisitorSegments.d.ts +0 -78
  209. package/lib/types/src/config/models/VisitorTrackingEvents.d.ts +0 -21
  210. package/lib/types/src/config/models/VisitorTypeMatchRule.d.ts +0 -10
  211. package/lib/types/src/config/models/VisitorTypeMatchRulesTypes.d.ts +0 -3
  212. package/lib/types/src/config/models/WeatherConditionMatchRule.d.ts +0 -10
  213. package/lib/types/src/config/models/WeatherConditionMatchRulesTypes.d.ts +0 -3
  214. package/lib/types/src/config/models/WeatherConditions.d.ts +0 -30
package/lib/index.min.mjs CHANGED
@@ -4,5 +4,5 @@
4
4
  * Copyright(c) 2020-2022 Convert Insights, Inc
5
5
  * License Apache-2.0
6
6
  */
7
- function e(e){return Array.isArray(e)&&e.length>0}function t(e){return"object"==typeof e&&null!==e&&Object.keys(e).length>0}var o,r,n;class a{static equals(e,o,r){return Array.isArray(e)?this._returnNegationCheck(-1!==e.indexOf(o),r):t(e)?this._returnNegationCheck(-1!==Object.keys(e).indexOf(String(o)),r):(e=String(e),o=String(o),e=e.valueOf().toLowerCase(),o=o.valueOf().toLowerCase(),this._returnNegationCheck(e===o,r))}static less(e,t,o){return typeof e==typeof t&&this._returnNegationCheck(e<t,o)}static lessEqual(e,t,o){return typeof e==typeof t&&this._returnNegationCheck(e<=t,o)}static contains(e,t,o){return e=String(e),t=String(t),e=e.valueOf().toLowerCase(),0===(t=t.valueOf().toLowerCase()).replace(/^([\s]*)|([\s]*)$/g,"").length?this._returnNegationCheck(!0,o):this._returnNegationCheck(-1!==e.indexOf(t),o)}static isIn(e,t,o=!1,r="|"){const n=String(e).split(r).map((e=>String(e)));"string"==typeof t&&(t=t.split(r)),Array.isArray(t)||(t=[]),t=t.map((e=>String(e).valueOf().toLowerCase()));for(let e=0;e<n.length;e++)if(-1!==t.indexOf(n[e]))return this._returnNegationCheck(!0,o);return this._returnNegationCheck(!1,o)}static startsWith(e,t,o){return e=String(e).valueOf().toLowerCase(),t=String(t).valueOf().toLowerCase(),this._returnNegationCheck(0===e.indexOf(t),o)}static endsWith(e,t,o){return e=String(e).valueOf().toLowerCase(),t=String(t).valueOf().toLowerCase(),this._returnNegationCheck(-1!==e.indexOf(t,e.length-t.length),o)}static regexMatches(e,t,o){e=String(e).valueOf().toLowerCase(),t=String(t).valueOf();const r=new RegExp(t,"i");return this._returnNegationCheck(r.test(e),o)}static _returnNegationCheck(e,t=!1){return t?!e:e}}o=a,a.equalsNumber=o.equals,a.matches=o.equals,"function"==typeof SuppressedError&&SuppressedError,function(e){e.VARIAION_NOT_DECIDED="convert.com_variation_not_decided"}(r||(r={})),function(e){e.FORCE_MULTIPLE_TRANSACTIONS="forceMultipleTransactions"}(n||(n={}));const i={SDK_KEY_MISSING:"SDK key is missing",DATA_OBJECT_MISSING:"Data object is missing",CONFIG_DATA_NOT_VALID:"Config Data is not valid",SDK_OR_DATA_OBJECT_REQUIRED:"SDK key or Data object should be provided",RULE_NOT_VALID:"Provided rule is not valid",RULE_DATA_NOT_VALID:"Provided rule data is not valid",RULE_MATCH_TYPE_NOT_SUPPORTED:'Provided rule matching type "#" is not supported',RULE_ERROR:"Rule error",DATA_STORE_NOT_VALID:"DataStore object is not valid. It should contain get and set methods",VISITOR_ID_REQUIRED:"Visitor string string is not present",GOAL_DATA_NOT_VALID:"GoalData object is not valid",UNABLE_TO_SELECT_BUCKET_FOR_VISITOR:"Unable to bucket visitor",UNABLE_TO_PERFORM_NETWORK_REQUEST:"Unable to perform network request",UNSUPPORTED_RESPONSE_TYPE:"Unsupported response type"},s={CONFIG_DATA_UPDATED:"Config Data updated",CORE_CONSTRUCTOR:"Core Manager constructor has been called",CORE_INITIALIZED:"Core Manager has been initialized",EXPERIENCE_CONSTRUCTOR:"Experience Manager constructor has been called",EXPERIENCE_NOT_FOUND:"Experience not found",EXPERIENCE_RULES_MATCHED:"Experience rules matched",VARIATIONS_NOT_FOUND:"Variations not found",VARIATION_CHANGE_NOT_SUPPORTED:"Variation change not supported",FEATURE_CONSTRUCTOR:"Feature Manager constructor has been called",FEATURE_NOT_FOUND:"Fullstack Feature not found",FEATURE_VARIABLES_NOT_FOUND:"Fullstack Feature Variables not found",FEATURE_VARIABLES_TYPE_NOT_FOUND:"Fullstack Feature Variables Type not found",BUCKETING_CONSTRUCTOR:"Bucketing Manager constructor has been called",DATA_CONSTRUCTOR:"Data Manager constructor has been called",RULE_CONSTRUCTOR:"Rule Manager constructor has been called",PROCESSING_ENTITY:"Processing #",LOCATION_MATCH:"Location # rule matched",LOCATION_NOT_MATCH:"Location does not match",LOCATION_NOT_RESTRICTED:"Location not restricted",AUDIENCE_MATCH:"Audience # rule matched",AUDIENCE_NOT_MATCH:"Audience does not match",NON_PERMANENT_AUDIENCE_NOT_RESTRICTED:"Non-Permanent Audience not restricted",AUDIENCE_NOT_RESTRICTED:"Audience not restricted",SEGMENTATION_MATCH:"Segmentation # rule matched",SEGMENTATION_NOT_RESTRICTED:"Segmentation not restricted",RULE_NOT_MATCH:"Rule does not match",RULE_MATCH:"Found matched rule at OR block #",RULE_MATCH_AND:"AND block rule macthed",RULE_MATCH_START:"About to evaluate rule #",LOCATION_ACTIVATED:"Location # activated",LOCATION_DEACTIVATED:"Location # deactivated",BUCKETED_VISITOR_FOUND:"Visitor is already bucketed for variation #",BUCKETED_VISITOR_FORCED:"Forcing variation #",BUCKETED_VISITOR:"Visitor is bucketed for variation #",GOAL_NOT_FOUND:"Goal not found",GOAL_RULE_NOT_MATCH:"Goal rule do not match",GOAL_FOUND:"Goal # already triggered",SEGMENTS_NOT_FOUND:"Segments not found",SEGMENTS_RULE_NOT_MATCH:"Segments rule do not match",CUSTOM_SEGMENTS_KEY_FOUND:"Custom segments key already set",SEND_BEACON_SUCCESS:"The user agent successfully queued the data for transfer"};var l,c,u,d,_,E,R,T,O,g,N,A,p,C,h,v;!function(e){e.OFF="OFF",e.EU_ONLY="EU ONLY",e.EEA_ONLY="EEA ONLY",e.WORLDWIDE="Worldwide"}(l||(l={})),function(e){e.AUDIENCE="audience",e.LOCATION="location",e.SEGMENT="segment",e.FEATURE="feature",e.GOAL="goal",e.EXPERIENCE="experience",e.VARIATION="variation"}(c||(c={})),function(e){e.ENABLED="enabled",e.DISABLED="disabled"}(u||(u={})),function(e){e.AMOUNT="amount",e.PRODUCTS_COUNT="productsCount",e.TRANSACTION_ID="transactionId"}(d||(d={})),function(e){e[e.TRACE=0]="TRACE",e[e.DEBUG=1]="DEBUG",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.SILENT=5]="SILENT"}(_||(_={})),function(e){e.LOG="log",e.TRACE="trace",e.DEBUG="debug",e.INFO="info",e.WARN="warn",e.ERROR="error"}(E||(E={})),function(e){e.WEB="web",e.FULLSTACK="fullstack"}(R||(R={})),function(e){e.NO_DATA_FOUND="convert.com_no_data_found",e.NEED_MORE_DATA="convert.com_need_more_data"}(T||(T={})),function(e){e.READY="ready",e.CONFIG_UPDATED="config.updated",e.API_QUEUE_RELEASED="api.queue.released",e.BUCKETING="bucketing",e.CONVERSION="conversion",e.SEGMENTS="segments",e.LOCATION_ACTIVATED="location.activated",e.LOCATION_DEACTIVATED="location.deactivated",e.AUDIENCES="audiences",e.DATA_STORE_QUEUE_RELEASED="datastore.queue.released"}(O||(O={})),function(e){e.RICH_STRUCTURE="richStructure",e.CUSTOM_CODE="customCode",e.DEFAULT_CODE="defaultCode",e.DEFAULT_CODE_MULTIPAGE="defaultCodeMultipage",e.DEFAULT_REDIRECT="defaultRedirect",e.FULLSTACK_FEATURE="fullStackFeature"}(g||(g={})),function(e){e.IE="IE",e.CH="CH",e.FF="FF",e.OP="OP",e.SF="SF",e.EDG="EDG",e.MO="MO",e.NS="NS",e.OTH="OTH"}(N||(N={})),function(e){e.ALLPH="ALLPH",e.IPH="IPH",e.OTHPH="OTHPH",e.ALLTAB="ALLTAB",e.IPAD="IPAD",e.OTHTAB="OTHTAB",e.DESK="DESK",e.OTHDEV="OTHDEV"}(A||(A={})),function(e){e.COUNTRY="country",e.BROWSER="browser",e.DEVICES="devices",e.SOURCE="source",e.CAMPAIGN="campaign",e.VISITOR_TYPE="visitorType",e.CUSTOM_SEGMENTS="customSegments"}(p||(p={})),function(e){e.CAMPAIGN="campaign",e.SEARCH="search",e.REFERRAL="referral",e.DIRECT="direct"}(C||(C={})),function(e){e.NEW="new",e.RETURNING="returning"}(h||(h={})),function(e){e[e.Continue=100]="Continue",e[e.SwitchingProtocols=101]="SwitchingProtocols",e[e.Processing=102]="Processing",e[e.EarlyHints=103]="EarlyHints",e[e.Ok=200]="Ok",e[e.Created=201]="Created",e[e.Accepted=202]="Accepted",e[e.NonAuthoritativeInformation=203]="NonAuthoritativeInformation",e[e.NoContent=204]="NoContent",e[e.ResetContent=205]="ResetContent",e[e.PartialContent=206]="PartialContent",e[e.MultiStatus=207]="MultiStatus",e[e.AlreadyReported=208]="AlreadyReported",e[e.ImUsed=226]="ImUsed",e[e.MultipleChoices=300]="MultipleChoices",e[e.MovedPermanently=301]="MovedPermanently",e[e.Found=302]="Found",e[e.SeeOther=303]="SeeOther",e[e.NotModified=304]="NotModified",e[e.UseProxy=305]="UseProxy",e[e.Unused=306]="Unused",e[e.TemporaryRedirect=307]="TemporaryRedirect",e[e.PermanentRedirect=308]="PermanentRedirect",e[e.BadRequest=400]="BadRequest",e[e.Unauthorized=401]="Unauthorized",e[e.PaymentRequired=402]="PaymentRequired",e[e.Forbidden=403]="Forbidden",e[e.NotFound=404]="NotFound",e[e.MethodNotAllowed=405]="MethodNotAllowed",e[e.NotAcceptable=406]="NotAcceptable",e[e.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",e[e.RequestTimeout=408]="RequestTimeout",e[e.Conflict=409]="Conflict",e[e.Gone=410]="Gone",e[e.LengthRequired=411]="LengthRequired",e[e.PreconditionFailed=412]="PreconditionFailed",e[e.PayloadTooLarge=413]="PayloadTooLarge",e[e.UriTooLong=414]="UriTooLong",e[e.UnsupportedMediaType=415]="UnsupportedMediaType",e[e.RangeNotSatisfiable=416]="RangeNotSatisfiable",e[e.ExpectationFailed=417]="ExpectationFailed",e[e.ImATeapot=418]="ImATeapot",e[e.MisdirectedRequest=421]="MisdirectedRequest",e[e.UnprocessableEntity=422]="UnprocessableEntity",e[e.Locked=423]="Locked",e[e.FailedDependency=424]="FailedDependency",e[e.TooEarly=425]="TooEarly",e[e.UpgradeRequired=426]="UpgradeRequired",e[e.PreconditionRequired=428]="PreconditionRequired",e[e.TooManyRequests=429]="TooManyRequests",e[e.RequestHeaderFieldsTooLarge=431]="RequestHeaderFieldsTooLarge",e[e.UnavailableForLegalReasons=451]="UnavailableForLegalReasons",e[e.InternalServerError=500]="InternalServerError",e[e.NotImplemented=501]="NotImplemented",e[e.BadGateway=502]="BadGateway",e[e.ServiceUnavailable=503]="ServiceUnavailable",e[e.GatewayTimeout=504]="GatewayTimeout",e[e.HttpVersionNotSupported=505]="HttpVersionNotSupported",e[e.VariantAlsoNegotiates=506]="VariantAlsoNegotiates",e[e.InsufficientStorage=507]="InsufficientStorage",e[e.LoopDetected=508]="LoopDetected",e[e.NotExtended=510]="NotExtended",e[e.NetworkAuthenticationRequired=511]="NetworkAuthenticationRequired"}(v||(v={}));var I;I={exports:{}},function(){const e=e=>(new TextEncoder).encode(e);function t(t,o){let r,n,a,i,s,l,c,u;for("string"==typeof t&&(t=e(t)),r=3&t.length,n=t.length-r,a=o,s=3432918353,l=461845907,u=0;u<n;)c=255&t[u]|(255&t[++u])<<8|(255&t[++u])<<16|(255&t[++u])<<24,++u,c=(65535&c)*s+(((c>>>16)*s&65535)<<16)&4294967295,c=c<<15|c>>>17,c=(65535&c)*l+(((c>>>16)*l&65535)<<16)&4294967295,a^=c,a=a<<13|a>>>19,i=5*(65535&a)+((5*(a>>>16)&65535)<<16)&4294967295,a=27492+(65535&i)+((58964+(i>>>16)&65535)<<16);switch(c=0,r){case 3:c^=(255&t[u+2])<<16;case 2:c^=(255&t[u+1])<<8;case 1:c^=255&t[u],c=(65535&c)*s+(((c>>>16)*s&65535)<<16)&4294967295,c=c<<15|c>>>17,c=(65535&c)*l+(((c>>>16)*l&65535)<<16)&4294967295,a^=c}return a^=t.length,a^=a>>>16,a=2246822507*(65535&a)+((2246822507*(a>>>16)&65535)<<16)&4294967295,a^=a>>>13,a=3266489909*(65535&a)+((3266489909*(a>>>16)&65535)<<16)&4294967295,a^=a>>>16,a>>>0}const o=t;o.v2=function(t,o){"string"==typeof t&&(t=e(t));let r,n=t.length,a=o^n,i=0;for(;n>=4;)r=255&t[i]|(255&t[++i])<<8|(255&t[++i])<<16|(255&t[++i])<<24,r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16),r^=r>>>24,r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16),a=1540483477*(65535&a)+((1540483477*(a>>>16)&65535)<<16)^r,n-=4,++i;switch(n){case 3:a^=(255&t[i+2])<<16;case 2:a^=(255&t[i+1])<<8;case 1:a^=255&t[i],a=1540483477*(65535&a)+((1540483477*(a>>>16)&65535)<<16)}return a^=a>>>13,a=1540483477*(65535&a)+((1540483477*(a>>>16)&65535)<<16),a^=a>>>15,a>>>0},o.v3=t,I.exports=o}();const S=!0;class f{constructor(e,{loggerManager:t}={}){var o,r,n,i,l;this._comparisonProcessor=a,this._negation="!",this._keys_case_sensitive=S,this._loggerManager=t,this._comparisonProcessor=(null===(o=null==e?void 0:e.rules)||void 0===o?void 0:o.comparisonProcessor)||a,this._negation=String((null===(r=null==e?void 0:e.rules)||void 0===r?void 0:r.negation)||"!"),this._keys_case_sensitive=(null===(n=null==e?void 0:e.rules)||void 0===n?void 0:n.keys_case_sensitive)||S,this._mapper=(null==e?void 0:e.mapper)||(e=>e),null===(l=null===(i=this._loggerManager)||void 0===i?void 0:i.trace)||void 0===l||l.call(i,"RuleManager()",s.RULE_CONSTRUCTOR,this)}set comparisonProcessor(e){this._comparisonProcessor=e}get comparisonProcessor(){return this._comparisonProcessor}getComparisonProcessorMethods(){return Object.getOwnPropertyNames(this._comparisonProcessor).filter((e=>"function"==typeof this._comparisonProcessor[e]))}isRuleMatched(t,o,r){var n,a,l,c,u,d,_,E,R,O;let g;if(null===(a=null===(n=this._loggerManager)||void 0===n?void 0:n.trace)||void 0===a||a.call(n,"RuleManager.isRuleMatched()",this._mapper({data:t,ruleSet:o})),r&&(null===(c=null===(l=this._loggerManager)||void 0===l?void 0:l.info)||void 0===c||c.call(l,"RuleManager.isRuleMatched()",s.PROCESSING_ENTITY.replace("#",r))),Object.prototype.hasOwnProperty.call(o,"OR")&&e(null==o?void 0:o.OR)){for(let e=0,n=o.OR.length;e<n;e++)if(g=this._processAND(t,o.OR[e]),Object.values(T).includes(g)?null===(d=null===(u=this._loggerManager)||void 0===u?void 0:u.info)||void 0===d||d.call(u,"RuleManager.isRuleMatched()",r||"",i.RULE_ERROR):null===(E=null===(_=this._loggerManager)||void 0===_?void 0:_.info)||void 0===E||E.call(_,"RuleManager.isRuleMatched()",r||"",!1===g?s.RULE_NOT_MATCH:s.RULE_MATCH.replace("#",String(e))),!1!==g)return g}else null===(O=null===(R=this._loggerManager)||void 0===R?void 0:R.warn)||void 0===O||O.call(R,"RuleManager.isRuleMatched()",r||"",i.RULE_NOT_VALID);return!1}isValidRule(e){var t,o;return null===(o=null===(t=this._loggerManager)||void 0===t?void 0:t.trace)||void 0===o||o.call(t,"RuleManager.isValidRule()",this._mapper({rule:e})),Object.prototype.hasOwnProperty.call(e,"matching")&&"object"==typeof e.matching&&Object.prototype.hasOwnProperty.call(e.matching,"match_type")&&"string"==typeof e.matching.match_type&&Object.prototype.hasOwnProperty.call(e.matching,"negated")&&"boolean"==typeof e.matching.negated&&Object.prototype.hasOwnProperty.call(e,"value")}_processAND(t,o){var r,n,a,l;let c;if(Object.prototype.hasOwnProperty.call(o,"AND")&&e(null==o?void 0:o.AND)){for(let e=0,r=o.AND.length;e<r;e++)if(c=this._processORWHEN(t,o.AND[e]),!1===c)return!1;return!1!==c&&(null===(n=null===(r=this._loggerManager)||void 0===r?void 0:r.info)||void 0===n||n.call(r,"RuleManager._processAND()",s.RULE_MATCH_AND)),c}return null===(l=null===(a=this._loggerManager)||void 0===a?void 0:a.warn)||void 0===l||l.call(a,"RuleManager._processAND()",i.RULE_NOT_VALID),!1}_processORWHEN(t,o){var r,n;let a;if(Object.prototype.hasOwnProperty.call(o,"OR_WHEN")&&e(null==o?void 0:o.OR_WHEN)){for(let e=0,r=o.OR_WHEN.length;e<r;e++)if(a=this._processRuleItem(t,o.OR_WHEN[e]),!1!==a)return a}else null===(n=null===(r=this._loggerManager)||void 0===r?void 0:r.warn)||void 0===n||n.call(r,"RuleManager._processORWHEN()",i.RULE_NOT_VALID);return!1}_processRuleItem(e,o){var r,n,a,l,c,u,d,_,E,R,O,g,N;if(this.isValidRule(o))try{const R=o.matching.negated||!1,O=o.matching.match_type;if(-1!==this.getComparisonProcessorMethods().indexOf(O))if(e&&"object"==typeof e)if(this.isUsingCustomInterface(e)){if(null==o?void 0:o.rule_type){null===(n=null===(r=this._loggerManager)||void 0===r?void 0:r.info)||void 0===n||n.call(r,"RuleManager._processRuleItem()",s.RULE_MATCH_START.replace("#",o.rule_type));for(const t of Object.getOwnPropertyNames(e.constructor.prototype)){if("constructor"===t)continue;const r=`get ${o.rule_type.replace(/_/g," ")}`.replace(/(?:^\w|[A-Z]|\b\w)/g,(function(e,t){return 0===t?e.toLowerCase():e.toUpperCase()})).replace(/\s+/g,"");if(t===r||(null===(a=null==e?void 0:e.mapper)||void 0===a?void 0:a.call(e,t))===r){const r=e[t](o);return Object.values(T).includes(r)||"js_condition"===o.rule_type?r:this._comparisonProcessor[O](r,o.value,R)}}}}else if(t(e))for(const t of Object.keys(e)){const r=this._keys_case_sensitive?t:t.toLowerCase();if(r===(this._keys_case_sensitive?o.key:String(o.key).toLowerCase()))return this._comparisonProcessor[O](e[t],o.value,R)}else null===(c=null===(l=this._loggerManager)||void 0===l?void 0:l.trace)||void 0===c||c.call(l,"RuleManager._processRuleItem()",{warn:i.RULE_DATA_NOT_VALID,data:e});else null===(d=null===(u=this._loggerManager)||void 0===u?void 0:u.trace)||void 0===d||d.call(u,"RuleManager._processRuleItem()",{warn:i.RULE_NOT_VALID,data:e,rule:o});else null===(E=null===(_=this._loggerManager)||void 0===_?void 0:_.warn)||void 0===E||E.call(_,"RuleManager._processRuleItem()",i.RULE_MATCH_TYPE_NOT_SUPPORTED.replace("#",O))}catch(e){null===(O=null===(R=this._loggerManager)||void 0===R?void 0:R.error)||void 0===O||O.call(R,"RuleManager._processRuleItem()",{error:e.message})}else null===(N=null===(g=this._loggerManager)||void 0===g?void 0:g.warn)||void 0===N||N.call(g,"RuleManager._processRuleItem()",i.RULE_NOT_VALID);return!1}isUsingCustomInterface(e){return t(e)&&Object.prototype.hasOwnProperty.call(e,"name")&&"RuleData"===e.name}}export{f as RuleManager};
7
+ function e(e){return Array.isArray(e)&&e.length>0}function t(e){return"object"==typeof e&&null!==e&&Object.keys(e).length>0}var o,r,n,a;function i(e){if("number"==typeof e)return!0;const t=parseFloat(String(e));return Number.isFinite(t)&&!isNaN(t)}function s(e){if("number"==typeof e)return e;const t=String(e).split(",");return parseFloat("0"==t[0]?String(e).replace(/,/g,"."):String(e).replace(/,/g,""))}o={exports:{}},function(){const e=e=>(new TextEncoder).encode(e);function t(t,o){let r,n,a,i,s,l,c,u;for("string"==typeof t&&(t=e(t)),r=3&t.length,n=t.length-r,a=o,s=3432918353,l=461845907,u=0;u<n;)c=255&t[u]|(255&t[++u])<<8|(255&t[++u])<<16|(255&t[++u])<<24,++u,c=(65535&c)*s+(((c>>>16)*s&65535)<<16)&4294967295,c=c<<15|c>>>17,c=(65535&c)*l+(((c>>>16)*l&65535)<<16)&4294967295,a^=c,a=a<<13|a>>>19,i=5*(65535&a)+((5*(a>>>16)&65535)<<16)&4294967295,a=27492+(65535&i)+((58964+(i>>>16)&65535)<<16);switch(c=0,r){case 3:c^=(255&t[u+2])<<16;case 2:c^=(255&t[u+1])<<8;case 1:c^=255&t[u],c=(65535&c)*s+(((c>>>16)*s&65535)<<16)&4294967295,c=c<<15|c>>>17,c=(65535&c)*l+(((c>>>16)*l&65535)<<16)&4294967295,a^=c}return a^=t.length,a^=a>>>16,a=2246822507*(65535&a)+((2246822507*(a>>>16)&65535)<<16)&4294967295,a^=a>>>13,a=3266489909*(65535&a)+((3266489909*(a>>>16)&65535)<<16)&4294967295,a^=a>>>16,a>>>0}const r=t;r.v2=function(t,o){"string"==typeof t&&(t=e(t));let r,n=t.length,a=o^n,i=0;for(;n>=4;)r=255&t[i]|(255&t[++i])<<8|(255&t[++i])<<16|(255&t[++i])<<24,r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16),r^=r>>>24,r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16),a=1540483477*(65535&a)+((1540483477*(a>>>16)&65535)<<16)^r,n-=4,++i;switch(n){case 3:a^=(255&t[i+2])<<16;case 2:a^=(255&t[i+1])<<8;case 1:a^=255&t[i],a=1540483477*(65535&a)+((1540483477*(a>>>16)&65535)<<16)}return a^=a>>>13,a=1540483477*(65535&a)+((1540483477*(a>>>16)&65535)<<16),a^=a>>>15,a>>>0},r.v3=t,o.exports=r}();class l{static equals(e,o,r){return Array.isArray(e)?this._returnNegationCheck(-1!==e.indexOf(o),r):t(e)?this._returnNegationCheck(-1!==Object.keys(e).indexOf(String(o)),r):(e=String(e),o=String(o),e=e.valueOf().toLowerCase(),o=o.valueOf().toLowerCase(),this._returnNegationCheck(e===o,r))}static less(e,t,o){return typeof(e=i(e)?s(e):e)==typeof(t=i(t)?s(t):t)&&this._returnNegationCheck(e<t,o)}static lessEqual(e,t,o){return typeof(e=i(e)?s(e):e)==typeof(t=i(t)?s(t):t)&&this._returnNegationCheck(e<=t,o)}static contains(e,t,o){return e=String(e),t=String(t),e=e.valueOf().toLowerCase(),0===(t=t.valueOf().toLowerCase()).replace(/^([\s]*)|([\s]*)$/g,"").length?this._returnNegationCheck(!0,o):this._returnNegationCheck(-1!==e.indexOf(t),o)}static isIn(e,t,o=!1,r="|"){const n=String(e).split(r).map((e=>String(e)));"string"==typeof t&&(t=t.split(r)),Array.isArray(t)||(t=[]),t=t.map((e=>String(e).valueOf().toLowerCase()));for(let e=0;e<n.length;e++)if(-1!==t.indexOf(n[e]))return this._returnNegationCheck(!0,o);return this._returnNegationCheck(!1,o)}static startsWith(e,t,o){return e=String(e).valueOf().toLowerCase(),t=String(t).valueOf().toLowerCase(),this._returnNegationCheck(0===e.indexOf(t),o)}static endsWith(e,t,o){return e=String(e).valueOf().toLowerCase(),t=String(t).valueOf().toLowerCase(),this._returnNegationCheck(-1!==e.indexOf(t,e.length-t.length),o)}static regexMatches(e,t,o){e=String(e).valueOf().toLowerCase(),t=String(t).valueOf();const r=new RegExp(t,"i");return this._returnNegationCheck(r.test(e),o)}static _returnNegationCheck(e,t=!1){return t?!e:e}}r=l,l.equalsNumber=r.equals,l.matches=r.equals,"function"==typeof SuppressedError&&SuppressedError,function(e){e.VARIAION_NOT_DECIDED="convert.com_variation_not_decided"}(n||(n={})),function(e){e.FORCE_MULTIPLE_TRANSACTIONS="forceMultipleTransactions"}(a||(a={}));const c={SDK_KEY_MISSING:"SDK key is missing",DATA_OBJECT_MISSING:"Data object is missing",CONFIG_DATA_NOT_VALID:"Config Data is not valid",SDK_OR_DATA_OBJECT_REQUIRED:"SDK key or Data object should be provided",RULE_NOT_VALID:"Provided rule is not valid",RULE_DATA_NOT_VALID:"Provided rule data is not valid",RULE_MATCH_TYPE_NOT_SUPPORTED:'Provided rule matching type "#" is not supported',RULE_ERROR:"Rule error",DATA_STORE_NOT_VALID:"DataStore object is not valid. It should contain get and set methods",VISITOR_ID_REQUIRED:"Visitor string string is not present",GOAL_DATA_NOT_VALID:"GoalData object is not valid",UNABLE_TO_SELECT_BUCKET_FOR_VISITOR:"Unable to bucket visitor",UNABLE_TO_PERFORM_NETWORK_REQUEST:"Unable to perform network request",UNSUPPORTED_RESPONSE_TYPE:"Unsupported response type"},u={CONFIG_DATA_UPDATED:"Config Data updated",CORE_CONSTRUCTOR:"Core Manager constructor has been called",CORE_INITIALIZED:"Core Manager has been initialized",EXPERIENCE_CONSTRUCTOR:"Experience Manager constructor has been called",EXPERIENCE_NOT_FOUND:"Experience not found",EXPERIENCE_ARCHIVED:"Experience archived",EXPERIENCE_ENVIRONMENT_NOT_MATCH:"Experience environment does not match",EXPERIENCE_RULES_MATCHED:"Experience rules matched",VARIATIONS_NOT_FOUND:"Variations not found",VARIATION_CHANGE_NOT_SUPPORTED:"Variation change not supported",FEATURE_CONSTRUCTOR:"Feature Manager constructor has been called",FEATURE_NOT_FOUND:"Fullstack Feature not found",FEATURE_VARIABLES_NOT_FOUND:"Fullstack Feature Variables not found",FEATURE_VARIABLES_TYPE_NOT_FOUND:"Fullstack Feature Variables Type not found",BUCKETING_CONSTRUCTOR:"Bucketing Manager constructor has been called",DATA_CONSTRUCTOR:"Data Manager constructor has been called",RULE_CONSTRUCTOR:"Rule Manager constructor has been called",PROCESSING_ENTITY:"Processing #",LOCATION_MATCH:"Location # rule matched",LOCATION_NOT_MATCH:"Location does not match",LOCATION_NOT_RESTRICTED:"Location not restricted",AUDIENCE_MATCH:"Audience # rule matched",AUDIENCE_NOT_MATCH:"Audience does not match",NON_PERMANENT_AUDIENCE_NOT_RESTRICTED:"Non-Permanent Audience not restricted",AUDIENCE_NOT_RESTRICTED:"Audience not restricted",SEGMENTATION_MATCH:"Segmentation # rule matched",SEGMENTATION_NOT_RESTRICTED:"Segmentation not restricted",RULE_NOT_MATCH:"Rule does not match",RULE_MATCH:"Found matched rule at OR block #",RULE_MATCH_AND:"AND block rule macthed",RULE_MATCH_START:"About to evaluate rule #",LOCATION_ACTIVATED:"Location # activated",LOCATION_DEACTIVATED:"Location # deactivated",BUCKETED_VISITOR_FOUND:"Visitor is already bucketed for variation #",BUCKETED_VISITOR_FORCED:"Forcing variation #",BUCKETED_VISITOR:"Visitor is bucketed for variation #",GOAL_NOT_FOUND:"Goal not found",GOAL_RULE_NOT_MATCH:"Goal rule do not match",GOAL_FOUND:"Goal # already triggered",SEGMENTS_NOT_FOUND:"Segments not found",SEGMENTS_RULE_NOT_MATCH:"Segments rule do not match",CUSTOM_SEGMENTS_KEY_FOUND:"Custom segments key already set",SEND_BEACON_SUCCESS:"The user agent successfully queued the data for transfer",RELEASING_QUEUE:"Releasing event queue..."};var d,_,E,R,T,O,g,N,A,p,C,h,I,f,S,v;!function(e){e.OFF="OFF",e.EU_ONLY="EU ONLY",e.EEA_ONLY="EEA ONLY",e.WORLDWIDE="Worldwide"}(d||(d={})),function(e){e.AUDIENCE="audience",e.LOCATION="location",e.SEGMENT="segment",e.FEATURE="feature",e.GOAL="goal",e.EXPERIENCE="experience",e.VARIATION="variation"}(_||(_={})),function(e){e.ENABLED="enabled",e.DISABLED="disabled"}(E||(E={})),function(e){e.AMOUNT="amount",e.PRODUCTS_COUNT="productsCount",e.TRANSACTION_ID="transactionId"}(R||(R={})),function(e){e[e.TRACE=0]="TRACE",e[e.DEBUG=1]="DEBUG",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.SILENT=5]="SILENT"}(T||(T={})),function(e){e.LOG="log",e.TRACE="trace",e.DEBUG="debug",e.INFO="info",e.WARN="warn",e.ERROR="error"}(O||(O={})),function(e){e.WEB="web",e.FULLSTACK="fullstack"}(g||(g={})),function(e){e.NO_DATA_FOUND="convert.com_no_data_found",e.NEED_MORE_DATA="convert.com_need_more_data"}(N||(N={})),function(e){e.READY="ready",e.CONFIG_UPDATED="config.updated",e.API_QUEUE_RELEASED="api.queue.released",e.BUCKETING="bucketing",e.CONVERSION="conversion",e.SEGMENTS="segments",e.LOCATION_ACTIVATED="location.activated",e.LOCATION_DEACTIVATED="location.deactivated",e.AUDIENCES="audiences",e.DATA_STORE_QUEUE_RELEASED="datastore.queue.released"}(A||(A={})),function(e){e.RICH_STRUCTURE="richStructure",e.CUSTOM_CODE="customCode",e.DEFAULT_CODE="defaultCode",e.DEFAULT_CODE_MULTIPAGE="defaultCodeMultipage",e.DEFAULT_REDIRECT="defaultRedirect",e.FULLSTACK_FEATURE="fullStackFeature"}(p||(p={})),function(e){e.IE="IE",e.CH="CH",e.FF="FF",e.OP="OP",e.SF="SF",e.EDG="EDG",e.MO="MO",e.NS="NS",e.OTH="OTH"}(C||(C={})),function(e){e.ALLPH="ALLPH",e.IPH="IPH",e.OTHPH="OTHPH",e.ALLTAB="ALLTAB",e.IPAD="IPAD",e.OTHTAB="OTHTAB",e.DESK="DESK",e.OTHDEV="OTHDEV"}(h||(h={})),function(e){e.COUNTRY="country",e.BROWSER="browser",e.DEVICES="devices",e.SOURCE="source",e.CAMPAIGN="campaign",e.VISITOR_TYPE="visitorType",e.CUSTOM_SEGMENTS="customSegments"}(I||(I={})),function(e){e.CAMPAIGN="campaign",e.SEARCH="search",e.REFERRAL="referral",e.DIRECT="direct"}(f||(f={})),function(e){e.NEW="new",e.RETURNING="returning"}(S||(S={})),function(e){e[e.Continue=100]="Continue",e[e.SwitchingProtocols=101]="SwitchingProtocols",e[e.Processing=102]="Processing",e[e.EarlyHints=103]="EarlyHints",e[e.Ok=200]="Ok",e[e.Created=201]="Created",e[e.Accepted=202]="Accepted",e[e.NonAuthoritativeInformation=203]="NonAuthoritativeInformation",e[e.NoContent=204]="NoContent",e[e.ResetContent=205]="ResetContent",e[e.PartialContent=206]="PartialContent",e[e.MultiStatus=207]="MultiStatus",e[e.AlreadyReported=208]="AlreadyReported",e[e.ImUsed=226]="ImUsed",e[e.MultipleChoices=300]="MultipleChoices",e[e.MovedPermanently=301]="MovedPermanently",e[e.Found=302]="Found",e[e.SeeOther=303]="SeeOther",e[e.NotModified=304]="NotModified",e[e.UseProxy=305]="UseProxy",e[e.Unused=306]="Unused",e[e.TemporaryRedirect=307]="TemporaryRedirect",e[e.PermanentRedirect=308]="PermanentRedirect",e[e.BadRequest=400]="BadRequest",e[e.Unauthorized=401]="Unauthorized",e[e.PaymentRequired=402]="PaymentRequired",e[e.Forbidden=403]="Forbidden",e[e.NotFound=404]="NotFound",e[e.MethodNotAllowed=405]="MethodNotAllowed",e[e.NotAcceptable=406]="NotAcceptable",e[e.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",e[e.RequestTimeout=408]="RequestTimeout",e[e.Conflict=409]="Conflict",e[e.Gone=410]="Gone",e[e.LengthRequired=411]="LengthRequired",e[e.PreconditionFailed=412]="PreconditionFailed",e[e.PayloadTooLarge=413]="PayloadTooLarge",e[e.UriTooLong=414]="UriTooLong",e[e.UnsupportedMediaType=415]="UnsupportedMediaType",e[e.RangeNotSatisfiable=416]="RangeNotSatisfiable",e[e.ExpectationFailed=417]="ExpectationFailed",e[e.ImATeapot=418]="ImATeapot",e[e.MisdirectedRequest=421]="MisdirectedRequest",e[e.UnprocessableEntity=422]="UnprocessableEntity",e[e.Locked=423]="Locked",e[e.FailedDependency=424]="FailedDependency",e[e.TooEarly=425]="TooEarly",e[e.UpgradeRequired=426]="UpgradeRequired",e[e.PreconditionRequired=428]="PreconditionRequired",e[e.TooManyRequests=429]="TooManyRequests",e[e.RequestHeaderFieldsTooLarge=431]="RequestHeaderFieldsTooLarge",e[e.UnavailableForLegalReasons=451]="UnavailableForLegalReasons",e[e.InternalServerError=500]="InternalServerError",e[e.NotImplemented=501]="NotImplemented",e[e.BadGateway=502]="BadGateway",e[e.ServiceUnavailable=503]="ServiceUnavailable",e[e.GatewayTimeout=504]="GatewayTimeout",e[e.HttpVersionNotSupported=505]="HttpVersionNotSupported",e[e.VariantAlsoNegotiates=506]="VariantAlsoNegotiates",e[e.InsufficientStorage=507]="InsufficientStorage",e[e.LoopDetected=508]="LoopDetected",e[e.NotExtended=510]="NotExtended",e[e.NetworkAuthenticationRequired=511]="NetworkAuthenticationRequired"}(v||(v={}));const D=!0;class U{constructor(e,{loggerManager:t}={}){var o,r,n,a,i;this._comparisonProcessor=l,this._negation="!",this._keys_case_sensitive=D,this._loggerManager=t,this._comparisonProcessor=(null===(o=null==e?void 0:e.rules)||void 0===o?void 0:o.comparisonProcessor)||l,this._negation=String((null===(r=null==e?void 0:e.rules)||void 0===r?void 0:r.negation)||"!"),this._keys_case_sensitive=(null===(n=null==e?void 0:e.rules)||void 0===n?void 0:n.keys_case_sensitive)||D,this._mapper=(null==e?void 0:e.mapper)||(e=>e),null===(i=null===(a=this._loggerManager)||void 0===a?void 0:a.trace)||void 0===i||i.call(a,"RuleManager()",u.RULE_CONSTRUCTOR,this)}set comparisonProcessor(e){this._comparisonProcessor=e}get comparisonProcessor(){return this._comparisonProcessor}getComparisonProcessorMethods(){return Object.getOwnPropertyNames(this._comparisonProcessor).filter((e=>"function"==typeof this._comparisonProcessor[e]))}isRuleMatched(t,o,r){var n,a,i,s,l,d,_,E,R,T;let O;if(null===(a=null===(n=this._loggerManager)||void 0===n?void 0:n.trace)||void 0===a||a.call(n,"RuleManager.isRuleMatched()",this._mapper({data:t,ruleSet:o})),r&&(null===(s=null===(i=this._loggerManager)||void 0===i?void 0:i.info)||void 0===s||s.call(i,"RuleManager.isRuleMatched()",u.PROCESSING_ENTITY.replace("#",r))),Object.prototype.hasOwnProperty.call(o,"OR")&&e(null==o?void 0:o.OR)){for(let e=0,n=o.OR.length;e<n;e++){if(O=this._processAND(t,o.OR[e]),!0===O)return O;Object.values(N).includes(O)?null===(d=null===(l=this._loggerManager)||void 0===l?void 0:l.info)||void 0===d||d.call(l,"RuleManager.isRuleMatched()",r||"",c.RULE_ERROR):null===(E=null===(_=this._loggerManager)||void 0===_?void 0:_.info)||void 0===E||E.call(_,"RuleManager.isRuleMatched()",r||"",!1===O?u.RULE_NOT_MATCH:u.RULE_MATCH.replace("#",String(e)))}if(!1!==O)return O}else null===(T=null===(R=this._loggerManager)||void 0===R?void 0:R.warn)||void 0===T||T.call(R,"RuleManager.isRuleMatched()",r||"",c.RULE_NOT_VALID);return!1}isValidRule(e){var t,o;return null===(o=null===(t=this._loggerManager)||void 0===t?void 0:t.trace)||void 0===o||o.call(t,"RuleManager.isValidRule()",this._mapper({rule:e})),Object.prototype.hasOwnProperty.call(e,"matching")&&"object"==typeof e.matching&&Object.prototype.hasOwnProperty.call(e.matching,"match_type")&&"string"==typeof e.matching.match_type&&Object.prototype.hasOwnProperty.call(e.matching,"negated")&&"boolean"==typeof e.matching.negated&&Object.prototype.hasOwnProperty.call(e,"value")}_processAND(t,o){var r,n,a,i;let s;if(Object.prototype.hasOwnProperty.call(o,"AND")&&e(null==o?void 0:o.AND)){for(let e=0,r=o.AND.length;e<r;e++)if(s=this._processORWHEN(t,o.AND[e]),!1===s)return!1;return!1!==s&&(null===(n=null===(r=this._loggerManager)||void 0===r?void 0:r.info)||void 0===n||n.call(r,"RuleManager._processAND()",u.RULE_MATCH_AND)),s}return null===(i=null===(a=this._loggerManager)||void 0===a?void 0:a.warn)||void 0===i||i.call(a,"RuleManager._processAND()",c.RULE_NOT_VALID),!1}_processORWHEN(t,o){var r,n;let a;if(Object.prototype.hasOwnProperty.call(o,"OR_WHEN")&&e(null==o?void 0:o.OR_WHEN)){for(let e=0,r=o.OR_WHEN.length;e<r;e++)if(a=this._processRuleItem(t,o.OR_WHEN[e]),!0===a)return a;if(!1!==a)return a}else null===(n=null===(r=this._loggerManager)||void 0===r?void 0:r.warn)||void 0===n||n.call(r,"RuleManager._processORWHEN()",c.RULE_NOT_VALID);return!1}_processRuleItem(e,o){var r,n,a,i,s,l,d,_,E,R,T,O,g;if(this.isValidRule(o))try{const R=o.matching.negated||!1,T=o.matching.match_type;if(-1!==this.getComparisonProcessorMethods().indexOf(T))if(e&&"object"==typeof e)if(this.isUsingCustomInterface(e)){if(null==o?void 0:o.rule_type){null===(n=null===(r=this._loggerManager)||void 0===r?void 0:r.info)||void 0===n||n.call(r,"RuleManager._processRuleItem()",u.RULE_MATCH_START.replace("#",o.rule_type));for(const t of Object.getOwnPropertyNames(e.constructor.prototype)){if("constructor"===t)continue;const r=`get ${o.rule_type.replace(/_/g," ")}`.replace(/(?:^\w|[A-Z]|\b\w)/g,(function(e,t){return 0===t?e.toLowerCase():e.toUpperCase()})).replace(/\s+/g,"");if(t===r||(null===(a=null==e?void 0:e.mapper)||void 0===a?void 0:a.call(e,t))===r){const r=e[t](o);return Object.values(N).includes(r)||"js_condition"===o.rule_type?r:this._comparisonProcessor[T](r,o.value,R)}}}}else if(t(e))for(const t of Object.keys(e)){const r=this._keys_case_sensitive?t:t.toLowerCase();if(r===(this._keys_case_sensitive?o.key:String(o.key).toLowerCase()))return this._comparisonProcessor[T](e[t],o.value,R)}else null===(s=null===(i=this._loggerManager)||void 0===i?void 0:i.trace)||void 0===s||s.call(i,"RuleManager._processRuleItem()",{warn:c.RULE_DATA_NOT_VALID,data:e});else null===(d=null===(l=this._loggerManager)||void 0===l?void 0:l.trace)||void 0===d||d.call(l,"RuleManager._processRuleItem()",{warn:c.RULE_NOT_VALID,data:e,rule:o});else null===(E=null===(_=this._loggerManager)||void 0===_?void 0:_.warn)||void 0===E||E.call(_,"RuleManager._processRuleItem()",c.RULE_MATCH_TYPE_NOT_SUPPORTED.replace("#",T))}catch(e){null===(T=null===(R=this._loggerManager)||void 0===R?void 0:R.error)||void 0===T||T.call(R,"RuleManager._processRuleItem()",{error:e.message})}else null===(g=null===(O=this._loggerManager)||void 0===O?void 0:O.warn)||void 0===g||g.call(O,"RuleManager._processRuleItem()",c.RULE_NOT_VALID);return!1}isUsingCustomInterface(e){return t(e)&&Object.prototype.hasOwnProperty.call(e,"name")&&"RuleData"===e.name}}export{U as RuleManager};
8
8
  //# sourceMappingURL=index.min.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.min.mjs","sources":["../../../node_modules/murmurhash/murmurhash.js"],"sourcesContent":["(function(){\n const _global = this;\n\n const createBuffer = (val) => new TextEncoder().encode(val)\n\n /**\n * JS Implementation of MurmurHash2\n *\n * @author <a href=\"mailto:gary.court@gmail.com\">Gary Court</a>\n * @see http://github.com/garycourt/murmurhash-js\n * @author <a href=\"mailto:aappleby@gmail.com\">Austin Appleby</a>\n * @see http://sites.google.com/site/murmurhash/\n *\n * @param {Uint8Array | string} str ASCII only\n * @param {number} seed Positive integer only\n * @return {number} 32-bit positive integer hash\n */\n function MurmurHashV2(str, seed) {\n if (typeof str === 'string') str = createBuffer(str);\n let\n l = str.length,\n h = seed ^ l,\n i = 0,\n k;\n\n while (l >= 4) {\n k =\n ((str[i] & 0xff)) |\n ((str[++i] & 0xff) << 8) |\n ((str[++i] & 0xff) << 16) |\n ((str[++i] & 0xff) << 24);\n\n k = (((k & 0xffff) * 0x5bd1e995) + ((((k >>> 16) * 0x5bd1e995) & 0xffff) << 16));\n k ^= k >>> 24;\n k = (((k & 0xffff) * 0x5bd1e995) + ((((k >>> 16) * 0x5bd1e995) & 0xffff) << 16));\n\n h = (((h & 0xffff) * 0x5bd1e995) + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16)) ^ k;\n\n l -= 4;\n ++i;\n }\n\n switch (l) {\n case 3: h ^= (str[i + 2] & 0xff) << 16;\n case 2: h ^= (str[i + 1] & 0xff) << 8;\n case 1: h ^= (str[i] & 0xff);\n h = (((h & 0xffff) * 0x5bd1e995) + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16));\n }\n\n h ^= h >>> 13;\n h = (((h & 0xffff) * 0x5bd1e995) + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16));\n h ^= h >>> 15;\n\n return h >>> 0;\n };\n\n /*\n * JS Implementation of MurmurHash3 (r136) (as of May 20, 2011)\n *\n * @author <a href=\"mailto:gary.court@gmail.com\">Gary Court</a>\n * @see http://github.com/garycourt/murmurhash-js\n * @author <a href=\"mailto:aappleby@gmail.com\">Austin Appleby</a>\n * @see http://sites.google.com/site/murmurhash/\n *\n * @param {Uint8Array | string} key ASCII only\n * @param {number} seed Positive integer only\n * @return {number} 32-bit positive integer hash\n */\n function MurmurHashV3(key, seed) {\n if (typeof key === 'string') key = createBuffer(key);\n\n let remainder, bytes, h1, h1b, c1, c1b, c2, c2b, k1, i;\n\n remainder = key.length & 3; // key.length % 4\n bytes = key.length - remainder;\n h1 = seed;\n c1 = 0xcc9e2d51;\n c2 = 0x1b873593;\n i = 0;\n\n while (i < bytes) {\n k1 =\n ((key[i] & 0xff)) |\n ((key[++i] & 0xff) << 8) |\n ((key[++i] & 0xff) << 16) |\n ((key[++i] & 0xff) << 24);\n ++i;\n\n k1 = ((((k1 & 0xffff) * c1) + ((((k1 >>> 16) * c1) & 0xffff) << 16))) & 0xffffffff;\n k1 = (k1 << 15) | (k1 >>> 17);\n k1 = ((((k1 & 0xffff) * c2) + ((((k1 >>> 16) * c2) & 0xffff) << 16))) & 0xffffffff;\n\n h1 ^= k1;\n h1 = (h1 << 13) | (h1 >>> 19);\n h1b = ((((h1 & 0xffff) * 5) + ((((h1 >>> 16) * 5) & 0xffff) << 16))) & 0xffffffff;\n h1 = (((h1b & 0xffff) + 0x6b64) + ((((h1b >>> 16) + 0xe654) & 0xffff) << 16));\n }\n\n k1 = 0;\n\n switch (remainder) {\n case 3: k1 ^= (key[i + 2] & 0xff) << 16;\n case 2: k1 ^= (key[i + 1] & 0xff) << 8;\n case 1: k1 ^= (key[i] & 0xff);\n\n k1 = (((k1 & 0xffff) * c1) + ((((k1 >>> 16) * c1) & 0xffff) << 16)) & 0xffffffff;\n k1 = (k1 << 15) | (k1 >>> 17);\n k1 = (((k1 & 0xffff) * c2) + ((((k1 >>> 16) * c2) & 0xffff) << 16)) & 0xffffffff;\n h1 ^= k1;\n }\n\n h1 ^= key.length;\n\n h1 ^= h1 >>> 16;\n h1 = (((h1 & 0xffff) * 0x85ebca6b) + ((((h1 >>> 16) * 0x85ebca6b) & 0xffff) << 16)) & 0xffffffff;\n h1 ^= h1 >>> 13;\n h1 = ((((h1 & 0xffff) * 0xc2b2ae35) + ((((h1 >>> 16) * 0xc2b2ae35) & 0xffff) << 16))) & 0xffffffff;\n h1 ^= h1 >>> 16;\n\n return h1 >>> 0;\n }\n\n const murmur = MurmurHashV3;\n murmur.v2 = MurmurHashV2;\n murmur.v3 = MurmurHashV3;\n\n if (typeof(module) != 'undefined') {\n module.exports = murmur;\n } else {\n const _previousRoot = _global.murmur;\n murmur.noConflict = function() {\n _global.murmur = _previousRoot;\n return murmur;\n }\n _global.murmur = murmur;\n }\n}());\n"],"names":["createBuffer","val","TextEncoder","encode","MurmurHashV3","key","seed","remainder","bytes","h1","h1b","c1","c2","k1","i","length","murmur","v2","str","k","l","h","v3","module","exports"],"mappings":";;;;;;25SAAC,WAGC,MAAMA,EAAgBC,IAAQ,IAAIC,aAA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A8C,YAAbA,IAAO,IAAoB,QAAW,IAAQ,WACxFA,GAAMA,IAAO,GAENA,IAAO,CACf,CAED,MAAMO,EAASZ,EACfY,EAAOC,GA1GP,SAAsBC,EAAKZ,GACN,iBAARY,IAAkBA,EAAMlB,EAAakB,IAChD,IAIEC,EAHAC,EAAIF,EAAIH,OACRM,EAAIf,EAAOc,EACXN,EAAI,EAGN,KAAOM,GAAK,GACVD,EACa,IAATD,EAAIJ,IACO,IAAXI,IAAMJ,KAAc,GACT,IAAXI,IAAMJ,KAAc,IACT,IAAXI,IAAMJ,KAAc,GAExBK,EAAqB,YAAV,MAAJA,KAA4C,YAAZA,IAAM,IAAoB,QAAW,IAC5EA,GAAKA,IAAM,GACXA,EAAqB,YAAV,MAAJA,KAA4C,YAAZA,IAAM,IAAoB,QAAW,IAE9EE,EAAqB,YAAV,MAAJA,KAA4C,YAAZA,IAAM,IAAoB,QAAW,IAAOF,EAEjFC,GAAK,IACHN,EAGJ,OAAQM,GACR,KAAK,EAAGC,IAAmB,IAAbH,EAAIJ,EAAI,KAAc,GACpC,KAAK,EAAGO,IAAmB,IAAbH,EAAIJ,EAAI,KAAc,EACpC,KAAK,EAAGO,GAAe,IAATH,EAAIJ,GACVO,EAAqB,YAAV,MAAJA,KAA4C,YAAZA,IAAM,IAAoB,QAAW,IAOpF,OAJAA,GAAKA,IAAM,GACXA,EAAqB,YAAV,MAAJA,KAA4C,YAAZA,IAAM,IAAoB,QAAW,IAC5EA,GAAKA,IAAM,GAEJA,IAAM,CAEjB,EAqEEL,EAAOM,GAAKlB,EAGVmB,EAAAC,QAAiBR,CASrB,CAxIA","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.min.mjs","sources":["../../../node_modules/murmurhash/murmurhash.js"],"sourcesContent":["(function(){\n const _global = this;\n\n const createBuffer = (val) => new TextEncoder().encode(val)\n\n /**\n * JS Implementation of MurmurHash2\n *\n * @author <a href=\"mailto:gary.court@gmail.com\">Gary Court</a>\n * @see http://github.com/garycourt/murmurhash-js\n * @author <a href=\"mailto:aappleby@gmail.com\">Austin Appleby</a>\n * @see http://sites.google.com/site/murmurhash/\n *\n * @param {Uint8Array | string} str ASCII only\n * @param {number} seed Positive integer only\n * @return {number} 32-bit positive integer hash\n */\n function MurmurHashV2(str, seed) {\n if (typeof str === 'string') str = createBuffer(str);\n let\n l = str.length,\n h = seed ^ l,\n i = 0,\n k;\n\n while (l >= 4) {\n k =\n ((str[i] & 0xff)) |\n ((str[++i] & 0xff) << 8) |\n ((str[++i] & 0xff) << 16) |\n ((str[++i] & 0xff) << 24);\n\n k = (((k & 0xffff) * 0x5bd1e995) + ((((k >>> 16) * 0x5bd1e995) & 0xffff) << 16));\n k ^= k >>> 24;\n k = (((k & 0xffff) * 0x5bd1e995) + ((((k >>> 16) * 0x5bd1e995) & 0xffff) << 16));\n\n h = (((h & 0xffff) * 0x5bd1e995) + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16)) ^ k;\n\n l -= 4;\n ++i;\n }\n\n switch (l) {\n case 3: h ^= (str[i + 2] & 0xff) << 16;\n case 2: h ^= (str[i + 1] & 0xff) << 8;\n case 1: h ^= (str[i] & 0xff);\n h = (((h & 0xffff) * 0x5bd1e995) + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16));\n }\n\n h ^= h >>> 13;\n h = (((h & 0xffff) * 0x5bd1e995) + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16));\n h ^= h >>> 15;\n\n return h >>> 0;\n };\n\n /*\n * JS Implementation of MurmurHash3 (r136) (as of May 20, 2011)\n *\n * @author <a href=\"mailto:gary.court@gmail.com\">Gary Court</a>\n * @see http://github.com/garycourt/murmurhash-js\n * @author <a href=\"mailto:aappleby@gmail.com\">Austin Appleby</a>\n * @see http://sites.google.com/site/murmurhash/\n *\n * @param {Uint8Array | string} key ASCII only\n * @param {number} seed Positive integer only\n * @return {number} 32-bit positive integer hash\n */\n function MurmurHashV3(key, seed) {\n if (typeof key === 'string') key = createBuffer(key);\n\n let remainder, bytes, h1, h1b, c1, c1b, c2, c2b, k1, i;\n\n remainder = key.length & 3; // key.length % 4\n bytes = key.length - remainder;\n h1 = seed;\n c1 = 0xcc9e2d51;\n c2 = 0x1b873593;\n i = 0;\n\n while (i < bytes) {\n k1 =\n ((key[i] & 0xff)) |\n ((key[++i] & 0xff) << 8) |\n ((key[++i] & 0xff) << 16) |\n ((key[++i] & 0xff) << 24);\n ++i;\n\n k1 = ((((k1 & 0xffff) * c1) + ((((k1 >>> 16) * c1) & 0xffff) << 16))) & 0xffffffff;\n k1 = (k1 << 15) | (k1 >>> 17);\n k1 = ((((k1 & 0xffff) * c2) + ((((k1 >>> 16) * c2) & 0xffff) << 16))) & 0xffffffff;\n\n h1 ^= k1;\n h1 = (h1 << 13) | (h1 >>> 19);\n h1b = ((((h1 & 0xffff) * 5) + ((((h1 >>> 16) * 5) & 0xffff) << 16))) & 0xffffffff;\n h1 = (((h1b & 0xffff) + 0x6b64) + ((((h1b >>> 16) + 0xe654) & 0xffff) << 16));\n }\n\n k1 = 0;\n\n switch (remainder) {\n case 3: k1 ^= (key[i + 2] & 0xff) << 16;\n case 2: k1 ^= (key[i + 1] & 0xff) << 8;\n case 1: k1 ^= (key[i] & 0xff);\n\n k1 = (((k1 & 0xffff) * c1) + ((((k1 >>> 16) * c1) & 0xffff) << 16)) & 0xffffffff;\n k1 = (k1 << 15) | (k1 >>> 17);\n k1 = (((k1 & 0xffff) * c2) + ((((k1 >>> 16) * c2) & 0xffff) << 16)) & 0xffffffff;\n h1 ^= k1;\n }\n\n h1 ^= key.length;\n\n h1 ^= h1 >>> 16;\n h1 = (((h1 & 0xffff) * 0x85ebca6b) + ((((h1 >>> 16) * 0x85ebca6b) & 0xffff) << 16)) & 0xffffffff;\n h1 ^= h1 >>> 13;\n h1 = ((((h1 & 0xffff) * 0xc2b2ae35) + ((((h1 >>> 16) * 0xc2b2ae35) & 0xffff) << 16))) & 0xffffffff;\n h1 ^= h1 >>> 16;\n\n return h1 >>> 0;\n }\n\n const murmur = MurmurHashV3;\n murmur.v2 = MurmurHashV2;\n murmur.v3 = MurmurHashV3;\n\n if (typeof(module) != 'undefined') {\n module.exports = murmur;\n } else {\n const _previousRoot = _global.murmur;\n murmur.noConflict = function() {\n _global.murmur = _previousRoot;\n return murmur;\n }\n _global.murmur = murmur;\n }\n}());\n"],"names":["createBuffer","val","TextEncoder","encode","MurmurHashV3","key","seed","remainder","bytes","h1","h1b","c1","c2","k1","i","length","murmur","v2","str","k","l","h","v3","module","exports"],"mappings":";;;;;;qaAAC,WAGC,MAAMA,EAAgBC,IAAQ,IAAIC,aAAcC,OAAOF,GAiEvD,SAASG,EAAaC,EAAKC,GAGzB,IAAIC,EAAWC,EAAOC,EAAIC,EAAKC,EAASC,EAASC,EAAIC,EASrD,IAXmB,iBAART,IAAkBA,EAAML,EAAaK,IAIhDE,EAAyB,EAAbF,EAAIU,OAChBP,EAAQH,EAAIU,OAASR,EACrBE,EAAKH,EACLK,EAAK,WACLC,EAAK,UACLE,EAAI,EAEGA,EAAIN,GACPK,EACa,IAATR,EAAIS,IACO,IAAXT,IAAMS,KAAc,GACT,IAAXT,IAAMS,KAAc,IACT,IAAXT,IAAMS,KAAc,KACxBA,EAEFD,GAAc,MAALA,GAAeF,KAAUE,IAAO,IAAMF,EAAM,QAAW,IAAQ,WACxEE,EAAMA,GAAM,GAAOA,IAAO,GAC1BA,GAAc,MAALA,GAAeD,KAAUC,IAAO,IAAMD,EAAM,QAAW,IAAQ,WAExEH,GAAMI,EACFJ,EAAMA,GAAM,GAAOA,IAAO,GAC9BC,EAAyB,GAAV,MAALD,KAAqC,GAAbA,IAAO,IAAW,QAAW,IAAQ,WACvEA,EAAwB,OAAV,MAANC,KAA4C,OAAdA,IAAQ,IAAgB,QAAW,IAK3E,OAFAG,EAAK,EAEGN,GACN,KAAK,EAAGM,IAAoB,IAAbR,EAAIS,EAAI,KAAc,GACrC,KAAK,EAAGD,IAAoB,IAAbR,EAAIS,EAAI,KAAc,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AAqB,YAAV,MAAJA,KAA4C,YAAZA,IAAM,IAAoB,QAAW,IAC5EA,GAAKA,IAAM,GAEJA,IAAM,CAEjB,EAqEEL,EAAOM,GAAKlB,EAGVmB,EAAAC,QAAiBR,CASrB,CAxIA","x_google_ignoreList":[0]}
package/lib/index.mjs CHANGED
@@ -37,6 +37,184 @@ function objectNotEmpty(object) {
37
37
  Object.keys(object).length > 0);
38
38
  }
39
39
 
40
+ var murmurhash = {exports: {}};
41
+
42
+ (function (module) {
43
+ (function(){
44
+
45
+ const createBuffer = (val) => new TextEncoder().encode(val);
46
+
47
+ /**
48
+ * JS Implementation of MurmurHash2
49
+ *
50
+ * @author <a href="mailto:gary.court@gmail.com">Gary Court</a>
51
+ * @see http://github.com/garycourt/murmurhash-js
52
+ * @author <a href="mailto:aappleby@gmail.com">Austin Appleby</a>
53
+ * @see http://sites.google.com/site/murmurhash/
54
+ *
55
+ * @param {Uint8Array | string} str ASCII only
56
+ * @param {number} seed Positive integer only
57
+ * @return {number} 32-bit positive integer hash
58
+ */
59
+ function MurmurHashV2(str, seed) {
60
+ if (typeof str === 'string') str = createBuffer(str);
61
+ let
62
+ l = str.length,
63
+ h = seed ^ l,
64
+ i = 0,
65
+ k;
66
+
67
+ while (l >= 4) {
68
+ k =
69
+ ((str[i] & 0xff)) |
70
+ ((str[++i] & 0xff) << 8) |
71
+ ((str[++i] & 0xff) << 16) |
72
+ ((str[++i] & 0xff) << 24);
73
+
74
+ k = (((k & 0xffff) * 0x5bd1e995) + ((((k >>> 16) * 0x5bd1e995) & 0xffff) << 16));
75
+ k ^= k >>> 24;
76
+ k = (((k & 0xffff) * 0x5bd1e995) + ((((k >>> 16) * 0x5bd1e995) & 0xffff) << 16));
77
+
78
+ h = (((h & 0xffff) * 0x5bd1e995) + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16)) ^ k;
79
+
80
+ l -= 4;
81
+ ++i;
82
+ }
83
+
84
+ switch (l) {
85
+ case 3: h ^= (str[i + 2] & 0xff) << 16;
86
+ case 2: h ^= (str[i + 1] & 0xff) << 8;
87
+ case 1: h ^= (str[i] & 0xff);
88
+ h = (((h & 0xffff) * 0x5bd1e995) + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16));
89
+ }
90
+
91
+ h ^= h >>> 13;
92
+ h = (((h & 0xffff) * 0x5bd1e995) + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16));
93
+ h ^= h >>> 15;
94
+
95
+ return h >>> 0;
96
+ }
97
+ /*
98
+ * JS Implementation of MurmurHash3 (r136) (as of May 20, 2011)
99
+ *
100
+ * @author <a href="mailto:gary.court@gmail.com">Gary Court</a>
101
+ * @see http://github.com/garycourt/murmurhash-js
102
+ * @author <a href="mailto:aappleby@gmail.com">Austin Appleby</a>
103
+ * @see http://sites.google.com/site/murmurhash/
104
+ *
105
+ * @param {Uint8Array | string} key ASCII only
106
+ * @param {number} seed Positive integer only
107
+ * @return {number} 32-bit positive integer hash
108
+ */
109
+ function MurmurHashV3(key, seed) {
110
+ if (typeof key === 'string') key = createBuffer(key);
111
+
112
+ let remainder, bytes, h1, h1b, c1, c2, k1, i;
113
+
114
+ remainder = key.length & 3; // key.length % 4
115
+ bytes = key.length - remainder;
116
+ h1 = seed;
117
+ c1 = 0xcc9e2d51;
118
+ c2 = 0x1b873593;
119
+ i = 0;
120
+
121
+ while (i < bytes) {
122
+ k1 =
123
+ ((key[i] & 0xff)) |
124
+ ((key[++i] & 0xff) << 8) |
125
+ ((key[++i] & 0xff) << 16) |
126
+ ((key[++i] & 0xff) << 24);
127
+ ++i;
128
+
129
+ k1 = ((((k1 & 0xffff) * c1) + ((((k1 >>> 16) * c1) & 0xffff) << 16))) & 0xffffffff;
130
+ k1 = (k1 << 15) | (k1 >>> 17);
131
+ k1 = ((((k1 & 0xffff) * c2) + ((((k1 >>> 16) * c2) & 0xffff) << 16))) & 0xffffffff;
132
+
133
+ h1 ^= k1;
134
+ h1 = (h1 << 13) | (h1 >>> 19);
135
+ h1b = ((((h1 & 0xffff) * 5) + ((((h1 >>> 16) * 5) & 0xffff) << 16))) & 0xffffffff;
136
+ h1 = (((h1b & 0xffff) + 0x6b64) + ((((h1b >>> 16) + 0xe654) & 0xffff) << 16));
137
+ }
138
+
139
+ k1 = 0;
140
+
141
+ switch (remainder) {
142
+ case 3: k1 ^= (key[i + 2] & 0xff) << 16;
143
+ case 2: k1 ^= (key[i + 1] & 0xff) << 8;
144
+ case 1: k1 ^= (key[i] & 0xff);
145
+
146
+ k1 = (((k1 & 0xffff) * c1) + ((((k1 >>> 16) * c1) & 0xffff) << 16)) & 0xffffffff;
147
+ k1 = (k1 << 15) | (k1 >>> 17);
148
+ k1 = (((k1 & 0xffff) * c2) + ((((k1 >>> 16) * c2) & 0xffff) << 16)) & 0xffffffff;
149
+ h1 ^= k1;
150
+ }
151
+
152
+ h1 ^= key.length;
153
+
154
+ h1 ^= h1 >>> 16;
155
+ h1 = (((h1 & 0xffff) * 0x85ebca6b) + ((((h1 >>> 16) * 0x85ebca6b) & 0xffff) << 16)) & 0xffffffff;
156
+ h1 ^= h1 >>> 13;
157
+ h1 = ((((h1 & 0xffff) * 0xc2b2ae35) + ((((h1 >>> 16) * 0xc2b2ae35) & 0xffff) << 16))) & 0xffffffff;
158
+ h1 ^= h1 >>> 16;
159
+
160
+ return h1 >>> 0;
161
+ }
162
+
163
+ const murmur = MurmurHashV3;
164
+ murmur.v2 = MurmurHashV2;
165
+ murmur.v3 = MurmurHashV3;
166
+
167
+ {
168
+ module.exports = murmur;
169
+ }
170
+ }());
171
+ } (murmurhash));
172
+
173
+ /*!
174
+ * Convert JS SDK
175
+ * Version 1.0.0
176
+ * Copyright(c) 2020 Convert Insights, Inc
177
+ * License Apache-2.0
178
+ */
179
+ /**
180
+ * String formatter tool. Transforms a space-separated string into camelCase
181
+ * @param {string} input
182
+ * @return {string}
183
+ */
184
+ function camelCase(input) {
185
+ return input
186
+ .replace(/(?:^\w|[A-Z]|\b\w)/g, function (word, index) {
187
+ return index === 0 ? word.toLowerCase() : word.toUpperCase();
188
+ })
189
+ .replace(/\s+/g, '');
190
+ }
191
+ /**
192
+ * Check if a value is numeric
193
+ * @param {string | number} value
194
+ * @returns {boolean}
195
+ */
196
+ function isNumeric(value) {
197
+ if (typeof value === 'number') {
198
+ return true;
199
+ }
200
+ const number = parseFloat(String(value));
201
+ return Number.isFinite(number) && !isNaN(number);
202
+ }
203
+ /**
204
+ * Convert a string to a number
205
+ * @param {string | number} value
206
+ * @returns {number}
207
+ */
208
+ function toNumber(value) {
209
+ if (typeof value === 'number') {
210
+ return value;
211
+ }
212
+ const parts = String(value).split(',');
213
+ return parseFloat(parts[0] == '0'
214
+ ? String(value).replace(/,/g, '.')
215
+ : String(value).replace(/,/g, ''));
216
+ }
217
+
40
218
  /*!
41
219
  * Convert JS SDK
42
220
  * Version 1.0.0
@@ -60,12 +238,16 @@ class Comparisons {
60
238
  return this._returnNegationCheck(value === testAgainst, negation);
61
239
  }
62
240
  static less(value, testAgainst, negation) {
241
+ value = isNumeric(value) ? toNumber(value) : value;
242
+ testAgainst = isNumeric(testAgainst) ? toNumber(testAgainst) : testAgainst;
63
243
  if (typeof value !== typeof testAgainst) {
64
244
  return false;
65
245
  }
66
246
  return this._returnNegationCheck(value < testAgainst, negation);
67
247
  }
68
248
  static lessEqual(value, testAgainst, negation) {
249
+ value = isNumeric(value) ? toNumber(value) : value;
250
+ testAgainst = isNumeric(testAgainst) ? toNumber(testAgainst) : testAgainst;
69
251
  if (typeof value !== typeof testAgainst) {
70
252
  return false;
71
253
  }
@@ -204,6 +386,8 @@ const MESSAGES = {
204
386
  CORE_INITIALIZED: 'Core Manager has been initialized',
205
387
  EXPERIENCE_CONSTRUCTOR: 'Experience Manager constructor has been called',
206
388
  EXPERIENCE_NOT_FOUND: 'Experience not found',
389
+ EXPERIENCE_ARCHIVED: 'Experience archived',
390
+ EXPERIENCE_ENVIRONMENT_NOT_MATCH: 'Experience environment does not match',
207
391
  EXPERIENCE_RULES_MATCHED: 'Experience rules matched',
208
392
  VARIATIONS_NOT_FOUND: 'Variations not found',
209
393
  VARIATION_CHANGE_NOT_SUPPORTED: 'Variation change not supported',
@@ -239,7 +423,8 @@ const MESSAGES = {
239
423
  SEGMENTS_NOT_FOUND: 'Segments not found',
240
424
  SEGMENTS_RULE_NOT_MATCH: 'Segments rule do not match',
241
425
  CUSTOM_SEGMENTS_KEY_FOUND: 'Custom segments key already set',
242
- SEND_BEACON_SUCCESS: 'The user agent successfully queued the data for transfer'
426
+ SEND_BEACON_SUCCESS: 'The user agent successfully queued the data for transfer',
427
+ RELEASING_QUEUE: 'Releasing event queue...'
243
428
  };
244
429
 
245
430
  /*!
@@ -547,158 +732,6 @@ var HttpStatusCode;
547
732
  HttpStatusCode[HttpStatusCode["NetworkAuthenticationRequired"] = 511] = "NetworkAuthenticationRequired";
548
733
  })(HttpStatusCode || (HttpStatusCode = {}));
549
734
 
550
- var murmurhash = {exports: {}};
551
-
552
- (function (module) {
553
- (function(){
554
-
555
- const createBuffer = (val) => new TextEncoder().encode(val);
556
-
557
- /**
558
- * JS Implementation of MurmurHash2
559
- *
560
- * @author <a href="mailto:gary.court@gmail.com">Gary Court</a>
561
- * @see http://github.com/garycourt/murmurhash-js
562
- * @author <a href="mailto:aappleby@gmail.com">Austin Appleby</a>
563
- * @see http://sites.google.com/site/murmurhash/
564
- *
565
- * @param {Uint8Array | string} str ASCII only
566
- * @param {number} seed Positive integer only
567
- * @return {number} 32-bit positive integer hash
568
- */
569
- function MurmurHashV2(str, seed) {
570
- if (typeof str === 'string') str = createBuffer(str);
571
- let
572
- l = str.length,
573
- h = seed ^ l,
574
- i = 0,
575
- k;
576
-
577
- while (l >= 4) {
578
- k =
579
- ((str[i] & 0xff)) |
580
- ((str[++i] & 0xff) << 8) |
581
- ((str[++i] & 0xff) << 16) |
582
- ((str[++i] & 0xff) << 24);
583
-
584
- k = (((k & 0xffff) * 0x5bd1e995) + ((((k >>> 16) * 0x5bd1e995) & 0xffff) << 16));
585
- k ^= k >>> 24;
586
- k = (((k & 0xffff) * 0x5bd1e995) + ((((k >>> 16) * 0x5bd1e995) & 0xffff) << 16));
587
-
588
- h = (((h & 0xffff) * 0x5bd1e995) + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16)) ^ k;
589
-
590
- l -= 4;
591
- ++i;
592
- }
593
-
594
- switch (l) {
595
- case 3: h ^= (str[i + 2] & 0xff) << 16;
596
- case 2: h ^= (str[i + 1] & 0xff) << 8;
597
- case 1: h ^= (str[i] & 0xff);
598
- h = (((h & 0xffff) * 0x5bd1e995) + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16));
599
- }
600
-
601
- h ^= h >>> 13;
602
- h = (((h & 0xffff) * 0x5bd1e995) + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16));
603
- h ^= h >>> 15;
604
-
605
- return h >>> 0;
606
- }
607
- /*
608
- * JS Implementation of MurmurHash3 (r136) (as of May 20, 2011)
609
- *
610
- * @author <a href="mailto:gary.court@gmail.com">Gary Court</a>
611
- * @see http://github.com/garycourt/murmurhash-js
612
- * @author <a href="mailto:aappleby@gmail.com">Austin Appleby</a>
613
- * @see http://sites.google.com/site/murmurhash/
614
- *
615
- * @param {Uint8Array | string} key ASCII only
616
- * @param {number} seed Positive integer only
617
- * @return {number} 32-bit positive integer hash
618
- */
619
- function MurmurHashV3(key, seed) {
620
- if (typeof key === 'string') key = createBuffer(key);
621
-
622
- let remainder, bytes, h1, h1b, c1, c2, k1, i;
623
-
624
- remainder = key.length & 3; // key.length % 4
625
- bytes = key.length - remainder;
626
- h1 = seed;
627
- c1 = 0xcc9e2d51;
628
- c2 = 0x1b873593;
629
- i = 0;
630
-
631
- while (i < bytes) {
632
- k1 =
633
- ((key[i] & 0xff)) |
634
- ((key[++i] & 0xff) << 8) |
635
- ((key[++i] & 0xff) << 16) |
636
- ((key[++i] & 0xff) << 24);
637
- ++i;
638
-
639
- k1 = ((((k1 & 0xffff) * c1) + ((((k1 >>> 16) * c1) & 0xffff) << 16))) & 0xffffffff;
640
- k1 = (k1 << 15) | (k1 >>> 17);
641
- k1 = ((((k1 & 0xffff) * c2) + ((((k1 >>> 16) * c2) & 0xffff) << 16))) & 0xffffffff;
642
-
643
- h1 ^= k1;
644
- h1 = (h1 << 13) | (h1 >>> 19);
645
- h1b = ((((h1 & 0xffff) * 5) + ((((h1 >>> 16) * 5) & 0xffff) << 16))) & 0xffffffff;
646
- h1 = (((h1b & 0xffff) + 0x6b64) + ((((h1b >>> 16) + 0xe654) & 0xffff) << 16));
647
- }
648
-
649
- k1 = 0;
650
-
651
- switch (remainder) {
652
- case 3: k1 ^= (key[i + 2] & 0xff) << 16;
653
- case 2: k1 ^= (key[i + 1] & 0xff) << 8;
654
- case 1: k1 ^= (key[i] & 0xff);
655
-
656
- k1 = (((k1 & 0xffff) * c1) + ((((k1 >>> 16) * c1) & 0xffff) << 16)) & 0xffffffff;
657
- k1 = (k1 << 15) | (k1 >>> 17);
658
- k1 = (((k1 & 0xffff) * c2) + ((((k1 >>> 16) * c2) & 0xffff) << 16)) & 0xffffffff;
659
- h1 ^= k1;
660
- }
661
-
662
- h1 ^= key.length;
663
-
664
- h1 ^= h1 >>> 16;
665
- h1 = (((h1 & 0xffff) * 0x85ebca6b) + ((((h1 >>> 16) * 0x85ebca6b) & 0xffff) << 16)) & 0xffffffff;
666
- h1 ^= h1 >>> 13;
667
- h1 = ((((h1 & 0xffff) * 0xc2b2ae35) + ((((h1 >>> 16) * 0xc2b2ae35) & 0xffff) << 16))) & 0xffffffff;
668
- h1 ^= h1 >>> 16;
669
-
670
- return h1 >>> 0;
671
- }
672
-
673
- const murmur = MurmurHashV3;
674
- murmur.v2 = MurmurHashV2;
675
- murmur.v3 = MurmurHashV3;
676
-
677
- {
678
- module.exports = murmur;
679
- }
680
- }());
681
- } (murmurhash));
682
-
683
- /*!
684
- * Convert JS SDK
685
- * Version 1.0.0
686
- * Copyright(c) 2020 Convert Insights, Inc
687
- * License Apache-2.0
688
- */
689
- /**
690
- * String formatter tool. Transforms a space-separated string into camelCase
691
- * @param {string} input
692
- * @return {string}
693
- */
694
- function camelCase(input) {
695
- return input
696
- .replace(/(?:^\w|[A-Z]|\b\w)/g, function (word, index) {
697
- return index === 0 ? word.toLowerCase() : word.toUpperCase();
698
- })
699
- .replace(/\s+/g, '');
700
- }
701
-
702
735
  /*!
703
736
  * Convert JS SDK
704
737
  * Version 1.0.0
@@ -774,6 +807,9 @@ class RuleManager {
774
807
  arrayNotEmpty(ruleSet === null || ruleSet === void 0 ? void 0 : ruleSet.OR)) {
775
808
  for (let i = 0, l = ruleSet.OR.length; i < l; i++) {
776
809
  match = this._processAND(data, ruleSet.OR[i]);
810
+ if (match === true) {
811
+ return match;
812
+ }
777
813
  if (Object.values(RuleError).includes(match)) {
778
814
  (_f = (_e = this._loggerManager) === null || _e === void 0 ? void 0 : _e.info) === null || _f === void 0 ? void 0 : _f.call(_e, 'RuleManager.isRuleMatched()', logEntry || '', ERROR_MESSAGES.RULE_ERROR);
779
815
  }
@@ -782,9 +818,9 @@ class RuleManager {
782
818
  ? MESSAGES.RULE_NOT_MATCH
783
819
  : MESSAGES.RULE_MATCH.replace('#', String(i)));
784
820
  }
785
- if (match !== false) {
786
- return match;
787
- }
821
+ }
822
+ if (match !== false) {
823
+ return match;
788
824
  }
789
825
  }
790
826
  else {
@@ -854,10 +890,13 @@ class RuleManager {
854
890
  arrayNotEmpty(rulesSubset === null || rulesSubset === void 0 ? void 0 : rulesSubset.OR_WHEN)) {
855
891
  for (let i = 0, l = rulesSubset.OR_WHEN.length; i < l; i++) {
856
892
  match = this._processRuleItem(data, rulesSubset.OR_WHEN[i]);
857
- if (match !== false) {
893
+ if (match === true) {
858
894
  return match;
859
895
  }
860
896
  }
897
+ if (match !== false) {
898
+ return match;
899
+ }
861
900
  }
862
901
  else {
863
902
  (_b = (_a = this._loggerManager) === null || _a === void 0 ? void 0 : _a.warn) === null || _b === void 0 ? void 0 : _b.call(_a, 'RuleManager._processORWHEN()', ERROR_MESSAGES.RULE_NOT_VALID);
package/lib/index.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../node_modules/murmurhash/murmurhash.js"],"sourcesContent":["(function(){\n const _global = this;\n\n const createBuffer = (val) => new TextEncoder().encode(val)\n\n /**\n * JS Implementation of MurmurHash2\n *\n * @author <a href=\"mailto:gary.court@gmail.com\">Gary Court</a>\n * @see http://github.com/garycourt/murmurhash-js\n * @author <a href=\"mailto:aappleby@gmail.com\">Austin Appleby</a>\n * @see http://sites.google.com/site/murmurhash/\n *\n * @param {Uint8Array | string} str ASCII only\n * @param {number} seed Positive integer only\n * @return {number} 32-bit positive integer hash\n */\n function MurmurHashV2(str, seed) {\n if (typeof str === 'string') str = createBuffer(str);\n let\n l = str.length,\n h = seed ^ l,\n i = 0,\n k;\n\n while (l >= 4) {\n k =\n ((str[i] & 0xff)) |\n ((str[++i] & 0xff) << 8) |\n ((str[++i] & 0xff) << 16) |\n ((str[++i] & 0xff) << 24);\n\n k = (((k & 0xffff) * 0x5bd1e995) + ((((k >>> 16) * 0x5bd1e995) & 0xffff) << 16));\n k ^= k >>> 24;\n k = (((k & 0xffff) * 0x5bd1e995) + ((((k >>> 16) * 0x5bd1e995) & 0xffff) << 16));\n\n h = (((h & 0xffff) * 0x5bd1e995) + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16)) ^ k;\n\n l -= 4;\n ++i;\n }\n\n switch (l) {\n case 3: h ^= (str[i + 2] & 0xff) << 16;\n case 2: h ^= (str[i + 1] & 0xff) << 8;\n case 1: h ^= (str[i] & 0xff);\n h = (((h & 0xffff) * 0x5bd1e995) + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16));\n }\n\n h ^= h >>> 13;\n h = (((h & 0xffff) * 0x5bd1e995) + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16));\n h ^= h >>> 15;\n\n return h >>> 0;\n };\n\n /*\n * JS Implementation of MurmurHash3 (r136) (as of May 20, 2011)\n *\n * @author <a href=\"mailto:gary.court@gmail.com\">Gary Court</a>\n * @see http://github.com/garycourt/murmurhash-js\n * @author <a href=\"mailto:aappleby@gmail.com\">Austin Appleby</a>\n * @see http://sites.google.com/site/murmurhash/\n *\n * @param {Uint8Array | string} key ASCII only\n * @param {number} seed Positive integer only\n * @return {number} 32-bit positive integer hash\n */\n function MurmurHashV3(key, seed) {\n if (typeof key === 'string') key = createBuffer(key);\n\n let remainder, bytes, h1, h1b, c1, c1b, c2, c2b, k1, i;\n\n remainder = key.length & 3; // key.length % 4\n bytes = key.length - remainder;\n h1 = seed;\n c1 = 0xcc9e2d51;\n c2 = 0x1b873593;\n i = 0;\n\n while (i < bytes) {\n k1 =\n ((key[i] & 0xff)) |\n ((key[++i] & 0xff) << 8) |\n ((key[++i] & 0xff) << 16) |\n ((key[++i] & 0xff) << 24);\n ++i;\n\n k1 = ((((k1 & 0xffff) * c1) + ((((k1 >>> 16) * c1) & 0xffff) << 16))) & 0xffffffff;\n k1 = (k1 << 15) | (k1 >>> 17);\n k1 = ((((k1 & 0xffff) * c2) + ((((k1 >>> 16) * c2) & 0xffff) << 16))) & 0xffffffff;\n\n h1 ^= k1;\n h1 = (h1 << 13) | (h1 >>> 19);\n h1b = ((((h1 & 0xffff) * 5) + ((((h1 >>> 16) * 5) & 0xffff) << 16))) & 0xffffffff;\n h1 = (((h1b & 0xffff) + 0x6b64) + ((((h1b >>> 16) + 0xe654) & 0xffff) << 16));\n }\n\n k1 = 0;\n\n switch (remainder) {\n case 3: k1 ^= (key[i + 2] & 0xff) << 16;\n case 2: k1 ^= (key[i + 1] & 0xff) << 8;\n case 1: k1 ^= (key[i] & 0xff);\n\n k1 = (((k1 & 0xffff) * c1) + ((((k1 >>> 16) * c1) & 0xffff) << 16)) & 0xffffffff;\n k1 = (k1 << 15) | (k1 >>> 17);\n k1 = (((k1 & 0xffff) * c2) + ((((k1 >>> 16) * c2) & 0xffff) << 16)) & 0xffffffff;\n h1 ^= k1;\n }\n\n h1 ^= key.length;\n\n h1 ^= h1 >>> 16;\n h1 = (((h1 & 0xffff) * 0x85ebca6b) + ((((h1 >>> 16) * 0x85ebca6b) & 0xffff) << 16)) & 0xffffffff;\n h1 ^= h1 >>> 13;\n h1 = ((((h1 & 0xffff) * 0xc2b2ae35) + ((((h1 >>> 16) * 0xc2b2ae35) & 0xffff) << 16))) & 0xffffffff;\n h1 ^= h1 >>> 16;\n\n return h1 >>> 0;\n }\n\n const murmur = MurmurHashV3;\n murmur.v2 = MurmurHashV2;\n murmur.v3 = MurmurHashV3;\n\n if (typeof(module) != 'undefined') {\n module.exports = murmur;\n } else {\n const _previousRoot = _global.murmur;\n murmur.noConflict = function() {\n _global.murmur = _previousRoot;\n return murmur;\n }\n _global.murmur = murmur;\n }\n}());\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,CAAA,CAAC,UAAU;AAEX;AACA,GAAE,MAAM,YAAY,GAAG,CAAC,GAA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AChB,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,MAAM,IAAI,UAAU,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,UAAU,IAAI,MAAM,KAAK,EAAE,CAAC,IAAI,UAAU,CAAC;AACrG,KAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;KAChB,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,GAAG,MAAM,IAAI,UAAU,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,UAAU,IAAI,MAAM,KAAK,EAAE,CAAC,KAAK,UAAU,CAAC;AACvG,KAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;AACpB;AACA,KAAI,OAAO,EAAE,KAAK,CAAC,CAAC;IACjB;AACH;AACA,GAAE,MAAM,MAAM,GAAG,YAAY,CAAC;AAC9B,GAAE,MAAM,CAAC,EAAE,GAAG,YAAY,CAAC;AAC3B,GAAE,MAAM,CAAC,EAAE,GAAG,YAAY,CAAC;AAC3B;AACA,GAAqC;KACjC,MAAA,CAAA,OAAA,GAAiB,MAAM,CAAC;AAC5B,IAOG;AACH,EAAC,EAAE,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.mjs","sources":["../../../node_modules/murmurhash/murmurhash.js"],"sourcesContent":["(function(){\n const _global = this;\n\n const createBuffer = (val) => new TextEncoder().encode(val)\n\n /**\n * JS Implementation of MurmurHash2\n *\n * @author <a href=\"mailto:gary.court@gmail.com\">Gary Court</a>\n * @see http://github.com/garycourt/murmurhash-js\n * @author <a href=\"mailto:aappleby@gmail.com\">Austin Appleby</a>\n * @see http://sites.google.com/site/murmurhash/\n *\n * @param {Uint8Array | string} str ASCII only\n * @param {number} seed Positive integer only\n * @return {number} 32-bit positive integer hash\n */\n function MurmurHashV2(str, seed) {\n if (typeof str === 'string') str = createBuffer(str);\n let\n l = str.length,\n h = seed ^ l,\n i = 0,\n k;\n\n while (l >= 4) {\n k =\n ((str[i] & 0xff)) |\n ((str[++i] & 0xff) << 8) |\n ((str[++i] & 0xff) << 16) |\n ((str[++i] & 0xff) << 24);\n\n k = (((k & 0xffff) * 0x5bd1e995) + ((((k >>> 16) * 0x5bd1e995) & 0xffff) << 16));\n k ^= k >>> 24;\n k = (((k & 0xffff) * 0x5bd1e995) + ((((k >>> 16) * 0x5bd1e995) & 0xffff) << 16));\n\n h = (((h & 0xffff) * 0x5bd1e995) + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16)) ^ k;\n\n l -= 4;\n ++i;\n }\n\n switch (l) {\n case 3: h ^= (str[i + 2] & 0xff) << 16;\n case 2: h ^= (str[i + 1] & 0xff) << 8;\n case 1: h ^= (str[i] & 0xff);\n h = (((h & 0xffff) * 0x5bd1e995) + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16));\n }\n\n h ^= h >>> 13;\n h = (((h & 0xffff) * 0x5bd1e995) + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16));\n h ^= h >>> 15;\n\n return h >>> 0;\n };\n\n /*\n * JS Implementation of MurmurHash3 (r136) (as of May 20, 2011)\n *\n * @author <a href=\"mailto:gary.court@gmail.com\">Gary Court</a>\n * @see http://github.com/garycourt/murmurhash-js\n * @author <a href=\"mailto:aappleby@gmail.com\">Austin Appleby</a>\n * @see http://sites.google.com/site/murmurhash/\n *\n * @param {Uint8Array | string} key ASCII only\n * @param {number} seed Positive integer only\n * @return {number} 32-bit positive integer hash\n */\n function MurmurHashV3(key, seed) {\n if (typeof key === 'string') key = createBuffer(key);\n\n let remainder, bytes, h1, h1b, c1, c1b, c2, c2b, k1, i;\n\n remainder = key.length & 3; // key.length % 4\n bytes = key.length - remainder;\n h1 = seed;\n c1 = 0xcc9e2d51;\n c2 = 0x1b873593;\n i = 0;\n\n while (i < bytes) {\n k1 =\n ((key[i] & 0xff)) |\n ((key[++i] & 0xff) << 8) |\n ((key[++i] & 0xff) << 16) |\n ((key[++i] & 0xff) << 24);\n ++i;\n\n k1 = ((((k1 & 0xffff) * c1) + ((((k1 >>> 16) * c1) & 0xffff) << 16))) & 0xffffffff;\n k1 = (k1 << 15) | (k1 >>> 17);\n k1 = ((((k1 & 0xffff) * c2) + ((((k1 >>> 16) * c2) & 0xffff) << 16))) & 0xffffffff;\n\n h1 ^= k1;\n h1 = (h1 << 13) | (h1 >>> 19);\n h1b = ((((h1 & 0xffff) * 5) + ((((h1 >>> 16) * 5) & 0xffff) << 16))) & 0xffffffff;\n h1 = (((h1b & 0xffff) + 0x6b64) + ((((h1b >>> 16) + 0xe654) & 0xffff) << 16));\n }\n\n k1 = 0;\n\n switch (remainder) {\n case 3: k1 ^= (key[i + 2] & 0xff) << 16;\n case 2: k1 ^= (key[i + 1] & 0xff) << 8;\n case 1: k1 ^= (key[i] & 0xff);\n\n k1 = (((k1 & 0xffff) * c1) + ((((k1 >>> 16) * c1) & 0xffff) << 16)) & 0xffffffff;\n k1 = (k1 << 15) | (k1 >>> 17);\n k1 = (((k1 & 0xffff) * c2) + ((((k1 >>> 16) * c2) & 0xffff) << 16)) & 0xffffffff;\n h1 ^= k1;\n }\n\n h1 ^= key.length;\n\n h1 ^= h1 >>> 16;\n h1 = (((h1 & 0xffff) * 0x85ebca6b) + ((((h1 >>> 16) * 0x85ebca6b) & 0xffff) << 16)) & 0xffffffff;\n h1 ^= h1 >>> 13;\n h1 = ((((h1 & 0xffff) * 0xc2b2ae35) + ((((h1 >>> 16) * 0xc2b2ae35) & 0xffff) << 16))) & 0xffffffff;\n h1 ^= h1 >>> 16;\n\n return h1 >>> 0;\n }\n\n const murmur = MurmurHashV3;\n murmur.v2 = MurmurHashV2;\n murmur.v3 = MurmurHashV3;\n\n if (typeof(module) != 'undefined') {\n module.exports = murmur;\n } else {\n const _previousRoot = _global.murmur;\n murmur.noConflict = function() {\n _global.murmur = _previousRoot;\n return murmur;\n }\n _global.murmur = murmur;\n }\n}());\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,CAAA,CAAC,UAAU;AAEX;AACA,GAAE,MAAM,YAAY,GAAG,CAAC,GAAG,KAAK,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,GAAG,EAAC;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE,SAAS,YAAY,CAAC,GAAG,EAAE,IAAI,EAAE;AACnC,KAAI,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,GAAG,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC;KACrD;AACJ,OAAM,CAAC,GAAG,GAAG,CAAC,MAAM;AACpB,OAAM,CAAC,GAAG,IAAI,GAAG,CAAC;OACZ,CAAC,GAAG,CAAC;AACX,OAAM,CAAC,CAAC;AACR;AACA,KAAI,OAAO,CAAC,IAAI,CAAC,EAAE;AACnB,OAAM,CAAC;AACP,SAAQ,EAAE,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI;UACd,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,IAAI,KAAK,CAAC,CAAC;UACvB,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,IAAI,KAAK,EAAE,CAAC;UACxB,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,IAAI,KAAK,EAAE,CAAC,CAAC;AAClC;OACM,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI,UAAU,KAAK,CAAC,CAAC,CAA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