@feathery/react 2.48.1 → 2.50.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 (193) hide show
  1. package/cjs/Form/grid/Container/index.d.ts.map +1 -1
  2. package/cjs/Form/grid/StyledContainer/utils.d.ts.map +1 -1
  3. package/cjs/elements/basic/ButtonElement.d.ts.map +1 -1
  4. package/cjs/elements/basic/TableElement/EditableCell.d.ts +5 -2
  5. package/cjs/elements/basic/TableElement/EditableCell.d.ts.map +1 -1
  6. package/cjs/elements/basic/TableElement/index.d.ts.map +1 -1
  7. package/cjs/elements/basic/TableElement/styles.d.ts +0 -23
  8. package/cjs/elements/basic/TableElement/styles.d.ts.map +1 -1
  9. package/cjs/elements/basic/TableElement/types.d.ts +4 -0
  10. package/cjs/elements/basic/TableElement/types.d.ts.map +1 -1
  11. package/cjs/elements/basic/TableElement/useTableMutations.d.ts +0 -1
  12. package/cjs/elements/basic/TableElement/useTableMutations.d.ts.map +1 -1
  13. package/cjs/elements/basic/TableElement/utils.d.ts +14 -0
  14. package/cjs/elements/basic/TableElement/utils.d.ts.map +1 -1
  15. package/cjs/elements/components/HoverTooltip.d.ts +24 -0
  16. package/cjs/elements/components/HoverTooltip.d.ts.map +1 -0
  17. package/cjs/elements/components/InlineTooltip.d.ts.map +1 -1
  18. package/cjs/elements/components/Overlay.d.ts +1 -1
  19. package/cjs/elements/components/Overlay.d.ts.map +1 -1
  20. package/cjs/elements/components/QuikFormViewer.d.ts.map +1 -1
  21. package/cjs/elements/components/TextHoverTooltip.d.ts.map +1 -1
  22. package/cjs/elements/components/Tooltip.d.ts +2 -1
  23. package/cjs/elements/components/Tooltip.d.ts.map +1 -1
  24. package/cjs/{fthry_AssistantChat.BjyKdtNo.js → fthry_AssistantChat.BT32wDG3.js} +4 -4
  25. package/cjs/{fthry_FormControl.Bjj4gcfs.js → fthry_FormControl.D4ekieUI.js} +1 -1
  26. package/cjs/{fthry_InlineTooltip.D5tgdB4g.js → fthry_InlineTooltip.D5NfxKVo.js} +2 -16
  27. package/cjs/{fthry_PaymentMethodField.Cx5IV_Aw.js → fthry_PaymentMethodField.vpxb_M9_.js} +3 -4
  28. package/cjs/{fthry_Placeholder.BeZ9F1hP.js → fthry_Placeholder.hq6Cgqjd.js} +1 -1
  29. package/cjs/{fthry_ShowEyeIcon.DO1SzK0H.js → fthry_ShowEyeIcon.C-wsnI6q.js} +1 -1
  30. package/cjs/{fthry_TabsElement.C1KUbyBb.js → fthry_TabsElement.BHVCgyd9.js} +1 -1
  31. package/cjs/{fthry_auto-track.CJBR_dw-.js → fthry_auto-track.g9k-T7sJ.js} +2 -2
  32. package/cjs/{fthry_highlighted-body-TPN3WLV5.BdAGVyam.js → fthry_highlighted-body-TPN3WLV5.CaePR3vZ.js} +3 -3
  33. package/cjs/{fthry_index.C0KW8hya.js → fthry_index.B5pgafIl.js} +2 -2
  34. package/cjs/{fthry_index.BpZi8dM4.js → fthry_index.BDV7qf2C.js} +5 -6
  35. package/cjs/{fthry_index.BhoKqCQO.js → fthry_index.BLKRQSHw.js} +2 -2
  36. package/cjs/{fthry_index.BWAq_scB.js → fthry_index.BcQE05aQ.js} +2 -2
  37. package/cjs/{fthry_index.C78x3b5O.js → fthry_index.BdAvU9aA.js} +5 -6
  38. package/cjs/{fthry_index.6SblfScs.js → fthry_index.BdOfkVzz.js} +2 -2
  39. package/cjs/{fthry_index.CjM_QMbB.js → fthry_index.BfD3esIa.js} +2 -2
  40. package/cjs/{fthry_index.BvriCG1q.js → fthry_index.BiCUy3Q2.js} +1 -1
  41. package/cjs/{fthry_index.CwpWkape.js → fthry_index.BldM4IKR.js} +343 -52
  42. package/cjs/{fthry_index.DRA1vbTd.js → fthry_index.ByQJ8Db5.js} +10 -10
  43. package/cjs/{fthry_index.97eysi95.js → fthry_index.C6YeHjI_.js} +5 -6
  44. package/cjs/{fthry_index.CqC7Lj7F.js → fthry_index.CNXv_44w.js} +5 -6
  45. package/cjs/{fthry_index.BOexWQ2G.js → fthry_index.COg3w9c8.js} +1 -1
  46. package/cjs/{fthry_index.CU2qYyyW.js → fthry_index.CSq9ML1V.js} +2 -2
  47. package/cjs/{fthry_index.B1e00tAu.js → fthry_index.CW8fXwgP.js} +6 -7
  48. package/cjs/{fthry_index.CeWHxiu2.js → fthry_index.CX5Tx1di.js} +3 -4
  49. package/cjs/{fthry_index.CGzU2RS3.js → fthry_index.Cb-o7T3I.js} +1 -1
  50. package/cjs/{fthry_index.DghgxDID.js → fthry_index.ClbpUjqu.js} +8 -9
  51. package/cjs/{fthry_index.DyPl9RTy.js → fthry_index.Cn-052XC.js} +1 -1
  52. package/cjs/{fthry_index.Bkg_JW4Z.js → fthry_index.D3svtoqj.js} +4 -5
  53. package/cjs/{fthry_index.BbZu0dS9.js → fthry_index.D42pyZzz.js} +3 -4
  54. package/cjs/{fthry_index.WdgJ-r5S.js → fthry_index.DAY5VW01.js} +5 -6
  55. package/cjs/{fthry_index.SMUP75Ic.js → fthry_index.DgVU5DPg.js} +3 -3
  56. package/cjs/{fthry_index.O5z58cdJ.js → fthry_index.DjKuHZML.js} +4 -5
  57. package/cjs/{fthry_index.duLdHjUv.js → fthry_index.DpQfBE8n.js} +151 -141
  58. package/cjs/{fthry_index.B3VA122M.js → fthry_index.DqCigvUs.js} +1 -1
  59. package/cjs/{fthry_index.foJzYyYX.js → fthry_index.QAttsABq.js} +1 -1
  60. package/cjs/{fthry_index.CeKZIDEV.js → fthry_index.QRzfI0b4.js} +3 -18
  61. package/cjs/{fthry_index.ycfNh9WZ.js → fthry_index.m_XKSVM8.js} +1 -1
  62. package/cjs/{fthry_index.Dhp1zjHK.js → fthry_index.s2Ah9v4O.js} +1 -1
  63. package/cjs/{fthry_index.CRXRQpkJ.js → fthry_index.u0sKUa7-.js} +1 -1
  64. package/cjs/{fthry_index.umd.B7oz9tEv.js → fthry_index.umd.Cl6yVNEY.js} +1 -1
  65. package/cjs/{fthry_input.BFEJqFg2.js → fthry_input.CzTMRvUa.js} +1 -1
  66. package/cjs/{fthry_mermaid-O7DHMXV3.-sm2XLZv.js → fthry_mermaid-O7DHMXV3.1Tp00mbG.js} +3 -3
  67. package/cjs/{fthry_script.CrJCYCaD.js → fthry_script.B2r1qN9_.js} +1 -1
  68. package/cjs/{fthry_styles.CBI9OfcR.js → fthry_styles.BcMEcBUF.js} +1 -1
  69. package/cjs/{fthry_useElementSize.Dq3fkD_k.js → fthry_useElementSize.91AcUxkY.js} +1 -1
  70. package/cjs/{fthry_useSalesforceSync.DkO47B4_.js → fthry_useSalesforceSync.BQORLqHu.js} +1 -1
  71. package/cjs/{fthry_webfontloader.BbP2ET0j.js → fthry_webfontloader.DbJc3-T2.js} +1 -1
  72. package/cjs/index.js +1 -1
  73. package/cjs/thumbnail-renderer.js +1 -1
  74. package/cjs/types/Form.d.ts +3 -0
  75. package/cjs/types/Form.d.ts.map +1 -1
  76. package/cjs/utils/featheryClient/index.d.ts.map +1 -1
  77. package/dist/Form/grid/Container/index.d.ts.map +1 -1
  78. package/dist/Form/grid/StyledContainer/utils.d.ts.map +1 -1
  79. package/dist/elements/basic/ButtonElement.d.ts.map +1 -1
  80. package/dist/elements/basic/TableElement/EditableCell.d.ts +5 -2
  81. package/dist/elements/basic/TableElement/EditableCell.d.ts.map +1 -1
  82. package/dist/elements/basic/TableElement/index.d.ts.map +1 -1
  83. package/dist/elements/basic/TableElement/styles.d.ts +0 -23
  84. package/dist/elements/basic/TableElement/styles.d.ts.map +1 -1
  85. package/dist/elements/basic/TableElement/tests/EditableCell.spec.d.ts +2 -0
  86. package/dist/elements/basic/TableElement/tests/EditableCell.spec.d.ts.map +1 -0
  87. package/dist/elements/basic/TableElement/tests/TableElement.spec.d.ts +2 -0
  88. package/dist/elements/basic/TableElement/tests/TableElement.spec.d.ts.map +1 -0
  89. package/dist/elements/basic/TableElement/tests/tabNavigation.spec.d.ts +2 -0
  90. package/dist/elements/basic/TableElement/tests/tabNavigation.spec.d.ts.map +1 -0
  91. package/dist/elements/basic/TableElement/types.d.ts +4 -0
  92. package/dist/elements/basic/TableElement/types.d.ts.map +1 -1
  93. package/dist/elements/basic/TableElement/useTableMutations.d.ts +0 -1
  94. package/dist/elements/basic/TableElement/useTableMutations.d.ts.map +1 -1
  95. package/dist/elements/basic/TableElement/utils.d.ts +14 -0
  96. package/dist/elements/basic/TableElement/utils.d.ts.map +1 -1
  97. package/dist/elements/components/HoverTooltip.d.ts +24 -0
  98. package/dist/elements/components/HoverTooltip.d.ts.map +1 -0
  99. package/dist/elements/components/InlineTooltip.d.ts.map +1 -1
  100. package/dist/elements/components/Overlay.d.ts +1 -1
  101. package/dist/elements/components/Overlay.d.ts.map +1 -1
  102. package/dist/elements/components/QuikFormViewer.d.ts.map +1 -1
  103. package/dist/elements/components/TextHoverTooltip.d.ts.map +1 -1
  104. package/dist/elements/components/Tooltip.d.ts +2 -1
  105. package/dist/elements/components/Tooltip.d.ts.map +1 -1
  106. package/dist/{fthry_AssistantChat.h6NTcnjr.js → fthry_AssistantChat.BxCe9PjE.js} +4 -4
  107. package/dist/{fthry_FormControl.DQP6LlCL.js → fthry_FormControl.BpMXWUv6.js} +1 -1
  108. package/dist/{fthry_InlineTooltip.DUtqoLti.js → fthry_InlineTooltip.Brp4oi0p.js} +2 -16
  109. package/dist/{fthry_PaymentMethodField.DoX9prJ2.js → fthry_PaymentMethodField.0oIU1B6N.js} +3 -4
  110. package/dist/{fthry_Placeholder.DIKXUrCe.js → fthry_Placeholder.CEPxPTLL.js} +1 -1
  111. package/dist/{fthry_ShowEyeIcon.BsDiRWJb.js → fthry_ShowEyeIcon.BWU3OOxh.js} +1 -1
  112. package/dist/{fthry_TabsElement.JCYNaBSd.js → fthry_TabsElement.DFuHUYUv.js} +1 -1
  113. package/dist/{fthry_auto-track.CZcLqilZ.js → fthry_auto-track.CizHo0k5.js} +2 -2
  114. package/dist/{fthry_highlighted-body-TPN3WLV5.DwNcoR0j.js → fthry_highlighted-body-TPN3WLV5.DDCKzqBt.js} +3 -3
  115. package/dist/{fthry_index.BD5OtLZc.js → fthry_index.-GpsDCwK.js} +3 -4
  116. package/dist/{fthry_index.mEvi-eyb.js → fthry_index.6wMTFMTj.js} +152 -142
  117. package/dist/{fthry_index.BKjEGHR_.js → fthry_index.BDSy9TBV.js} +4 -5
  118. package/dist/{fthry_index.BXqHrLYx.js → fthry_index.BeEYTrUw.js} +2 -2
  119. package/dist/{fthry_index.D48zqV-m.js → fthry_index.Bmr2qAQ9.js} +1 -1
  120. package/dist/{fthry_index.INdwJAsd.js → fthry_index.Bn_DZ8s-.js} +2 -2
  121. package/dist/{fthry_index.k3Hq7wKG.js → fthry_index.Bs0b7fF8.js} +1 -1
  122. package/dist/{fthry_index.C9bj3Amt.js → fthry_index.ByfmNWHm.js} +2 -2
  123. package/dist/{fthry_index.BFPFVaWv.js → fthry_index.C-3BwV3D.js} +1 -1
  124. package/dist/{fthry_index.dmme1I7g.js → fthry_index.CEFYX7Cb.js} +1 -1
  125. package/dist/{fthry_index.D9kooW59.js → fthry_index.CKyEKNhB.js} +3 -4
  126. package/dist/{fthry_index.BkzGvVg2.js → fthry_index.CV6KaQP2.js} +3 -18
  127. package/dist/{fthry_index.KFRNwcZ_.js → fthry_index.CXvBwACd.js} +1 -1
  128. package/dist/{fthry_index.CHb07pX6.js → fthry_index.CgeOgf6v.js} +7 -8
  129. package/dist/{fthry_index.C2QdbMzv.js → fthry_index.Cl0vinm2.js} +2 -2
  130. package/dist/{fthry_index.BgCJlRTN.js → fthry_index.DD4JAsd0.js} +3 -3
  131. package/dist/{fthry_index.DHIhJeBb.js → fthry_index.DF33pFg0.js} +2 -2
  132. package/dist/{fthry_index.CPrLJ4J-.js → fthry_index.DZYRCGrF.js} +5 -6
  133. package/dist/{fthry_index.CuFf_oA3.js → fthry_index.DjeCrTPA.js} +1 -1
  134. package/dist/{fthry_index.Bl_YFFMi.js → fthry_index.DkB3n_gE.js} +4 -5
  135. package/dist/{fthry_index.Bfo0vjcQ.js → fthry_index.DtEJ8UnC.js} +4 -5
  136. package/dist/{fthry_index.DW4ZEycb.js → fthry_index.DuFXqlIh.js} +4 -5
  137. package/dist/{fthry_index.CCyrVDsN.js → fthry_index.Gk4XHc2v.js} +4 -5
  138. package/dist/{fthry_index.DNmwwxoZ.js → fthry_index.HfY_xMXi.js} +10 -10
  139. package/dist/{fthry_index.DZPtLmTA.js → fthry_index.Tz4wWr5G.js} +5 -6
  140. package/dist/{fthry_index.B21PnTei.js → fthry_index.UaQC1EFo.js} +341 -53
  141. package/dist/{fthry_index.B4uTV15J.js → fthry_index.UqBNOqYF.js} +1 -1
  142. package/dist/{fthry_index.C75qxU8Z.js → fthry_index.X-5RnKbv.js} +1 -1
  143. package/dist/{fthry_index.By9XI2Se.js → fthry_index.caHStIvy.js} +1 -1
  144. package/dist/{fthry_index.Br_wsbaD.js → fthry_index.l3GNavsZ.js} +5 -6
  145. package/dist/{fthry_index.umd.CNiEdJLO.js → fthry_index.umd.zD2ytPrK.js} +1 -1
  146. package/dist/{fthry_index.B03qg4WP.js → fthry_index.wOe1Wv1J.js} +2 -2
  147. package/dist/{fthry_input.C13Hy41e.js → fthry_input.vNAUHsdE.js} +1 -1
  148. package/dist/fthry_mermaid-O7DHMXV3.C6znNgyC.js +8 -0
  149. package/dist/{fthry_script.DG-h2qqu.js → fthry_script.ClnRFan9.js} +1 -1
  150. package/dist/{fthry_styles.BbfFntw_.js → fthry_styles.NzBPYPQ9.js} +1 -1
  151. package/dist/{fthry_useElementSize.Bvu4QN6c.js → fthry_useElementSize.CGVQMCbV.js} +1 -1
  152. package/dist/{fthry_useSalesforceSync.DxPyrYOH.js → fthry_useSalesforceSync.DDPGKOl4.js} +1 -1
  153. package/dist/{fthry_webfontloader.BZH4UrSE.js → fthry_webfontloader.BY0qufCl.js} +1 -1
  154. package/dist/index.js +2 -2
  155. package/dist/thumbnail-renderer.js +1 -1
  156. package/dist/types/Form.d.ts +3 -0
  157. package/dist/types/Form.d.ts.map +1 -1
  158. package/dist/utils/featheryClient/index.d.ts.map +1 -1
  159. package/package.json +1 -1
  160. package/umd/AddressField.4a4788a40afba5fc22d2.js +1 -0
  161. package/umd/ButtonGroupField.fcf087a9664e14da7fc5.js +1 -0
  162. package/umd/CheckboxGroupField.7b055043cbd1ef8b3787.js +1 -0
  163. package/umd/DateSelectorField.b87988253da02a40c6f7.js +1 -0
  164. package/umd/DropdownField.459ba798e2ff6a8518c2.js +1 -0
  165. package/umd/DropdownMultiField.ad59b04c5e3c1ad1a6e8.js +1 -0
  166. package/umd/MatrixField.6541a0f9570b2c56e336.js +1 -0
  167. package/umd/PasswordField.fb8f587107389274112e.js +1 -0
  168. package/umd/PaymentMethodField.f6820da8252bb2eed6b1.js +1 -0
  169. package/umd/PhoneField.a161db93d8f815ced395.js +1 -0
  170. package/umd/RadioButtonGroupField.9a43334b87129e33afd2.js +1 -0
  171. package/umd/TableElement.f51ba6d3b0a6c7835187.js +1 -0
  172. package/umd/TextArea.8341b3d302383a53175d.js +1 -0
  173. package/umd/TextField.fa9f11c4b1fab1747ae1.js +1 -0
  174. package/umd/index.js +1 -1
  175. package/cjs/fthry_Overlay.DLteVVAy.js +0 -231
  176. package/dist/fthry_Overlay.DjQfEgir.js +0 -228
  177. package/dist/fthry_mermaid-O7DHMXV3.rQggAcUJ.js +0 -8
  178. package/umd/277.1a33ea06f86326613fcb.js +0 -1
  179. package/umd/664.4a3ec465094a3d59c184.js +0 -1
  180. package/umd/AddressField.648b3da916171008dc9f.js +0 -1
  181. package/umd/ButtonGroupField.d39ac976a6dee9ef593a.js +0 -1
  182. package/umd/CheckboxGroupField.e495eb152c4faa000d4b.js +0 -1
  183. package/umd/DateSelectorField.e702b3e6b0a5b498c824.js +0 -1
  184. package/umd/DropdownField.d1a234d236d9989bbf20.js +0 -1
  185. package/umd/DropdownMultiField.5b4e24025035f1678c83.js +0 -1
  186. package/umd/MatrixField.bcd6f58ea1896f386988.js +0 -1
  187. package/umd/PasswordField.593d7b7d3d954634fa30.js +0 -1
  188. package/umd/PaymentMethodField.8e4fd6353793eaaa2b5b.js +0 -1
  189. package/umd/PhoneField.861b99c7e81b4b9c8648.js +0 -1
  190. package/umd/RadioButtonGroupField.7a333a6f7e578a181a98.js +0 -1
  191. package/umd/TableElement.8c0bec8400517f135fe6.js +0 -1
  192. package/umd/TextArea.04335be4f0f0d6c0cc1a.js +0 -1
  193. package/umd/TextField.749931ebb258bf38e007.js +0 -1
