@feathery/react 2.42.0 → 2.43.0

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 (196) hide show
  1. package/cjs/{fthry_AssistantChat.BOyDRP1t.js → fthry_AssistantChat.Dc6irzAk.js} +4 -4
  2. package/cjs/{fthry_FormControl.ChDphBiw.js → fthry_FormControl.D_eydQlT.js} +1 -1
  3. package/cjs/{fthry_InlineTooltip.Ddh8_6aY.js → fthry_InlineTooltip.Km0nxBV3.js} +2 -2
  4. package/cjs/{fthry_Overlay.Bd1qiy6-.js → fthry_Overlay.ChABiy0m.js} +1 -1
  5. package/cjs/{fthry_PaymentMethodField.DmbR79FW.js → fthry_PaymentMethodField.BMABompY.js} +4 -4
  6. package/cjs/{fthry_Placeholder.BZUp2I1J.js → fthry_Placeholder.CnNGDD_K.js} +1 -1
  7. package/cjs/{fthry_ShowEyeIcon.D9DLoHqI.js → fthry_ShowEyeIcon.Cozhh36m.js} +1 -1
  8. package/cjs/fthry_auto-track.CzyR3umO.js +114 -0
  9. package/cjs/{fthry_highlighted-body-TPN3WLV5.W8KTEXCF.js → fthry_highlighted-body-TPN3WLV5.D8LjPUtI.js} +3 -3
  10. package/cjs/{fthry_index.pqZR4gSb.js → fthry_index.5oiWIOUK.js} +1 -1
  11. package/cjs/fthry_index.8ZkixEuX.js +477 -0
  12. package/cjs/{fthry_index.C_KCwy5K.js → fthry_index.B-QAg85r.js} +6 -6
  13. package/cjs/{fthry_index.BJAzpvPO.js → fthry_index.B4qsX_2B.js} +4 -4
  14. package/cjs/fthry_index.B5TkPpn3.js +73 -0
  15. package/cjs/fthry_index.B76xVeoK.js +6893 -0
  16. package/cjs/fthry_index.B79ksg_6.js +68 -0
  17. package/cjs/{fthry_index.DjWcky2z.js → fthry_index.B7Slrn_2.js} +1 -1
  18. package/cjs/{fthry_index.C3bArUa4.js → fthry_index.BNFRKqrl.js} +5 -5
  19. package/cjs/{fthry_index.CW5rWtuZ.js → fthry_index.BPu5GDF3.js} +5 -5
  20. package/cjs/{fthry_index.DJzIqovs.js → fthry_index.BVLMhJHP.js} +1 -1
  21. package/cjs/{fthry_index.aU4Q-Vhi.js → fthry_index.BYJ0Cjz1.js} +1 -1
  22. package/cjs/{fthry_index.B4iCcGUt.js → fthry_index.CMRH7foG.js} +6 -6
  23. package/cjs/{fthry_index.DQ3tM-b4.js → fthry_index.Cj3i1JIs.js} +1 -1
  24. package/cjs/{fthry_index.Bcl3u2bt.js → fthry_index.Cj8NIIWS.js} +6 -6
  25. package/cjs/{fthry_index.pmG3XerW.js → fthry_index.Crv5Oqdb.js} +6 -6
  26. package/cjs/{fthry_index.VXMfU8Ig.js → fthry_index.CsV6zv_0.js} +5 -5
  27. package/cjs/{fthry_index.JJYyApby.js → fthry_index.D6PlFvY8.js} +5 -5
  28. package/cjs/{fthry_index.DNNK_WNB.js → fthry_index.D7jBFEkz.js} +1 -1
  29. package/cjs/fthry_index.DMmTH04s.js +34 -0
  30. package/cjs/{fthry_index.DcZhokGw.js → fthry_index.DcnmaMvN.js} +2 -2
  31. package/cjs/fthry_index.DfOk3_Vc.js +72 -0
  32. package/cjs/{fthry_index.Cts348D4.js → fthry_index.Dn7k0XbZ.js} +91 -111
  33. package/cjs/{fthry_index.BEwwo45U.js → fthry_index.DoliEMOD.js} +3 -3
  34. package/cjs/{fthry_index.BcSPIfHw.js → fthry_index.H4GgWRQ-.js} +1 -1
  35. package/cjs/fthry_index.KDrRVPx5.js +575 -0
  36. package/cjs/{fthry_index.DMa8KL_d.js → fthry_index.KMyCBmte.js} +1 -1
  37. package/cjs/{fthry_index.Wf6EoIZb.js → fthry_index.WbKUUcdS.js} +1 -1
  38. package/cjs/{fthry_index.B8IGhOnl.js → fthry_index._pqB5lCu.js} +8 -8
  39. package/cjs/{fthry_index.DzpicfAn.js → fthry_index.ecHJPvgK.js} +3 -3
  40. package/cjs/fthry_index.umd.lxnwBuEl.js +41 -0
  41. package/cjs/{fthry_index.LPXprTDf.js → fthry_index.wTd_xpVX.js} +4 -4
  42. package/cjs/{fthry_index.l6iPtqf7.js → fthry_index.x_Q9efXs.js} +2 -2
  43. package/cjs/{fthry_input.C3lHXfth.js → fthry_input.DJaKnXqS.js} +1 -1
  44. package/cjs/fthry_is-plan-event-enabled.nMt_kVye.js +19 -0
  45. package/cjs/{fthry_mermaid-O7DHMXV3.BODsiYW_.js → fthry_mermaid-O7DHMXV3.CyaPsnki.js} +3 -3
  46. package/cjs/{fthry_script.C70Bm3qk.js → fthry_script.DrFnB8ud.js} +1 -1
  47. package/cjs/{fthry_styles.BLUeHaH3.js → fthry_styles.qeOM9hPF.js} +1 -1
  48. package/cjs/{fthry_useElementSize.B4RuT8C5.js → fthry_useElementSize.K1QGuhUj.js} +1 -1
  49. package/cjs/{fthry_useSalesforceSync.CNNAgWe2.js → fthry_useSalesforceSync.DQd2UZn6.js} +1 -1
  50. package/cjs/{fthry_webfontloader.CJNW-DFS.js → fthry_webfontloader.D6aR0hiT.js} +1 -1
  51. package/cjs/index.js +1 -1
  52. package/cjs/integrations/segment.d.ts +1 -1
  53. package/cjs/integrations/segment.d.ts.map +1 -1
  54. package/dist/{fthry_AssistantChat.HxV8LV1W.js → fthry_AssistantChat.D2SjzX88.js} +4 -4
  55. package/dist/{fthry_FormControl.CnYezAfl.js → fthry_FormControl.AWZ2hRhb.js} +1 -1
  56. package/dist/{fthry_InlineTooltip.bROBNZ_Z.js → fthry_InlineTooltip.DAaWNMEQ.js} +2 -2
  57. package/dist/{fthry_Overlay.c1qlB9ct.js → fthry_Overlay.C500WG6U.js} +1 -1
  58. package/dist/{fthry_PaymentMethodField.t7Dvi81Y.js → fthry_PaymentMethodField.Bl2Ce36L.js} +4 -4
  59. package/dist/{fthry_Placeholder.BH2h6ybj.js → fthry_Placeholder.DXrZi2ze.js} +1 -1
  60. package/dist/{fthry_ShowEyeIcon.BRmzNxYQ.js → fthry_ShowEyeIcon.D3iEMZA7.js} +1 -1
  61. package/dist/fthry_auto-track.C9HCW4qJ.js +111 -0
  62. package/dist/{fthry_highlighted-body-TPN3WLV5.VbtSFmzn.js → fthry_highlighted-body-TPN3WLV5.j0rrY2PD.js} +3 -3
  63. package/dist/fthry_index.-lEiRiJ3.js +66 -0
  64. package/dist/{fthry_index.fobb7KRG.js → fthry_index.0DlQOa4l.js} +1 -1
  65. package/dist/{fthry_index.BU1tBfl4.js → fthry_index.4rXsgo8n.js} +6 -6
  66. package/dist/{fthry_index.Cni5qhKo.js → fthry_index.BALrl_Ek.js} +4 -4
  67. package/dist/{fthry_index.CTKKbjOj.js → fthry_index.BDtWG5y-.js} +5 -5
  68. package/dist/fthry_index.BHbPxMcy.js +71 -0
  69. package/dist/fthry_index.BjZmdaIR.js +474 -0
  70. package/dist/{fthry_index.D9AlZz3i.js → fthry_index.BlrVY1vE.js} +6 -6
  71. package/dist/{fthry_index._5bwnWsa.js → fthry_index.BoXwpo3p.js} +91 -112
  72. package/dist/{fthry_index.BabA9Mw-.js → fthry_index.C-Af9t8c.js} +5 -5
  73. package/dist/{fthry_index.D703JOs7.js → fthry_index.C8xVXq31.js} +3 -3
  74. package/dist/{fthry_index.BCEtAYB2.js → fthry_index.C9P7Vo6r.js} +1 -1
  75. package/dist/{fthry_index.BwtbJAEO.js → fthry_index.CB6eTYmX.js} +5 -5
  76. package/dist/{fthry_index.DO15Hx14.js → fthry_index.CS604ePK.js} +2 -2
  77. package/dist/{fthry_index.D3YVIQwB.js → fthry_index.Cd0JKkOc.js} +8 -8
  78. package/dist/fthry_index.Cn4kA2tn.js +6871 -0
  79. package/dist/fthry_index.Co2zkJCZ.js +70 -0
  80. package/dist/{fthry_index.DjOqKkBq.js → fthry_index.D2-zTdBQ.js} +1 -1
  81. package/dist/{fthry_index.C3ADr7W7.js → fthry_index.D3O1Qvm3.js} +3 -3
  82. package/dist/{fthry_index.DkcH8BMq.js → fthry_index.D5dmTp6g.js} +1 -1
  83. package/dist/{fthry_index.DDOGQlw5.js → fthry_index.D8_hWgYx.js} +1 -1
  84. package/dist/{fthry_index.CrDUdmXr.js → fthry_index.DA5HHbVe.js} +1 -1
  85. package/dist/fthry_index.DAdR6bYe.js +32 -0
  86. package/dist/{fthry_index.CNnWO_IQ.js → fthry_index.DFZRIGNF.js} +2 -2
  87. package/dist/{fthry_index.C3UMQKv8.js → fthry_index.DOGU2-kQ.js} +5 -5
  88. package/dist/{fthry_index.DXdUdmGQ.js → fthry_index.DZviU_0h.js} +1 -1
  89. package/dist/{fthry_index.DObbQIll.js → fthry_index.DtHlcCDX.js} +1 -1
  90. package/dist/{fthry_index.IiZ-zUFp.js → fthry_index.DzDuGB1B.js} +6 -6
  91. package/dist/{fthry_index.vtPqJ0XE.js → fthry_index.IaraEDTR.js} +1 -1
  92. package/dist/fthry_index.JD44HVFL.js +573 -0
  93. package/dist/{fthry_index.CI2e6tdr.js → fthry_index.OgRdIE07.js} +5 -5
  94. package/dist/fthry_index.umd.BhHG1ThX.js +39 -0
  95. package/dist/{fthry_index.BXQYUbtj.js → fthry_index.x_DcI6GR.js} +4 -4
  96. package/dist/{fthry_input.DNaXMuMS.js → fthry_input.Y2HVhQeo.js} +1 -1
  97. package/dist/fthry_is-plan-event-enabled.mXX0dwl-.js +17 -0
  98. package/dist/{fthry_mermaid-O7DHMXV3.WhXC51ol.js → fthry_mermaid-O7DHMXV3._Ng2DeVi.js} +3 -3
  99. package/dist/{fthry_script.Bqz_se84.js → fthry_script.4cQVioC4.js} +1 -1
  100. package/dist/{fthry_styles.DMI6ijBl.js → fthry_styles.DX0NUnVP.js} +1 -1
  101. package/dist/{fthry_useElementSize.BcPjULOb.js → fthry_useElementSize.BCbe9jZd.js} +1 -1
  102. package/dist/{fthry_useSalesforceSync.lJhIijY2.js → fthry_useSalesforceSync.DJFGoBIG.js} +1 -1
  103. package/dist/{fthry_webfontloader.B0wgjWSB.js → fthry_webfontloader.4kqCCEG_.js} +1 -1
  104. package/dist/index.js +1 -1
  105. package/dist/integrations/segment.d.ts +1 -1
  106. package/dist/integrations/segment.d.ts.map +1 -1
  107. package/package.json +2 -1
  108. package/umd/277.1a33ea06f86326613fcb.js +1 -0
  109. package/umd/301.b40f38397dcde848ba46.js +1 -0
  110. package/umd/435.a94343a900f83a1ba8eb.js +1 -0
  111. package/umd/466.c82e14e5b06ae17649ff.js +1 -0
  112. package/umd/509.d49410af0cc948b08d73.js +2 -0
  113. package/umd/529.e7a0a831bf80398fda0f.js +1 -0
  114. package/umd/542.5168cf86fc7255c8b7fd.js +1 -0
  115. package/umd/598.9bc05f78267c055211d9.js +2 -0
  116. package/umd/602.ddda17ac6b2cabb3d639.js +1 -0
  117. package/umd/664.4a3ec465094a3d59c184.js +1 -0
  118. package/umd/834.b4ef33227c4c872368d6.js +1 -0
  119. package/umd/94.391827577c1c62f73f29.js +2 -0
  120. package/umd/AddressField.648b3da916171008dc9f.js +1 -0
  121. package/umd/AssistantChat.879f86967feffba1cc6f.js +1 -0
  122. package/umd/ButtonGroupField.d39ac976a6dee9ef593a.js +1 -0
  123. package/umd/CheckboxField.3323fdfd4a7377580d46.js +1 -0
  124. package/umd/CheckboxGroupField.e495eb152c4faa000d4b.js +1 -0
  125. package/umd/ColorPickerField.7e0f3c3a7dc1bcaf5e30.js +1 -0
  126. package/umd/CustomField.895d9a1d34e8e7b8b8d0.js +1 -0
  127. package/umd/DateSelectorField.e702b3e6b0a5b498c824.js +1 -0
  128. package/umd/DropdownField.d1a234d236d9989bbf20.js +1 -0
  129. package/umd/DropdownMultiField.5b4e24025035f1678c83.js +1 -0
  130. package/umd/FileUploadField.f0d66cf87244c0e565a1.js +1 -0
  131. package/umd/MatrixField.bcd6f58ea1896f386988.js +1 -0
  132. package/umd/PasswordField.593d7b7d3d954634fa30.js +1 -0
  133. package/umd/PaymentMethodField.8e4fd6353793eaaa2b5b.js +1 -0
  134. package/umd/PhoneField.861b99c7e81b4b9c8648.js +1 -0
  135. package/umd/PinInputField.ddc30797191dfbed7fe3.js +1 -0
  136. package/umd/QRScanner.94381603047f5db6b5c0.js +1 -0
  137. package/umd/RadioButtonGroupField.7a333a6f7e578a181a98.js +1 -0
  138. package/umd/RatingField.204cb92c30aeb4b8952a.js +1 -0
  139. package/umd/SignatureField.9cc9b3783cf8149ba767.js +1 -0
  140. package/umd/SliderField.d746a57527031d551f58.js +1 -0
  141. package/umd/TableElement.fef6a362cfa150f0f38e.js +1 -0
  142. package/umd/TextArea.04335be4f0f0d6c0cc1a.js +1 -0
  143. package/umd/TextField.749931ebb258bf38e007.js +1 -0
  144. package/umd/ajs-destination.19322d501875cd260554.js +1 -0
  145. package/umd/auto-track.e6503d851d1d8c634ff0.js +1 -0
  146. package/umd/index.js +1 -1
  147. package/umd/legacyVideos.5ab9e462d737eca6f817.js +1 -0
  148. package/umd/libphonenumber.721378defae8d84deae2.js +1 -0
  149. package/umd/queryString.74978b49d70f9556e22a.js +1 -0
  150. package/umd/remoteMiddleware.fb68e7490b3379937c68.js +1 -0
  151. package/umd/schemaFilter.45d31876c08e74664f1d.js +1 -0
  152. package/umd/segment.76c3946188b5c80e77d6.js +2 -0
  153. package/umd/segment.76c3946188b5c80e77d6.js.LICENSE.txt +1 -0
  154. package/umd/tsub-middleware.4d4d00320fa7aa6a97cc.js +2 -0
  155. package/umd/tsub-middleware.4d4d00320fa7aa6a97cc.js.LICENSE.txt +1 -0
  156. package/umd/webfontloader.419636e0eb0cfb39b078.js +1 -0
  157. package/umd/277.87e6ca5c1cf2a7477992.js +0 -1
  158. package/umd/301.a96bba9d529bf7fd379e.js +0 -1
  159. package/umd/435.faa037e36038c2c766da.js +0 -1
  160. package/umd/466.e3456c8b3407ad04ba56.js +0 -1
  161. package/umd/509.bca2ff43c66b1dba064f.js +0 -2
  162. package/umd/529.63afee65c745ca950f81.js +0 -1
  163. package/umd/542.f1dbbbb062e82a2995e9.js +0 -1
  164. package/umd/598.ca92da6595afad37b511.js +0 -2
  165. package/umd/602.1fde434923c6596acd40.js +0 -1
  166. package/umd/664.42541009d1fcb121cc49.js +0 -1
  167. package/umd/94.e8ad20ab98c664d13197.js +0 -2
  168. package/umd/AddressField.c4188872f2a931394aa1.js +0 -1
  169. package/umd/AssistantChat.7af8f8f25348f5379aeb.js +0 -1
  170. package/umd/ButtonGroupField.33cf9c939c8e82cc6c83.js +0 -1
  171. package/umd/CheckboxField.782999cad642da04434d.js +0 -1
  172. package/umd/CheckboxGroupField.18ab392a2890a239fd0b.js +0 -1
  173. package/umd/ColorPickerField.f6740bb7c4c20a520db5.js +0 -1
  174. package/umd/CustomField.a5b2965922f2d170b9b5.js +0 -1
  175. package/umd/DateSelectorField.568bb30a220837a36660.js +0 -1
  176. package/umd/DropdownField.9f0f8a425ddf09771ad8.js +0 -1
  177. package/umd/DropdownMultiField.72a44c0280217eeb5652.js +0 -1
  178. package/umd/FileUploadField.7a5028fb6035d09b3e81.js +0 -1
  179. package/umd/MatrixField.2b65107453ddf2322137.js +0 -1
  180. package/umd/PasswordField.7585ef588333cb4181f7.js +0 -1
  181. package/umd/PaymentMethodField.d08bcfa1efb56084572d.js +0 -1
  182. package/umd/PhoneField.b9293ead8e5a2a3b7c37.js +0 -1
  183. package/umd/PinInputField.b1aee0ef9d3c9f9a1933.js +0 -1
  184. package/umd/QRScanner.3c22391de30dba001f13.js +0 -1
  185. package/umd/RadioButtonGroupField.20268d1b4649053bf1db.js +0 -1
  186. package/umd/RatingField.eeeb0ac499c308c120ba.js +0 -1
  187. package/umd/SignatureField.0e7d60fa2fafcb6be554.js +0 -1
  188. package/umd/SliderField.a5ab58e4b89fa67d6ac6.js +0 -1
  189. package/umd/TableElement.1076e69a66923cfe6434.js +0 -1
  190. package/umd/TextArea.7cca0d69e618846660c5.js +0 -1
  191. package/umd/TextField.28c59425e129e78a4551.js +0 -1
  192. package/umd/libphonenumber.4ab4d30edb4e455b2fc4.js +0 -1
  193. package/umd/webfontloader.b44bdf00049b175713ae.js +0 -1
  194. /package/umd/{509.bca2ff43c66b1dba064f.js.LICENSE.txt → 509.d49410af0cc948b08d73.js.LICENSE.txt} +0 -0
  195. /package/umd/{598.ca92da6595afad37b511.js.LICENSE.txt → 598.9bc05f78267c055211d9.js.LICENSE.txt} +0 -0
  196. /package/umd/{94.e8ad20ab98c664d13197.js.LICENSE.txt → 94.391827577c1c62f73f29.js.LICENSE.txt} +0 -0
