@verbb/formie-browser 1.0.4 → 1.0.6

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 (197) hide show
  1. package/CHANGELOG.md +76 -22
  2. package/dist/chunks/address-country-Rx6GQTND.js +68 -0
  3. package/dist/chunks/address-finder-yXU5yMjG.js +30 -0
  4. package/dist/chunks/address-state-BQ0xGV9n.js +344 -0
  5. package/dist/chunks/api-CmwLRq_n.js +780 -0
  6. package/dist/chunks/api-DMK8NSUI.js +407 -0
  7. package/dist/chunks/api-sPqGbOww.js +125 -0
  8. package/dist/chunks/async-nPFRNQ06.js +25 -0
  9. package/dist/chunks/bpoint-DSjqRv63.js +24 -0
  10. package/dist/chunks/calculations-CeDgB9jt.js +299 -0
  11. package/dist/chunks/captcha-eu-CWJb64_j.js +31 -0
  12. package/dist/chunks/checkbox-radio-DQ0H67Tj.js +125 -0
  13. package/dist/chunks/chunk-3b4jIN3o.js +13 -0
  14. package/dist/chunks/combobox-D-2b42wn.js +1954 -0
  15. package/dist/chunks/conditions-DjZOtHfS.js +412 -0
  16. package/dist/chunks/constants-DVcJAvc5.js +38 -0
  17. package/dist/chunks/country-from-ip-BwxKaBuJ.js +26 -0
  18. package/dist/chunks/custom-google-maps-BsaSirEZ.js +194 -0
  19. package/dist/chunks/custom-link-CJ1-FjEM.js +46 -0
  20. package/dist/chunks/custom-maps-DYW_pBid.js +161 -0
  21. package/dist/chunks/date-picker-5CA_-zGb.js +5311 -0
  22. package/dist/chunks/debug-BV0DvdHx.js +41 -0
  23. package/dist/chunks/dist-BQ4a9hmy.js +2659 -0
  24. package/dist/chunks/event-names-BCI2FLD8.js +51 -0
  25. package/dist/chunks/eway-D3ctTbEk.js +70 -0
  26. package/dist/chunks/field-references.keys-58ZSTrCW.js +21 -0
  27. package/dist/chunks/field-references.resolver-CHwn0G0L.js +145 -0
  28. package/dist/chunks/file-upload-D49m8-DR.js +287 -0
  29. package/dist/chunks/friendly-captcha-v1-ByXzENYZ.js +31 -0
  30. package/dist/chunks/friendly-captcha-v2-BPdlmhQu.js +36 -0
  31. package/dist/chunks/friendly-challenge-8uPatWqk.js +832 -0
  32. package/dist/chunks/go-cardless-BwASSYSK.js +23 -0
  33. package/dist/chunks/google-address-OhKilPWE.js +161 -0
  34. package/dist/chunks/hcaptcha-CdCd9oEi.js +54 -0
  35. package/dist/chunks/hidden-D7_Ch-QN.js +26 -0
  36. package/dist/chunks/http-D-JExro7.js +27 -0
  37. package/dist/chunks/i18n-BY1ds1BL.js +121 -0
  38. package/dist/chunks/leaflet-src-j-lHNmhR.js +4585 -0
  39. package/dist/chunks/loqate-Cp2zvwpE.js +76 -0
  40. package/dist/chunks/mollie-COG-ko2D.js +23 -0
  41. package/dist/chunks/moneris-CMH8PlRc.js +117 -0
  42. package/dist/chunks/opayo-D2jsR5vh.js +113 -0
  43. package/dist/chunks/paddle-DxF88RfC.js +55 -0
  44. package/dist/chunks/paypal-b5pnwrA2.js +95 -0
  45. package/dist/chunks/payway-BJYu9DIR.js +55 -0
  46. package/dist/chunks/phone-country-D3ayr60L.js +2645 -0
  47. package/dist/chunks/place-kit-BGHklIZ-.js +48 -0
  48. package/dist/chunks/placekit-autocomplete.esm-DWVabQlq.js +1236 -0
  49. package/dist/chunks/recaptcha-enterprise-BSwi8IVX.js +65 -0
  50. package/dist/chunks/recaptcha-shared-B4zAescW.js +15 -0
  51. package/dist/chunks/recaptcha-v2-checkbox-CnDQmsKa.js +40 -0
  52. package/dist/chunks/recaptcha-v2-invisible-Cz5uIlp-.js +53 -0
  53. package/dist/chunks/recaptcha-v3-BtbbP111.js +27 -0
  54. package/dist/chunks/repeater-B5leVxZU.js +102 -0
  55. package/dist/chunks/rich-text-D0sb8bmX.js +349 -0
  56. package/dist/chunks/scripts-6CYSUGKQ.js +24 -0
  57. package/dist/chunks/sdk-BhHAYgga.js +1397 -0
  58. package/dist/chunks/shared-Bx9s0i0P.js +100 -0
  59. package/dist/chunks/signature-xz4QO7CR.js +536 -0
  60. package/dist/chunks/snaptcha-vz1RnZ15.js +8 -0
  61. package/dist/chunks/square-BP8RWAKB.js +40 -0
  62. package/dist/chunks/stripe-MihN63uC.js +184 -0
  63. package/dist/chunks/styles-BfoIZwJp.js +19 -0
  64. package/dist/chunks/summary-D3AjxpYN.js +114 -0
  65. package/dist/chunks/table-C-lkQN6I.js +78 -0
  66. package/dist/chunks/text-limit-DbgEFHLO.js +125 -0
  67. package/dist/chunks/theme-classes-Tv7q7ToE.js +44 -0
  68. package/dist/chunks/turnstile-D_Pi1CKM.js +58 -0
  69. package/dist/chunks/upload-manager-BpqWSHmU.js +2558 -0
  70. package/dist/chunks/utils-Vqp8i_RM.js +49401 -0
  71. package/dist/css/formie-theme.css +2 -0
  72. package/dist/css/theme/_buttons.css +16 -0
  73. package/dist/css/theme/_tokens.css +2 -0
  74. package/dist/css/theme/fields/_address-state.css +94 -0
  75. package/dist/css/theme/fields/_combobox.css +246 -0
  76. package/dist/css/theme/fields/_select.css +13 -0
  77. package/dist/css/theme/fields/_signature.css +19 -0
  78. package/dist/css/theme/fields/_upload-manager.css +279 -0
  79. package/dist/index.js +2448 -39
  80. package/dist/js/core/create-formie-client.d.ts.map +1 -1
  81. package/dist/js/core/submit-result-ui.d.ts.map +1 -1
  82. package/dist/js/core/validation-focus.d.ts +4 -0
  83. package/dist/js/core/validation-focus.d.ts.map +1 -0
  84. package/dist/js/modules/address/api.d.ts +1 -0
  85. package/dist/js/modules/address/api.d.ts.map +1 -1
  86. package/dist/js/modules/address/constants.d.ts +22 -1
  87. package/dist/js/modules/address/constants.d.ts.map +1 -1
  88. package/dist/js/modules/address/host.d.ts +2 -2
  89. package/dist/js/modules/address/host.d.ts.map +1 -1
  90. package/dist/js/modules/address/loqate.d.ts.map +1 -1
  91. package/dist/js/modules/fields/address-country.d.ts +3 -0
  92. package/dist/js/modules/fields/address-country.d.ts.map +1 -0
  93. package/dist/js/modules/fields/address-state.d.ts +3 -0
  94. package/dist/js/modules/fields/address-state.d.ts.map +1 -0
  95. package/dist/js/modules/fields/calculations.d.ts.map +1 -1
  96. package/dist/js/modules/fields/combobox.d.ts +17 -0
  97. package/dist/js/modules/fields/combobox.d.ts.map +1 -0
  98. package/dist/js/modules/fields/custom-google-maps.d.ts +64 -0
  99. package/dist/js/modules/fields/custom-google-maps.d.ts.map +1 -0
  100. package/dist/js/modules/fields/custom-link.d.ts +3 -0
  101. package/dist/js/modules/fields/custom-link.d.ts.map +1 -0
  102. package/dist/js/modules/fields/custom-maps.d.ts +3 -0
  103. package/dist/js/modules/fields/custom-maps.d.ts.map +1 -0
  104. package/dist/js/modules/fields/date-picker.d.ts.map +1 -1
  105. package/dist/js/modules/fields/index.d.ts.map +1 -1
  106. package/dist/js/modules/fields/phone-country.d.ts.map +1 -1
  107. package/dist/js/modules/fields/signature.d.ts.map +1 -1
  108. package/dist/js/modules/fields/upload-manager.d.ts +3 -0
  109. package/dist/js/modules/fields/upload-manager.d.ts.map +1 -0
  110. package/dist/js/submit/pipeline.d.ts.map +1 -1
  111. package/dist/js/utils/country-from-ip.d.ts +7 -0
  112. package/dist/js/utils/country-from-ip.d.ts.map +1 -0
  113. package/dist/js/utils/field-references.d.ts +1 -0
  114. package/dist/js/utils/field-references.d.ts.map +1 -1
  115. package/dist/js/utils/field-references.row-scope.d.ts +11 -0
  116. package/dist/js/utils/field-references.row-scope.d.ts.map +1 -0
  117. package/package.json +8 -3
  118. package/src/css/formie-theme.css +2 -0
  119. package/src/css/theme/_buttons.css +16 -0
  120. package/src/css/theme/_tokens.css +2 -0
  121. package/src/css/theme/fields/_address-state.css +94 -0
  122. package/src/css/theme/fields/_combobox.css +246 -0
  123. package/src/css/theme/fields/_select.css +13 -0
  124. package/src/css/theme/fields/_signature.css +19 -0
  125. package/src/css/theme/fields/_upload-manager.css +279 -0
  126. package/src/js/core/create-formie-client.ts +27 -0
  127. package/src/js/core/submit-result-ui.ts +4 -4
  128. package/src/js/core/validation-focus.ts +117 -0
  129. package/src/js/modules/address/api.ts +7 -0
  130. package/src/js/modules/address/constants.ts +82 -2
  131. package/src/js/modules/address/host.ts +16 -6
  132. package/src/js/modules/address/loqate.ts +3 -17
  133. package/src/js/modules/fields/address-country.ts +156 -0
  134. package/src/js/modules/fields/address-state.ts +946 -0
  135. package/src/js/modules/fields/calculations.ts +32 -0
  136. package/src/js/modules/fields/combobox.ts +188 -0
  137. package/src/js/modules/fields/custom-google-maps.ts +416 -0
  138. package/src/js/modules/fields/custom-link.ts +95 -0
  139. package/src/js/modules/fields/custom-maps.ts +339 -0
  140. package/src/js/modules/fields/date-picker.ts +96 -3
  141. package/src/js/modules/fields/index.ts +7 -0
  142. package/src/js/modules/fields/phone-country.ts +6 -0
  143. package/src/js/modules/fields/signature.ts +199 -15
  144. package/src/js/modules/fields/upload-manager.ts +1277 -0
  145. package/src/js/submit/pipeline.ts +11 -1
  146. package/src/js/utils/country-from-ip.ts +54 -0
  147. package/src/js/utils/field-references.row-scope.ts +303 -0
  148. package/src/js/utils/field-references.ts +1 -0
  149. package/src/vendor.d.ts +1 -1
  150. package/dist/chunks/address-finder-BU4roxT6.js +0 -37
  151. package/dist/chunks/bpoint-uNg5j6rt.js +0 -26
  152. package/dist/chunks/calculations-C9t6Zop9.js +0 -147
  153. package/dist/chunks/captcha-eu-BAPzHNts.js +0 -34
  154. package/dist/chunks/checkbox-radio-CHeLNVIK.js +0 -141
  155. package/dist/chunks/conditions-DKxVCsjD.js +0 -459
  156. package/dist/chunks/date-picker-B3iQ797Z.js +0 -4994
  157. package/dist/chunks/eway-DCielIML.js +0 -74
  158. package/dist/chunks/file-upload-DP2TOUYV.js +0 -316
  159. package/dist/chunks/friendly-captcha-v1-DdlcGiFY.js +0 -33
  160. package/dist/chunks/friendly-captcha-v2-76w-YnFm.js +0 -38
  161. package/dist/chunks/go-cardless-rwCkzbNK.js +0 -24
  162. package/dist/chunks/google-address-BD8IZ86V.js +0 -181
  163. package/dist/chunks/hcaptcha-BNNTL6uf.js +0 -56
  164. package/dist/chunks/hidden-CW6Rcf1N.js +0 -31
  165. package/dist/chunks/index-BEsfee-D.js +0 -1839
  166. package/dist/chunks/index-BP7Unm5Y.js +0 -863
  167. package/dist/chunks/index-D6npYxvr.js +0 -4423
  168. package/dist/chunks/loqate-B-ZNS65B.js +0 -55
  169. package/dist/chunks/mollie-BDAZ-1X4.js +0 -24
  170. package/dist/chunks/moneris-B1b0uEtY.js +0 -101
  171. package/dist/chunks/opayo-CC5hraHo.js +0 -122
  172. package/dist/chunks/paddle-B4GmrDsq.js +0 -60
  173. package/dist/chunks/paypal-BFS6XsIS.js +0 -100
  174. package/dist/chunks/payway-DekoJead.js +0 -56
  175. package/dist/chunks/phone-country-Cm5YUeXI.js +0 -3765
  176. package/dist/chunks/place-kit-DizZWV_e.js +0 -42
  177. package/dist/chunks/placekit-autocomplete.esm-LAwfbPZl.js +0 -1299
  178. package/dist/chunks/recaptcha-enterprise-BbOvO7JZ.js +0 -71
  179. package/dist/chunks/recaptcha-shared-Dwg1eVFS.js +0 -15
  180. package/dist/chunks/recaptcha-v2-checkbox-SY3ti5iQ.js +0 -41
  181. package/dist/chunks/recaptcha-v2-invisible-DSmQnn6c.js +0 -59
  182. package/dist/chunks/recaptcha-v3-DNh7YCnR.js +0 -28
  183. package/dist/chunks/repeater-DM0vuFNQ.js +0 -124
  184. package/dist/chunks/rich-text-C8aGYp70.js +0 -304
  185. package/dist/chunks/scripts-CKTFtxPO.js +0 -36
  186. package/dist/chunks/sdk-3SicTWby.js +0 -1559
  187. package/dist/chunks/shared--BU5CFoL.js +0 -80
  188. package/dist/chunks/signature-pFhZfH7d.js +0 -550
  189. package/dist/chunks/snaptcha-VuOUOaLj.js +0 -8
  190. package/dist/chunks/square-BR9pvToy.js +0 -46
  191. package/dist/chunks/stripe-OHUwoV9g.js +0 -202
  192. package/dist/chunks/styles-C3aqgtek.js +0 -21
  193. package/dist/chunks/summary-Da7Ktg3N.js +0 -126
  194. package/dist/chunks/table-C0PmR9bI.js +0 -95
  195. package/dist/chunks/text-limit-mLEwZDIa.js +0 -144
  196. package/dist/chunks/turnstile-9tM7q_LK.js +0 -59
  197. package/dist/chunks/utils-BntI3W4S.js +0 -6149