@@ -1,231 +0,0 @@
1
- 'use strict';
2
-
3
- var index = require('./fthry_index.CwpWkape.js');
4
- var React = require('react');
5
- var ReactDOM = require('react-dom');
6
-
7
- var Tooltip = function (_a) {
8
- var children = _a.children, css = _a.css, props = index.__rest(_a, ["children", "css"]);
9
- return (index.jsx("div", index.__assign({ css: index.__assign({ zIndex: index.FORM_Z_INDEX + 1, padding: '.4rem 0', transition: 'opacity .10s linear', '.tooltip-inner': {
10
- maxWidth: '200px',
11
- padding: '.25rem .5rem',
12
- color: '#fff',
13
- textAlign: 'center',
14
- backgroundColor: '#000',
15
- borderRadius: '.25rem',
16
- fontSize: 'smaller'
17
- } }, css) }, props, { children: index.jsx("div", index.__assign({ className: 'tooltip-inner' }, { children: children })) })));
18
- };
19
-
20
- var Overlay = function (_a) {
21
- var show = _a.show, targetRef = _a.targetRef, children = _a.children, onHide = _a.onHide, _b = _a.placement, placement = _b === void 0 ? 'bottom-start' : _b, _c = _a.offset, offset = _c === void 0 ? 0 : _c, _d = _a.zIndex, zIndex = _d === void 0 ? 1000 : _d, containerRef = _a.containerRef;
22
- var ref = React.useRef(null);
23
- var _e = index.__read(React.useState(null), 2), position = _e[0], setPosition = _e[1];
24
- var getContainer = React.useCallback(function () {
25
- return (containerRef === null || containerRef === void 0 ? void 0 : containerRef.current) || index.featheryDoc().body;
26
- }, [containerRef]);
27
- var recalcPosition = React.useCallback(function () {
28
- var _a;
29
- if (!show || !targetRef.current || !ref.current)
30
- return;
31
- var window = index.featheryWindow();
32
- var container = getContainer();
33
- if (!container)
34
- return;
35
- var targetRect = targetRef.current.getBoundingClientRect();
36
- var overlayRect = ref.current.getBoundingClientRect();
37
- var containerRect = container.getBoundingClientRect();
38
- var _b = calcPosition(placement, targetRect, overlayRect, offset), top = _b.top, left = _b.left;
39
- // Flip if it doesn’t fit
40
- var overlayBottom = top + overlayRect.height;
41
- var overlayRight = left + overlayRect.width;
42
- var fitsVertically = top >= 0 && overlayBottom <= window.innerHeight;
43
- var fitsHorizontally = left >= 0 && overlayRight <= window.innerWidth;
44
- if (!fitsVertically || !fitsHorizontally) {
45
- var flipped = getFlippedPlacement(placement, !fitsVertically, !fitsHorizontally);
46
- if (flipped !== placement) {
47
- (_a = calcPosition(flipped, targetRect, overlayRect, offset), top = _a.top, left = _a.left);
48
- }
49
- }
50
- var isBodyContainer = container === index.featheryDoc().body;
51
- var finalTop = isBodyContainer
52
- ? top + window.scrollY
53
- : top - containerRect.top;
54
- var finalLeft = isBodyContainer
55
- ? left + window.scrollX
56
- : left - containerRect.left;
57
- setPosition(function (prev) {
58
- if (!prev || prev.top !== finalTop || prev.left !== finalLeft) {
59
- return { top: finalTop, left: finalLeft };
60
- }
61
- return prev;
62
- });
63
- }, [show, placement, offset, getContainer, targetRef]);
64
- var throttledRecalc = React.useCallback(function () {
65
- var ticking = false;
66
- return function () {
67
- if (!ticking) {
68
- ticking = true;
69
- requestAnimationFrame(function () {
70
- recalcPosition();
71
- ticking = false;
72
- });
73
- }
74
- };
75
- }, [recalcPosition])();
76
- React.useLayoutEffect(function () {
77
- if (show)
78
- recalcPosition();
79
- }, [show, recalcPosition]);
80
- React.useEffect(function () {
81
- if (!show)
82
- return;
83
- var window = index.featheryWindow();
84
- var container = getContainer();
85
- if (!container)
86
- return;
87
- window.addEventListener('resize', throttledRecalc);
88
- window.addEventListener('scroll', throttledRecalc, true);
89
- if (container !== index.featheryDoc().body) {
90
- container.addEventListener('scroll', throttledRecalc);
91
- }
92
- var resizeObserver = new ResizeObserver(function () { return throttledRecalc(); });
93
- if (targetRef.current)
94
- resizeObserver.observe(targetRef.current);
95
- if (container !== index.featheryDoc().body)
96
- resizeObserver.observe(container);
97
- return function () {
98
- window.removeEventListener('resize', throttledRecalc);
99
- window.removeEventListener('scroll', throttledRecalc, true);
100
- if (container !== index.featheryDoc().body) {
101
- container.removeEventListener('scroll', throttledRecalc);
102
- }
103
- resizeObserver.disconnect();
104
- };
105
- }, [show, throttledRecalc, getContainer, targetRef]);
106
- React.useEffect(function () {
107
- if (!show)
108
- return;
109
- var handleKeyDown = function (event) {
110
- if (event.key === 'Escape') {
111
- setPosition(null);
112
- onHide === null || onHide === void 0 ? void 0 : onHide();
113
- }
114
- };
115
- var handleClickOutside = function (event) {
116
- var target = event.target;
117
- if (ref.current &&
118
- !ref.current.contains(target) &&
119
- targetRef.current &&
120
- !targetRef.current.contains(target)) {
121
- setPosition(null);
122
- onHide === null || onHide === void 0 ? void 0 : onHide();
123
- }
124
- };
125
- var doc = index.featheryDoc();
126
- doc.addEventListener('mousedown', handleClickOutside);
127
- doc.addEventListener('keydown', handleKeyDown);
128
- return function () {
129
- doc.removeEventListener('mousedown', handleClickOutside);
130
- doc.removeEventListener('keydown', handleKeyDown);
131
- };
132
- }, [show, onHide, targetRef]);
133
- if (!show)
134
- return null;
135
- var container = getContainer();
136
- if (!container)
137
- return index.jsx(index.Fragment, { children: children });
138
- return ReactDOM.createPortal(index.jsx("div", index.__assign({ ref: ref, style: index.__assign(index.__assign({ position: 'absolute' }, (position || { top: -9999, left: -9999 })), { zIndex: zIndex }) }, { children: children })), container);
139
- };
140
- var getFlippedPlacement = function (original, needsVerticalFlip, needsHorizontalFlip) {
141
- if (needsVerticalFlip) {
142
- if (original.includes('top')) {
143
- return original.replace('top', 'bottom');
144
- }
145
- if (original.includes('bottom')) {
146
- return original.replace('bottom', 'top');
147
- }
148
- }
149
- if (needsHorizontalFlip) {
150
- if (original.includes('left')) {
151
- return original.replace('left', 'right');
152
- }
153
- if (original.includes('right')) {
154
- return original.replace('right', 'left');
155
- }
156
- }
157
- return original;
158
- };
159
- var calcPosition = function (pl, targetRect, overlayRect, offset) {
160
- if (offset === void 0) { offset = 0; }
161
- switch (pl) {
162
- case 'top':
163
- return {
164
- top: targetRect.top - overlayRect.height - offset,
165
- left: targetRect.left + (targetRect.width - overlayRect.width) / 2
166
- };
167
- case 'top-start':
168
- return {
169
- top: targetRect.top - overlayRect.height - offset,
170
- left: targetRect.left
171
- };
172
- case 'top-end':
173
- return {
174
- top: targetRect.top - overlayRect.height - offset,
175
- left: targetRect.right - overlayRect.width
176
- };
177
- case 'left':
178
- return {
179
- top: targetRect.top + (targetRect.height - overlayRect.height) / 2,
180
- left: targetRect.left - overlayRect.width - offset
181
- };
182
- case 'left-start':
183
- return {
184
- top: targetRect.top,
185
- left: targetRect.left - overlayRect.width - offset
186
- };
187
- case 'left-end':
188
- return {
189
- top: targetRect.bottom - overlayRect.height,
190
- left: targetRect.left - overlayRect.width - offset
191
- };
192
- case 'bottom':
193
- return {
194
- top: targetRect.bottom + offset,
195
- left: targetRect.left + (targetRect.width - overlayRect.width) / 2
196
- };
197
- case 'bottom-start':
198
- return {
199
- top: targetRect.bottom + offset,
200
- left: targetRect.left
201
- };
202
- case 'bottom-end':
203
- return {
204
- top: targetRect.bottom + offset,
205
- left: targetRect.right - overlayRect.width
206
- };
207
- case 'right':
208
- return {
209
- top: targetRect.top + (targetRect.height - overlayRect.height) / 2,
210
- left: targetRect.right + offset
211
- };
212
- case 'right-start':
213
- return {
214
- top: targetRect.top,
215
- left: targetRect.right + offset
216
- };
217
- case 'right-end':
218
- return {
219
- top: targetRect.bottom - overlayRect.height,
220
- left: targetRect.right + offset
221
- };
222
- default:
223
- return {
224
- top: targetRect.bottom + offset,
225
- left: targetRect.left + (targetRect.width - overlayRect.width) / 2
226
- };
227
- }
228
- };
229
-
230
- exports.Overlay = Overlay;
231
- exports.Tooltip = Tooltip;
@@ -1,228 +0,0 @@
1
- import { q as __rest, j as jsx, _ as __assign, p as FORM_Z_INDEX, e as __read, z as featheryDoc, w as featheryWindow, x as Fragment } from './fthry_index.B21PnTei.js';
2
- import { useRef, useState, useCallback, useLayoutEffect, useEffect } from 'react';
3
- import { createPortal } from 'react-dom';
4
-
5
- var Tooltip = function (_a) {
6
- var children = _a.children, css = _a.css, props = __rest(_a, ["children", "css"]);
7
- return (jsx("div", __assign({ css: __assign({ zIndex: FORM_Z_INDEX + 1, padding: '.4rem 0', transition: 'opacity .10s linear', '.tooltip-inner': {
8
- maxWidth: '200px',
9
- padding: '.25rem .5rem',
10
- color: '#fff',
11
- textAlign: 'center',
12
- backgroundColor: '#000',
13
- borderRadius: '.25rem',
14
- fontSize: 'smaller'
15
- } }, css) }, props, { children: jsx("div", __assign({ className: 'tooltip-inner' }, { children: children })) })));
16
- };
17
-
18
- var Overlay = function (_a) {
19
- var show = _a.show, targetRef = _a.targetRef, children = _a.children, onHide = _a.onHide, _b = _a.placement, placement = _b === void 0 ? 'bottom-start' : _b, _c = _a.offset, offset = _c === void 0 ? 0 : _c, _d = _a.zIndex, zIndex = _d === void 0 ? 1000 : _d, containerRef = _a.containerRef;
20
- var ref = useRef(null);
21
- var _e = __read(useState(null), 2), position = _e[0], setPosition = _e[1];
22
- var getContainer = useCallback(function () {
23
- return (containerRef === null || containerRef === void 0 ? void 0 : containerRef.current) || featheryDoc().body;
24
- }, [containerRef]);
25
- var recalcPosition = useCallback(function () {
26
- var _a;
27
- if (!show || !targetRef.current || !ref.current)
28
- return;
29
- var window = featheryWindow();
30
- var container = getContainer();
31
- if (!container)
32
- return;
33
- var targetRect = targetRef.current.getBoundingClientRect();
34
- var overlayRect = ref.current.getBoundingClientRect();
35
- var containerRect = container.getBoundingClientRect();
36
- var _b = calcPosition(placement, targetRect, overlayRect, offset), top = _b.top, left = _b.left;
37
- // Flip if it doesn’t fit
38
- var overlayBottom = top + overlayRect.height;
39
- var overlayRight = left + overlayRect.width;
40
- var fitsVertically = top >= 0 && overlayBottom <= window.innerHeight;
41
- var fitsHorizontally = left >= 0 && overlayRight <= window.innerWidth;
42
- if (!fitsVertically || !fitsHorizontally) {
43
- var flipped = getFlippedPlacement(placement, !fitsVertically, !fitsHorizontally);
44
- if (flipped !== placement) {
45
- (_a = calcPosition(flipped, targetRect, overlayRect, offset), top = _a.top, left = _a.left);
46
- }
47
- }
48
- var isBodyContainer = container === featheryDoc().body;
49
- var finalTop = isBodyContainer
50
- ? top + window.scrollY
51
- : top - containerRect.top;
52
- var finalLeft = isBodyContainer
53
- ? left + window.scrollX
54
- : left - containerRect.left;
55
- setPosition(function (prev) {
56
- if (!prev || prev.top !== finalTop || prev.left !== finalLeft) {
57
- return { top: finalTop, left: finalLeft };
58
- }
59
- return prev;
60
- });
61
- }, [show, placement, offset, getContainer, targetRef]);
62
- var throttledRecalc = useCallback(function () {
63
- var ticking = false;
64
- return function () {
65
- if (!ticking) {
66
- ticking = true;
67
- requestAnimationFrame(function () {
68
- recalcPosition();
69
- ticking = false;
70
- });
71
- }
72
- };
73
- }, [recalcPosition])();
74
- useLayoutEffect(function () {
75
- if (show)
76
- recalcPosition();
77
- }, [show, recalcPosition]);
78
- useEffect(function () {
79
- if (!show)
80
- return;
81
- var window = featheryWindow();
82
- var container = getContainer();
83
- if (!container)
84
- return;
85
- window.addEventListener('resize', throttledRecalc);
86
- window.addEventListener('scroll', throttledRecalc, true);
87
- if (container !== featheryDoc().body) {
88
- container.addEventListener('scroll', throttledRecalc);
89
- }
90
- var resizeObserver = new ResizeObserver(function () { return throttledRecalc(); });
91
- if (targetRef.current)
92
- resizeObserver.observe(targetRef.current);
93
- if (container !== featheryDoc().body)
94
- resizeObserver.observe(container);
95
- return function () {
96
- window.removeEventListener('resize', throttledRecalc);
97
- window.removeEventListener('scroll', throttledRecalc, true);
98
- if (container !== featheryDoc().body) {
99
- container.removeEventListener('scroll', throttledRecalc);
100
- }
101
- resizeObserver.disconnect();
102
- };
103
- }, [show, throttledRecalc, getContainer, targetRef]);
104
- useEffect(function () {
105
- if (!show)
106
- return;
107
- var handleKeyDown = function (event) {
108
- if (event.key === 'Escape') {
109
- setPosition(null);
110
- onHide === null || onHide === void 0 ? void 0 : onHide();
111
- }
112
- };
113
- var handleClickOutside = function (event) {
114
- var target = event.target;
115
- if (ref.current &&
116
- !ref.current.contains(target) &&
117
- targetRef.current &&
118
- !targetRef.current.contains(target)) {
119
- setPosition(null);
120
- onHide === null || onHide === void 0 ? void 0 : onHide();
121
- }
122
- };
123
- var doc = featheryDoc();
124
- doc.addEventListener('mousedown', handleClickOutside);
125
- doc.addEventListener('keydown', handleKeyDown);
126
- return function () {
127
- doc.removeEventListener('mousedown', handleClickOutside);
128
- doc.removeEventListener('keydown', handleKeyDown);
129
- };
130
- }, [show, onHide, targetRef]);
131
- if (!show)
132
- return null;
133
- var container = getContainer();
134
- if (!container)
135
- return jsx(Fragment, { children: children });
136
- return createPortal(jsx("div", __assign({ ref: ref, style: __assign(__assign({ position: 'absolute' }, (position || { top: -9999, left: -9999 })), { zIndex: zIndex }) }, { children: children })), container);
137
- };
138
- var getFlippedPlacement = function (original, needsVerticalFlip, needsHorizontalFlip) {
139
- if (needsVerticalFlip) {
140
- if (original.includes('top')) {
141
- return original.replace('top', 'bottom');
142
- }
143
- if (original.includes('bottom')) {
144
- return original.replace('bottom', 'top');
145
- }
146
- }
147
- if (needsHorizontalFlip) {
148
- if (original.includes('left')) {
149
- return original.replace('left', 'right');
150
- }
151
- if (original.includes('right')) {
152
- return original.replace('right', 'left');
153
- }
154
- }
155
- return original;
156
- };
157
- var calcPosition = function (pl, targetRect, overlayRect, offset) {
158
- if (offset === void 0) { offset = 0; }
159
- switch (pl) {
160
- case 'top':
161
- return {
162
- top: targetRect.top - overlayRect.height - offset,
163
- left: targetRect.left + (targetRect.width - overlayRect.width) / 2
164
- };
165
- case 'top-start':
166
- return {
167
- top: targetRect.top - overlayRect.height - offset,
168
- left: targetRect.left
169
- };
170
- case 'top-end':
171
- return {
172
- top: targetRect.top - overlayRect.height - offset,
173
- left: targetRect.right - overlayRect.width
174
- };
175
- case 'left':
176
- return {
177
- top: targetRect.top + (targetRect.height - overlayRect.height) / 2,
178
- left: targetRect.left - overlayRect.width - offset
179
- };
180
- case 'left-start':
181
- return {
182
- top: targetRect.top,
183
- left: targetRect.left - overlayRect.width - offset
184
- };
185
- case 'left-end':
186
- return {
187
- top: targetRect.bottom - overlayRect.height,
188
- left: targetRect.left - overlayRect.width - offset
189
- };
190
- case 'bottom':
191
- return {
192
- top: targetRect.bottom + offset,
193
- left: targetRect.left + (targetRect.width - overlayRect.width) / 2
194
- };
195
- case 'bottom-start':
196
- return {
197
- top: targetRect.bottom + offset,
198
- left: targetRect.left
199
- };
200
- case 'bottom-end':
201
- return {
202
- top: targetRect.bottom + offset,
203
- left: targetRect.right - overlayRect.width
204
- };
205
- case 'right':
206
- return {
207
- top: targetRect.top + (targetRect.height - overlayRect.height) / 2,
208
- left: targetRect.right + offset
209
- };
210
- case 'right-start':
211
- return {
212
- top: targetRect.top,
213
- left: targetRect.right + offset
214
- };
215
- case 'right-end':
216
- return {
217
- top: targetRect.bottom - overlayRect.height,
218
- left: targetRect.right + offset
219
- };
220
- default:
221
- return {
222
- top: targetRect.bottom + offset,
223
- left: targetRect.left + (targetRect.width - overlayRect.width) / 2
224
- };
225
- }
226
- };
227
-
228
- export { Overlay as O, Tooltip as T };
@@ -1,8 +0,0 @@
1
- export { u as Mermaid } from './fthry_AssistantChat.h6NTcnjr.js';
2
- import './fthry_index.B21PnTei.js';
3
- import 'react/jsx-runtime';
4
- import 'react';
5
- import 'jszip';
6
- import 'react-dom';
7
- import './fthry_clsx.ChV9xqsO.js';
8
- import './fthry_index.CuFf_oA3.js';
@@ -1 +0,0 @@
1
- "use strict";(this.webpackChunkFeathery=this.webpackChunkFeathery||[]).push([[277],{11587:(t,e,r)=>{r.d(e,{Z:()=>d});var n=r(35944),o=r(67294),i=r(18776),l=r(65096),a=r(52988),c=r(54665),u=r(47449),f=r(39479),s=function(){return s=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},s.apply(this,arguments)};function d(t){var e=t.id,r=t.text,d=t.responsiveStyles,p=t.absolute,h=void 0===p||p,v=t.containerRef,y=t.repeat,b=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),l=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)l.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return l}((0,o.useState)(!1),2),m=b[0],g=b[1],w=(0,o.useRef)(null);if(!(r=(0,c.xf)(r,y)))return null;var x=(0,f.tq)();return(0,n.BX)(n.HY,{children:[(0,n.tZ)("div",s({ref:w,onMouseEnter:x?void 0:function(){return g(!0)},onMouseLeave:x?void 0:function(){return g(!1)},onFocus:function(){return g(!0)},onBlur:function(){return g(!1)},onClick:function(){return g((function(t){return!t}))},css:h?{position:"absolute",insetInlineEnd:"10px",top:0,bottom:0,zIndex:a.rM,margin:"auto",cursor:"pointer",height:"100%",display:"flex"}:{position:"relative",marginInlineStart:"8px",display:"flex",alignItems:"center"}},{children:(0,n.tZ)(l.by,{cssStyles:d.getTarget("tooltipIcon")})})),(0,n.tZ)(u.Z,s({show:m,targetRef:w,containerRef:v,placement:"left",onHide:function(){return g(!1)},offset:8},{children:(0,n.tZ)(i.u,s({id:"tooltip-".concat(e),css:{zIndex:a.rM+1,padding:".4rem 0",transition:"opacity .10s linear",".tooltip-inner":{maxWidth:"200px",padding:".25rem .5rem",color:"#fff",textAlign:"center",backgroundColor:"#000",borderRadius:".25rem",fontSize:"smaller"}}},{children:r}))}))]})}},47449:(t,e,r)=>{r.d(e,{Z:()=>c});var n=r(35944),o=r(67294),i=r(73935),l=r(39479),a=function(){return a=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},a.apply(this,arguments)};const c=function(t){var e=t.show,r=t.targetRef,c=t.children,s=t.onHide,d=t.placement,p=void 0===d?"bottom-start":d,h=t.offset,v=void 0===h?0:h,y=t.zIndex,b=void 0===y?1e3:y,m=t.containerRef,g=(0,o.useRef)(null),w=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),l=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)l.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return l}((0,o.useState)(null),2),x=w[0],S=w[1],O=(0,o.useCallback)((function(){return(null==m?void 0:m.current)||(0,l.me)().body}),[m]),k=(0,o.useCallback)((function(){var t;if(e&&r.current&&g.current){var n=(0,l.Kv)(),o=O();if(o){var i=r.current.getBoundingClientRect(),a=g.current.getBoundingClientRect(),c=o.getBoundingClientRect(),s=f(p,i,a,v),d=s.top,h=s.left,y=d+a.height,b=h+a.width,m=d>=0&&y<=n.innerHeight,w=h>=0&&b<=n.innerWidth;if(!m||!w){var x=u(p,!m,!w);x!==p&&(d=(t=f(x,i,a,v)).top,h=t.left)}var k=o===(0,l.me)().body,E=k?d+n.scrollY:d-c.top,R=k?h+n.scrollX:h-c.left;S((function(t){return t&&t.top===E&&t.left===R?t:{top:E,left:R}}))}}}),[e,p,v,O,r]),E=(0,o.useCallback)((function(){var t=!1;return function(){t||(t=!0,requestAnimationFrame((function(){k(),t=!1})))}}),[k])();if((0,o.useLayoutEffect)((function(){e&&k()}),[e,k]),(0,o.useEffect)((function(){if(e){var t=(0,l.Kv)(),n=O();if(n){t.addEventListener("resize",E),t.addEventListener("scroll",E,!0),n!==(0,l.me)().body&&n.addEventListener("scroll",E);var o=new ResizeObserver((function(){return E()}));return r.current&&o.observe(r.current),n!==(0,l.me)().body&&o.observe(n),function(){t.removeEventListener("resize",E),t.removeEventListener("scroll",E,!0),n!==(0,l.me)().body&&n.removeEventListener("scroll",E),o.disconnect()}}}}),[e,E,O,r]),(0,o.useEffect)((function(){if(e){var t=function(t){"Escape"===t.key&&(S(null),null==s||s())},n=function(t){var e=t.target;g.current&&!g.current.contains(e)&&r.current&&!r.current.contains(e)&&(S(null),null==s||s())},o=(0,l.me)();return o.addEventListener("mousedown",n),o.addEventListener("keydown",t),function(){o.removeEventListener("mousedown",n),o.removeEventListener("keydown",t)}}}),[e,s,r]),!e)return null;var R=O();return R?(0,i.createPortal)((0,n.tZ)("div",a({ref:g,style:a(a({position:"absolute"},x||{top:-9999,left:-9999}),{zIndex:b})},{children:c})),R):(0,n.tZ)(n.HY,{children:c})};var u=function(t,e,r){if(e){if(t.includes("top"))return t.replace("top","bottom");if(t.includes("bottom"))return t.replace("bottom","top")}if(r){if(t.includes("left"))return t.replace("left","right");if(t.includes("right"))return t.replace("right","left")}return t},f=function(t,e,r,n){switch(void 0===n&&(n=0),t){case"top":return{top:e.top-r.height-n,left:e.left+(e.width-r.width)/2};case"top-start":return{top:e.top-r.height-n,left:e.left};case"top-end":return{top:e.top-r.height-n,left:e.right-r.width};case"left":return{top:e.top+(e.height-r.height)/2,left:e.left-r.width-n};case"left-start":return{top:e.top,left:e.left-r.width-n};case"left-end":return{top:e.bottom-r.height,left:e.left-r.width-n};case"bottom":default:return{top:e.bottom+n,left:e.left+(e.width-r.width)/2};case"bottom-start":return{top:e.bottom+n,left:e.left};case"bottom-end":return{top:e.bottom+n,left:e.right-r.width};case"right":return{top:e.top+(e.height-r.height)/2,left:e.right+n};case"right-start":return{top:e.top,left:e.right+n};case"right-end":return{top:e.bottom-r.height,left:e.right+n}}}},18776:(t,e,r)=>{r.d(e,{u:()=>l});var n=r(35944),o=r(52988),i=function(){return i=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},i.apply(this,arguments)},l=function(t){var e=t.children,r=t.css,l=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r}(t,["children","css"]);return(0,n.tZ)("div",i({css:i({zIndex:o.rM+1,padding:".4rem 0",transition:"opacity .10s linear",".tooltip-inner":{maxWidth:"200px",padding:".25rem .5rem",color:"#fff",textAlign:"center",backgroundColor:"#000",borderRadius:".25rem",fontSize:"smaller"}},r)},l,{children:(0,n.tZ)("div",i({className:"tooltip-inner"},{children:e}))}))}},25406:(t,e,r)=>{r.d(e,{Z:()=>l});var n=r(67294),o=r(79292),i=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),l=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)l.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return l};function l(t,e){var r=this,l=i((0,n.useState)([]),2),a=l[0],c=l[1],u=i((0,n.useState)(!1),2),f=u[0],s=u[1],d=!e&&t;return(0,n.useEffect)((function(){var n,i,l,a;t&&!e&&(n=r,i=void 0,a=function(){var e,r;return function(t,e){var r,n,o,i,l={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;l;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return l.label++,{value:i[1],done:!1};case 5:l.label++,n=i[1],i=[0];continue;case 7:i=l.ops.pop(),l.trys.pop();continue;default:if(!((o=(o=l.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){l=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){l.label=i[1];break}if(6===i[0]&&l.label<o[1]){l.label=o[1],o=i;break}if(o&&l.label<o[2]){l.label=o[2],l.ops.push(i);break}o[2]&&l.ops.pop(),l.trys.pop();continue}i=e.call(t,l)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}(this,(function(n){switch(n.label){case 0:s(!0),n.label=1;case 1:return n.trys.push([1,3,4,5]),[4,(new o.ZP).fetchSalesforcePicklistOptions(t.object_name,t.field_name,t.credential_key)];case 2:return e=n.sent(),c(e.options||[]),[3,5];case 3:return r=n.sent(),console.error("Failed to fetch Salesforce options:",r),c([]),[3,5];case 4:return s(!1),[7];case 5:return[2]}}))},new((l=void 0)||(l=Promise))((function(t,e){function r(t){try{c(a.next(t))}catch(t){e(t)}}function o(t){try{c(a.throw(t))}catch(t){e(t)}}function c(e){var n;e.done?t(e.value):(n=e.value,n instanceof l?n:new l((function(t){t(n)}))).then(r,o)}c((a=a.apply(n,i||[])).next())})))}),[t]),{dynamicOptions:a,loadingDynamicOptions:f,shouldSalesforceSync:d}}}}]);
@@ -1 +0,0 @@
1
- (this.webpackChunkFeathery=this.webpackChunkFeathery||[]).push([[664],{86664:function(e,t,n){!function(e,t){"use strict";function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function r(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){c(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=n){var r,o,c=[],u=!0,i=!1;try{for(n=n.call(e);!(u=(r=n.next()).done)&&(c.push(r.value),!t||c.length!==t);u=!0);}catch(e){i=!0,o=e}finally{try{u||null==n.return||n.return()}finally{if(i)throw o}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function a(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var l,p,f,d,h={exports:{}};h.exports=function(){if(d)return f;d=1;var e=p?l:(p=1,l="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");function t(){}function n(){}return n.resetWarningCache=t,f=function(){function r(t,n,r,o,c,u){if(u!==e){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function o(){return r}r.isRequired=r;var c={array:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return c.PropTypes=c,c}}()();var m=a(h.exports),y=function(e,n,r){var o=!!r,c=t.useRef(r);t.useEffect((function(){c.current=r}),[r]),t.useEffect((function(){if(!o||!e)return function(){};var t=function(){c.current&&c.current.apply(c,arguments)};return e.on(n,t),function(){e.off(n,t)}}),[o,n,e,c])},g=function(e){var n=t.useRef(e);return t.useEffect((function(){n.current=e}),[e]),n.current},v=function(e){return null!==e&&"object"===o(e)},C=function(e){return v(e)&&"function"==typeof e.then},E=function(e){return v(e)&&"function"==typeof e.elements&&"function"==typeof e.createToken&&"function"==typeof e.createPaymentMethod&&"function"==typeof e.confirmCardPayment},k="[object Object]",b=function e(t,n){if(!v(t)||!v(n))return t===n;var r=Array.isArray(t);if(r!==Array.isArray(n))return!1;var o=Object.prototype.toString.call(t)===k;if(o!==(Object.prototype.toString.call(n)===k))return!1;if(!o&&!r)return t===n;var c=Object.keys(t),u=Object.keys(n);if(c.length!==u.length)return!1;for(var i={},s=0;s<c.length;s+=1)i[c[s]]=!0;for(var a=0;a<u.length;a+=1)i[u[a]]=!0;var l=Object.keys(i);if(l.length!==c.length)return!1;var p=t,f=n;return l.every((function(t){return e(p[t],f[t])}))},S=function(e,t,n){return v(e)?Object.keys(e).reduce((function(o,u){var i=!v(t)||!b(e[u],t[u]);return n.includes(u)?(i&&console.warn("Unsupported prop change: options.".concat(u," is not a mutable property.")),o):i?r(r({},o||{}),{},c({},u,e[u])):o}),null):null},w="Invalid prop `stripe` supplied to `Elements`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.",P=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:w;if(null===e||E(e))return e;throw new Error(t)},O=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:w;if(C(e))return{tag:"async",stripePromise:Promise.resolve(e).then((function(e){return P(e,t)}))};var n=P(e,t);return null===n?{tag:"empty"}:{tag:"sync",stripe:n}},j=function(e){e&&e._registerWrapper&&e.registerAppInfo&&(e._registerWrapper({name:"react-stripe-js",version:"3.7.0"}),e.registerAppInfo({name:"react-stripe-js",version:"3.7.0",url:"https://stripe.com/docs/stripe-js/react"}))},x=t.createContext(null);x.displayName="ElementsContext";var A=function(e,t){if(!e)throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(t," in an <Elements> provider."));return e},R=function(e){var n=e.stripe,r=e.options,o=e.children,c=t.useMemo((function(){return O(n)}),[n]),u=i(t.useState((function(){return{stripe:"sync"===c.tag?c.stripe:null,elements:"sync"===c.tag?c.stripe.elements(r):null}})),2),s=u[0],a=u[1];t.useEffect((function(){var e=!0,t=function(e){a((function(t){return t.stripe?t:{stripe:e,elements:e.elements(r)}}))};return"async"!==c.tag||s.stripe?"sync"!==c.tag||s.stripe||t(c.stripe):c.stripePromise.then((function(n){n&&e&&t(n)})),function(){e=!1}}),[c,s,r]);var l=g(n);t.useEffect((function(){null!==l&&l!==n&&console.warn("Unsupported prop change on Elements: You cannot change the `stripe` prop after setting it.")}),[l,n]);var p=g(r);return t.useEffect((function(){if(s.elements){var e=S(r,p,["clientSecret","fonts"]);e&&s.elements.update(e)}}),[r,p,s.elements]),t.useEffect((function(){j(s.stripe)}),[s.stripe]),t.createElement(x.Provider,{value:s},o)};R.propTypes={stripe:m.any,options:m.object};var I=function(e){var n=t.useContext(x);return A(n,e)},N=function(e){return(0,e.children)(I("mounts <ElementsConsumer>"))};N.propTypes={children:m.func.isRequired};var T=["on","session"],Y=t.createContext(null);Y.displayName="CheckoutSdkContext";var B=function(e,t){if(!e)throw new Error("Could not find CheckoutProvider context; You need to wrap the part of your app that ".concat(t," in an <CheckoutProvider> provider."));return e},U=t.createContext(null);U.displayName="CheckoutContext";var M=function(e){var n=e.stripe,r=e.options,o=e.children,c=t.useMemo((function(){return O(n,"Invalid prop `stripe` supplied to `CheckoutProvider`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.")}),[n]),s=i(t.useState(null),2),a=s[0],l=s[1],p=i(t.useState((function(){return{stripe:"sync"===c.tag?c.stripe:null,checkoutSdk:null}})),2),f=p[0],d=p[1],h=function(e,t){d((function(n){return n.stripe&&n.checkoutSdk?n:{stripe:e,checkoutSdk:t}}))},m=t.useRef(!1);t.useEffect((function(){var e=!0;return"async"!==c.tag||f.stripe?"sync"===c.tag&&c.stripe&&!m.current&&(m.current=!0,c.stripe.initCheckout(r).then((function(e){e&&(h(c.stripe,e),e.on("change",l))}))):c.stripePromise.then((function(t){t&&e&&!m.current&&(m.current=!0,t.initCheckout(r).then((function(e){e&&(h(t,e),e.on("change",l))})))})),function(){e=!1}}),[c,f,r,l]);var y=g(n);t.useEffect((function(){null!==y&&y!==n&&console.warn("Unsupported prop change on CheckoutProvider: You cannot change the `stripe` prop after setting it.")}),[y,n]);var v=g(r),C=g(f.checkoutSdk);t.useEffect((function(){var e,t;if(f.checkoutSdk){var n=null==v||null===(e=v.elementsOptions)||void 0===e?void 0:e.appearance,o=null==r||null===(t=r.elementsOptions)||void 0===t?void 0:t.appearance,c=!b(o,n),u=!C&&f.checkoutSdk;o&&(c||u)&&f.checkoutSdk.changeAppearance(o)}}),[r,v,f.checkoutSdk,C]),t.useEffect((function(){j(f.stripe)}),[f.stripe]);var E=t.useMemo((function(){return function(e,t){if(!e)return null;e.on,e.session;var n=u(e,T);return t?Object.assign(t,n):Object.assign(e.session(),n)}(f.checkoutSdk,a)}),[f.checkoutSdk,a]);return f.checkoutSdk?t.createElement(Y.Provider,{value:f},t.createElement(U.Provider,{value:E},o)):null};M.propTypes={stripe:m.any,options:m.shape({fetchClientSecret:m.func.isRequired,elementsOptions:m.object}).isRequired};var _=function(e){var n=t.useContext(Y),r=t.useContext(x);if(n&&r)throw new Error("You cannot wrap the part of your app that ".concat(e," in both <CheckoutProvider> and <Elements> providers."));return n?B(n,e):A(r,e)},L=["mode"],D=function(e,n){var r,o="".concat((r=e).charAt(0).toUpperCase()+r.slice(1),"Element"),c=n?function(e){_("mounts <".concat(o,">"));var n=e.id,r=e.className;return t.createElement("div",{id:n,className:r})}:function(n){var r,c=n.id,s=n.className,a=n.options,l=void 0===a?{}:a,p=n.onBlur,f=n.onFocus,d=n.onReady,h=n.onChange,m=n.onEscape,v=n.onClick,C=n.onLoadError,E=n.onLoaderStart,k=n.onNetworksChange,b=n.onConfirm,w=n.onCancel,P=n.onShippingAddressChange,O=n.onShippingRateChange,j=_("mounts <".concat(o,">")),x="elements"in j?j.elements:null,A="checkoutSdk"in j?j.checkoutSdk:null,R=i(t.useState(null),2),I=R[0],N=R[1],T=t.useRef(null),Y=t.useRef(null);y(I,"blur",p),y(I,"focus",f),y(I,"escape",m),y(I,"click",v),y(I,"loaderror",C),y(I,"loaderstart",E),y(I,"networkschange",k),y(I,"confirm",b),y(I,"cancel",w),y(I,"shippingaddresschange",P),y(I,"shippingratechange",O),y(I,"change",h),d&&(r="expressCheckout"===e?d:function(){d(I)}),y(I,"ready",r),t.useLayoutEffect((function(){if(null===T.current&&null!==Y.current&&(x||A)){var t=null;if(A)switch(e){case"payment":t=A.createPaymentElement(l);break;case"address":if(!("mode"in l))throw new Error("You must supply options.mode. mode must be 'billing' or 'shipping'.");var n=l.mode,r=u(l,L);if("shipping"===n)t=A.createShippingAddressElement(r);else{if("billing"!==n)throw new Error("Invalid options.mode. mode must be 'billing' or 'shipping'.");t=A.createBillingAddressElement(r)}break;case"expressCheckout":t=A.createExpressCheckoutElement(l);break;case"currencySelector":t=A.createCurrencySelectorElement();break;default:throw new Error("Invalid Element type ".concat(o,". You must use either the <PaymentElement />, <AddressElement options={{mode: 'shipping'}} />, <AddressElement options={{mode: 'billing'}} />, or <ExpressCheckoutElement />."))}else x&&(t=x.create(e,l));T.current=t,N(t),t&&t.mount(Y.current)}}),[x,A,l]);var B=g(l);return t.useEffect((function(){if(T.current){var e=S(l,B,["paymentRequest"]);e&&"update"in T.current&&T.current.update(e)}}),[l,B]),t.useLayoutEffect((function(){return function(){if(T.current&&"function"==typeof T.current.destroy)try{T.current.destroy(),T.current=null}catch(e){}}}),[]),t.createElement("div",{id:c,className:s,ref:Y})};return c.propTypes={id:m.string,className:m.string,onChange:m.func,onBlur:m.func,onFocus:m.func,onReady:m.func,onEscape:m.func,onClick:m.func,onLoadError:m.func,onLoaderStart:m.func,onNetworksChange:m.func,onConfirm:m.func,onCancel:m.func,onShippingAddressChange:m.func,onShippingRateChange:m.func,options:m.object},c.displayName=o,c.__elementType=e,c},W="undefined"==typeof window,q=t.createContext(null);q.displayName="EmbeddedCheckoutProviderContext";var F=function(){var e=t.useContext(q);if(!e)throw new Error("<EmbeddedCheckout> must be used within <EmbeddedCheckoutProvider>");return e},H=W?function(e){var n=e.id,r=e.className;return F(),t.createElement("div",{id:n,className:r})}:function(e){var n=e.id,r=e.className,o=F().embeddedCheckout,c=t.useRef(!1),u=t.useRef(null);return t.useLayoutEffect((function(){return!c.current&&o&&null!==u.current&&(o.mount(u.current),c.current=!0),function(){if(c.current&&o)try{o.unmount(),c.current=!1}catch(e){}}}),[o]),t.createElement("div",{ref:u,id:n,className:r})},V=D("auBankAccount",W),$=D("card",W),z=D("cardNumber",W),G=D("cardExpiry",W),J=D("cardCvc",W),K=D("fpxBank",W),Q=D("iban",W),X=D("idealBank",W),Z=D("p24Bank",W),ee=D("epsBank",W),te=D("payment",W),ne=D("expressCheckout",W),re=D("currencySelector",W),oe=D("paymentRequestButton",W),ce=D("linkAuthentication",W),ue=D("address",W),ie=D("shippingAddress",W),se=D("paymentMethodMessaging",W),ae=D("affirmMessage",W),le=D("afterpayClearpayMessage",W);e.AddressElement=ue,e.AffirmMessageElement=ae,e.AfterpayClearpayMessageElement=le,e.AuBankAccountElement=V,e.CardCvcElement=J,e.CardElement=$,e.CardExpiryElement=G,e.CardNumberElement=z,e.CheckoutProvider=M,e.CurrencySelectorElement=re,e.Elements=R,e.ElementsConsumer=N,e.EmbeddedCheckout=H,e.EmbeddedCheckoutProvider=function(e){var n=e.stripe,r=e.options,o=e.children,c=t.useMemo((function(){return O(n,"Invalid prop `stripe` supplied to `EmbeddedCheckoutProvider`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.")}),[n]),u=t.useRef(null),s=t.useRef(null),a=i(t.useState({embeddedCheckout:null}),2),l=a[0],p=a[1];t.useEffect((function(){if(!s.current&&!u.current){var e=function(e){s.current||u.current||(s.current=e,u.current=s.current.initEmbeddedCheckout(r).then((function(e){p({embeddedCheckout:e})})))};"async"!==c.tag||s.current||!r.clientSecret&&!r.fetchClientSecret?"sync"!==c.tag||s.current||!r.clientSecret&&!r.fetchClientSecret||e(c.stripe):c.stripePromise.then((function(t){t&&e(t)}))}}),[c,r,l,s]),t.useEffect((function(){return function(){l.embeddedCheckout?(u.current=null,l.embeddedCheckout.destroy()):u.current&&u.current.then((function(){u.current=null,l.embeddedCheckout&&l.embeddedCheckout.destroy()}))}}),[l.embeddedCheckout]),t.useEffect((function(){j(s)}),[s]);var f=g(n);t.useEffect((function(){null!==f&&f!==n&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the `stripe` prop after setting it.")}),[f,n]);var d=g(r);return t.useEffect((function(){null!=d&&(null!=r?(void 0===r.clientSecret&&void 0===r.fetchClientSecret&&console.warn("Invalid props passed to EmbeddedCheckoutProvider: You must provide one of either `options.fetchClientSecret` or `options.clientSecret`."),null!=d.clientSecret&&r.clientSecret!==d.clientSecret&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the client secret after setting it. Unmount and create a new instance of EmbeddedCheckoutProvider instead."),null!=d.fetchClientSecret&&r.fetchClientSecret!==d.fetchClientSecret&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change fetchClientSecret after setting it. Unmount and create a new instance of EmbeddedCheckoutProvider instead."),null!=d.onComplete&&r.onComplete!==d.onComplete&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the onComplete option after setting it."),null!=d.onShippingDetailsChange&&r.onShippingDetailsChange!==d.onShippingDetailsChange&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the onShippingDetailsChange option after setting it."),null!=d.onLineItemsChange&&r.onLineItemsChange!==d.onLineItemsChange&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the onLineItemsChange option after setting it.")):console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot unset options after setting them."))}),[d,r]),t.createElement(q.Provider,{value:l},o)},e.EpsBankElement=ee,e.ExpressCheckoutElement=ne,e.FpxBankElement=K,e.IbanElement=Q,e.IdealBankElement=X,e.LinkAuthenticationElement=ce,e.P24BankElement=Z,e.PaymentElement=te,e.PaymentMethodMessagingElement=se,e.PaymentRequestButtonElement=oe,e.ShippingAddressElement=ie,e.useCheckout=function(){!function(e){var n=t.useContext(Y);B(n,e)}("calls useCheckout()");var e=t.useContext(U);if(!e)throw new Error("Could not find Checkout Context; You need to wrap the part of your app that calls useCheckout() in an <CheckoutProvider> provider.");return e},e.useElements=function(){return I("calls useElements()").elements},e.useStripe=function(){return _("calls useStripe()").stripe}}(t,n(67294))}}]);
@@ -1 +0,0 @@
1
- "use strict";(this.webpackChunkFeathery=this.webpackChunkFeathery||[]).push([[102],{11587:(e,t,r)=>{r.d(t,{Z:()=>d});var n=r(35944),o=r(67294),i=r(18776),a=r(65096),l=r(52988),u=r(54665),c=r(47449),s=r(39479),f=function(){return f=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},f.apply(this,arguments)};function d(e){var t=e.id,r=e.text,d=e.responsiveStyles,p=e.absolute,v=void 0===p||p,h=e.containerRef,g=e.repeat,y=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}((0,o.useState)(!1),2),b=y[0],m=y[1],w=(0,o.useRef)(null);if(!(r=(0,u.xf)(r,g)))return null;var x=(0,s.tq)();return(0,n.BX)(n.HY,{children:[(0,n.tZ)("div",f({ref:w,onMouseEnter:x?void 0:function(){return m(!0)},onMouseLeave:x?void 0:function(){return m(!1)},onFocus:function(){return m(!0)},onBlur:function(){return m(!1)},onClick:function(){return m((function(e){return!e}))},css:v?{position:"absolute",insetInlineEnd:"10px",top:0,bottom:0,zIndex:l.rM,margin:"auto",cursor:"pointer",height:"100%",display:"flex"}:{position:"relative",marginInlineStart:"8px",display:"flex",alignItems:"center"}},{children:(0,n.tZ)(a.by,{cssStyles:d.getTarget("tooltipIcon")})})),(0,n.tZ)(c.Z,f({show:b,targetRef:w,containerRef:h,placement:"left",onHide:function(){return m(!1)},offset:8},{children:(0,n.tZ)(i.u,f({id:"tooltip-".concat(t),css:{zIndex:l.rM+1,padding:".4rem 0",transition:"opacity .10s linear",".tooltip-inner":{maxWidth:"200px",padding:".25rem .5rem",color:"#fff",textAlign:"center",backgroundColor:"#000",borderRadius:".25rem",fontSize:"smaller"}}},{children:r}))}))]})}},47449:(e,t,r)=>{r.d(t,{Z:()=>u});var n=r(35944),o=r(67294),i=r(73935),a=r(39479),l=function(){return l=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},l.apply(this,arguments)};const u=function(e){var t=e.show,r=e.targetRef,u=e.children,f=e.onHide,d=e.placement,p=void 0===d?"bottom-start":d,v=e.offset,h=void 0===v?0:v,g=e.zIndex,y=void 0===g?1e3:g,b=e.containerRef,m=(0,o.useRef)(null),w=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}((0,o.useState)(null),2),x=w[0],S=w[1],E=(0,o.useCallback)((function(){return(null==b?void 0:b.current)||(0,a.me)().body}),[b]),k=(0,o.useCallback)((function(){var e;if(t&&r.current&&m.current){var n=(0,a.Kv)(),o=E();if(o){var i=r.current.getBoundingClientRect(),l=m.current.getBoundingClientRect(),u=o.getBoundingClientRect(),f=s(p,i,l,h),d=f.top,v=f.left,g=d+l.height,y=v+l.width,b=d>=0&&g<=n.innerHeight,w=v>=0&&y<=n.innerWidth;if(!b||!w){var x=c(p,!b,!w);x!==p&&(d=(e=s(x,i,l,h)).top,v=e.left)}var k=o===(0,a.me)().body,O=k?d+n.scrollY:d-u.top,Z=k?v+n.scrollX:v-u.left;S((function(e){return e&&e.top===O&&e.left===Z?e:{top:O,left:Z}}))}}}),[t,p,h,E,r]),O=(0,o.useCallback)((function(){var e=!1;return function(){e||(e=!0,requestAnimationFrame((function(){k(),e=!1})))}}),[k])();if((0,o.useLayoutEffect)((function(){t&&k()}),[t,k]),(0,o.useEffect)((function(){if(t){var e=(0,a.Kv)(),n=E();if(n){e.addEventListener("resize",O),e.addEventListener("scroll",O,!0),n!==(0,a.me)().body&&n.addEventListener("scroll",O);var o=new ResizeObserver((function(){return O()}));return r.current&&o.observe(r.current),n!==(0,a.me)().body&&o.observe(n),function(){e.removeEventListener("resize",O),e.removeEventListener("scroll",O,!0),n!==(0,a.me)().body&&n.removeEventListener("scroll",O),o.disconnect()}}}}),[t,O,E,r]),(0,o.useEffect)((function(){if(t){var e=function(e){"Escape"===e.key&&(S(null),null==f||f())},n=function(e){var t=e.target;m.current&&!m.current.contains(t)&&r.current&&!r.current.contains(t)&&(S(null),null==f||f())},o=(0,a.me)();return o.addEventListener("mousedown",n),o.addEventListener("keydown",e),function(){o.removeEventListener("mousedown",n),o.removeEventListener("keydown",e)}}}),[t,f,r]),!t)return null;var Z=E();return Z?(0,i.createPortal)((0,n.tZ)("div",l({ref:m,style:l(l({position:"absolute"},x||{top:-9999,left:-9999}),{zIndex:y})},{children:u})),Z):(0,n.tZ)(n.HY,{children:u})};var c=function(e,t,r){if(t){if(e.includes("top"))return e.replace("top","bottom");if(e.includes("bottom"))return e.replace("bottom","top")}if(r){if(e.includes("left"))return e.replace("left","right");if(e.includes("right"))return e.replace("right","left")}return e},s=function(e,t,r,n){switch(void 0===n&&(n=0),e){case"top":return{top:t.top-r.height-n,left:t.left+(t.width-r.width)/2};case"top-start":return{top:t.top-r.height-n,left:t.left};case"top-end":return{top:t.top-r.height-n,left:t.right-r.width};case"left":return{top:t.top+(t.height-r.height)/2,left:t.left-r.width-n};case"left-start":return{top:t.top,left:t.left-r.width-n};case"left-end":return{top:t.bottom-r.height,left:t.left-r.width-n};case"bottom":default:return{top:t.bottom+n,left:t.left+(t.width-r.width)/2};case"bottom-start":return{top:t.bottom+n,left:t.left};case"bottom-end":return{top:t.bottom+n,left:t.right-r.width};case"right":return{top:t.top+(t.height-r.height)/2,left:t.right+n};case"right-start":return{top:t.top,left:t.right+n};case"right-end":return{top:t.bottom-r.height,left:t.right+n}}}},29069:(e,t,r)=>{r.d(t,{Z:()=>i});var n=r(35944),o=function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},o.apply(this,arguments)};function i(e){var t,r,i,a=e.value,l=e.element,u=e.responsiveStyles,c=e.type,s=void 0===c?"input":c,f=e.inputFocused,d=void 0!==f&&f,p=e.repeatIndex,v=void 0===p?null:p,h=l.properties,g=null!==(i=(null!==(r=h.repeat_placeholder)&&void 0!==r?r:[])[null!=v?v:0])&&void 0!==i?i:h.placeholder||"",y=o(o({},u.getTarget("placeholderFocus")),u.getTarget("placeholderActive"));return(0,n.tZ)("span",o({css:o(o(o(o({position:"absolute",pointerEvents:"none",insetInlineStart:"0.75rem",transition:"0.2s ease all",top:"input"===s?"50%":"0.6rem"},u.getTarget("placeholder")),a?u.getTarget("placeholderFocus"):{}),d?y:{}),(t={},t["".concat(s,":focus ~ &")]=y,t))},{children:g}))}},18776:(e,t,r)=>{r.d(t,{u:()=>a});var n=r(35944),o=r(52988),i=function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=function(e){var t=e.children,r=e.css,a=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(e,["children","css"]);return(0,n.tZ)("div",i({css:i({zIndex:o.rM+1,padding:".4rem 0",transition:"opacity .10s linear",".tooltip-inner":{maxWidth:"200px",padding:".25rem .5rem",color:"#fff",textAlign:"center",backgroundColor:"#000",borderRadius:".25rem",fontSize:"smaller"}},r)},a,{children:(0,n.tZ)("div",i({className:"tooltip-inner"},{children:t}))}))}},35024:(e,t,r)=>{r.r(t),r.d(t,{default:()=>b});var n=r(35944),o=r(67294),i=r(29069),a=r(11587),l=r(1211),u=r(79292),c=r(91296),s=r.n(c),f=r(6867),d=r(47449),p=r(71275),v=r(39479),h=r(45398),g=function(){return g=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},g.apply(this,arguments)},y=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a};const b=(0,o.memo)((function(e){var t=this,r=e.element,c=e.responsiveStyles,b=e.fieldLabel,m=e.elementProps,w=void 0===m?{}:m,x=e.disabled,S=void 0!==x&&x,E=e.autoComplete,k=e.editMode,O=e.repeatIndex,Z=void 0===O?null:O,R=e.onSelect,L=void 0===R?function(){}:R,C=e.onChange,T=void 0===C?function(){}:C,z=e.required,I=e.onBlur,j=void 0===I?function(){}:I,B=e.onEnter,P=void 0===B?function(){}:B,_=e.setRef,F=void 0===_?function(){}:_,M=e.value,H=void 0===M?"":M,X=e.inlineError,q=e.children,A=r.servar,K=function(e,t){var r,n=t.metadata,i=n.address_autocomplete,a=null!==(r=n.autocomplete_country)&&void 0!==r?r:"",l=function(){var e=(0,o.useRef)(!0);return(0,o.useEffect)((function(){return e.current=!0,function(){e.current=!1}}),[]),e}(),c=y((0,o.useState)(e),2),f=c[0],d=c[1],p=y((0,o.useState)([]),2),v=p[0],h=p[1],g=(0,o.useCallback)(s()((function(e){(new u.ZP).addressSearchResults(e,a,"gmap_city"===t.type).then((function(t){l.current&&(h(t),d(e))}))}),500),[h,d]);return(0,o.useEffect)((function(){var t=e.trim();i&&t!==f&&(t.length>3?g(t):(v.length&&h([]),d(t)))}),[e]),v}(H,A),W=y((0,o.useState)(!1),2),Y=W[0],D=W[1],G=y((0,o.useState)(!1),2),N=G[0],J=G[1],Q=(0,o.useRef)(null),U=(0,o.useRef)(null),V=(0,o.useRef)(null),$=(0,h.Z)(V).width,ee=(0,f.Z)({element:r,error:X,breakpoint:c.getMobileBreakpoint()}),te=ee.borderStyles,re=ee.customBorder,ne="gmap_city"===A.type?"address-level2":"street-address";return(0,n.BX)("div",g({ref:U,css:g({maxWidth:"100%",width:"100%",height:"100%",position:"relative",pointerEvents:k?"none":"auto"},c.getTarget("fc"))},w,{children:[q,b,(0,n.BX)("div",g({ref:V,css:g(g(g({position:"relative",width:"100%",overflowX:"clip"},c.getTarget("sub-fc")),S?c.getTarget("disabled"):{}),{"&:hover":(0,v.wL)(S?{}:g(g({},c.getTarget("hover")),te.hover)),"&&":N?g(g({},c.getTarget("active")),te.active):{}})},{children:[re,(0,n.tZ)("input",{id:A.key,name:A.key,css:g(g(g({position:"relative",height:"100%",width:"100%",border:"none",margin:0,backgroundColor:"transparent"},l.ET),c.getTarget("field")),N||H||!r.properties.placeholder?{}:{color:"transparent !important"}),maxLength:A.max_length,minLength:A.min_length,placeholder:"",disabled:S,"aria-label":r.properties.aria_label,autoComplete:"on"===E?ne:"new-password",value:H,ref:function(e){Q.current=e,F(e)},onKeyDown:function(e){var t;t=e,Boolean(t.isTrusted&&t.code)&&("Enter"===e.key?P(e):D("Escape"!==e.key))},onFocus:function(e){J(!0),(0,v.ms)(e)},onBlur:function(e){setTimeout((function(){return D(!1)}),200),j(e),J(!1)},onChange:T,required:z}),(0,n.tZ)(d.Z,g({show:Y&&K.length>0,targetRef:Q,containerRef:U,placement:"bottom-start",offset:4,onHide:function(){return D(!1)}},{children:(0,n.tZ)("ul",g({css:g({zIndex:p.m6,listStyleType:"none",padding:0,margin:0,backgroundColor:"white",cursor:"pointer",boxShadow:"0 0 4px rgb(0 0 0 / 15%)",width:void 0!==$?"".concat($,"px"):"100%"},c.getTarget("dropdown"))},{children:K.map((function(e){var r=e.display,o=e.address_id;return(0,n.tZ)("li",g({css:{padding:"8px 14px",transition:"0.1s ease all","&:hover":(0,v.wL)({backgroundColor:"#e6e6e633"})},onClick:function(){return e=t,r=void 0,i=function(){var e,t;return function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}}(this,(function(r){switch(r.label){case 0:return[4,(new u.ZP).addressDetail(o)];case 1:return e=r.sent(),L(e,o),D(!1),null===(t=Q.current)||void 0===t||t.focus(),[2]}}))},new((n=void 0)||(n=Promise))((function(t,o){function a(e){try{u(i.next(e))}catch(e){o(e)}}function l(e){try{u(i.throw(e))}catch(e){o(e)}}function u(e){var r;e.done?t(e.value):(r=e.value,r instanceof n?r:new n((function(e){e(r)}))).then(a,l)}u((i=i.apply(e,r||[])).next())}));var e,r,n,i}},{children:r}),r)}))}))})),(0,n.tZ)(i.Z,{value:H,element:r,responsiveStyles:c,repeatIndex:Z}),(0,n.tZ)(a.Z,{containerRef:U,id:r.id,text:r.properties.tooltipText,responsiveStyles:c,repeat:r.repeat})]}))]}))}))},45398:(e,t,r)=>{r.d(t,{Z:()=>i});var n=r(67294),o=r(39479);function i(e){var t=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}((0,n.useState)({width:void 0,height:void 0}),2),r=t[0],i=t[1];return(0,n.useLayoutEffect)((function(){var t=function(){var t=e.current;if(t){var r=t.getBoundingClientRect(),n=r.width,o=r.height;i({width:n>0?n:void 0,height:o>0?o:void 0})}},r=e.current;if(r){if("undefined"==typeof ResizeObserver){var n=(0,o.Kv)();return n&&"function"==typeof n.addEventListener&&"function"==typeof n.removeEventListener?(n.addEventListener("resize",t),t(),function(){return n.removeEventListener("resize",t)}):void t()}var a=new ResizeObserver((function(){return t()}));try{a.observe(r,{box:"border-box"})}catch(e){a.observe(r)}return t(),function(){return a.disconnect()}}}),[e]),r}}}]);
@@ -1 +0,0 @@
1
- "use strict";(this.webpackChunkFeathery=this.webpackChunkFeathery||[]).push([[507],{55888:(e,t,a)=>{a.r(t),a.d(t,{default:()=>u});var i=a(35944),r=a(67294),n=a(1211),o=a(6867),l=a(39479),s=a(11587),c=a(44416),d=a(25406),p=function(){return p=Object.assign||function(e){for(var t,a=1,i=arguments.length;a<i;a++)for(var r in t=arguments[a])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},p.apply(this,arguments)};const u=function(e){var t,a=e.element,u=e.responsiveStyles,v=e.fieldLabel,f=e.inlineError,g=e.fieldVal,m=void 0===g?null:g,h=e.repeatIndex,b=void 0===h?null:h,y=e.editMode,k=e.onClick,x=void 0===k?function(){}:k,Z=e.elementProps,_=void 0===Z?{}:Z,w=e.disabled,T=void 0!==w&&w,S=e.children,B=(0,r.useRef)(null),C=a.servar,O=(0,d.Z)(C.metadata.salesforce_sync,y),j=O.dynamicOptions,M=O.loadingDynamicOptions,X=O.shouldSalesforceSync,A=(0,r.useMemo)((function(){return Array.isArray(m)?m.reduce((function(e,t){return e[t]=!0,e}),{}):{}}),[m]),E=(0,o.Z)({element:a,error:f,breakpoint:u.getMobileBreakpoint()}),F=E.borderStyles,I=E.customBorder,L=C.metadata.option_labels,P=C.metadata.option_tooltips;return t=X?j.map((function(e){return{value:e.value,label:e.label,tooltip:""}})):null!==b&&void 0!==C.metadata.repeat_options&&void 0!==C.metadata.repeat_options[b]?C.metadata.repeat_options[b]:C.metadata.options.map((function(e,t){return{value:e,label:L&&L[t]?L[t]:e,tooltip:P&&P[t]?P[t]:""}})),(0,i.BX)("div",p({ref:B,css:p({position:"relative",width:"100%",height:"100%",pointerEvents:y||T||M?"none":"auto"},u.getTarget("fc"))},{children:[S,v,(0,i.BX)("div",p({css:p({display:"flex",flexWrap:"wrap",width:"100%"},u.getTarget("bc"))},_,{children:[t.map((function(e,t){var r,o,c,d=null!==(r=e.value)&&void 0!==r?r:e,v=null!==(o=e.label)&&void 0!==o?o:e,f=e.image?e.image:C.metadata.option_images[t],g=null!==(c=e.tooltip)&&void 0!==c?c:"";return(0,i.BX)("div",p({onClick:function(){y||T||M||x(d)},css:p(p({position:"relative",display:"flex",justifyContent:"center",alignItems:"center",boxSizing:"border-box",cursor:"pointer"},u.getTarget("field")),{"&:hover":(0,l.wL)(y||T||M?{}:p(p({},u.getTarget("hover")),F.hover)),"&&":A[d]?p(p({},u.getTarget("active")),F.active):{}})},{children:[I,f&&(0,i.tZ)("img",{src:f,css:p(p({},n.lH),u.getTargets("img"))}),v&&(0,i.tZ)("div",p({css:p(p({display:"flex",maxWidth:"100%"},u.getTargets("label")),n.aY)},{children:v})),g&&(0,i.tZ)(s.Z,{containerRef:B,id:"".concat(a.id,"-").concat(v),text:g,responsiveStyles:u,absolute:!1,repeat:a.repeat})]}),"".concat(C.key,"-").concat(t))})),(0,i.tZ)(c.Z,{id:C.key,name:C.key,"aria-label":a.properties.aria_label})]}))]}))}}}]);
@@ -1 +0,0 @@
1
- "use strict";(this.webpackChunkFeathery=this.webpackChunkFeathery||[]).push([[446,745],{85577:(e,t,o)=>{o.d(t,{N:()=>r});var n=o(35944),a=function(){return a=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var a in t=arguments[o])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},a.apply(this,arguments)};function r(e){var t=e.type,o=void 0===t?"text":t,r=e.htmlSize,c=e.css,i=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(o[n[a]]=e[n[a]])}return o}(e,["type","htmlSize","css"]);return(0,n.tZ)("input",a({type:o,size:r,css:a({border:"1px solid #ced4da",borderRadius:"0.375rem",padding:"0.375rem 0.75rem",fontSize:"1rem",lineHeight:"1.5",color:"#495057",backgroundColor:"#fff",backgroundClip:"padding-box",transition:"border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out","&:focus":{borderColor:"#80bdff",outline:0,boxShadow:"0 0 0 0.2rem rgba(0, 123, 255, 0.25)"},"&:disabled":{backgroundColor:"#e9ecef",opacity:1}},c)},i))}},72788:(e,t,o)=>{o.r(t),o.d(t,{applyCheckableInputStyles:()=>h,applyHeightWidthMarginByFontSize:()=>d,composeCheckableInputStyle:()=>u,default:()=>b});var n=o(35944),a=o(67294),r=o(39479),c=function(){return c=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var a in t=arguments[o])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},c.apply(this,arguments)},i="polygon(40% 85%, 89% 23%, 76% 12%, 39% 59%, 23% 44%, 12% 55%)",l=function(e){return Math.max(e,13)},d=function(e,t,o){void 0===o&&(o=!1),e.apply(t,["font_size"],(function(e){var t=l(e),n="".concat(t,"px"),a={minHeight:n,height:n,minWidth:n,width:n},r=Math.max(t/2,10);return o||(a.marginRight="".concat(r,"px")),a}))},p=function(e,t,o,n){e.apply(t,["font_size",o],(function(e,t){var o=l(e);return n?function(e,t){return{height:e=Math.floor(e/1.7),width:e,minWidth:e,minHeight:e,border:0,boxShadow:"inset ".concat(e,"px ").concat(e,"px #").concat(t),borderRadius:"50%"}}(o,t):function(e,t){return{boxShadow:"inset ".concat(e,"px ").concat(e,"px #").concat(t),clipPath:i}}(o,t)}))},s=function(e,t,o){e.apply(t,["height","height_unit","width","width_unit",o],(function(e,t,o,n,a){return{boxShadow:"inset ".concat(o).concat(n," ").concat(e).concat(t," #").concat(a),clipPath:i}}))};function h(e,t){t.addTargets("checkbox","checkboxCheckmark","checkboxSelected","checkboxHover","checkboxCheckmarkHover","checkboxLabel");var o=e.servar,n=o.type,a=o.metadata.multiple,r="select"===n||"matrix"===n&&!a;return"multiselect"===n||"checkbox_group"===n||"matrix"===n&&a||r?(function(e,t){e.apply("checkboxLabel",["font_size","line_height"],(function(e,t){return t||(t=l(e)),{position:"relative",top:"-".concat((t-e)/2,"px"),lineHeight:"".concat(t,"px")}}))}(t),d(t,"checkbox",!0),d(t,"checkboxCheckmark",!0),d(t,"checkboxCheckmarkHover",!0),p(t,"checkboxCheckmark","selected_font_color",r),p(t,"checkboxCheckmarkHover","hover_font_color",r)):(t.applyHeight("checkbox"),t.applyWidth("checkbox"),t.applyHeight("checkboxCheckmark"),t.applyWidth("checkboxCheckmark"),t.applyHeight("checkboxCheckmarkHover"),t.applyWidth("checkboxCheckmarkHover"),t.apply("checkbox",["width","width_unit"],(function(e,t){return"px"===t&&e?{marginRight:"".concat(Math.max(Math.round(.4*e),5),"px")}:{}})),s(t,"checkboxCheckmark","selected_font_color"),s(t,"checkboxCheckmarkHover","hover_font_color")),t.applyBorders({target:"checkbox"}),r||t.applyCorners("checkbox"),t.applyBoxShadow("checkbox"),t.applyColor("checkbox","background_color","backgroundColor",!0),t.applySelectorStyles("checkboxHover",{prefix:"hover_",important:!0}),t.applySelectorStyles("checkboxSelected",{prefix:"selected_",important:!0}),t}var u=function(e,t,o){return void 0===t&&(t=!1),void 0===o&&(o=!1),c(c({position:"static",marginLeft:5,marginRight:5,marginTop:0,marginBottom:0,appearance:"none",display:"grid",placeContent:"center",outline:"none",borderRadius:o?"50%":null},e.getTarget("checkbox")),{"&:hover":(0,r.wL)(t?{}:e.getTarget("checkboxHover")),"&::before":c({content:"''",transform:"scale(0)"},e.getTarget("checkboxCheckmark")),"&:hover::before":(0,r.wL)(c(c({},e.getTarget("checkboxCheckmark")),e.getTarget("checkboxCheckmarkHover"))),"&:checked":c({},e.getTarget("checkboxSelected")),"&:checked::before":{transform:"scale(1)"}})};const b=function(e){var t=e.element,o=e.responsiveStyles,i=e.fieldLabel,l=e.fieldVal,d=void 0===l||l,p=e.onChange,s=void 0===p?function(){}:p,b=e.elementProps,g=void 0===b?{}:b,f=e.disabled,k=void 0!==f&&f,m=e.children,y=(0,a.useMemo)((function(){return h(t,o)}),[o]),x=t.servar;return(0,n.BX)("div",c({css:c(c({},o.getTarget("fc")),{position:"relative",display:"flex",alignItems:"center"})},g,{children:[m,(0,n.tZ)("input",{id:x.key,name:x.key,type:"checkbox",checked:d,disabled:k,onChange:s,onFocus:r.ms,"aria-label":t.properties.aria_label,css:c(c(c(c({},u(y,k)),i?{}:{marginRight:5}),k?o.getTarget("disabled"):{}),{"&:focus-visible":{border:"1px solid rgb(74, 144, 226)"}})}),i]}))}},18250:(e,t,o)=>{o.r(t),o.d(t,{default:()=>h});var n=o(35944),a=o(67294),r=o(85577),c=o(1211),i=o(72788),l=o(11587),d=o(39479),p=o(25406),s=function(){return s=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var a in t=arguments[o])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},s.apply(this,arguments)};const h=function(e){var t,o,h,u=e.element,b=e.responsiveStyles,g=e.fieldLabel,f=e.fieldVal,k=void 0===f?[]:f,m=e.otherVal,y=void 0===m?"":m,x=e.repeatIndex,v=void 0===x?null:x,w=e.editMode,C=e.onChange,S=void 0===C?function(){}:C,_=e.onSelectAllChange,T=void 0===_?function(){}:_,H=e.onOtherChange,O=void 0===H?function(){}:H,Z=e.onEnter,B=void 0===Z?function(){}:Z,L=e.elementProps,P=void 0===L?{}:L,R=e.disabled,j=void 0!==R&&R,z=e.children,M=u.servar,W=(0,p.Z)(M.metadata.salesforce_sync,w),F=W.dynamicOptions,I=W.loadingDynamicOptions,E=W.shouldSalesforceSync,G=k.includes(y),X=null!==(t=M.metadata.other_label)&&void 0!==t?t:"Other",D=M.metadata.select_all_label||"Select All",V=(0,a.useRef)(null),A=(0,a.useRef)(null),N=(0,a.useMemo)((function(){return(0,i.applyCheckableInputStyles)(u,b),function(e,t){t.addTargets("checkboxGroup"),(0,i.applyHeightWidthMarginByFontSize)(t,"checkboxGroup")}(0,b),b.addTargets("row-container"),b.apply("row-container","row_separation",(function(e){return{gap:"".concat(e||5,"px")}})),b.apply("row-container","option_direction",(function(e){return{flexDirection:e||"column"}})),b}),[b]),q=M.metadata.option_labels,K=null!==(o=M.metadata.option_tooltips)&&void 0!==o?o:[],J=function(e){return j||I||M.max_length&&M.max_length<=k.length&&!e},Q=J(G),U=!G||Q,Y=(h=E?F.map((function(e){return{value:e.value,label:e.label,tooltip:""}})):null!==v&&void 0!==M.metadata.repeat_options&&void 0!==M.metadata.repeat_options[v]?M.metadata.repeat_options[v]:M.metadata.options.map((function(e,t){return{value:e,label:q&&q[t]?q[t]:e,tooltip:K&&K[t]?K[t]:""}}))).map((function(e){var t;return null!==(t=e.value)&&void 0!==t?t:e})),$=Y.filter((function(e){return k.includes(e)})).length,ee=Y.length>0&&$===Y.length,te=$>0&&!ee,oe=M.metadata.select_all&&!M.max_length&&Y.length>0,ne=j||I;return(0,a.useEffect)((function(){A.current&&(A.current.indeterminate=te)}),[te]),(0,n.BX)("div",s({ref:V,css:s({position:"relative",width:"100%"},b.getTarget("fc"))},P,{children:[z,g,(0,n.BX)("div",s({css:s({display:"flex",flexWrap:"wrap",width:"100%"},N.getTarget("row-container"))},{children:[oe&&(0,n.tZ)("div",s({css:{display:"flex",pointerEvents:ne?"none":"auto"}},{children:(0,n.BX)("label",s({style:{display:"contents"}},{children:[(0,n.tZ)("input",{ref:A,type:"checkbox",id:"".concat(M.key,"-select-all"),checked:ee,onChange:function(){return T(Y,!ee)},onFocus:d.ms,style:{padding:0,lineHeight:"normal"},css:s(s(s(s({},(0,i.composeCheckableInputStyle)(N,ne)),N.getTarget("checkboxGroup")),ne?b.getTarget("disabled"):{}),{"&:focus-visible":{border:"1px solid rgb(74, 144, 226)"},"&:indeterminate":s({},N.getTarget("checkboxSelected")),"&:indeterminate::before":{transform:"scale(1)",clipPath:"inset(45% 15%)"}}),disabled:ne,"aria-label":D}),(0,n.tZ)("span",s({css:s({whiteSpace:"pre-wrap",overflowWrap:"anywhere"},N.getTarget("checkboxLabel"))},{children:D}))]}))})),h.map((function(e,t){var o,a,r,c=null!==(o=e.value)&&void 0!==o?o:e,p=null!==(a=e.label)&&void 0!==a?a:e,h=k.includes(c),g=J(h);return(0,n.BX)("div",s({css:{display:"flex",pointerEvents:g?"none":"auto"}},{children:[(0,n.BX)("label",s({style:{display:"contents"}},{children:[(0,n.tZ)("input",{type:"checkbox",id:"".concat(M.key,"-").concat(t),name:c,checked:h,onChange:S,onFocus:d.ms,style:{padding:0,lineHeight:"normal"},css:s(s(s(s({},(0,i.composeCheckableInputStyle)(N,g)),N.getTarget("checkboxGroup")),g?b.getTarget("disabled"):{}),{"&:focus-visible":{border:"1px solid rgb(74, 144, 226)"}}),disabled:g,"aria-label":u.properties.aria_label}),(0,n.tZ)("span",s({css:s({whiteSpace:"pre-wrap",overflowWrap:"anywhere"},N.getTarget("checkboxLabel"))},{children:p}))]})),(0,n.tZ)(l.Z,{containerRef:V,id:"".concat(u.id,"-").concat(c),text:null!==(r=e.tooltip)&&void 0!==r?r:"",responsiveStyles:b,absolute:!1,repeat:u.repeat})]}),"".concat(M.key,"-").concat(t))})),M.metadata.other&&(0,n.BX)("div",s({style:{display:"flex",flexGrow:1}},{children:[(0,n.tZ)("input",{type:"checkbox",id:"".concat(M.key,"-"),name:y,checked:G,disabled:Q,onChange:S,onFocus:d.ms,style:{padding:0,lineHeight:"normal"},css:s(s(s(s({},(0,i.composeCheckableInputStyle)(N,Q)),N.getTarget("checkboxGroup")),Q?b.getTarget("disabled"):{}),{"&:focus-visible":{border:"1px solid rgb(74, 144, 226)"}})},"".concat(M.key,"-")),(0,n.tZ)("label",s({htmlFor:"".concat(M.key,"-"),css:N.getTarget("checkboxLabel")},{children:X})),(0,n.tZ)(r.N,{type:"text",htmlSize:1,css:s(s(s(s({marginLeft:"5px"},c.ET),{paddingLeft:"0.4rem",flexGrow:1}),b.getTarget("field")),U?b.getTarget("disabled"):{}),id:M.key,value:y||"",onChange:O,onKeyDown:function(e){"Enter"===e.key&&B(e)},required:G,disabled:U}),(0,n.tZ)(l.Z,{containerRef:V,id:"".concat(u.id,"-"),text:M.metadata.other_tooltip,responsiveStyles:b,absolute:!1,repeat:u.repeat})]}))]}))]}))}}}]);