@@ -0,0 +1,477 @@
1
+ 'use strict';
2
+
3
+ var index = require('./fthry_index.Dn7k0XbZ.js');
4
+ var index$1 = require('./fthry_index.B76xVeoK.js');
5
+ var isPlanEventEnabled = require('./fthry_is-plan-event-enabled.nMt_kVye.js');
6
+ require('react/jsx-runtime');
7
+ require('react');
8
+ require('react-dom/client');
9
+ require('jszip');
10
+ require('react-dom');
11
+
12
+ function normalizeName(name) {
13
+ return name.toLowerCase().replace('.', '').replace(/\s+/g, '-');
14
+ }
15
+ function obfuscatePathName(pathName, obfuscate) {
16
+ if (obfuscate === void 0) { obfuscate = false; }
17
+ return obfuscate ? btoa(pathName).replace(/=/g, '') : undefined;
18
+ }
19
+ function resolveIntegrationNameFromSource(integrationSource) {
20
+ return ('Integration' in integrationSource
21
+ ? integrationSource.Integration
22
+ : integrationSource).prototype.name;
23
+ }
24
+ function recordLoadMetrics(fullPath, ctx, name) {
25
+ var _a, _b;
26
+ try {
27
+ var metric = ((_b = (_a = window === null || window === void 0 ? void 0 : window.performance) === null || _a === void 0 ? void 0 : _a.getEntriesByName(fullPath, 'resource')) !== null && _b !== void 0 ? _b : [])[0];
28
+ // we assume everything that took under 100ms is cached
29
+ metric &&
30
+ ctx.stats.gauge('legacy_destination_time', Math.round(metric.duration), index.__spreadArray([
31
+ name
32
+ ], (metric.duration < 100 ? ['cached'] : []), true));
33
+ }
34
+ catch (_) {
35
+ // not available
36
+ }
37
+ }
38
+ function buildIntegration(integrationSource, integrationSettings, analyticsInstance) {
39
+ var integrationCtr;
40
+ // GA and Appcues use a different interface to instantiating integrations
41
+ if ('Integration' in integrationSource) {
42
+ var analyticsStub = {
43
+ user: function () { return analyticsInstance.user(); },
44
+ addIntegration: function () { },
45
+ };
46
+ integrationSource(analyticsStub);
47
+ integrationCtr = integrationSource.Integration;
48
+ }
49
+ else {
50
+ integrationCtr = integrationSource;
51
+ }
52
+ var integration = new integrationCtr(integrationSettings);
53
+ integration.analytics = analyticsInstance;
54
+ return integration;
55
+ }
56
+ function loadIntegration(ctx, name, version, obfuscate) {
57
+ return index.__awaiter(this, void 0, void 0, function () {
58
+ var pathName, obfuscatedPathName, path, fullPath, err_1, deps;
59
+ return index.__generator(this, function (_a) {
60
+ switch (_a.label) {
61
+ case 0:
62
+ pathName = normalizeName(name);
63
+ obfuscatedPathName = obfuscatePathName(pathName, obfuscate);
64
+ path = index$1.getNextIntegrationsURL();
65
+ fullPath = "".concat(path, "/integrations/").concat(obfuscatedPathName !== null && obfuscatedPathName !== void 0 ? obfuscatedPathName : pathName, "/").concat(version, "/").concat(obfuscatedPathName !== null && obfuscatedPathName !== void 0 ? obfuscatedPathName : pathName, ".dynamic.js.gz");
66
+ _a.label = 1;
67
+ case 1:
68
+ _a.trys.push([1, 3, , 4]);
69
+ return [4 /*yield*/, index$1.loadScript(fullPath)];
70
+ case 2:
71
+ _a.sent();
72
+ recordLoadMetrics(fullPath, ctx, name);
73
+ return [3 /*break*/, 4];
74
+ case 3:
75
+ err_1 = _a.sent();
76
+ ctx.stats.gauge('legacy_destination_time', -1, ["plugin:".concat(name), "failed"]);
77
+ throw err_1;
78
+ case 4:
79
+ deps = window["".concat(pathName, "Deps")];
80
+ return [4 /*yield*/, Promise.all(deps.map(function (dep) { return index$1.loadScript(path + dep + '.gz'); }))
81
+ // @ts-ignore
82
+ ];
83
+ case 5:
84
+ _a.sent();
85
+ // @ts-ignore
86
+ window["".concat(pathName, "Loader")]();
87
+ return [2 /*return*/, window[
88
+ // @ts-ignore
89
+ "".concat(pathName, "Integration")]];
90
+ }
91
+ });
92
+ });
93
+ }
94
+ function unloadIntegration(name, version, obfuscate) {
95
+ return index.__awaiter(this, void 0, void 0, function () {
96
+ var path, pathName, obfuscatedPathName, fullPath;
97
+ return index.__generator(this, function (_a) {
98
+ path = index$1.getNextIntegrationsURL();
99
+ pathName = normalizeName(name);
100
+ obfuscatedPathName = obfuscatePathName(name, obfuscate);
101
+ fullPath = "".concat(path, "/integrations/").concat(obfuscatedPathName !== null && obfuscatedPathName !== void 0 ? obfuscatedPathName : pathName, "/").concat(version, "/").concat(obfuscatedPathName !== null && obfuscatedPathName !== void 0 ? obfuscatedPathName : pathName, ".dynamic.js.gz");
102
+ return [2 /*return*/, index$1.unloadScript(fullPath)];
103
+ });
104
+ });
105
+ }
106
+ function resolveVersion(integrationConfig) {
107
+ var _a, _b, _c, _d;
108
+ return ((_d = (_b = (_a = integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.versionSettings) === null || _a === void 0 ? void 0 : _a.override) !== null && _b !== void 0 ? _b : (_c = integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.versionSettings) === null || _c === void 0 ? void 0 : _c.version) !== null && _d !== void 0 ? _d : 'latest');
109
+ }
110
+
111
+ var isInstallableIntegration = function (name, integrationSettings) {
112
+ var _a;
113
+ var type = integrationSettings.type, bundlingStatus = integrationSettings.bundlingStatus, versionSettings = integrationSettings.versionSettings;
114
+ // We use `!== 'unbundled'` (versus `=== 'bundled'`) to be inclusive of
115
+ // destinations without a defined value for `bundlingStatus`
116
+ var deviceMode = bundlingStatus !== 'unbundled' &&
117
+ (type === 'browser' || ((_a = versionSettings === null || versionSettings === void 0 ? void 0 : versionSettings.componentTypes) === null || _a === void 0 ? void 0 : _a.includes('browser')));
118
+ // checking for iterable is a quick fix we need in place to prevent
119
+ // errors showing Iterable as a failed destiantion. Ideally, we should
120
+ // fix the Iterable metadata instead, but that's a longer process.
121
+ return !name.startsWith('Segment') && name !== 'Iterable' && deviceMode;
122
+ };
123
+ var isDisabledIntegration = function (integrationName, integrations) {
124
+ var allDisableAndNotDefined = integrations.All === false && integrations[integrationName] === undefined;
125
+ return integrations[integrationName] === false || allDisableAndNotDefined;
126
+ };
127
+
128
+ function flushQueue(xt, queue) {
129
+ return index.__awaiter(this, void 0, void 0, function () {
130
+ var failedQueue;
131
+ var _this = this;
132
+ return index.__generator(this, function (_a) {
133
+ switch (_a.label) {
134
+ case 0:
135
+ failedQueue = [];
136
+ if (index$1.isOffline()) {
137
+ return [2 /*return*/, queue];
138
+ }
139
+ return [4 /*yield*/, index$1.pWhile(function () { return queue.length > 0 && index$1.isOnline(); }, function () { return index.__awaiter(_this, void 0, void 0, function () {
140
+ var ctx, result, success;
141
+ return index.__generator(this, function (_a) {
142
+ switch (_a.label) {
143
+ case 0:
144
+ ctx = queue.pop();
145
+ if (!ctx) {
146
+ return [2 /*return*/];
147
+ }
148
+ return [4 /*yield*/, index$1.attempt(ctx, xt)];
149
+ case 1:
150
+ result = _a.sent();
151
+ success = result instanceof index$1.Context;
152
+ if (!success) {
153
+ failedQueue.push(ctx);
154
+ }
155
+ return [2 /*return*/];
156
+ }
157
+ });
158
+ }); })
159
+ // re-add failed tasks
160
+ ];
161
+ case 1:
162
+ _a.sent();
163
+ // re-add failed tasks
164
+ failedQueue.map(function (failed) { return queue.pushWithBackoff(failed); });
165
+ return [2 /*return*/, queue];
166
+ }
167
+ });
168
+ });
169
+ }
170
+ var LegacyDestination = /** @class */ (function () {
171
+ function LegacyDestination(name, version, writeKey, settings, options, integrationSource) {
172
+ if (settings === void 0) { settings = {}; }
173
+ var _this = this;
174
+ this.options = {};
175
+ this.type = 'destination';
176
+ this.middleware = [];
177
+ this.initializePromise = index$1.createDeferred();
178
+ this.flushing = false;
179
+ this.name = name;
180
+ this.version = version;
181
+ this.settings = index.__assign({}, settings);
182
+ this.disableAutoISOConversion = options.disableAutoISOConversion || false;
183
+ this.integrationSource = integrationSource;
184
+ // AJS-Renderer sets an extraneous `type` setting that clobbers
185
+ // existing type defaults. We need to remove it if it's present
186
+ if (this.settings['type'] && this.settings['type'] === 'browser') {
187
+ delete this.settings['type'];
188
+ }
189
+ this.initializePromise.promise.then(function (isInitialized) { return (_this._initialized = isInitialized); }, function () { });
190
+ this.options = options;
191
+ this.buffer = options.disableClientPersistence
192
+ ? new index$1.PriorityQueue(4, [])
193
+ : new index$1.PersistedPriorityQueue(4, "".concat(writeKey, ":dest-").concat(name));
194
+ this.scheduleFlush();
195
+ }
196
+ LegacyDestination.prototype.isLoaded = function () {
197
+ return !!this._ready;
198
+ };
199
+ LegacyDestination.prototype.ready = function () {
200
+ var _this = this;
201
+ return this.initializePromise.promise.then(function () { var _a; return (_a = _this.onReady) !== null && _a !== void 0 ? _a : Promise.resolve(); });
202
+ };
203
+ LegacyDestination.prototype.load = function (ctx, analyticsInstance) {
204
+ var _a;
205
+ return index.__awaiter(this, void 0, void 0, function () {
206
+ var integrationSource, _b, error_1;
207
+ var _this = this;
208
+ return index.__generator(this, function (_c) {
209
+ switch (_c.label) {
210
+ case 0:
211
+ if (this._ready || this.onReady !== undefined) {
212
+ return [2 /*return*/];
213
+ }
214
+ _c.label = 1;
215
+ case 1:
216
+ _c.trys.push([1, 5, , 6]);
217
+ if (!((_a = this.integrationSource) !== null && _a !== void 0)) return [3 /*break*/, 2];
218
+ _b = _a;
219
+ return [3 /*break*/, 4];
220
+ case 2: return [4 /*yield*/, loadIntegration(ctx, this.name, this.version, this.options.obfuscate)];
221
+ case 3:
222
+ _b = (_c.sent());
223
+ _c.label = 4;
224
+ case 4:
225
+ integrationSource = _b;
226
+ this.integration = buildIntegration(integrationSource, this.settings, analyticsInstance);
227
+ return [3 /*break*/, 6];
228
+ case 5:
229
+ error_1 = _c.sent();
230
+ index$1.recordIntegrationMetric(ctx, {
231
+ integrationName: this.name,
232
+ methodName: 'load',
233
+ type: 'classic',
234
+ didError: true,
235
+ });
236
+ throw error_1;
237
+ case 6:
238
+ this.onReady = new Promise(function (resolve) {
239
+ var onReadyFn = function () {
240
+ _this._ready = true;
241
+ resolve(true);
242
+ };
243
+ _this.integration.once('ready', onReadyFn);
244
+ });
245
+ this.integration.on('initialize', function () {
246
+ _this.initializePromise.resolve(true);
247
+ });
248
+ try {
249
+ index$1.recordIntegrationMetric(ctx, {
250
+ integrationName: this.name,
251
+ methodName: 'initialize',
252
+ type: 'classic',
253
+ });
254
+ this.integration.initialize();
255
+ }
256
+ catch (error) {
257
+ index$1.recordIntegrationMetric(ctx, {
258
+ integrationName: this.name,
259
+ methodName: 'initialize',
260
+ type: 'classic',
261
+ didError: true,
262
+ });
263
+ this.initializePromise.resolve(false);
264
+ throw error;
265
+ }
266
+ return [2 /*return*/];
267
+ }
268
+ });
269
+ });
270
+ };
271
+ LegacyDestination.prototype.unload = function (_ctx, _analyticsInstance) {
272
+ return unloadIntegration(this.name, this.version, this.options.obfuscate);
273
+ };
274
+ LegacyDestination.prototype.addMiddleware = function () {
275
+ var _a;
276
+ var fn = [];
277
+ for (var _i = 0; _i < arguments.length; _i++) {
278
+ fn[_i] = arguments[_i];
279
+ }
280
+ this.middleware = (_a = this.middleware).concat.apply(_a, fn);
281
+ };
282
+ LegacyDestination.prototype.shouldBuffer = function (ctx) {
283
+ return (
284
+ // page events can't be buffered because of destinations that automatically add page views
285
+ ctx.event.type !== 'page' &&
286
+ (index$1.isOffline() || this._ready !== true || this._initialized !== true));
287
+ };
288
+ LegacyDestination.prototype.send = function (ctx, clz, eventType) {
289
+ var _a, _b;
290
+ return index.__awaiter(this, void 0, void 0, function () {
291
+ var plan, ev, planEvent, afterMiddleware, event, err_1;
292
+ return index.__generator(this, function (_c) {
293
+ switch (_c.label) {
294
+ case 0:
295
+ if (this.shouldBuffer(ctx)) {
296
+ this.buffer.push(ctx);
297
+ this.scheduleFlush();
298
+ return [2 /*return*/, ctx];
299
+ }
300
+ plan = (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.plan) === null || _b === void 0 ? void 0 : _b.track;
301
+ ev = ctx.event.event;
302
+ if (plan && ev && this.name !== 'Segment.io') {
303
+ planEvent = plan[ev];
304
+ if (!isPlanEventEnabled.isPlanEventEnabled(plan, planEvent)) {
305
+ ctx.updateEvent('integrations', index.__assign(index.__assign({}, ctx.event.integrations), { All: false, 'Segment.io': true }));
306
+ ctx.cancel(new index$1.ContextCancelation({
307
+ retry: false,
308
+ reason: "Event ".concat(ev, " disabled for integration ").concat(this.name, " in tracking plan"),
309
+ type: 'Dropped by plan',
310
+ }));
311
+ }
312
+ else {
313
+ ctx.updateEvent('integrations', index.__assign(index.__assign({}, ctx.event.integrations), planEvent === null || planEvent === void 0 ? void 0 : planEvent.integrations));
314
+ }
315
+ if ((planEvent === null || planEvent === void 0 ? void 0 : planEvent.enabled) && (planEvent === null || planEvent === void 0 ? void 0 : planEvent.integrations[this.name]) === false) {
316
+ ctx.cancel(new index$1.ContextCancelation({
317
+ retry: false,
318
+ reason: "Event ".concat(ev, " disabled for integration ").concat(this.name, " in tracking plan"),
319
+ type: 'Dropped by plan',
320
+ }));
321
+ }
322
+ }
323
+ return [4 /*yield*/, index$1.applyDestinationMiddleware(this.name, ctx.event, this.middleware)];
324
+ case 1:
325
+ afterMiddleware = _c.sent();
326
+ if (afterMiddleware === null) {
327
+ return [2 /*return*/, ctx];
328
+ }
329
+ event = new clz(afterMiddleware, {
330
+ traverse: !this.disableAutoISOConversion,
331
+ });
332
+ index$1.recordIntegrationMetric(ctx, {
333
+ integrationName: this.name,
334
+ methodName: eventType,
335
+ type: 'classic',
336
+ });
337
+ _c.label = 2;
338
+ case 2:
339
+ _c.trys.push([2, 5, , 6]);
340
+ if (!this.integration) return [3 /*break*/, 4];
341
+ return [4 /*yield*/, this.integration.invoke.call(this.integration, eventType, event)];
342
+ case 3:
343
+ _c.sent();
344
+ _c.label = 4;
345
+ case 4: return [3 /*break*/, 6];
346
+ case 5:
347
+ err_1 = _c.sent();
348
+ index$1.recordIntegrationMetric(ctx, {
349
+ integrationName: this.name,
350
+ methodName: eventType,
351
+ type: 'classic',
352
+ didError: true,
353
+ });
354
+ throw err_1;
355
+ case 6: return [2 /*return*/, ctx];
356
+ }
357
+ });
358
+ });
359
+ };
360
+ LegacyDestination.prototype.track = function (ctx) {
361
+ return index.__awaiter(this, void 0, void 0, function () {
362
+ return index.__generator(this, function (_a) {
363
+ return [2 /*return*/, this.send(ctx, index$1.distExports.Track, 'track')];
364
+ });
365
+ });
366
+ };
367
+ LegacyDestination.prototype.page = function (ctx) {
368
+ var _a;
369
+ return index.__awaiter(this, void 0, void 0, function () {
370
+ return index.__generator(this, function (_b) {
371
+ switch (_b.label) {
372
+ case 0:
373
+ if (((_a = this.integration) === null || _a === void 0 ? void 0 : _a._assumesPageview) && !this._initialized) {
374
+ this.integration.initialize();
375
+ }
376
+ return [4 /*yield*/, this.initializePromise.promise];
377
+ case 1:
378
+ _b.sent();
379
+ return [2 /*return*/, this.send(ctx, index$1.distExports.Page, 'page')];
380
+ }
381
+ });
382
+ });
383
+ };
384
+ LegacyDestination.prototype.identify = function (ctx) {
385
+ return index.__awaiter(this, void 0, void 0, function () {
386
+ return index.__generator(this, function (_a) {
387
+ return [2 /*return*/, this.send(ctx, index$1.distExports.Identify, 'identify')];
388
+ });
389
+ });
390
+ };
391
+ LegacyDestination.prototype.alias = function (ctx) {
392
+ return index.__awaiter(this, void 0, void 0, function () {
393
+ return index.__generator(this, function (_a) {
394
+ return [2 /*return*/, this.send(ctx, index$1.distExports.Alias, 'alias')];
395
+ });
396
+ });
397
+ };
398
+ LegacyDestination.prototype.group = function (ctx) {
399
+ return index.__awaiter(this, void 0, void 0, function () {
400
+ return index.__generator(this, function (_a) {
401
+ return [2 /*return*/, this.send(ctx, index$1.distExports.Group, 'group')];
402
+ });
403
+ });
404
+ };
405
+ LegacyDestination.prototype.scheduleFlush = function () {
406
+ var _this = this;
407
+ if (this.flushing) {
408
+ return;
409
+ }
410
+ // eslint-disable-next-line @typescript-eslint/no-misused-promises
411
+ setTimeout(function () { return index.__awaiter(_this, void 0, void 0, function () {
412
+ var _a;
413
+ return index.__generator(this, function (_b) {
414
+ switch (_b.label) {
415
+ case 0:
416
+ if (index$1.isOffline() || this._ready !== true || this._initialized !== true) {
417
+ this.scheduleFlush();
418
+ return [2 /*return*/];
419
+ }
420
+ this.flushing = true;
421
+ _a = this;
422
+ return [4 /*yield*/, flushQueue(this, this.buffer)];
423
+ case 1:
424
+ _a.buffer = _b.sent();
425
+ this.flushing = false;
426
+ if (this.buffer.todo > 0) {
427
+ this.scheduleFlush();
428
+ }
429
+ return [2 /*return*/];
430
+ }
431
+ });
432
+ }); }, Math.random() * 5000);
433
+ };
434
+ return LegacyDestination;
435
+ }());
436
+ function ajsDestinations(writeKey, settings, integrations, options, routingMiddleware, legacyIntegrationSources) {
437
+ var _a, _b;
438
+ if (integrations === void 0) { integrations = {}; }
439
+ if (options === void 0) { options = {}; }
440
+ if (index$1.isServer()) {
441
+ return [];
442
+ }
443
+ if (settings.plan) {
444
+ options = options !== null && options !== void 0 ? options : {};
445
+ options.plan = settings.plan;
446
+ }
447
+ var routingRules = (_b = (_a = settings.middlewareSettings) === null || _a === void 0 ? void 0 : _a.routingRules) !== null && _b !== void 0 ? _b : [];
448
+ var remoteIntegrationsConfig = settings.integrations;
449
+ var localIntegrationsConfig = options.integrations;
450
+ // merged remote CDN settings with user provided options
451
+ var integrationOptions = index$1.mergedOptions(settings, options !== null && options !== void 0 ? options : {});
452
+ var adhocIntegrationSources = legacyIntegrationSources === null || legacyIntegrationSources === void 0 ? void 0 : legacyIntegrationSources.reduce(function (acc, integrationSource) {
453
+ var _a;
454
+ return (index.__assign(index.__assign({}, acc), (_a = {}, _a[resolveIntegrationNameFromSource(integrationSource)] = integrationSource, _a)));
455
+ }, {});
456
+ var installableIntegrations = new Set(index.__spreadArray(index.__spreadArray([], Object.keys(remoteIntegrationsConfig).filter(function (name) {
457
+ return isInstallableIntegration(name, remoteIntegrationsConfig[name]);
458
+ }), true), Object.keys(adhocIntegrationSources || {}).filter(function (name) {
459
+ return index$1.isPlainObject(remoteIntegrationsConfig[name]) ||
460
+ index$1.isPlainObject(localIntegrationsConfig === null || localIntegrationsConfig === void 0 ? void 0 : localIntegrationsConfig[name]);
461
+ }), true));
462
+ return Array.from(installableIntegrations)
463
+ .filter(function (name) { return !isDisabledIntegration(name, integrations); })
464
+ .map(function (name) {
465
+ var integrationSettings = remoteIntegrationsConfig[name];
466
+ var version = resolveVersion(integrationSettings);
467
+ var destination = new LegacyDestination(name, version, writeKey, integrationOptions[name], options, adhocIntegrationSources === null || adhocIntegrationSources === void 0 ? void 0 : adhocIntegrationSources[name]);
468
+ var routing = routingRules.filter(function (rule) { return rule.destinationName === name; });
469
+ if (routing.length > 0 && routingMiddleware) {
470
+ destination.addMiddleware(routingMiddleware);
471
+ }
472
+ return destination;
473
+ });
474
+ }
475
+
476
+ exports.LegacyDestination = LegacyDestination;
477
+ exports.ajsDestinations = ajsDestinations;
@@ -1,17 +1,17 @@
1
1
  'use strict';