@@ -0,0 +1,46 @@
1
+ import { i as e, s as t } from "./shared-Bx9s0i0P.js";
2
+ //#region src/js/modules/fields/custom-link.ts
3
+ var n = "custom-link", r = "[data-formie-custom-link]";
4
+ function i(e, t) {
5
+ return e.getAttribute(t) === "1";
6
+ }
7
+ function a(e, t) {
8
+ return t === "email" ? {
9
+ type: "email",
10
+ inputMode: "email",
11
+ autocomplete: "email"
12
+ } : t === "tel" || t === "sms" ? {
13
+ type: "tel",
14
+ inputMode: "tel",
15
+ autocomplete: "tel"
16
+ } : {
17
+ type: !i(e, "data-formie-custom-link-allow-root-relative") && !i(e, "data-formie-custom-link-allow-anchors") && !i(e, "data-formie-custom-link-allow-custom-schemes") ? "url" : "text",
18
+ inputMode: "url",
19
+ autocomplete: "url"
20
+ };
21
+ }
22
+ function o(e) {
23
+ return e instanceof HTMLElement && e.matches(r);
24
+ }
25
+ function s(e) {
26
+ let t = e.querySelector("[data-formie-custom-link-type]"), n = e.querySelector("[data-formie-custom-link-value]");
27
+ if (!(t instanceof HTMLSelectElement) || !(n instanceof HTMLInputElement)) return () => {};
28
+ let r = () => {
29
+ let r = a(e, t.value);
30
+ n.type = r.type, n.inputMode = r.inputMode, n.setAttribute("autocomplete", r.autocomplete);
31
+ };
32
+ return r(), t.addEventListener("change", r), () => {
33
+ t.removeEventListener("change", r);
34
+ };
35
+ }
36
+ var c = {
37
+ id: n,
38
+ kind: "field",
39
+ match: ({ target: e }) => e instanceof Element && (e.matches(r) || !!e.querySelector(r)),
40
+ setup: async (n) => {
41
+ let i = e(n) || n.target;
42
+ if (i instanceof Element) return { destroy: t(i, r, o, s) };
43
+ }
44
+ };
45
+ //#endregion
46
+ export { c as customLinkModule };
@@ -0,0 +1,161 @@
1
+ import { n as e } from "./chunk-3b4jIN3o.js";
2
+ import { t } from "./styles-BfoIZwJp.js";
3
+ import { i as n, s as r } from "./shared-Bx9s0i0P.js";
4
+ //#region ../../node_modules/leaflet/dist/leaflet.css?inline
5
+ var i = ".leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;top:0;left:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::selection{background:0 0}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{-webkit-transform-origin:0 0;width:1600px;height:1600px}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none!important;max-height:none!important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{width:auto;padding:0;max-width:none!important;max-height:none!important}.leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}.leaflet-container.leaflet-touch-zoom{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{-ms-touch-action:pinch-zoom;touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{-ms-touch-action:none;touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:#33b5e566}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{box-sizing:border-box;z-index:800;width:0;height:0}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{z-index:800;pointer-events:visiblePainted;pointer-events:auto;position:relative}.leaflet-top,.leaflet-bottom{z-index:1000;pointer-events:none;position:absolute}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{-webkit-transition:-webkit-transform .25s cubic-bezier(0,0,.25,1);-moz-transition:-moz-transform .25s cubic-bezier(0,0,.25,1);transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{outline-offset:1px;background:#ddd}.leaflet-container a{color:#0078a8}.leaflet-zoom-box{background:#ffffff80;border:2px dotted #38f}.leaflet-container{font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:.75rem;line-height:1.5}.leaflet-bar{border-radius:4px;box-shadow:0 1px 5px #000000a6}.leaflet-bar a{text-align:center;color:#000;background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;text-decoration:none;display:block}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom:none;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.leaflet-bar a.leaflet-disabled{cursor:default;color:#bbb;background-color:#f4f4f4}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-right-radius:2px;border-bottom-left-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{text-indent:1px;font:700 18px Lucida Console,Monaco,monospace}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{background:#fff;border-radius:5px;box-shadow:0 1px 5px #0006}.leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAQAAAADQ4RFAAACf0lEQVR4AY1UM3gkARTePdvdoTxXKc+qTl3aU5U6b2Kbkz3Gtq3Zw6ziLGNPzrYx7946Tr6/ee/XeCQ4D3ykPtL5tHno4n0d/h3+xfuWHGLX81cn7r0iTNzjr7LrlxCqPtkbTQEHeqOrTy4Yyt3VCi/IOB0v7rVC7q45Q3Gr5K6jt+3Gl5nCoDD4MtO+j96Wu8atmhGqcNGHObuf8OM/x3AMx38+4Z2sPqzCxRFK2aF2e5Jol56XTLyggAMTL56XOMoS1W4pOyjUcGGQdZxU6qRh7B9Zp+PfpOFlqt0zyDZckPi1ttmIp03jX8gyJ8a/PG2yutpS/Vol7peZIbZcKBAEEheEIAgFbDkz5H6Zrkm2hVWGiXKiF4Ycw0RWKdtC16Q7qe3X4iOMxruonzegJzWaXFrU9utOSsLUmrc0YjeWYjCW4PDMADElpJSSQ0vQvA1Tm6/JlKnqFs1EGyZiFCqnRZTEJJJiKRYzVYzJck2Rm6P4iH+cmSY0YzimYa8l0EtTODFWhcMIMVqdsI2uiTvKmTisIDHJ3od5GILVhBCarCfVRmo4uTjkhrhzkiBV7SsaqS+TzrzM1qpGGUFt28pIySQHR6h7F6KSwGWm97ay+Z+ZqMcEjEWebE7wxCSQwpkhJqoZA5ivCdZDjJepuJ9IQjGGUmuXJdBFUygxVqVsxFsLMbDe8ZbDYVCGKxs+W080max1hFCarCfV+C1KATwcnvE9gRRuMP2prdbWGowm1KB1y+zwMMENkM755cJ2yPDtqhTI6ED1M/82yIDtC/4j4BijjeObflpO9I9MwXTCsSX8jWAFeHr05WoLTJ5G8IQVS/7vwR6ohirYM7f6HzYpogfS3R2OAAAAAElFTkSuQmCC);width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAQAAABvcdNgAAAEsklEQVR4AWL4TydIhpZK1kpWOlg0w3ZXP6D2soBtG42jeI6ZmQTHzAxiTbSJsYLjO9HhP+WOmcuhciVnmHVQcJnp7DFvScowZorad/+V/fVzMdMT2g9Cv9guXGv/7pYOrXh2U+RRR3dSd9JRx6bIFc/ekqHI29JC6pJ5ZEh1yWkhkbcFeSjxgx3L2m1cb1C7bceyxA+CNjT/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3mWjLR9JCO1jRDMd0fpYC2VnvjBSEFg7wBENc0R9HFlb0xvF1+TBEpF68d+DHR6IOWVv2BECtxo46hOFUBd/APU57WIoEwJhIi2CdpyZX0m93BZicktMj1AS9dClteUFAUNUIEygRZCtik5zSxI9MubTBH1GOiHsiLJ3OCoSZkILa9PxiN0EbvhsAo8tdAf9Seepd36lGWHmtNANTv5Jd0z4QYyeo/UEJqxKRpg5LZx6btLPsOaEmdMyxYdlc8LMaJnikDlhclqmPiQnTEpLUIZEwkRagjYkEibQErwhkTAKCLQEbUgkzJQWc/0PstHHcfEdQ+UAAAAASUVORK5CYII=);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{color:#333;background:#fff;padding:6px 10px 6px 6px}.leaflet-control-layers-scrollbar{padding-right:5px;overflow:hidden scroll}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{font-size:1.08333em;display:block}.leaflet-control-layers-separator{border-top:1px solid #ddd;height:0;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz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shf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=)}.leaflet-container .leaflet-control-attribution{background:#fffc;margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{color:#333;padding:0 5px;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-attribution-flag{width:1em;height:.6669em;vertical-align:baseline!important;display:inline!important}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{white-space:nowrap;box-sizing:border-box;text-shadow:1px 1px #fff;background:#fffc;border:2px solid #777;border-top:none;padding:2px 5px 1px;line-height:1.1}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{background-clip:padding-box;border:2px solid #0003}.leaflet-popup{text-align:center;margin-bottom:20px;position:absolute}.leaflet-popup-content-wrapper{text-align:left;border-radius:12px;padding:1px}.leaflet-popup-content{min-height:1px;margin:13px 24px 13px 20px;font-size:1.08333em;line-height:1.3}.leaflet-popup-content p{margin:1.3em 0}.leaflet-popup-tip-container{pointer-events:none;width:40px;height:20px;margin-top:-1px;margin-left:-20px;position:absolute;left:50%;overflow:hidden}.leaflet-popup-tip{pointer-events:auto;width:17px;height:17px;margin:-10px auto 0;padding:1px;transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{color:#333;background:#fff;box-shadow:0 3px 14px #0006}.leaflet-container a.leaflet-popup-close-button{text-align:center;color:#757575;background:0 0;border:none;width:24px;height:24px;font:16px/24px Tahoma,Verdana,sans-serif;text-decoration:none;position:absolute;top:0;right:0}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{-ms-filter:\"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)\";width:24px;filter:progid:DXImageTransform.Microsoft.Matrix(M11=.707107, M12=.707107, M21=-.707107, M22=.707107);margin:0 auto}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{color:#222;white-space:nowrap;-webkit-user-select:none;user-select:none;pointer-events:none;background-color:#fff;border:1px solid #fff;border-radius:3px;padding:6px;position:absolute;box-shadow:0 1px 3px #0006}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{pointer-events:none;content:\"\";background:0 0;border:6px solid #0000;position:absolute}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{margin-left:-6px;left:50%}.leaflet-tooltip-top:before{border-top-color:#fff;margin-bottom:-12px;bottom:0}.leaflet-tooltip-bottom:before{border-bottom-color:#fff;margin-top:-12px;margin-left:-6px;top:0}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{margin-top:-6px;top:50%}.leaflet-tooltip-left:before{border-left-color:#fff;margin-right:-12px;right:0}.leaflet-tooltip-right:before{border-right-color:#fff;margin-left:-12px;left:0}@media print{.leaflet-control{-webkit-print-color-adjust:exact;print-color-adjust:exact}}", a = "custom-maps", o = "[data-formie-custom-maps]";
6
+ t(a, [i]);
7
+ var s = null;
8
+ function c(e) {
9
+ return e instanceof HTMLElement && e.matches(o);
10
+ }
11
+ function l(e) {
12
+ let t = e.getAttribute("data-formie-custom-maps-settings");
13
+ if (!t) return {};
14
+ try {
15
+ return JSON.parse(t);
16
+ } catch {
17
+ return {};
18
+ }
19
+ }
20
+ function u(e) {
21
+ return {
22
+ root: e,
23
+ canvas: e.querySelector("[data-formie-custom-maps-canvas]"),
24
+ searchInput: e.querySelector("[data-formie-custom-maps-search]"),
25
+ addressInput: e.querySelector("[data-formie-custom-map-address]"),
26
+ latInput: e.querySelector("[data-formie-custom-map-lat]"),
27
+ lngInput: e.querySelector("[data-formie-custom-map-lng]"),
28
+ zoomInput: e.querySelector("[data-formie-custom-map-zoom]"),
29
+ partsInput: e.querySelector("[data-formie-custom-maps-parts]"),
30
+ currentLocationButton: e.querySelector("[data-formie-custom-maps-current-location]")
31
+ };
32
+ }
33
+ function d(e) {
34
+ if (e == null || e === "") return null;
35
+ let t = Number(e);
36
+ return Number.isFinite(t) ? t : null;
37
+ }
38
+ function f(e, t) {
39
+ return {
40
+ lat: d(e.latInput?.value) ?? t.defaultLat ?? 51.272154,
41
+ lng: d(e.lngInput?.value) ?? t.defaultLng ?? .514951
42
+ };
43
+ }
44
+ function p(e, t) {
45
+ return d(e.zoomInput?.value) ?? t.defaultZoom ?? 15;
46
+ }
47
+ function m(e, t) {
48
+ e && (e.value = t == null ? "" : String(t), e.dispatchEvent(new Event("input", { bubbles: !0 })), e.dispatchEvent(new Event("change", { bubbles: !0 })));
49
+ }
50
+ function h(e, t, n) {
51
+ m(e.latInput, t.lat), m(e.lngInput, t.lng), n !== void 0 && m(e.zoomInput, n);
52
+ }
53
+ function g() {
54
+ return s ||= import("./leaflet-src-j-lHNmhR.js").then((t) => /* @__PURE__ */ e(t.default, 1)), s;
55
+ }
56
+ function _(e) {
57
+ switch (e.mapTiles) {
58
+ case "openstreetmap":
59
+ case "wikimedia": return "https://a.tile.openstreetmap.org/{z}/{x}/{y}.png";
60
+ case "carto.light_all": return "https://a.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png";
61
+ case "carto.dark_all": return "https://a.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}.png";
62
+ default: return "https://a.basemaps.cartocdn.com/rastertiles/voyager/{z}/{x}/{y}.png";
63
+ }
64
+ }
65
+ function v(e) {
66
+ return e ? {
67
+ number: e.house_number || "",
68
+ address: e.road || e.pedestrian || e.footway || e.path || e.neighbourhood || "",
69
+ city: e.city || e.town || e.village || e.suburb || "",
70
+ postcode: e.postcode || "",
71
+ county: e.county || "",
72
+ state: e.state || e.state_district || "",
73
+ country: e.country || ""
74
+ } : {};
75
+ }
76
+ async function y(e, t) {
77
+ let n = new URLSearchParams({
78
+ format: "jsonv2",
79
+ limit: "1",
80
+ addressdetails: "1",
81
+ q: e
82
+ });
83
+ t.country && n.set("countrycodes", t.country.toLowerCase());
84
+ let r = await fetch(`https://nominatim.openstreetmap.org/search?${n.toString()}`);
85
+ if (!r.ok) return null;
86
+ let i = (await r.json())[0], a = d(i?.lat), o = d(i?.lon);
87
+ return !i || a === null || o === null ? null : {
88
+ latLng: {
89
+ lat: a,
90
+ lng: o
91
+ },
92
+ address: i.display_name || e,
93
+ parts: v(i.address)
94
+ };
95
+ }
96
+ function b(e, t, n) {
97
+ m(e.addressInput, t.address), m(e.searchInput, t.address), m(e.partsInput, JSON.stringify(t.parts)), h(e, t.latLng, n);
98
+ }
99
+ async function x(e, t) {
100
+ if (!e.canvas) return () => {};
101
+ let n = await g(), r = f(e, t), i = p(e, t), a = n.map(e.canvas, {
102
+ minZoom: t.minZoom ?? 3,
103
+ maxZoom: t.maxZoom ?? 18
104
+ }).setView([r.lat, r.lng], i), o = n.marker([r.lat, r.lng], { draggable: !0 }).addTo(a);
105
+ n.tileLayer(_(t), {
106
+ maxZoom: t.maxZoom ?? 18,
107
+ attribution: "© OpenStreetMap contributors, © CARTO"
108
+ }).addTo(a), a.on("click", (t) => {
109
+ o.setLatLng([t.latlng.lat, t.latlng.lng]), h(e, t.latlng, a.getZoom());
110
+ }), o.on("dragend", (t) => {
111
+ h(e, t.target.getLatLng(), a.getZoom());
112
+ });
113
+ let s = async () => {
114
+ let n = e.searchInput?.value.trim();
115
+ if (!n) return;
116
+ let r = await y(n, t);
117
+ if (!r) return;
118
+ let i = p(e, t);
119
+ b(e, r, i), a.setView([r.latLng.lat, r.latLng.lng], i), o.setLatLng([r.latLng.lat, r.latLng.lng]);
120
+ }, c = (e) => {
121
+ e.key === "Enter" && (e.preventDefault(), s());
122
+ }, l = () => {
123
+ s();
124
+ };
125
+ e.searchInput?.addEventListener("keydown", c), e.searchInput?.addEventListener("blur", l);
126
+ let u = () => {
127
+ navigator.geolocation?.getCurrentPosition((n) => {
128
+ let r = {
129
+ lat: n.coords.latitude,
130
+ lng: n.coords.longitude
131
+ }, i = p(e, t);
132
+ h(e, r, i), a.setView([r.lat, r.lng], i), o.setLatLng([r.lat, r.lng]);
133
+ });
134
+ };
135
+ return e.currentLocationButton?.addEventListener("click", u), () => {
136
+ e.searchInput?.removeEventListener("keydown", c), e.searchInput?.removeEventListener("blur", l), e.currentLocationButton?.removeEventListener("click", u), a.remove();
137
+ };
138
+ }
139
+ function S(e) {
140
+ let t = u(e), n = l(e), r = null, i = !1;
141
+ return e.getAttribute("data-formie-custom-map-hide-map") !== "1" && x(t, n).then((e) => {
142
+ if (i) {
143
+ e();
144
+ return;
145
+ }
146
+ r = e;
147
+ }), () => {
148
+ i = !0, r?.();
149
+ };
150
+ }
151
+ var C = {
152
+ id: a,
153
+ kind: "field",
154
+ match: ({ target: e }) => e instanceof Element && (e.matches(o) || !!e.querySelector(o)),
155
+ setup: async (e) => {
156
+ let t = n(e) || e.target;
157
+ if (t instanceof Element) return { destroy: r(t, o, c, S) };
158
+ }
159
+ };
160
+ //#endregion
161
+ export { C as customMapsModule };