@feathery/react 2.29.0 → 2.31.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 (148) hide show
  1. package/cjs/Form/grid/Element/index.d.ts.map +1 -1
  2. package/cjs/Form/index.d.ts.map +1 -1
  3. package/cjs/elements/basic/TableElement/Actions.d.ts +3 -1
  4. package/cjs/elements/basic/TableElement/Actions.d.ts.map +1 -1
  5. package/cjs/elements/basic/TableElement/DeleteConfirm.d.ts +11 -0
  6. package/cjs/elements/basic/TableElement/DeleteConfirm.d.ts.map +1 -0
  7. package/cjs/elements/basic/TableElement/EditableCell.d.ts +10 -0
  8. package/cjs/elements/basic/TableElement/EditableCell.d.ts.map +1 -0
  9. package/cjs/elements/basic/TableElement/Search.d.ts.map +1 -1
  10. package/cjs/elements/basic/TableElement/index.d.ts +1 -1
  11. package/cjs/elements/basic/TableElement/index.d.ts.map +1 -1
  12. package/cjs/elements/basic/TableElement/styles.d.ts +221 -4
  13. package/cjs/elements/basic/TableElement/styles.d.ts.map +1 -1
  14. package/cjs/elements/basic/TableElement/useColumnWidths.d.ts +7 -0
  15. package/cjs/elements/basic/TableElement/useColumnWidths.d.ts.map +1 -0
  16. package/cjs/elements/basic/TableElement/useTableData.d.ts +6 -1
  17. package/cjs/elements/basic/TableElement/useTableData.d.ts.map +1 -1
  18. package/cjs/elements/basic/TableElement/useTableMutations.d.ts +23 -0
  19. package/cjs/elements/basic/TableElement/useTableMutations.d.ts.map +1 -0
  20. package/cjs/elements/components/icons/TrashIcon.d.ts +3 -0
  21. package/cjs/elements/components/icons/TrashIcon.d.ts.map +1 -0
  22. package/cjs/elements/components/icons/index.d.ts +2 -1
  23. package/cjs/elements/components/icons/index.d.ts.map +1 -1
  24. package/cjs/{fthry_FormControl.kZ5yXjHP.js → fthry_FormControl.WIYoX7l6.js} +1 -1
  25. package/cjs/{fthry_InlineTooltip.BBNkgzp3.js → fthry_InlineTooltip.C6Kf0Ff-.js} +2 -2
  26. package/cjs/{fthry_Overlay.DQ1W49J6.js → fthry_Overlay.JRkHffzB.js} +1 -1
  27. package/cjs/{fthry_PaymentMethodField.D7BpcTHT.js → fthry_PaymentMethodField.DvPj_Lup.js} +4 -4
  28. package/cjs/{fthry_Placeholder.DY81qB5U.js → fthry_Placeholder.luXrF_m_.js} +1 -1
  29. package/cjs/{fthry_ShowEyeIcon.Ck3HpNRr.js → fthry_ShowEyeIcon.cWxfPj5A.js} +1 -1
  30. package/cjs/{fthry_index.CJ3nEvr8.js → fthry_index.7lPT7adc.js} +4 -4
  31. package/cjs/{fthry_index.D9nl6yWC.js → fthry_index.Ax4XuQ-W.js} +1 -1
  32. package/cjs/{fthry_index.BhfQqXGJ.js → fthry_index.B1gH_Pb_.js} +4 -4
  33. package/cjs/{fthry_index.V0-nv5L4.js → fthry_index.BAf-75T4.js} +1 -1
  34. package/cjs/{fthry_index.B2WrnDCu.js → fthry_index.BS2jEY70.js} +5 -5
  35. package/cjs/{fthry_index.Ca-jN77c.js → fthry_index.BT0N_ojJ.js} +5 -5
  36. package/cjs/{fthry_index.BXuRsANe.js → fthry_index.B_WCqLEf.js} +2 -2
  37. package/cjs/{fthry_index.ChHqvi_w.js → fthry_index.Be2Fs97T.js} +5 -5
  38. package/cjs/{fthry_index.DXpLDtWu.js → fthry_index.Bxz6SYIg.js} +6 -6
  39. package/cjs/{fthry_index.CR2ysImA.js → fthry_index.C4a2Ic12.js} +1 -1
  40. package/cjs/{fthry_index.CTmQVKHd.js → fthry_index.C51tqyoq.js} +1 -1
  41. package/cjs/{fthry_index.DkMxV18v.js → fthry_index.Caau3hdX.js} +5 -5
  42. package/cjs/{fthry_index.BPi1okoK.js → fthry_index.CcK_Svsf.js} +6 -6
  43. package/cjs/{fthry_index.DIJxNTtb.js → fthry_index.CfElaaWV.js} +6 -6
  44. package/cjs/{fthry_index.CaGtg7No.js → fthry_index.CmAB9Ar7.js} +1 -1
  45. package/cjs/{fthry_index.Bgag42Np.js → fthry_index.DWS39de6.js} +1 -1
  46. package/cjs/{fthry_index.Dxki7HdW.js → fthry_index.D_RuNzwI.js} +8 -8
  47. package/cjs/{fthry_index.BJquBpMQ.js → fthry_index.DdSDwu2Z.js} +1 -1
  48. package/cjs/{fthry_index.Da6aYIHM.js → fthry_index.DtcJ5ShY.js} +3 -3
  49. package/cjs/{fthry_index.hWQvQk7E.js → fthry_index.DtiRdy95.js} +3 -3
  50. package/cjs/{fthry_index.CyO673Aw.js → fthry_index.IHqwZyC3.js} +65 -34
  51. package/cjs/{fthry_index.EYrk9cSa.js → fthry_index.Io4u55nU.js} +527 -47
  52. package/cjs/{fthry_index.BiaJ1jl2.js → fthry_index.TgxeIOKY.js} +2 -2
  53. package/cjs/{fthry_index.BuH0Itrc.js → fthry_index.W-9IfXEV.js} +4 -4
  54. package/cjs/{fthry_input.bE0l-t_1.js → fthry_input.QMSUSm2J.js} +1 -1
  55. package/cjs/{fthry_script.BCkKPMlm.js → fthry_script.Bnnc8FZ3.js} +1 -1
  56. package/cjs/{fthry_styles.T0Rj_2XL.js → fthry_styles.MX1EKxvQ.js} +1 -1
  57. package/cjs/{fthry_useElementSize.Du6gVeG7.js → fthry_useElementSize.Dup4Oq53.js} +1 -1
  58. package/cjs/{fthry_useSalesforceSync.CnsTa2jO.js → fthry_useSalesforceSync.D0kLb1UT.js} +1 -1
  59. package/cjs/{fthry_webfontloader.D6rNHkUp.js → fthry_webfontloader.C-AsnAPa.js} +1 -1
  60. package/cjs/index.d.ts +2 -1
  61. package/cjs/index.d.ts.map +1 -1
  62. package/cjs/index.js +1 -1
  63. package/cjs/utils/featheryClient/index.d.ts +2 -1
  64. package/cjs/utils/featheryClient/index.d.ts.map +1 -1
  65. package/cjs/utils/formContext.d.ts +2 -1
  66. package/cjs/utils/formContext.d.ts.map +1 -1
  67. package/dist/Form/grid/Element/index.d.ts.map +1 -1
  68. package/dist/Form/index.d.ts.map +1 -1
  69. package/dist/elements/basic/TableElement/Actions.d.ts +3 -1
  70. package/dist/elements/basic/TableElement/Actions.d.ts.map +1 -1
  71. package/dist/elements/basic/TableElement/DeleteConfirm.d.ts +11 -0
  72. package/dist/elements/basic/TableElement/DeleteConfirm.d.ts.map +1 -0
  73. package/dist/elements/basic/TableElement/EditableCell.d.ts +10 -0
  74. package/dist/elements/basic/TableElement/EditableCell.d.ts.map +1 -0
  75. package/dist/elements/basic/TableElement/Search.d.ts.map +1 -1
  76. package/dist/elements/basic/TableElement/index.d.ts +1 -1
  77. package/dist/elements/basic/TableElement/index.d.ts.map +1 -1
  78. package/dist/elements/basic/TableElement/styles.d.ts +221 -4
  79. package/dist/elements/basic/TableElement/styles.d.ts.map +1 -1
  80. package/dist/elements/basic/TableElement/useColumnWidths.d.ts +7 -0
  81. package/dist/elements/basic/TableElement/useColumnWidths.d.ts.map +1 -0
  82. package/dist/elements/basic/TableElement/useTableData.d.ts +6 -1
  83. package/dist/elements/basic/TableElement/useTableData.d.ts.map +1 -1
  84. package/dist/elements/basic/TableElement/useTableMutations.d.ts +23 -0
  85. package/dist/elements/basic/TableElement/useTableMutations.d.ts.map +1 -0
  86. package/dist/elements/components/icons/TrashIcon.d.ts +3 -0
  87. package/dist/elements/components/icons/TrashIcon.d.ts.map +1 -0
  88. package/dist/elements/components/icons/index.d.ts +2 -1
  89. package/dist/elements/components/icons/index.d.ts.map +1 -1
  90. package/dist/{fthry_FormControl.BuuMSi33.js → fthry_FormControl.DEleJ-Vj.js} +1 -1
  91. package/dist/{fthry_InlineTooltip.BrYdk-JC.js → fthry_InlineTooltip.DeG1g5MU.js} +2 -2
  92. package/dist/{fthry_Overlay.tEYnJT2R.js → fthry_Overlay.CtQBdlg7.js} +1 -1
  93. package/dist/{fthry_PaymentMethodField.CtnTgodd.js → fthry_PaymentMethodField.CryiQIpT.js} +4 -4
  94. package/dist/{fthry_Placeholder.CNCz2tec.js → fthry_Placeholder.Bel7e4T4.js} +1 -1
  95. package/dist/{fthry_ShowEyeIcon.D5SVexo6.js → fthry_ShowEyeIcon.BeXoEyvh.js} +1 -1
  96. package/dist/{fthry_index.DkCSBYBS.js → fthry_index.0A10yDWO.js} +1 -1
  97. package/dist/{fthry_index.Ba9mZR-a.js → fthry_index.BNi8VaMz.js} +2 -2
  98. package/dist/{fthry_index.CAiP8AGh.js → fthry_index.Bb9yC_Hb.js} +3 -3
  99. package/dist/{fthry_index.BDuq8oLk.js → fthry_index.Bi8oY0jk.js} +5 -5
  100. package/dist/{fthry_index.CbildiLx.js → fthry_index.Bk-p0axS.js} +6 -6
  101. package/dist/{fthry_index.BE-1b7-q.js → fthry_index.By9Va7yz.js} +6 -6
  102. package/dist/{fthry_index.CRSq4rGz.js → fthry_index.C9r-2T-9.js} +6 -6
  103. package/dist/{fthry_index.CLHxEKDU.js → fthry_index.CMh4cU_z.js} +66 -35
  104. package/dist/{fthry_index.BQguezyR.js → fthry_index.CUF2y3Aa.js} +1 -1
  105. package/dist/{fthry_index.DoYMXQUW.js → fthry_index.CVQd320z.js} +8 -8
  106. package/dist/{fthry_index.9Ck9ftoz.js → fthry_index.ClSefCHf.js} +1 -1
  107. package/dist/{fthry_index.BBfWFvRc.js → fthry_index.D7lNVIgD.js} +1 -1
  108. package/dist/{fthry_index.BnI0SWmF.js → fthry_index.D9GA9x4P.js} +3 -3
  109. package/dist/{fthry_index.BueBK9vP.js → fthry_index.DKiSNQ6p.js} +1 -1
  110. package/dist/{fthry_index.DLVY2u37.js → fthry_index.DR8HsKVo.js} +4 -4
  111. package/dist/{fthry_index.BJMKe9bY.js → fthry_index.DSS7GFbG.js} +4 -4
  112. package/dist/{fthry_index.BTyNf3DP.js → fthry_index.D_JQEcg-.js} +4 -4
  113. package/dist/{fthry_index.BFd-TLmA.js → fthry_index.DclrMlf2.js} +5 -5
  114. package/dist/{fthry_index.BUzvhIcG.js → fthry_index.Dkg3j5xH.js} +2 -2
  115. package/dist/{fthry_index.fk9t5r9-.js → fthry_index.DtrV_j07.js} +1 -1
  116. package/dist/{fthry_index.DIRJK8qX.js → fthry_index.Dxpjw81y.js} +5 -5
  117. package/dist/{fthry_index.BCis3aeZ.js → fthry_index.F3kjcuAK.js} +528 -48
  118. package/dist/{fthry_index.DkIp3iRV.js → fthry_index.sWxp-JjY.js} +5 -5
  119. package/dist/{fthry_index.q-SYsLEL.js → fthry_index.y9utv2Db.js} +1 -1
  120. package/dist/{fthry_input.CAzTu6mk.js → fthry_input.DlZicl10.js} +1 -1
  121. package/dist/{fthry_script.Bf8zgQ01.js → fthry_script.BjtIkib6.js} +1 -1
  122. package/dist/{fthry_styles.DjMXy6e-.js → fthry_styles.Dxs0EByz.js} +1 -1
  123. package/dist/{fthry_useElementSize.DPFsWHu0.js → fthry_useElementSize.BeQYF72J.js} +1 -1
  124. package/dist/{fthry_useSalesforceSync.CxDImAZo.js → fthry_useSalesforceSync.DcCcNLS2.js} +1 -1
  125. package/dist/{fthry_webfontloader.C1UQw9Fa.js → fthry_webfontloader.B7FGEMJA.js} +1 -1
  126. package/dist/index.d.ts +2 -1
  127. package/dist/index.d.ts.map +1 -1
  128. package/dist/index.js +1 -1
  129. package/dist/utils/featheryClient/index.d.ts +2 -1
  130. package/dist/utils/featheryClient/index.d.ts.map +1 -1
  131. package/dist/utils/formContext.d.ts +2 -1
  132. package/dist/utils/formContext.d.ts.map +1 -1
  133. package/package.json +2 -2
  134. package/umd/{277.d9907ecd5dc2117c9171.js → 277.87e6ca5c1cf2a7477992.js} +1 -1
  135. package/umd/{509.a863f8749c28540476bb.js → 509.bca2ff43c66b1dba064f.js} +2 -2
  136. package/umd/{AddressField.ec97334fe233830bc05b.js → AddressField.2d777eda22a67a0ed3a3.js} +1 -1
  137. package/umd/{DateSelectorField.00f321e0b1972feb9d69.js → DateSelectorField.54afc978d2fd9d10b106.js} +1 -1
  138. package/umd/{FileUploadField.ea0067dd62b0454b7c2e.js → FileUploadField.7a5028fb6035d09b3e81.js} +1 -1
  139. package/umd/{PasswordField.1358356d6fbc6880f12a.js → PasswordField.7585ef588333cb4181f7.js} +1 -1
  140. package/umd/{PaymentMethodField.9a8e934f7450eb141217.js → PaymentMethodField.d08bcfa1efb56084572d.js} +1 -1
  141. package/umd/{PhoneField.c526085aaa5ccd25e982.js → PhoneField.19c987f04cfcb60ab07c.js} +1 -1
  142. package/umd/{SignatureField.d710930ca89642eb651c.js → SignatureField.0e7d60fa2fafcb6be554.js} +1 -1
  143. package/umd/TableElement.b9bb3cedf1a75fd2ea01.js +1 -0
  144. package/umd/{TextArea.f566845d458d4c00e0e7.js → TextArea.7cca0d69e618846660c5.js} +1 -1
  145. package/umd/{TextField.5a5296fe3ea60c4459f2.js → TextField.f5cc4a03e69d5872027b.js} +1 -1
  146. package/umd/index.js +1 -1
  147. package/umd/TableElement.ee77e0f53a9ccac846ab.js +0 -1
  148. /package/umd/{509.a863f8749c28540476bb.js.LICENSE.txt → 509.bca2ff43c66b1dba064f.js.LICENSE.txt} +0 -0