2
2
 
3
- var index$3 = require('./fthry_index.Cts348D4.js');
3
+ var index$3 = require('./fthry_index.Dn7k0XbZ.js');
4
4
  var React = require('react');
5
- var Placeholder = require('./fthry_Placeholder.BZUp2I1J.js');
6
- var InlineTooltip = require('./fthry_InlineTooltip.Ddh8_6aY.js');
5
+ var Placeholder = require('./fthry_Placeholder.CnNGDD_K.js');
6
+ var InlineTooltip = require('./fthry_InlineTooltip.Km0nxBV3.js');
7
7
  var clsx = require('./fthry_clsx.BtxeOLZW.js');
8
8
  var ReactJSXRuntime = require('react/jsx-runtime');
9
9
  var ReactDOM = require('react-dom');
10
- var input = require('./fthry_input.C3lHXfth.js');
10
+ var input = require('./fthry_input.DJaKnXqS.js');
11
11
  require('react-dom/client');
12
12
  require('jszip');
13
- require('./fthry_Overlay.Bd1qiy6-.js');
14
- require('./fthry_index.Wf6EoIZb.js');
13
+ require('./fthry_Overlay.ChABiy0m.js');
14
+ require('./fthry_index.WbKUUcdS.js');
15
15
 
16
16
  function _interopNamespaceDefault(e) {
17
17
  var n = Object.create(null);
@@ -1,14 +1,14 @@
1
1
  'use strict';
2
2
 
3
- var index$1 = require('./fthry_index.Cts348D4.js');
3
+ var index$1 = require('./fthry_index.Dn7k0XbZ.js');
4
4
  var React = require('react');
5
- var Placeholder = require('./fthry_Placeholder.BZUp2I1J.js');
6
- var InlineTooltip = require('./fthry_InlineTooltip.Ddh8_6aY.js');
5
+ var Placeholder = require('./fthry_Placeholder.CnNGDD_K.js');
6
+ var InlineTooltip = require('./fthry_InlineTooltip.Km0nxBV3.js');
7
7
  require('react/jsx-runtime');
8
8
  require('react-dom/client');
9
9
  require('jszip');
10
10
  require('react-dom');
11
- require('./fthry_Overlay.Bd1qiy6-.js');
11
+ require('./fthry_Overlay.ChABiy0m.js');
12
12
 
13
13
  function TextArea(_a) {
14
14
  var element = _a.element, responsiveStyles = _a.responsiveStyles, fieldLabel = _a.fieldLabel, _b = _a.elementProps, elementProps = _b === void 0 ? {} : _b, _c = _a.required, required = _c === void 0 ? false : _c, _d = _a.disabled, disabled = _d === void 0 ? false : _d, editMode = _a.editMode, _e = _a.onChange, onChange = _e === void 0 ? function () { } : _e, _f = _a.setRef, setRef = _f === void 0 ? function () { } : _f, _g = _a.rawValue, rawValue = _g === void 0 ? '' : _g, inlineError = _a.inlineError, _h = _a.repeatIndex, repeatIndex = _h === void 0 ? null : _h, children = _a.children;
@@ -0,0 +1,73 @@
1
+ 'use strict';
2
+
3
+ var index = require('./fthry_index.Dn7k0XbZ.js');
4
+ var index$1 = require('./fthry_index.B76xVeoK.js');
5
+ require('react/jsx-runtime');
6
+ require('react');
7
+ require('react-dom/client');
8
+ require('jszip');
9
+ require('react-dom');
10
+
11
+ function remoteMiddlewares(ctx, settings, obfuscate) {
12
+ var _a;
13
+ return index.__awaiter(this, void 0, void 0, function () {
14
+ var path, remoteMiddleware, names, scripts, middleware;
15
+ var _this = this;
16
+ return index.__generator(this, function (_b) {
17
+ switch (_b.label) {
18
+ case 0:
19
+ if (index$1.isServer()) {
20
+ return [2 /*return*/, []];
21
+ }
22
+ path = index$1.getNextIntegrationsURL();
23
+ remoteMiddleware = (_a = settings.enabledMiddleware) !== null && _a !== void 0 ? _a : {};
24
+ names = Object.entries(remoteMiddleware)
25
+ .filter(function (_a) {
26
+ _a[0]; var enabled = _a[1];
27
+ return enabled;
28
+ })
29
+ .map(function (_a) {
30
+ var name = _a[0];
31
+ return name;
32
+ });
33
+ scripts = names.map(function (name) { return index.__awaiter(_this, void 0, void 0, function () {
34
+ var nonNamespaced, bundleName, fullPath, error_1;
35
+ return index.__generator(this, function (_a) {
36
+ switch (_a.label) {
37
+ case 0:
38
+ nonNamespaced = name.replace('@segment/', '');
39
+ bundleName = nonNamespaced;
40
+ if (obfuscate) {
41
+ bundleName = btoa(nonNamespaced).replace(/=/g, '');
42
+ }
43
+ fullPath = "".concat(path, "/middleware/").concat(bundleName, "/latest/").concat(bundleName, ".js.gz");
44
+ _a.label = 1;
45
+ case 1:
46
+ _a.trys.push([1, 3, , 4]);
47
+ return [4 /*yield*/, index$1.loadScript(fullPath)
48
+ // @ts-ignore
49
+ ];
50
+ case 2:
51
+ _a.sent();
52
+ // @ts-ignore
53
+ return [2 /*return*/, window["".concat(nonNamespaced, "Middleware")]];
54
+ case 3:
55
+ error_1 = _a.sent();
56
+ ctx.log('error', error_1);
57
+ ctx.stats.increment('failed_remote_middleware');
58
+ return [3 /*break*/, 4];
59
+ case 4: return [2 /*return*/];
60
+ }
61
+ });
62
+ }); });
63
+ return [4 /*yield*/, Promise.all(scripts)];
64
+ case 1:
65
+ middleware = _b.sent();
66
+ middleware = middleware.filter(Boolean);
67
+ return [2 /*return*/, middleware];
68
+ }
69
+ });
70
+ });
71
+ }
72
+
73
+ exports.remoteMiddlewares = remoteMiddlewares;