@@ -1 +1 @@
1
- "use strict";(this.webpackChunkFeathery=this.webpackChunkFeathery||[]).push([[707],{1587:(e,t,r)=>{r.d(t,{Z:()=>f});var n=r(5944),o=r(7294),i=r(8776),a=r(5467),l=r(2988),u=r(4665),c=r(7449),s=r(9479),d=function(){return d=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},d.apply(this,arguments)};function f(e){var t=e.id,r=e.text,f=e.responsiveStyles,p=e.absolute,v=void 0===p||p,h=e.containerRef,m=e.repeat,g=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),y=g[0],b=g[1],w=(0,o.useRef)(null);if(!(r=(0,u.xf)(r,m)))return null;var x=(0,s.tq)();return(0,n.BX)(n.HY,{children:[(0,n.tZ)("div",d({ref:w,onMouseEnter:x?void 0:function(){return b(!0)},onMouseLeave:x?void 0:function(){return b(!1)},onFocus:function(){return b(!0)},onBlur:function(){return b(!1)},onClick:function(){return b((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:f.getTarget("tooltipIcon")})})),(0,n.tZ)(c.Z,d({show:y,targetRef:w,containerRef:h,placement:"left",onHide:function(){return b(!1)},offset:8},{children:(0,n.tZ)(i.u,d({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}))}))]})}},7449:(e,t,r)=>{r.d(t,{Z:()=>u});var n=r(5944),o=r(7294),i=r(3935),a=r(9479),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,d=e.onHide,f=e.placement,p=void 0===f?"bottom-start":f,v=e.offset,h=void 0===v?0:v,m=e.zIndex,g=void 0===m?1e3:m,y=e.containerRef,b=(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],k=w[1],S=(0,o.useCallback)((function(){return(null==y?void 0:y.current)||(0,a.me)().body}),[y]),O=(0,o.useCallback)((function(){var e;if(t&&r.current&&b.current){var n=(0,a.Kv)(),o=S();if(o){var i=r.current.getBoundingClientRect(),l=b.current.getBoundingClientRect(),u=o.getBoundingClientRect(),d=s(p,i,l,h),f=d.top,v=d.left,m=f+l.height,g=v+l.width,y=f>=0&&m<=n.innerHeight,w=v>=0&&g<=n.innerWidth;if(!y||!w){var x=c(p,!y,!w);x!==p&&(f=(e=s(x,i,l,h)).top,v=e.left)}var O=o===(0,a.me)().body,E=O?f+n.scrollY:f-u.top,R=O?v+n.scrollX:v-u.left;k((function(e){return e&&e.top===E&&e.left===R?e:{top:E,left:R}}))}}}),[t,p,h,S,r]),E=(0,o.useCallback)((function(){var e=!1;return function(){e||(e=!0,requestAnimationFrame((function(){O(),e=!1})))}}),[O])();if((0,o.useLayoutEffect)((function(){t&&O()}),[t,O]),(0,o.useEffect)((function(){if(t){var e=(0,a.Kv)(),n=S();if(n){e.addEventListener("resize",E),e.addEventListener("scroll",E,!0),n!==(0,a.me)().body&&n.addEventListener("scroll",E);var o=new ResizeObserver((function(){return E()}));return r.current&&o.observe(r.current),n!==(0,a.me)().body&&o.observe(n),function(){e.removeEventListener("resize",E),e.removeEventListener("scroll",E,!0),n!==(0,a.me)().body&&n.removeEventListener("scroll",E),o.disconnect()}}}}),[t,E,S,r]),(0,o.useEffect)((function(){if(t){var e=function(e){"Escape"===e.key&&(k(null),null==d||d())},n=function(e){var t=e.target;b.current&&!b.current.contains(t)&&r.current&&!r.current.contains(t)&&(k(null),null==d||d())},o=(0,a.me)();return o.addEventListener("mousedown",n),o.addEventListener("keydown",e),function(){o.removeEventListener("mousedown",n),o.removeEventListener("keydown",e)}}}),[t,d,r]),!t)return null;var R=S();return R?(0,i.createPortal)((0,n.tZ)("div",l({ref:b,style:l(l({position:"absolute"},x||{top:-9999,left:-9999}),{zIndex:g})},{children:u})),R):(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}}}},9069:(e,t,r)=>{r.d(t,{Z:()=>i});var n=r(5944),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,d=e.inputFocused,f=void 0!==d&&d,p=e.repeatIndex,v=void 0===p?null:p,h=l.properties,m=null!==(i=(null!==(r=h.repeat_placeholder)&&void 0!==r?r:[])[null!=v?v:0])&&void 0!==i?i:h.placeholder||"",g=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"):{}),f?g:{}),(t={},t["".concat(s,":focus ~ &")]=g,t))},{children:m}))}},8776:(e,t,r)=>{r.d(t,{u:()=>a});var n=r(5944),o=r(2988),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}))}))}},8500:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Z});var n=r(5944),o=r(7294),i=r(9069),a=r(1587),l=r(1211),u=r(9234),c=r(6867),s=r(1275),d=r(7449),f=r(5398),p=function(){return p=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},p.apply(this,arguments)};const v=(0,o.memo)((function(e){var t=e.allOptions,r=void 0===t?[]:t,i=e.showOptions,a=e.onSelect,l=void 0===a?function(){}:a,u=e.onHide,c=void 0===u?function(){}:u,v=e.onInputFocus,h=void 0===v?function(){}:v,m=e.value,g=void 0===m?"":m,y=e.containerRef,b=e.responsiveStyles,w=e.listItemRef,x=e.children,k=r.filter((function(e){return e.toLowerCase().includes(g.toLowerCase())})),S=(0,o.useRef)(null),O=(0,f.Z)(S).width;return 0===r.length?x:(0,n.BX)("div",p({ref:S,css:{height:"100%",width:"100%"}},{children:[x,k.length>0&&i&&(0,n.tZ)(d.Z,p({targetRef:S,containerRef:y,show:!0,placement:"bottom-start",onHide:c},{children:(0,n.tZ)("ul",p({css:p({zIndex:s.m,listStyleType:"none",padding:0,margin:0,maxHeight:"210px",overflowY:"scroll",overflowX:"auto",width:void 0!==O?"".concat(O,"px"):"100%",backgroundColor:"white",cursor:"pointer",boxShadow:"0 0 4px rgb(0 0 0 / 15%)"},b.getTarget("dropdown"))},{children:k.map((function(e,t){return(0,n.tZ)("li",p({css:{padding:"8px 14px",transition:"0.1s ease all","&:hover":{backgroundColor:"#e6e6e633"},"&:focus-visible":{outline:"none",backgroundColor:"#e6e6e644"}},tabIndex:0,ref:function(e){w.current[t]=e},onClick:function(){return l(e)},onKeyDown:function(r){var n,o,i=function(){r.preventDefault(),r.stopPropagation()};"Enter"===r.key?(i(),l(e)):["ArrowDown","ArrowRight"].includes(r.key)?(i(),null===(n=w.current[t].nextSibling)||void 0===n||n.focus()):["ArrowUp","ArrowLeft"].includes(r.key)&&(i(),0===t?h():null===(o=w.current[t].previousSibling)||void 0===o||o.focus())},onBlur:function(e){e.relatedTarget&&w.current.some((function(t){return t===e.relatedTarget}))||c()}},{children:e}),"".concat(e,"-").concat(t))}))}))}))]}))}));var h=r(7193),m=r(426),g=r(2988),y=r(9479),b=r(5467),w=r(3466),x=function(){return x=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},x.apply(this,arguments)},k=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},S={text_area:16384,url:256,gmap_zip:10},O=function(e){var t;return null!==(t=S[e])&&void 0!==t?t:1024};function E(e){return(null!=e?e:"").replaceAll("0","\\0").replaceAll("a","\\a").replaceAll("b","\\b").replaceAll("*","\\*")}function R(e){var t=e.metadata,r=E(t.prefix),n=E(t.suffix),o="";if(t.mask)o=t.mask;else{var i=t.allowed_characters;"gmap_zip"!==e.type||i||(i="alphaspace");var a=function(e){switch(e){case"letters":return"a";case"alphanumeric":return"b";case"alphaspace":return"c";case"digits":return"0";default:return"*"}}(i),l=O(e.type)-r.length-n.length;e.max_length&&(l=Math.min(e.max_length,l)),o="[".concat(a.repeat(l),"]")}return"".concat(r).concat(o).concat(n)}function C(e,t,r){var n,o,i,a,l=null!==(n=e.max_length)&&void 0!==n?n:O(e.type);switch(e.type){case"integer_field":a={mask:"num",blocks:{num:{mask:Number,radix:".",thousandsSeparator:",",scale:2,max:null!==(o=e.max_length)&&void 0!==o?o:Number.MAX_SAFE_INTEGER,min:Math.max(0,null!==(i=e.min_length)&&void 0!==i?i:0)}},value:t.toString()},"currency"===e.format&&(a.mask="$num");break;case"ssn":a={mask:e.metadata.last_four_digits?"∗∗∗ - ∗∗ - 0000":"000 - 00 - 0000",displayChar:r?void 0:"∗",placeholderChar:e.metadata.last_four_digits?" ":void 0,lazy:!e.metadata.last_four_digits};break;case"email":case"text_area":case"url":a={mask:new RegExp("^.{0,".concat(l,"}$")),maxLength:l};break;default:e.metadata.mask&&(l=void 0),a={mask:R(e),definitions:{b:/[a-zA-Z0-9]/,c:/[a-zA-Z0-9 ]/},maxLength:l}}return x({lazy:!1,unmask:!e.metadata.save_mask},a)}function L(e,t,r){var n,o={minLength:e.min_length},i=null!==(n=e.max_length)&&void 0!==n?n:O(e.type);t.length>0&&(o.autoComplete="off");var a=e.metadata;switch(e.type){case"integer_field":return{inputMode:"decimal"};case"email":return r&&!o.autoComplete&&(o.autoComplete="email"),x({type:"email",pattern:u.Z1,maxLength:i},o);case"gmap_zip":return r&&!o.autoComplete&&(o.autoComplete="postal-code"),x(x({},o),{maxLength:i,inputMode:"digits"===a.allowed_characters?"numeric":"text"});case"url":return r&&!o.autoComplete&&(o.autoComplete="url",o.maxLength=i),o;case"ssn":return x({inputMode:"numeric"},o);default:return o.maxLength=i,a.custom_autocomplete&&!o.autoComplete&&(o.autoComplete=a.custom_autocomplete),a.number_keypad||"digits"===a.allowed_characters?x({inputMode:"numeric"},o):o}}const Z=(0,o.memo)((function(e){var t,r,u=e.element,s=e.responsiveStyles,d=e.fieldLabel,f=e.elementProps,p=void 0===f?{}:f,S=e.required,O=void 0!==S&&S,E=e.disabled,R=void 0!==E&&E,Z=e.autoComplete,_=e.editMode,I=e.onAccept,T=void 0===I?function(){}:I,z=e.onEnter,A=void 0===z?function(){}:z,j=e.setRef,M=void 0===j?function(){}:j,B=e.inlineError,F=e.repeatIndex,P=void 0===F?null:F,H=e.children,X=k((0,o.useState)(!1),2),D=X[0],K=X[1],N=k((0,o.useState)(!1),2),q=N[0],W=N[1],Y=(0,c.Z)({element:u,error:B,breakpoint:s.getMobileBreakpoint()}),U=Y.borderStyles,$=Y.customBorder,G=Y.borderId,J=(0,o.useRef)(null),Q=(0,o.useRef)([]),V=(0,o.useRef)(null),ee=(0,h.OL)(u).value,te=(0,m.e7)(ee),re=u.servar,ne=(null!==(r=re.metadata.options)&&void 0!==r?r:[]).filter((function(e){return e})),oe=u.properties.tooltipText?30:8;return(0,n.BX)("div",x({ref:J,css:x({maxWidth:"100%",width:"100%",height:"100%",position:"relative",pointerEvents:_?"none":"auto"},s.getTarget("fc"))},p,{children:[H,d,(0,n.BX)("div",x({css:x(x(x({position:"relative",width:"100%",whiteSpace:"nowrap",overflowX:"clip"},s.getTarget("sub-fc")),R?s.getTarget("disabled"):{}),{"&:focus-within":x(x({},s.getTarget("active")),U.active),"&:hover":(0,y.wL)(R?{}:x(x({},s.getTarget("hover")),U.hover))})},{children:[(0,n.tZ)(v,x({allOptions:ne,value:te,showOptions:D,onSelect:function(e){var t,r,n;T(e,{}),K(!1),null===(n=null===(r=null===(t=V.current)||void 0===t?void 0:t.element)||void 0===r?void 0:r.focus)||void 0===n||n.call(r)},responsiveStyles:s,containerRef:J,listItemRef:Q,onHide:function(){return K(!1)},onInputFocus:function(){var e,t,r;return null===(r=null===(t=null===(e=V.current)||void 0===e?void 0:e.element)||void 0===t?void 0:t.focus)||void 0===r?void 0:r.call(t)}},{children:(0,n.tZ)(w.oc,x({id:re.key,name:re.key,ref:V,css:x(x(x({position:"relative",zIndex:g.rM,height:"100%",width:"100%",border:"none",margin:0,backgroundColor:"transparent"},l.ET),s.getTarget("field")),(t={"&:focus":s.getTarget("field")["&:focus"]},t["&:focus ~ #".concat(G)]=Object.values(U.active)[0],t["&:not(:focus)"]=te||!u.properties.placeholder?{}:{color:"transparent !important"},t)),required:O,disabled:R,placeholder:"",value:te,"aria-label":u.properties.aria_label,onKeyDown:function(e){if("Enter"===e.key)A(e);else if(ne.length){if(!te&&["Backspace","Delete"].includes(e.key))return;if(["ArrowUp","ArrowLeft","ArrowRight"].includes(e.key))return;K("Escape"!==e.key),"ArrowDown"===e.key&&setTimeout((function(){var e;return null===(e=Q.current[0])||void 0===e?void 0:e.focus({preventScroll:!0})}),0)}},onBlur:function(e){e.relatedTarget&&Q.current.some((function(t){return t===e.relatedTarget}))||ne.length>0&&setTimeout((function(){return K(!1)}),200)},onFocus:y.ms,inputRef:M},L(re,ne,"on"===Z),C(re,te,q),{onAccept:T}))})),"ssn"===re.type&&te&&(0,n.tZ)("div",x({css:{position:"absolute",cursor:"pointer",insetInlineEnd:"".concat(oe,"px"),top:"calc(50% - 12px)",zIndex:g.rM},onClick:function(){return W((function(e){return!e}))},"aria-label":"Toggle SSN visibility"},{children:q?(0,n.tZ)(b.uL,{}):(0,n.tZ)(b.FX,{})})),$,(0,n.tZ)(i.Z,{value:te,element:u,responsiveStyles:s,repeatIndex:P}),(0,n.tZ)(a.Z,{containerRef:J,id:u.id,text:u.properties.tooltipText,responsiveStyles:s,repeat:u.repeat})]}))]}))}))},5398:(e,t,r)=>{r.d(t,{Z:()=>i});var n=r(7294),o=r(9479);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
+ "use strict";(this.webpackChunkFeathery=this.webpackChunkFeathery||[]).push([[707],{1587:(e,t,r)=>{r.d(t,{Z:()=>f});var n=r(5944),o=r(7294),i=r(8776),a=r(5096),l=r(2988),u=r(4665),c=r(7449),s=r(9479),d=function(){return d=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},d.apply(this,arguments)};function f(e){var t=e.id,r=e.text,f=e.responsiveStyles,p=e.absolute,v=void 0===p||p,h=e.containerRef,m=e.repeat,g=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),y=g[0],b=g[1],w=(0,o.useRef)(null);if(!(r=(0,u.xf)(r,m)))return null;var x=(0,s.tq)();return(0,n.BX)(n.HY,{children:[(0,n.tZ)("div",d({ref:w,onMouseEnter:x?void 0:function(){return b(!0)},onMouseLeave:x?void 0:function(){return b(!1)},onFocus:function(){return b(!0)},onBlur:function(){return b(!1)},onClick:function(){return b((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:f.getTarget("tooltipIcon")})})),(0,n.tZ)(c.Z,d({show:y,targetRef:w,containerRef:h,placement:"left",onHide:function(){return b(!1)},offset:8},{children:(0,n.tZ)(i.u,d({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}))}))]})}},7449:(e,t,r)=>{r.d(t,{Z:()=>u});var n=r(5944),o=r(7294),i=r(3935),a=r(9479),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,d=e.onHide,f=e.placement,p=void 0===f?"bottom-start":f,v=e.offset,h=void 0===v?0:v,m=e.zIndex,g=void 0===m?1e3:m,y=e.containerRef,b=(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],k=w[1],S=(0,o.useCallback)((function(){return(null==y?void 0:y.current)||(0,a.me)().body}),[y]),O=(0,o.useCallback)((function(){var e;if(t&&r.current&&b.current){var n=(0,a.Kv)(),o=S();if(o){var i=r.current.getBoundingClientRect(),l=b.current.getBoundingClientRect(),u=o.getBoundingClientRect(),d=s(p,i,l,h),f=d.top,v=d.left,m=f+l.height,g=v+l.width,y=f>=0&&m<=n.innerHeight,w=v>=0&&g<=n.innerWidth;if(!y||!w){var x=c(p,!y,!w);x!==p&&(f=(e=s(x,i,l,h)).top,v=e.left)}var O=o===(0,a.me)().body,E=O?f+n.scrollY:f-u.top,R=O?v+n.scrollX:v-u.left;k((function(e){return e&&e.top===E&&e.left===R?e:{top:E,left:R}}))}}}),[t,p,h,S,r]),E=(0,o.useCallback)((function(){var e=!1;return function(){e||(e=!0,requestAnimationFrame((function(){O(),e=!1})))}}),[O])();if((0,o.useLayoutEffect)((function(){t&&O()}),[t,O]),(0,o.useEffect)((function(){if(t){var e=(0,a.Kv)(),n=S();if(n){e.addEventListener("resize",E),e.addEventListener("scroll",E,!0),n!==(0,a.me)().body&&n.addEventListener("scroll",E);var o=new ResizeObserver((function(){return E()}));return r.current&&o.observe(r.current),n!==(0,a.me)().body&&o.observe(n),function(){e.removeEventListener("resize",E),e.removeEventListener("scroll",E,!0),n!==(0,a.me)().body&&n.removeEventListener("scroll",E),o.disconnect()}}}}),[t,E,S,r]),(0,o.useEffect)((function(){if(t){var e=function(e){"Escape"===e.key&&(k(null),null==d||d())},n=function(e){var t=e.target;b.current&&!b.current.contains(t)&&r.current&&!r.current.contains(t)&&(k(null),null==d||d())},o=(0,a.me)();return o.addEventListener("mousedown",n),o.addEventListener("keydown",e),function(){o.removeEventListener("mousedown",n),o.removeEventListener("keydown",e)}}}),[t,d,r]),!t)return null;var R=S();return R?(0,i.createPortal)((0,n.tZ)("div",l({ref:b,style:l(l({position:"absolute"},x||{top:-9999,left:-9999}),{zIndex:g})},{children:u})),R):(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}}}},9069:(e,t,r)=>{r.d(t,{Z:()=>i});var n=r(5944),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,d=e.inputFocused,f=void 0!==d&&d,p=e.repeatIndex,v=void 0===p?null:p,h=l.properties,m=null!==(i=(null!==(r=h.repeat_placeholder)&&void 0!==r?r:[])[null!=v?v:0])&&void 0!==i?i:h.placeholder||"",g=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"):{}),f?g:{}),(t={},t["".concat(s,":focus ~ &")]=g,t))},{children:m}))}},8776:(e,t,r)=>{r.d(t,{u:()=>a});var n=r(5944),o=r(2988),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}))}))}},8500:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Z});var n=r(5944),o=r(7294),i=r(9069),a=r(1587),l=r(1211),u=r(9234),c=r(6867),s=r(1275),d=r(7449),f=r(5398),p=function(){return p=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},p.apply(this,arguments)};const v=(0,o.memo)((function(e){var t=e.allOptions,r=void 0===t?[]:t,i=e.showOptions,a=e.onSelect,l=void 0===a?function(){}:a,u=e.onHide,c=void 0===u?function(){}:u,v=e.onInputFocus,h=void 0===v?function(){}:v,m=e.value,g=void 0===m?"":m,y=e.containerRef,b=e.responsiveStyles,w=e.listItemRef,x=e.children,k=r.filter((function(e){return e.toLowerCase().includes(g.toLowerCase())})),S=(0,o.useRef)(null),O=(0,f.Z)(S).width;return 0===r.length?x:(0,n.BX)("div",p({ref:S,css:{height:"100%",width:"100%"}},{children:[x,k.length>0&&i&&(0,n.tZ)(d.Z,p({targetRef:S,containerRef:y,show:!0,placement:"bottom-start",onHide:c},{children:(0,n.tZ)("ul",p({css:p({zIndex:s.m,listStyleType:"none",padding:0,margin:0,maxHeight:"210px",overflowY:"scroll",overflowX:"auto",width:void 0!==O?"".concat(O,"px"):"100%",backgroundColor:"white",cursor:"pointer",boxShadow:"0 0 4px rgb(0 0 0 / 15%)"},b.getTarget("dropdown"))},{children:k.map((function(e,t){return(0,n.tZ)("li",p({css:{padding:"8px 14px",transition:"0.1s ease all","&:hover":{backgroundColor:"#e6e6e633"},"&:focus-visible":{outline:"none",backgroundColor:"#e6e6e644"}},tabIndex:0,ref:function(e){w.current[t]=e},onClick:function(){return l(e)},onKeyDown:function(r){var n,o,i=function(){r.preventDefault(),r.stopPropagation()};"Enter"===r.key?(i(),l(e)):["ArrowDown","ArrowRight"].includes(r.key)?(i(),null===(n=w.current[t].nextSibling)||void 0===n||n.focus()):["ArrowUp","ArrowLeft"].includes(r.key)&&(i(),0===t?h():null===(o=w.current[t].previousSibling)||void 0===o||o.focus())},onBlur:function(e){e.relatedTarget&&w.current.some((function(t){return t===e.relatedTarget}))||c()}},{children:e}),"".concat(e,"-").concat(t))}))}))}))]}))}));var h=r(7193),m=r(426),g=r(2988),y=r(9479),b=r(5096),w=r(3466),x=function(){return x=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},x.apply(this,arguments)},k=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},S={text_area:16384,url:256,gmap_zip:10},O=function(e){var t;return null!==(t=S[e])&&void 0!==t?t:1024};function E(e){return(null!=e?e:"").replaceAll("0","\\0").replaceAll("a","\\a").replaceAll("b","\\b").replaceAll("*","\\*")}function R(e){var t=e.metadata,r=E(t.prefix),n=E(t.suffix),o="";if(t.mask)o=t.mask;else{var i=t.allowed_characters;"gmap_zip"!==e.type||i||(i="alphaspace");var a=function(e){switch(e){case"letters":return"a";case"alphanumeric":return"b";case"alphaspace":return"c";case"digits":return"0";default:return"*"}}(i),l=O(e.type)-r.length-n.length;e.max_length&&(l=Math.min(e.max_length,l)),o="[".concat(a.repeat(l),"]")}return"".concat(r).concat(o).concat(n)}function C(e,t,r){var n,o,i,a,l=null!==(n=e.max_length)&&void 0!==n?n:O(e.type);switch(e.type){case"integer_field":a={mask:"num",blocks:{num:{mask:Number,radix:".",thousandsSeparator:",",scale:2,max:null!==(o=e.max_length)&&void 0!==o?o:Number.MAX_SAFE_INTEGER,min:Math.max(0,null!==(i=e.min_length)&&void 0!==i?i:0)}},value:t.toString()},"currency"===e.format&&(a.mask="$num");break;case"ssn":a={mask:e.metadata.last_four_digits?"∗∗∗ - ∗∗ - 0000":"000 - 00 - 0000",displayChar:r?void 0:"∗",placeholderChar:e.metadata.last_four_digits?" ":void 0,lazy:!e.metadata.last_four_digits};break;case"email":case"text_area":case"url":a={mask:new RegExp("^.{0,".concat(l,"}$")),maxLength:l};break;default:e.metadata.mask&&(l=void 0),a={mask:R(e),definitions:{b:/[a-zA-Z0-9]/,c:/[a-zA-Z0-9 ]/},maxLength:l}}return x({lazy:!1,unmask:!e.metadata.save_mask},a)}function L(e,t,r){var n,o={minLength:e.min_length},i=null!==(n=e.max_length)&&void 0!==n?n:O(e.type);t.length>0&&(o.autoComplete="off");var a=e.metadata;switch(e.type){case"integer_field":return{inputMode:"decimal"};case"email":return r&&!o.autoComplete&&(o.autoComplete="email"),x({type:"email",pattern:u.Z1,maxLength:i},o);case"gmap_zip":return r&&!o.autoComplete&&(o.autoComplete="postal-code"),x(x({},o),{maxLength:i,inputMode:"digits"===a.allowed_characters?"numeric":"text"});case"url":return r&&!o.autoComplete&&(o.autoComplete="url",o.maxLength=i),o;case"ssn":return x({inputMode:"numeric"},o);default:return o.maxLength=i,a.custom_autocomplete&&!o.autoComplete&&(o.autoComplete=a.custom_autocomplete),a.number_keypad||"digits"===a.allowed_characters?x({inputMode:"numeric"},o):o}}const Z=(0,o.memo)((function(e){var t,r,u=e.element,s=e.responsiveStyles,d=e.fieldLabel,f=e.elementProps,p=void 0===f?{}:f,S=e.required,O=void 0!==S&&S,E=e.disabled,R=void 0!==E&&E,Z=e.autoComplete,_=e.editMode,I=e.onAccept,T=void 0===I?function(){}:I,z=e.onEnter,A=void 0===z?function(){}:z,j=e.setRef,M=void 0===j?function(){}:j,B=e.inlineError,F=e.repeatIndex,P=void 0===F?null:F,H=e.children,X=k((0,o.useState)(!1),2),D=X[0],K=X[1],N=k((0,o.useState)(!1),2),q=N[0],W=N[1],Y=(0,c.Z)({element:u,error:B,breakpoint:s.getMobileBreakpoint()}),U=Y.borderStyles,$=Y.customBorder,G=Y.borderId,J=(0,o.useRef)(null),Q=(0,o.useRef)([]),V=(0,o.useRef)(null),ee=(0,h.OL)(u).value,te=(0,m.e7)(ee),re=u.servar,ne=(null!==(r=re.metadata.options)&&void 0!==r?r:[]).filter((function(e){return e})),oe=u.properties.tooltipText?30:8;return(0,n.BX)("div",x({ref:J,css:x({maxWidth:"100%",width:"100%",height:"100%",position:"relative",pointerEvents:_?"none":"auto"},s.getTarget("fc"))},p,{children:[H,d,(0,n.BX)("div",x({css:x(x(x({position:"relative",width:"100%",whiteSpace:"nowrap",overflowX:"clip"},s.getTarget("sub-fc")),R?s.getTarget("disabled"):{}),{"&:focus-within":x(x({},s.getTarget("active")),U.active),"&:hover":(0,y.wL)(R?{}:x(x({},s.getTarget("hover")),U.hover))})},{children:[(0,n.tZ)(v,x({allOptions:ne,value:te,showOptions:D,onSelect:function(e){var t,r,n;T(e,{}),K(!1),null===(n=null===(r=null===(t=V.current)||void 0===t?void 0:t.element)||void 0===r?void 0:r.focus)||void 0===n||n.call(r)},responsiveStyles:s,containerRef:J,listItemRef:Q,onHide:function(){return K(!1)},onInputFocus:function(){var e,t,r;return null===(r=null===(t=null===(e=V.current)||void 0===e?void 0:e.element)||void 0===t?void 0:t.focus)||void 0===r?void 0:r.call(t)}},{children:(0,n.tZ)(w.oc,x({id:re.key,name:re.key,ref:V,css:x(x(x({position:"relative",zIndex:g.rM,height:"100%",width:"100%",border:"none",margin:0,backgroundColor:"transparent"},l.ET),s.getTarget("field")),(t={"&:focus":s.getTarget("field")["&:focus"]},t["&:focus ~ #".concat(G)]=Object.values(U.active)[0],t["&:not(:focus)"]=te||!u.properties.placeholder?{}:{color:"transparent !important"},t)),required:O,disabled:R,placeholder:"",value:te,"aria-label":u.properties.aria_label,onKeyDown:function(e){if("Enter"===e.key)A(e);else if(ne.length){if(!te&&["Backspace","Delete"].includes(e.key))return;if(["ArrowUp","ArrowLeft","ArrowRight"].includes(e.key))return;K("Escape"!==e.key),"ArrowDown"===e.key&&setTimeout((function(){var e;return null===(e=Q.current[0])||void 0===e?void 0:e.focus({preventScroll:!0})}),0)}},onBlur:function(e){e.relatedTarget&&Q.current.some((function(t){return t===e.relatedTarget}))||ne.length>0&&setTimeout((function(){return K(!1)}),200)},onFocus:y.ms,inputRef:M},L(re,ne,"on"===Z),C(re,te,q),{onAccept:T}))})),"ssn"===re.type&&te&&(0,n.tZ)("div",x({css:{position:"absolute",cursor:"pointer",insetInlineEnd:"".concat(oe,"px"),top:"calc(50% - 12px)",zIndex:g.rM},onClick:function(){return W((function(e){return!e}))},"aria-label":"Toggle SSN visibility"},{children:q?(0,n.tZ)(b.uL,{}):(0,n.tZ)(b.FX,{})})),$,(0,n.tZ)(i.Z,{value:te,element:u,responsiveStyles:s,repeatIndex:P}),(0,n.tZ)(a.Z,{containerRef:J,id:u.id,text:u.properties.tooltipText,responsiveStyles:s,repeat:u.repeat})]}))]}))}))},5398:(e,t,r)=>{r.d(t,{Z:()=>i});var n=r(7294),o=r(9479);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}}}]);