@jmruthers/pace-core 0.5.185 → 0.5.187

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 (300) hide show
  1. package/dist/{DataTable-Z9NLVJh0.d.ts → DataTable-IVYljGJ6.d.ts} +1 -1
  2. package/dist/{DataTable-IX2NBUTP.js → DataTable-K3RJRSOX.js} +7 -7
  3. package/dist/{PublicPageProvider-BABf6JCh.d.ts → PublicPageProvider-DrLDztHt.d.ts} +214 -107
  4. package/dist/{UnifiedAuthProvider-A4BCQRJY.js → UnifiedAuthProvider-B76OWOAT.js} +2 -2
  5. package/dist/{api-BMFCXVQX.js → api-YP7XD5L6.js} +3 -3
  6. package/dist/{audit-WRS3KJKI.js → audit-B5P6FFIR.js} +2 -2
  7. package/dist/{chunk-445GEP27.js → chunk-3IC5WCMO.js} +33 -8
  8. package/dist/chunk-3IC5WCMO.js.map +1 -0
  9. package/dist/{chunk-OKI34GZD.js → chunk-3NFNJOO7.js} +8 -8
  10. package/dist/chunk-3NFNJOO7.js.map +1 -0
  11. package/dist/{chunk-FSFQFJCU.js → chunk-63FOKYGO.js} +174 -6
  12. package/dist/chunk-63FOKYGO.js.map +1 -0
  13. package/dist/{chunk-MX3EIJGQ.js → chunk-C4OYJOV4.js} +631 -97
  14. package/dist/chunk-C4OYJOV4.js.map +1 -0
  15. package/dist/{chunk-HGPQUCBC.js → chunk-FMTK4XNN.js} +3 -3
  16. package/dist/{chunk-U6WNSFX5.js → chunk-HEHYGYOX.js} +279 -44
  17. package/dist/chunk-HEHYGYOX.js.map +1 -0
  18. package/dist/{chunk-XAUHJD3L.js → chunk-K2JGDXGU.js} +2 -2
  19. package/dist/{chunk-HC67NW5K.js → chunk-LBBUPSSC.js} +863 -552
  20. package/dist/chunk-LBBUPSSC.js.map +1 -0
  21. package/dist/{chunk-IXSNYUCT.js → chunk-SAUPYVLF.js} +1 -1
  22. package/dist/chunk-SAUPYVLF.js.map +1 -0
  23. package/dist/{chunk-AISXLWGZ.js → chunk-T6ZJVI3A.js} +27 -23
  24. package/dist/chunk-T6ZJVI3A.js.map +1 -0
  25. package/dist/{chunk-STTZQK2I.js → chunk-ULX5FYEM.js} +9 -7
  26. package/dist/chunk-ULX5FYEM.js.map +1 -0
  27. package/dist/{chunk-FXFJRTKI.js → chunk-WK2Y6TGA.js} +3 -3
  28. package/dist/chunk-WK2Y6TGA.js.map +1 -0
  29. package/dist/chunk-YHCN776L.js +447 -0
  30. package/dist/chunk-YHCN776L.js.map +1 -0
  31. package/dist/components.d.ts +4 -4
  32. package/dist/components.js +12 -10
  33. package/dist/components.js.map +1 -1
  34. package/dist/{database.generated-CBmg2950.d.ts → database.generated-DI89OQeI.d.ts} +63 -9
  35. package/dist/{file-reference-BjR39ktt.d.ts → file-reference-D037xOFK.d.ts} +3 -1
  36. package/dist/hooks.d.ts +265 -6
  37. package/dist/hooks.js +148 -49
  38. package/dist/hooks.js.map +1 -1
  39. package/dist/index.d.ts +25 -10
  40. package/dist/index.js +65 -30
  41. package/dist/index.js.map +1 -1
  42. package/dist/providers.js +1 -1
  43. package/dist/rbac/index.d.ts +125 -8
  44. package/dist/rbac/index.js +27 -7
  45. package/dist/{types-DUyCRSTj.d.ts → types-Bwgl--Xo.d.ts} +162 -1
  46. package/dist/types.d.ts +2 -2
  47. package/dist/types.js +1 -1
  48. package/dist/{usePublicRouteParams-CvnC3d-e.d.ts → usePublicRouteParams-CTDELQ7H.d.ts} +3 -3
  49. package/dist/utils.d.ts +214 -4
  50. package/dist/utils.js +22 -2
  51. package/dist/utils.js.map +1 -1
  52. package/docs/api/classes/ColumnFactory.md +1 -1
  53. package/docs/api/classes/ErrorBoundary.md +1 -1
  54. package/docs/api/classes/InvalidScopeError.md +1 -1
  55. package/docs/api/classes/Logger.md +1 -1
  56. package/docs/api/classes/MissingUserContextError.md +1 -1
  57. package/docs/api/classes/OrganisationContextRequiredError.md +1 -1
  58. package/docs/api/classes/PermissionDeniedError.md +1 -1
  59. package/docs/api/classes/RBACAuditManager.md +21 -17
  60. package/docs/api/classes/RBACCache.md +31 -23
  61. package/docs/api/classes/RBACEngine.md +6 -6
  62. package/docs/api/classes/RBACError.md +1 -1
  63. package/docs/api/classes/RBACNotInitializedError.md +1 -1
  64. package/docs/api/classes/SecureSupabaseClient.md +5 -5
  65. package/docs/api/classes/StorageUtils.md +1 -1
  66. package/docs/api/enums/FileCategory.md +1 -1
  67. package/docs/api/enums/LogLevel.md +1 -1
  68. package/docs/api/enums/RBACErrorCode.md +1 -1
  69. package/docs/api/enums/RPCFunction.md +1 -1
  70. package/docs/api/interfaces/AddressFieldProps.md +241 -0
  71. package/docs/api/interfaces/AddressFieldRef.md +94 -0
  72. package/docs/api/interfaces/AggregateConfig.md +1 -1
  73. package/docs/api/interfaces/AutocompleteOptions.md +75 -0
  74. package/docs/api/interfaces/BadgeProps.md +1 -1
  75. package/docs/api/interfaces/ButtonProps.md +1 -1
  76. package/docs/api/interfaces/CalendarProps.md +1 -1
  77. package/docs/api/interfaces/CardProps.md +1 -1
  78. package/docs/api/interfaces/ColorPalette.md +1 -1
  79. package/docs/api/interfaces/ColorShade.md +1 -1
  80. package/docs/api/interfaces/ComplianceResult.md +1 -1
  81. package/docs/api/interfaces/DataAccessRecord.md +1 -1
  82. package/docs/api/interfaces/DataRecord.md +1 -1
  83. package/docs/api/interfaces/DataTableAction.md +1 -1
  84. package/docs/api/interfaces/DataTableColumn.md +1 -1
  85. package/docs/api/interfaces/DataTableProps.md +1 -1
  86. package/docs/api/interfaces/DataTableToolbarButton.md +1 -1
  87. package/docs/api/interfaces/DatabaseComplianceResult.md +1 -1
  88. package/docs/api/interfaces/DatabaseIssue.md +1 -1
  89. package/docs/api/interfaces/EmptyStateConfig.md +1 -1
  90. package/docs/api/interfaces/EnhancedNavigationMenuProps.md +1 -1
  91. package/docs/api/interfaces/EventAppRoleData.md +1 -1
  92. package/docs/api/interfaces/ExportColumn.md +1 -1
  93. package/docs/api/interfaces/ExportOptions.md +1 -1
  94. package/docs/api/interfaces/FileDisplayProps.md +15 -15
  95. package/docs/api/interfaces/FileMetadata.md +1 -1
  96. package/docs/api/interfaces/FileReference.md +1 -1
  97. package/docs/api/interfaces/FileSizeLimits.md +1 -1
  98. package/docs/api/interfaces/FileUploadOptions.md +33 -9
  99. package/docs/api/interfaces/FileUploadProps.md +36 -14
  100. package/docs/api/interfaces/FooterProps.md +1 -1
  101. package/docs/api/interfaces/FormFieldProps.md +1 -1
  102. package/docs/api/interfaces/FormProps.md +1 -1
  103. package/docs/api/interfaces/GrantEventAppRoleParams.md +1 -1
  104. package/docs/api/interfaces/InactivityWarningModalProps.md +1 -1
  105. package/docs/api/interfaces/InputProps.md +1 -1
  106. package/docs/api/interfaces/LabelProps.md +1 -1
  107. package/docs/api/interfaces/LoggerConfig.md +1 -1
  108. package/docs/api/interfaces/LoginFormProps.md +1 -1
  109. package/docs/api/interfaces/NavigationAccessRecord.md +1 -1
  110. package/docs/api/interfaces/NavigationContextType.md +1 -1
  111. package/docs/api/interfaces/NavigationGuardProps.md +1 -1
  112. package/docs/api/interfaces/NavigationItem.md +1 -1
  113. package/docs/api/interfaces/NavigationMenuProps.md +1 -1
  114. package/docs/api/interfaces/NavigationProviderProps.md +1 -1
  115. package/docs/api/interfaces/Organisation.md +1 -1
  116. package/docs/api/interfaces/OrganisationContextType.md +1 -1
  117. package/docs/api/interfaces/OrganisationMembership.md +1 -1
  118. package/docs/api/interfaces/OrganisationProviderProps.md +1 -1
  119. package/docs/api/interfaces/OrganisationSecurityError.md +1 -1
  120. package/docs/api/interfaces/PaceAppLayoutProps.md +1 -1
  121. package/docs/api/interfaces/PaceLoginPageProps.md +1 -1
  122. package/docs/api/interfaces/PageAccessRecord.md +1 -1
  123. package/docs/api/interfaces/PagePermissionContextType.md +1 -1
  124. package/docs/api/interfaces/PagePermissionGuardProps.md +11 -11
  125. package/docs/api/interfaces/PagePermissionProviderProps.md +1 -1
  126. package/docs/api/interfaces/PaletteData.md +1 -1
  127. package/docs/api/interfaces/ParsedAddress.md +120 -0
  128. package/docs/api/interfaces/PermissionEnforcerProps.md +1 -1
  129. package/docs/api/interfaces/ProgressProps.md +1 -1
  130. package/docs/api/interfaces/ProtectedRouteProps.md +6 -6
  131. package/docs/api/interfaces/PublicPageFooterProps.md +1 -1
  132. package/docs/api/interfaces/PublicPageHeaderProps.md +1 -1
  133. package/docs/api/interfaces/PublicPageLayoutProps.md +1 -1
  134. package/docs/api/interfaces/QuickFix.md +1 -1
  135. package/docs/api/interfaces/RBACAccessValidateParams.md +1 -1
  136. package/docs/api/interfaces/RBACAccessValidateResult.md +1 -1
  137. package/docs/api/interfaces/RBACAuditLogParams.md +1 -1
  138. package/docs/api/interfaces/RBACAuditLogResult.md +1 -1
  139. package/docs/api/interfaces/RBACConfig.md +27 -4
  140. package/docs/api/interfaces/RBACContext.md +1 -1
  141. package/docs/api/interfaces/RBACLogger.md +5 -5
  142. package/docs/api/interfaces/RBACPageAccessCheckParams.md +1 -1
  143. package/docs/api/interfaces/RBACPerformanceMetrics.md +138 -0
  144. package/docs/api/interfaces/RBACPermissionCheckParams.md +1 -1
  145. package/docs/api/interfaces/RBACPermissionCheckResult.md +1 -1
  146. package/docs/api/interfaces/RBACPermissionsGetParams.md +1 -1
  147. package/docs/api/interfaces/RBACPermissionsGetResult.md +1 -1
  148. package/docs/api/interfaces/RBACResult.md +1 -1
  149. package/docs/api/interfaces/RBACRoleGrantParams.md +1 -1
  150. package/docs/api/interfaces/RBACRoleGrantResult.md +1 -1
  151. package/docs/api/interfaces/RBACRoleRevokeParams.md +1 -1
  152. package/docs/api/interfaces/RBACRoleRevokeResult.md +1 -1
  153. package/docs/api/interfaces/RBACRoleValidateParams.md +1 -1
  154. package/docs/api/interfaces/RBACRoleValidateResult.md +1 -1
  155. package/docs/api/interfaces/RBACRolesListParams.md +1 -1
  156. package/docs/api/interfaces/RBACRolesListResult.md +1 -1
  157. package/docs/api/interfaces/RBACSessionTrackParams.md +1 -1
  158. package/docs/api/interfaces/RBACSessionTrackResult.md +1 -1
  159. package/docs/api/interfaces/ResourcePermissions.md +1 -1
  160. package/docs/api/interfaces/RevokeEventAppRoleParams.md +1 -1
  161. package/docs/api/interfaces/RoleBasedRouterContextType.md +1 -1
  162. package/docs/api/interfaces/RoleBasedRouterProps.md +1 -1
  163. package/docs/api/interfaces/RoleManagementResult.md +1 -1
  164. package/docs/api/interfaces/RouteAccessRecord.md +1 -1
  165. package/docs/api/interfaces/RouteConfig.md +1 -1
  166. package/docs/api/interfaces/RuntimeComplianceResult.md +1 -1
  167. package/docs/api/interfaces/SecureDataContextType.md +1 -1
  168. package/docs/api/interfaces/SecureDataProviderProps.md +1 -1
  169. package/docs/api/interfaces/SessionRestorationLoaderProps.md +1 -1
  170. package/docs/api/interfaces/SetupIssue.md +1 -1
  171. package/docs/api/interfaces/StorageConfig.md +1 -1
  172. package/docs/api/interfaces/StorageFileInfo.md +1 -1
  173. package/docs/api/interfaces/StorageFileMetadata.md +1 -1
  174. package/docs/api/interfaces/StorageListOptions.md +1 -1
  175. package/docs/api/interfaces/StorageListResult.md +1 -1
  176. package/docs/api/interfaces/StorageUploadOptions.md +1 -1
  177. package/docs/api/interfaces/StorageUploadResult.md +1 -1
  178. package/docs/api/interfaces/StorageUrlOptions.md +1 -1
  179. package/docs/api/interfaces/StyleImport.md +1 -1
  180. package/docs/api/interfaces/SwitchProps.md +1 -1
  181. package/docs/api/interfaces/TabsContentProps.md +1 -1
  182. package/docs/api/interfaces/TabsListProps.md +1 -1
  183. package/docs/api/interfaces/TabsProps.md +1 -1
  184. package/docs/api/interfaces/TabsTriggerProps.md +1 -1
  185. package/docs/api/interfaces/TextareaProps.md +1 -1
  186. package/docs/api/interfaces/ToastActionElement.md +1 -1
  187. package/docs/api/interfaces/ToastProps.md +1 -1
  188. package/docs/api/interfaces/UnifiedAuthContextType.md +1 -1
  189. package/docs/api/interfaces/UnifiedAuthProviderProps.md +1 -1
  190. package/docs/api/interfaces/UseFormDialogOptions.md +1 -1
  191. package/docs/api/interfaces/UseFormDialogReturn.md +1 -1
  192. package/docs/api/interfaces/UseInactivityTrackerOptions.md +1 -1
  193. package/docs/api/interfaces/UseInactivityTrackerReturn.md +1 -1
  194. package/docs/api/interfaces/UsePublicEventLogoOptions.md +2 -2
  195. package/docs/api/interfaces/UsePublicEventLogoReturn.md +1 -1
  196. package/docs/api/interfaces/UsePublicEventOptions.md +1 -1
  197. package/docs/api/interfaces/UsePublicEventReturn.md +1 -1
  198. package/docs/api/interfaces/UsePublicFileDisplayOptions.md +2 -2
  199. package/docs/api/interfaces/UsePublicFileDisplayReturn.md +1 -1
  200. package/docs/api/interfaces/UsePublicRouteParamsReturn.md +1 -1
  201. package/docs/api/interfaces/UseResolvedScopeOptions.md +2 -2
  202. package/docs/api/interfaces/UseResolvedScopeReturn.md +1 -1
  203. package/docs/api/interfaces/UseResourcePermissionsOptions.md +1 -1
  204. package/docs/api/interfaces/UserEventAccess.md +1 -1
  205. package/docs/api/interfaces/UserMenuProps.md +1 -1
  206. package/docs/api/interfaces/UserProfile.md +1 -1
  207. package/docs/api/modules.md +328 -69
  208. package/docs/api-reference/components.md +26 -12
  209. package/docs/best-practices/performance.md +11 -0
  210. package/docs/implementation-guides/file-reference-system.md +24 -2
  211. package/docs/implementation-guides/file-upload-storage.md +38 -1
  212. package/docs/rbac/README.md +2 -1
  213. package/docs/rbac/api-reference.md +11 -0
  214. package/docs/rbac/performance.md +320 -0
  215. package/docs/standards/01-architecture-standard.md +5 -0
  216. package/docs/standards/05-security-standard.md +12 -0
  217. package/package.json +1 -1
  218. package/scripts/check-pace-core-compliance.js +512 -0
  219. package/src/components/AddressField/AddressField.test.tsx +411 -0
  220. package/src/components/AddressField/AddressField.tsx +323 -0
  221. package/src/components/AddressField/README.md +336 -0
  222. package/src/components/AddressField/index.ts +10 -0
  223. package/src/components/AddressField/types.ts +65 -0
  224. package/src/components/FileDisplay/FileDisplay.test.tsx +454 -0
  225. package/src/components/FileDisplay/FileDisplay.tsx +28 -1
  226. package/src/components/FileUpload/FileUpload.test.tsx +2 -0
  227. package/src/components/FileUpload/FileUpload.tsx +7 -1
  228. package/src/components/Header/Header.tsx +2 -5
  229. package/src/components/ProtectedRoute/ProtectedRoute.tsx +134 -1
  230. package/src/components/index.ts +2 -0
  231. package/src/hooks/__tests__/useFileDisplay.unit.test.ts +30 -5
  232. package/src/hooks/__tests__/useOrganisationSecurity.unit.test.tsx +11 -10
  233. package/src/hooks/__tests__/usePublicFileDisplay.test.ts +31 -6
  234. package/src/hooks/index.ts +9 -0
  235. package/src/hooks/public/usePublicFileDisplay.ts +8 -10
  236. package/src/hooks/useAddressAutocomplete.test.ts +318 -0
  237. package/src/hooks/useAddressAutocomplete.ts +268 -0
  238. package/src/hooks/useFileDisplay.ts +3 -15
  239. package/src/hooks/useFileReference.test.ts +21 -3
  240. package/src/hooks/useFileReference.ts +3 -24
  241. package/src/hooks/useFileUrlCache.ts +246 -0
  242. package/src/hooks/useInactivityTracker.ts +31 -20
  243. package/src/hooks/useOrganisationSecurity.test.ts +10 -7
  244. package/src/hooks/useOrganisationSecurity.ts +3 -3
  245. package/src/hooks/usePreventTabReload.ts +106 -0
  246. package/src/hooks/useQueryCache.ts +315 -0
  247. package/src/hooks/useSecureDataAccess.ts +2 -2
  248. package/src/index.ts +2 -0
  249. package/src/providers/services/EventServiceProvider.tsx +4 -1
  250. package/src/rbac/__tests__/rbac-role-isolation.test.ts +456 -0
  251. package/src/rbac/api.test.ts +21 -6
  252. package/src/rbac/api.ts +32 -11
  253. package/src/rbac/audit-batched.ts +223 -0
  254. package/src/rbac/audit-enhanced.ts +2 -2
  255. package/src/rbac/audit.test.ts +6 -5
  256. package/src/rbac/audit.ts +34 -6
  257. package/src/rbac/cache-invalidation.ts +63 -12
  258. package/src/rbac/cache.test.ts +2 -2
  259. package/src/rbac/cache.ts +61 -14
  260. package/src/rbac/components/PagePermissionGuard.tsx +19 -10
  261. package/src/rbac/components/__tests__/PagePermissionGuard.performance.test.tsx +248 -0
  262. package/src/rbac/config.ts +9 -0
  263. package/src/rbac/engine.ts +2 -21
  264. package/src/rbac/hooks/usePermissions.ts +21 -5
  265. package/src/rbac/index.ts +19 -0
  266. package/src/rbac/performance.ts +210 -0
  267. package/src/rbac/request-deduplication.ts +87 -0
  268. package/src/rbac/utils/deep-equal.ts +93 -0
  269. package/src/styles/core.css +5 -5
  270. package/src/types/database.generated.ts +63 -9
  271. package/src/types/file-reference.ts +3 -1
  272. package/src/utils/file-reference/__tests__/file-reference.test.ts +89 -8
  273. package/src/utils/file-reference/index.ts +56 -17
  274. package/src/utils/google-places/googlePlacesUtils.test.ts +403 -0
  275. package/src/utils/google-places/googlePlacesUtils.ts +475 -0
  276. package/src/utils/google-places/index.ts +26 -0
  277. package/src/utils/google-places/loadGoogleMapsScript.ts +207 -0
  278. package/src/utils/google-places/types.ts +94 -0
  279. package/src/utils/index.ts +23 -0
  280. package/src/utils/request-deduplication.ts +165 -0
  281. package/src/utils/security/secureDataAccess.ts +1 -1
  282. package/src/utils/storage/helpers.ts +211 -4
  283. package/dist/chunk-445GEP27.js.map +0 -1
  284. package/dist/chunk-AISXLWGZ.js.map +0 -1
  285. package/dist/chunk-FMUCXFII.js +0 -76
  286. package/dist/chunk-FMUCXFII.js.map +0 -1
  287. package/dist/chunk-FSFQFJCU.js.map +0 -1
  288. package/dist/chunk-FXFJRTKI.js.map +0 -1
  289. package/dist/chunk-HC67NW5K.js.map +0 -1
  290. package/dist/chunk-IXSNYUCT.js.map +0 -1
  291. package/dist/chunk-MX3EIJGQ.js.map +0 -1
  292. package/dist/chunk-OKI34GZD.js.map +0 -1
  293. package/dist/chunk-STTZQK2I.js.map +0 -1
  294. package/dist/chunk-U6WNSFX5.js.map +0 -1
  295. /package/dist/{DataTable-IX2NBUTP.js.map → DataTable-K3RJRSOX.js.map} +0 -0
  296. /package/dist/{UnifiedAuthProvider-A4BCQRJY.js.map → UnifiedAuthProvider-B76OWOAT.js.map} +0 -0
  297. /package/dist/{api-BMFCXVQX.js.map → api-YP7XD5L6.js.map} +0 -0
  298. /package/dist/{audit-WRS3KJKI.js.map → audit-B5P6FFIR.js.map} +0 -0
  299. /package/dist/{chunk-HGPQUCBC.js.map → chunk-FMTK4XNN.js.map} +0 -0
  300. /package/dist/{chunk-XAUHJD3L.js.map → chunk-K2JGDXGU.js.map} +0 -0
@@ -0,0 +1,447 @@
1
+ import {
2
+ createLogger
3
+ } from "./chunk-PWLANIRT.js";
4
+
5
+ // src/utils/request-deduplication.ts
6
+ var log = createLogger("request-deduplication");
7
+ var inFlightRequests = /* @__PURE__ */ new Map();
8
+ function generateRequestKey(method, table, filters, select) {
9
+ const filterStr = filters ? JSON.stringify(filters) : "";
10
+ const selectStr = select || "*";
11
+ return `${method}:${table}:${filterStr}:${selectStr}`;
12
+ }
13
+ async function getOrCreateRequest(key, requestFn) {
14
+ const existingRequest = inFlightRequests.get(key);
15
+ if (existingRequest) {
16
+ log.debug(`Request deduplication: reusing in-flight request for ${key}`);
17
+ return existingRequest;
18
+ }
19
+ log.debug(`Creating new request for ${key}`);
20
+ const requestPromise = requestFn().then((result) => {
21
+ inFlightRequests.delete(key);
22
+ return result;
23
+ }).catch((error) => {
24
+ inFlightRequests.delete(key);
25
+ throw error;
26
+ });
27
+ inFlightRequests.set(key, requestPromise);
28
+ return requestPromise;
29
+ }
30
+ function clearInFlightRequests() {
31
+ const count = inFlightRequests.size;
32
+ inFlightRequests.clear();
33
+ log.debug(`Cleared ${count} in-flight requests`);
34
+ }
35
+ function getInFlightRequestStats() {
36
+ return {
37
+ count: inFlightRequests.size,
38
+ keys: Array.from(inFlightRequests.keys())
39
+ };
40
+ }
41
+ async function deduplicatedQuery(supabase, table, filters, select, requestFn) {
42
+ const key = generateRequestKey("GET", table, filters, select);
43
+ return getOrCreateRequest(key, requestFn);
44
+ }
45
+
46
+ // src/utils/google-places/loadGoogleMapsScript.ts
47
+ function loadGoogleMapsScript(apiKey, libraries = "places") {
48
+ return new Promise((resolve, reject) => {
49
+ if (window.google && window.google.maps && window.google.maps.places) {
50
+ resolve();
51
+ return;
52
+ }
53
+ const existingScript = document.querySelector(
54
+ `script[src*="maps.googleapis.com/maps/api/js"]`
55
+ );
56
+ if (existingScript) {
57
+ existingScript.addEventListener("load", () => {
58
+ let attempts = 0;
59
+ const maxAttempts = 20;
60
+ const checkPlaces = () => {
61
+ if (window.google?.maps?.places) {
62
+ resolve();
63
+ } else if (attempts < maxAttempts) {
64
+ attempts++;
65
+ setTimeout(checkPlaces, 100);
66
+ } else {
67
+ reject(new Error("Google Maps script loaded but Places library not available. Make sure the Places API is enabled in your Google Cloud Console."));
68
+ }
69
+ };
70
+ checkPlaces();
71
+ });
72
+ existingScript.addEventListener("error", () => {
73
+ reject(new Error("Failed to load Google Maps script"));
74
+ });
75
+ return;
76
+ }
77
+ const script = document.createElement("script");
78
+ script.src = `https://maps.googleapis.com/maps/api/js?key=${apiKey}&libraries=${libraries}&loading=async`;
79
+ script.async = true;
80
+ script.defer = true;
81
+ script.onload = () => {
82
+ let attempts = 0;
83
+ const maxAttempts = 20;
84
+ const checkPlaces = () => {
85
+ if (window.google?.maps?.places) {
86
+ resolve();
87
+ } else if (attempts < maxAttempts) {
88
+ attempts++;
89
+ setTimeout(checkPlaces, 100);
90
+ } else {
91
+ if (window.google?.maps && !window.google.maps.places) {
92
+ reject(new Error('Google Maps loaded but Places library not available. Make sure the Places API is enabled in your Google Cloud Console and the "places" library is included in the script URL.'));
93
+ } else if (!window.google) {
94
+ reject(new Error("Google Maps script loaded but google object not available. Check your API key and network connection."));
95
+ } else {
96
+ reject(new Error("Google Maps script loaded but Places library not available after multiple attempts. Make sure the Places API is enabled in your Google Cloud Console."));
97
+ }
98
+ }
99
+ };
100
+ checkPlaces();
101
+ };
102
+ script.onerror = () => {
103
+ reject(new Error("Failed to load Google Maps script"));
104
+ };
105
+ document.head.appendChild(script);
106
+ });
107
+ }
108
+ function isGoogleMapsLoaded() {
109
+ return !!(window.google && window.google.maps && window.google.maps.places);
110
+ }
111
+
112
+ // src/utils/google-places/googlePlacesUtils.ts
113
+ var log2 = createLogger("google-places");
114
+ async function fetchPlaceAutocomplete(query, apiKey, options) {
115
+ if (!query.trim()) {
116
+ return [];
117
+ }
118
+ if (!apiKey) {
119
+ throw new Error("Google Places API key is required");
120
+ }
121
+ if (!isGoogleMapsLoaded()) {
122
+ await loadGoogleMapsScript(apiKey, "places");
123
+ }
124
+ const requestKey = `google-places-autocomplete:${query}:${JSON.stringify(options || {})}`;
125
+ return getOrCreateRequest(requestKey, async () => {
126
+ try {
127
+ log2.debug(`Fetching autocomplete for query: ${query}`);
128
+ if (!window.google?.maps?.places) {
129
+ throw new Error("Google Maps Places library not available");
130
+ }
131
+ const useNewAPI = window.google.maps.places.AutocompleteSuggestion !== void 0;
132
+ if (useNewAPI) {
133
+ const request2 = {
134
+ input: query.trim()
135
+ };
136
+ if (options?.components) {
137
+ const componentParts = options.components.split("|");
138
+ const countries = [];
139
+ componentParts.forEach((part) => {
140
+ const [key, value] = part.split(":");
141
+ if (key === "country") {
142
+ countries.push(...value.split(",").map((c) => c.toUpperCase()));
143
+ }
144
+ });
145
+ if (countries.length > 0) {
146
+ request2.includedRegionCodes = countries;
147
+ }
148
+ }
149
+ if (options?.location && options?.radius) {
150
+ const [lat, lng] = options.location.split(",").map(Number);
151
+ request2.locationBias = {
152
+ circle: {
153
+ center: { latitude: lat, longitude: lng },
154
+ radius: options.radius
155
+ }
156
+ };
157
+ }
158
+ if (options?.language) {
159
+ request2.languageCode = options.language;
160
+ }
161
+ return new Promise((resolve, reject) => {
162
+ window.google.maps.places.AutocompleteSuggestion.fetchAutocompleteSuggestions(request2).then((response) => {
163
+ if (response.suggestions && response.suggestions.length > 0) {
164
+ const result = response.suggestions.filter((s) => s.placePrediction).map((s) => ({
165
+ description: s.placePrediction.text.text,
166
+ place_id: s.placePrediction.placeId,
167
+ structured_formatting: {
168
+ main_text: s.placePrediction.structuredFormat?.mainText?.text || s.placePrediction.text.text,
169
+ secondary_text: s.placePrediction.structuredFormat?.secondaryText?.text || ""
170
+ }
171
+ }));
172
+ log2.debug(`Received ${result.length} predictions (new API)`);
173
+ resolve(result);
174
+ } else {
175
+ log2.debug("No results found (new API)");
176
+ resolve([]);
177
+ }
178
+ }).catch((error) => {
179
+ log2.error("Autocomplete fetch failed (new API):", error);
180
+ reject(new Error(`Failed to fetch autocomplete predictions: ${error.message || "Unknown error"}`));
181
+ });
182
+ });
183
+ }
184
+ const autocompleteService = new window.google.maps.places.AutocompleteService();
185
+ const request = {
186
+ input: query.trim()
187
+ };
188
+ if (options?.components) {
189
+ const componentParts = options.components.split("|");
190
+ const restrictions = {};
191
+ const countries = [];
192
+ componentParts.forEach((part) => {
193
+ const [key, value] = part.split(":");
194
+ if (key === "country") {
195
+ countries.push(...value.split(",").map((c) => c.toUpperCase()));
196
+ }
197
+ });
198
+ if (countries.length > 0) {
199
+ request.componentRestrictions = { country: countries.length === 1 ? countries[0] : countries };
200
+ }
201
+ }
202
+ if (options?.location) {
203
+ const [lat, lng] = options.location.split(",").map(Number);
204
+ if (window.google?.maps?.LatLng) {
205
+ request.location = new window.google.maps.LatLng(lat, lng);
206
+ }
207
+ }
208
+ if (options?.radius) {
209
+ request.radius = options.radius;
210
+ }
211
+ if (options?.types) {
212
+ request.types = [options.types];
213
+ }
214
+ if (options?.language) {
215
+ request.language = options.language;
216
+ }
217
+ return new Promise((resolve, reject) => {
218
+ autocompleteService.getPlacePredictions(request, (predictions, status) => {
219
+ if (status === "OK" && predictions) {
220
+ log2.debug(`Received ${predictions.length} predictions`);
221
+ const result = predictions.map((pred) => ({
222
+ description: pred.description,
223
+ place_id: pred.place_id,
224
+ structured_formatting: {
225
+ main_text: pred.structured_formatting.main_text,
226
+ secondary_text: pred.structured_formatting.secondary_text
227
+ }
228
+ }));
229
+ resolve(result);
230
+ } else if (status === "ZERO_RESULTS") {
231
+ log2.debug("No results found");
232
+ resolve([]);
233
+ } else {
234
+ const errorMsg = `Google Places API error: ${status}`;
235
+ log2.error("Autocomplete fetch failed:", errorMsg);
236
+ reject(new Error(errorMsg));
237
+ }
238
+ });
239
+ });
240
+ } catch (error) {
241
+ if (error instanceof Error) {
242
+ log2.error("Autocomplete fetch failed:", error.message);
243
+ throw error;
244
+ }
245
+ log2.error("Autocomplete fetch failed: Unknown error");
246
+ throw new Error("Failed to fetch autocomplete predictions");
247
+ }
248
+ });
249
+ }
250
+ async function fetchPlaceDetails(placeId, apiKey) {
251
+ if (!placeId) {
252
+ throw new Error("Place ID is required");
253
+ }
254
+ if (!apiKey) {
255
+ throw new Error("Google Places API key is required");
256
+ }
257
+ if (!isGoogleMapsLoaded()) {
258
+ await loadGoogleMapsScript(apiKey, "places");
259
+ }
260
+ const requestKey = `google-places-details:${placeId}`;
261
+ return getOrCreateRequest(requestKey, async () => {
262
+ try {
263
+ log2.debug(`Fetching place details for place_id: ${placeId}`);
264
+ if (!window.google?.maps?.places) {
265
+ throw new Error("Google Maps Places library not available");
266
+ }
267
+ const dummyElement = document.createElement("div");
268
+ const placesService = new window.google.maps.places.PlacesService(dummyElement);
269
+ return new Promise((resolve, reject) => {
270
+ placesService.getDetails(
271
+ {
272
+ placeId,
273
+ fields: ["place_id", "formatted_address", "address_components", "geometry"]
274
+ },
275
+ (place, status) => {
276
+ if (status === "OK" && place) {
277
+ log2.debug("Place details fetched successfully");
278
+ resolve(place);
279
+ } else if (status === "NOT_FOUND") {
280
+ log2.error("Place not found:", placeId);
281
+ reject(new Error("Place not found"));
282
+ } else {
283
+ const errorMsg = `Failed to fetch place details: ${status}`;
284
+ log2.error("Place details fetch failed:", errorMsg);
285
+ reject(new Error(errorMsg));
286
+ }
287
+ }
288
+ );
289
+ });
290
+ } catch (error) {
291
+ if (error instanceof Error) {
292
+ log2.error("Place details fetch failed:", error.message);
293
+ throw error;
294
+ }
295
+ log2.error("Place details fetch failed: Unknown error");
296
+ throw new Error("Failed to fetch place details");
297
+ }
298
+ });
299
+ }
300
+ function parseAddressComponents(components) {
301
+ if (!components || components.length === 0) {
302
+ return {
303
+ street_number: null,
304
+ route: null,
305
+ suburb: null,
306
+ state: null,
307
+ postcode: null,
308
+ country: null
309
+ };
310
+ }
311
+ const result = {
312
+ street_number: null,
313
+ route: null,
314
+ suburb: null,
315
+ state: null,
316
+ postcode: null,
317
+ country: null
318
+ };
319
+ for (const component of components) {
320
+ const types = component.types || [];
321
+ if (types.includes("street_number")) {
322
+ result.street_number = component.long_name;
323
+ } else if (types.includes("route")) {
324
+ result.route = component.long_name;
325
+ } else if (types.includes("locality") || types.includes("sublocality")) {
326
+ result.suburb = component.long_name;
327
+ } else if (types.includes("administrative_area_level_1")) {
328
+ result.state = component.short_name;
329
+ } else if (types.includes("postal_code")) {
330
+ result.postcode = component.long_name;
331
+ } else if (types.includes("country")) {
332
+ result.country = component.short_name;
333
+ }
334
+ }
335
+ return result;
336
+ }
337
+ function createAddressFromPlaceResult(place) {
338
+ const components = parseAddressComponents(place.address_components || []);
339
+ return {
340
+ place_id: place.place_id,
341
+ full_address: place.formatted_address || null,
342
+ street_number: components.street_number,
343
+ route: components.route,
344
+ suburb: components.suburb,
345
+ state: components.state,
346
+ postcode: components.postcode,
347
+ country: components.country,
348
+ lat: place.geometry?.location?.lat() ?? null,
349
+ lng: place.geometry?.location?.lng() ?? null
350
+ };
351
+ }
352
+ async function getAddressByPlaceId(placeId, apiKey) {
353
+ try {
354
+ const place = await fetchPlaceDetails(placeId, apiKey);
355
+ return createAddressFromPlaceResult(place);
356
+ } catch (error) {
357
+ log2.error("Failed to get address by place_id:", error);
358
+ return null;
359
+ }
360
+ }
361
+
362
+ // src/utils/performance/performanceBudgets.ts
363
+ var PERFORMANCE_BUDGETS = {
364
+ COMPONENT_RENDER: { threshold: 50 },
365
+ BUNDLE_SIZE: { threshold: 15e4 },
366
+ CHUNK_COUNT: { threshold: 10 },
367
+ TREESHAKING_SCORE: { threshold: 70 },
368
+ ERROR_BOUNDARY_TRIGGER: { threshold: 5 },
369
+ MEMORY_INCREASE: { threshold: 1e3 },
370
+ LARGE_LIST_RENDER: { threshold: 500 }
371
+ };
372
+ var PerformanceBudgetMonitor = class {
373
+ constructor() {
374
+ this.metrics = /* @__PURE__ */ new Map();
375
+ this.budgets = [];
376
+ }
377
+ measure(metric, value, metadata) {
378
+ this.metrics.set(metric, value);
379
+ if (import.meta.env.MODE === "development" || import.meta.env.MODE === "test" || false) {
380
+ console.log("\u{1F4CA} Performance Metric: " + metric + " = " + value, metadata);
381
+ }
382
+ const budgetConfig = PERFORMANCE_BUDGETS[metric];
383
+ const threshold = budgetConfig?.threshold || 100;
384
+ const passed = value <= threshold;
385
+ return {
386
+ passed,
387
+ value,
388
+ threshold
389
+ };
390
+ }
391
+ setBudget(metric, budget, threshold = "warning") {
392
+ this.budgets.push({ metric, budget, actual: 0, threshold });
393
+ }
394
+ checkBudgets() {
395
+ const violations = [];
396
+ for (const budget of this.budgets) {
397
+ const actual = this.metrics.get(budget.metric) || 0;
398
+ budget.actual = actual;
399
+ if (actual > budget.budget) {
400
+ violations.push(budget);
401
+ if (import.meta.env.MODE === "development" || import.meta.env.MODE === "test" || false) {
402
+ if (budget.threshold === "error") {
403
+ console.error("\u274C Performance budget exceeded: " + budget.metric + " (" + actual + " > " + budget.budget + ")");
404
+ } else if (budget.threshold === "warning") {
405
+ console.warn("\u26A0\uFE0F Performance budget exceeded: " + budget.metric + " (" + actual + " > " + budget.budget + ")");
406
+ } else {
407
+ console.info("\u2139\uFE0F Performance budget exceeded: " + budget.metric + " (" + actual + " > " + budget.budget + ")");
408
+ }
409
+ }
410
+ }
411
+ }
412
+ return violations;
413
+ }
414
+ getMetrics() {
415
+ return {
416
+ bundleSize: this.metrics.get("BUNDLE_SIZE") || 0,
417
+ chunkCount: this.metrics.get("CHUNK_COUNT") || 0,
418
+ treeshakingEffectiveness: this.metrics.get("TREESHAKING_SCORE") || 0,
419
+ dynamicImportUsage: this.metrics.get("DYNAMIC_IMPORTS") || 0
420
+ };
421
+ }
422
+ reset() {
423
+ this.metrics.clear();
424
+ this.budgets.length = 0;
425
+ }
426
+ };
427
+ var performanceBudgetMonitor = new PerformanceBudgetMonitor();
428
+ performanceBudgetMonitor.setBudget("BUNDLE_SIZE", 15e4, "error");
429
+ performanceBudgetMonitor.setBudget("CHUNK_COUNT", 10, "warning");
430
+ performanceBudgetMonitor.setBudget("TREESHAKING_SCORE", 70, "warning");
431
+ performanceBudgetMonitor.setBudget("ERROR_BOUNDARY_TRIGGER", 5, "error");
432
+
433
+ export {
434
+ generateRequestKey,
435
+ getOrCreateRequest,
436
+ clearInFlightRequests,
437
+ getInFlightRequestStats,
438
+ deduplicatedQuery,
439
+ fetchPlaceAutocomplete,
440
+ fetchPlaceDetails,
441
+ parseAddressComponents,
442
+ createAddressFromPlaceResult,
443
+ getAddressByPlaceId,
444
+ PERFORMANCE_BUDGETS,
445
+ performanceBudgetMonitor
446
+ };
447
+ //# sourceMappingURL=chunk-YHCN776L.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/utils/request-deduplication.ts","../src/utils/google-places/loadGoogleMapsScript.ts","../src/utils/google-places/googlePlacesUtils.ts","../src/utils/performance/performanceBudgets.ts"],"sourcesContent":["/**\n * Request Deduplication Utility\n * @package @jmruthers/pace-core\n * @module Utils/RequestDeduplication\n * @since 2.0.0\n * \n * Provides request deduplication to prevent duplicate in-flight requests.\n * When multiple components request the same data simultaneously, only one\n * request is made and all callers share the same promise.\n */\n\nimport { createLogger } from './core/logger';\n\nconst log = createLogger('request-deduplication');\n\n/**\n * In-flight request cache\n * Key: request identifier (e.g., \"GET:table:filter:value\")\n * Value: Promise that resolves to the request result\n */\nconst inFlightRequests = new Map<string, Promise<any>>();\n\n/**\n * Generate a request key from request parameters\n * \n * @param method - HTTP method (GET, POST, etc.)\n * @param table - Table name\n * @param filters - Filter object\n * @param select - Select columns\n * @returns Request key string\n */\nexport function generateRequestKey(\n method: string,\n table: string,\n filters?: Record<string, any>,\n select?: string\n): string {\n const filterStr = filters ? JSON.stringify(filters) : '';\n const selectStr = select || '*';\n return `${method}:${table}:${filterStr}:${selectStr}`;\n}\n\n/**\n * Get or create a request\n * \n * If a request with the same key is already in-flight, returns the existing promise.\n * Otherwise, creates a new request and stores it for deduplication.\n * \n * @param key - Request key\n * @param requestFn - Function that performs the actual request\n * @returns Promise that resolves to the request result\n * \n * @example\n * ```ts\n * const data = await getOrCreateRequest(\n * 'GET:pace_person:{\"user_id\":\"123\"}',\n * async () => {\n * const { data } = await supabase\n * .from('pace_person')\n * .select('id, first_name')\n * .eq('user_id', '123')\n * .single();\n * return data;\n * }\n * );\n * ```\n */\nexport async function getOrCreateRequest<T>(\n key: string,\n requestFn: () => Promise<T>\n): Promise<T> {\n // Check if request is already in-flight\n const existingRequest = inFlightRequests.get(key);\n if (existingRequest) {\n log.debug(`Request deduplication: reusing in-flight request for ${key}`);\n return existingRequest as Promise<T>;\n }\n \n // Create new request\n log.debug(`Creating new request for ${key}`);\n const requestPromise = requestFn()\n .then((result) => {\n // Remove from in-flight cache after completion\n inFlightRequests.delete(key);\n return result;\n })\n .catch((error) => {\n // Remove from in-flight cache on error\n inFlightRequests.delete(key);\n throw error;\n });\n \n // Store in-flight request\n inFlightRequests.set(key, requestPromise);\n \n return requestPromise;\n}\n\n/**\n * Clear all in-flight requests\n * \n * Useful for cleanup or testing.\n */\nexport function clearInFlightRequests(): void {\n const count = inFlightRequests.size;\n inFlightRequests.clear();\n log.debug(`Cleared ${count} in-flight requests`);\n}\n\n/**\n * Get statistics about in-flight requests\n * \n * @returns Statistics object\n */\nexport function getInFlightRequestStats(): {\n count: number;\n keys: string[];\n} {\n return {\n count: inFlightRequests.size,\n keys: Array.from(inFlightRequests.keys()),\n };\n}\n\n/**\n * Supabase query wrapper with automatic deduplication\n * \n * Wraps a Supabase query to automatically deduplicate identical requests.\n * \n * @param supabase - Supabase client\n * @param table - Table name\n * @param filters - Filter object (e.g., { user_id: '123' })\n * @param select - Select columns (default: '*')\n * @param requestFn - Function that performs the query\n * @returns Promise that resolves to query result\n * \n * @example\n * ```ts\n * const person = await deduplicatedQuery(\n * supabase,\n * 'pace_person',\n * { user_id: userId },\n * 'id, first_name, last_name',\n * async () => {\n * const { data } = await supabase\n * .from('pace_person')\n * .select('id, first_name, last_name')\n * .eq('user_id', userId)\n * .single();\n * return data;\n * }\n * );\n * ```\n */\nexport async function deduplicatedQuery<T>(\n supabase: any,\n table: string,\n filters: Record<string, any>,\n select: string,\n requestFn: () => Promise<T>\n): Promise<T> {\n const key = generateRequestKey('GET', table, filters, select);\n return getOrCreateRequest(key, requestFn);\n}\n\n","/**\n * @file Google Maps Script Loader\n * @package @jmruthers/pace-core\n * @module Utils/GooglePlaces\n * @since 0.1.0\n *\n * Utility to dynamically load the Google Maps JavaScript API.\n * This is required because the REST API doesn't support CORS from browsers.\n */\n\n// Type definitions for Google Maps (minimal, just what we need)\ndeclare global {\n interface Window {\n google?: {\n maps: {\n places: {\n // New AutocompleteSuggestion API (recommended)\n AutocompleteSuggestion: {\n fetchAutocompleteSuggestions: (\n request: {\n input: string;\n includedRegionCodes?: string[];\n locationBias?: {\n circle?: {\n center: { latitude: number; longitude: number };\n radius: number;\n };\n };\n includedPrimaryTypes?: string[];\n languageCode?: string;\n }\n ) => Promise<{\n suggestions: Array<{\n placePrediction?: {\n placeId: string;\n text: {\n text: string;\n matches: Array<{\n endOffset: number;\n startOffset: number;\n }>;\n };\n structuredFormat?: {\n mainText: { text: string };\n secondaryText: { text: string };\n };\n };\n }>;\n }>;\n };\n // Legacy AutocompleteService (deprecated but still works)\n AutocompleteService: new () => {\n getPlacePredictions: (\n request: {\n input: string;\n componentRestrictions?: { country: string | string[] };\n location?: { lat: () => number; lng: () => number };\n radius?: number;\n types?: string[];\n language?: string;\n },\n callback: (\n predictions: Array<{\n description: string;\n place_id: string;\n structured_formatting: {\n main_text: string;\n secondary_text: string;\n };\n }> | null,\n status: string\n ) => void\n ) => void;\n };\n PlacesService: new (element: HTMLElement) => {\n getDetails: (\n request: { placeId: string; fields?: string[] },\n callback: (\n place: {\n place_id: string;\n formatted_address?: string;\n address_components?: Array<{\n long_name: string;\n short_name: string;\n types: string[];\n }>;\n geometry?: {\n location?: {\n lat: () => number;\n lng: () => number;\n };\n };\n } | null,\n status: string\n ) => void\n ) => void;\n };\n PlacesServiceStatus: {\n OK: string;\n ZERO_RESULTS: string;\n NOT_FOUND: string;\n REQUEST_DENIED: string;\n INVALID_REQUEST: string;\n OVER_QUERY_LIMIT: string;\n };\n };\n LatLng: new (lat: number, lng: number) => { lat: () => number; lng: () => number };\n };\n };\n }\n}\n\n/**\n * Load Google Maps JavaScript API script\n * @param apiKey - Google Places API key\n * @param libraries - Comma-separated list of libraries to load (default: 'places')\n * @returns Promise that resolves when the script is loaded\n */\nexport function loadGoogleMapsScript(\n apiKey: string,\n libraries: string = 'places'\n): Promise<void> {\n return new Promise((resolve, reject) => {\n // Check if script is already loaded\n if (window.google && window.google.maps && window.google.maps.places) {\n resolve();\n return;\n }\n\n // Check if script is already being loaded\n const existingScript = document.querySelector(\n `script[src*=\"maps.googleapis.com/maps/api/js\"]`\n );\n if (existingScript) {\n // Wait for existing script to load\n existingScript.addEventListener('load', () => {\n // Wait for the library to initialize with multiple retries\n let attempts = 0;\n const maxAttempts = 20; // 2 seconds total\n \n const checkPlaces = () => {\n if (window.google?.maps?.places) {\n resolve();\n } else if (attempts < maxAttempts) {\n attempts++;\n setTimeout(checkPlaces, 100);\n } else {\n reject(new Error('Google Maps script loaded but Places library not available. Make sure the Places API is enabled in your Google Cloud Console.'));\n }\n };\n \n checkPlaces();\n });\n existingScript.addEventListener('error', () => {\n reject(new Error('Failed to load Google Maps script'));\n });\n return;\n }\n\n // Create and load script\n const script = document.createElement('script');\n script.src = `https://maps.googleapis.com/maps/api/js?key=${apiKey}&libraries=${libraries}&loading=async`;\n script.async = true;\n script.defer = true;\n\n script.onload = () => {\n // Wait for the library to initialize with multiple retries\n let attempts = 0;\n const maxAttempts = 20; // 2 seconds total (20 * 100ms)\n \n const checkPlaces = () => {\n if (window.google?.maps?.places) {\n resolve();\n } else if (attempts < maxAttempts) {\n attempts++;\n setTimeout(checkPlaces, 100);\n } else {\n // Check if google.maps exists but places doesn't\n if (window.google?.maps && !window.google.maps.places) {\n reject(new Error('Google Maps loaded but Places library not available. Make sure the Places API is enabled in your Google Cloud Console and the \"places\" library is included in the script URL.'));\n } else if (!window.google) {\n reject(new Error('Google Maps script loaded but google object not available. Check your API key and network connection.'));\n } else {\n reject(new Error('Google Maps script loaded but Places library not available after multiple attempts. Make sure the Places API is enabled in your Google Cloud Console.'));\n }\n }\n };\n \n // Start checking immediately, then retry if needed\n checkPlaces();\n };\n\n script.onerror = () => {\n reject(new Error('Failed to load Google Maps script'));\n };\n\n document.head.appendChild(script);\n });\n}\n\n/**\n * Check if Google Maps is already loaded\n */\nexport function isGoogleMapsLoaded(): boolean {\n return !!(window.google && window.google.maps && window.google.maps.places);\n}\n\n","/**\n * @file Google Places API Utilities\n * @package @jmruthers/pace-core\n * @module Utils/GooglePlaces\n * @since 0.1.0\n *\n * Utility functions for interacting with Google Places API.\n * Uses the Google Maps JavaScript API to avoid CORS issues.\n *\n * Features:\n * - Places Autocomplete Service integration\n * - Places Service integration\n * - Address component parsing\n * - Error handling\n * - Request deduplication\n */\n\nimport { getOrCreateRequest } from '../request-deduplication';\nimport { createLogger } from '../core/logger';\nimport { loadGoogleMapsScript, isGoogleMapsLoaded } from './loadGoogleMapsScript';\nimport type {\n GooglePlaceAutocompletePrediction,\n ParsedAddress,\n AutocompleteOptions,\n} from './types';\n\nconst log = createLogger('google-places');\n\n// Google Maps types are defined in loadGoogleMapsScript.ts\n\n/**\n * Fetch place autocomplete predictions using Google Maps JavaScript API\n *\n * @param query - Search query string\n * @param apiKey - Google Places API key\n * @param options - Optional autocomplete options\n * @returns Promise resolving to array of predictions\n *\n * @example\n * ```ts\n * const predictions = await fetchPlaceAutocomplete(\n * '123 Main St',\n * 'your-api-key',\n * { components: 'country:au' }\n * );\n * ```\n */\nexport async function fetchPlaceAutocomplete(\n query: string,\n apiKey: string,\n options?: AutocompleteOptions\n): Promise<GooglePlaceAutocompletePrediction[]> {\n if (!query.trim()) {\n return [];\n }\n\n if (!apiKey) {\n throw new Error('Google Places API key is required');\n }\n\n // Ensure Google Maps script is loaded\n if (!isGoogleMapsLoaded()) {\n await loadGoogleMapsScript(apiKey, 'places');\n }\n\n const requestKey = `google-places-autocomplete:${query}:${JSON.stringify(options || {})}`;\n\n return getOrCreateRequest(requestKey, async () => {\n try {\n log.debug(`Fetching autocomplete for query: ${query}`);\n\n if (!window.google?.maps?.places) {\n throw new Error('Google Maps Places library not available');\n }\n\n // Try to use the new AutocompleteSuggestion API first, fallback to legacy AutocompleteService\n const useNewAPI = window.google.maps.places.AutocompleteSuggestion !== undefined;\n \n if (useNewAPI) {\n // Use new AutocompleteSuggestion API\n const request: {\n input: string;\n includedRegionCodes?: string[];\n locationBias?: {\n circle?: {\n center: { latitude: number; longitude: number };\n radius: number;\n };\n };\n includedPrimaryTypes?: string[];\n languageCode?: string;\n } = {\n input: query.trim(),\n };\n\n // Parse components option (e.g., \"country:au\" -> [\"au\"])\n if (options?.components) {\n const componentParts = options.components.split('|');\n const countries: string[] = [];\n\n componentParts.forEach((part) => {\n const [key, value] = part.split(':');\n if (key === 'country') {\n countries.push(...value.split(',').map(c => c.toUpperCase()));\n }\n });\n\n if (countries.length > 0) {\n request.includedRegionCodes = countries;\n }\n }\n\n if (options?.location && options?.radius) {\n const [lat, lng] = options.location.split(',').map(Number);\n request.locationBias = {\n circle: {\n center: { latitude: lat, longitude: lng },\n radius: options.radius,\n },\n };\n }\n\n if (options?.language) {\n request.languageCode = options.language;\n }\n\n // Call new API\n return new Promise<GooglePlaceAutocompletePrediction[]>((resolve, reject) => {\n window.google!.maps.places.AutocompleteSuggestion.fetchAutocompleteSuggestions(request)\n .then((response) => {\n if (response.suggestions && response.suggestions.length > 0) {\n const result: GooglePlaceAutocompletePrediction[] = response.suggestions\n .filter(s => s.placePrediction)\n .map((s) => ({\n description: s.placePrediction!.text.text,\n place_id: s.placePrediction!.placeId,\n structured_formatting: {\n main_text: s.placePrediction!.structuredFormat?.mainText?.text || s.placePrediction!.text.text,\n secondary_text: s.placePrediction!.structuredFormat?.secondaryText?.text || '',\n },\n }));\n log.debug(`Received ${result.length} predictions (new API)`);\n resolve(result);\n } else {\n log.debug('No results found (new API)');\n resolve([]);\n }\n })\n .catch((error) => {\n log.error('Autocomplete fetch failed (new API):', error);\n reject(new Error(`Failed to fetch autocomplete predictions: ${error.message || 'Unknown error'}`));\n });\n });\n }\n\n // Fallback to legacy AutocompleteService\n const autocompleteService = new window.google.maps.places.AutocompleteService();\n\n // Build request\n const request: {\n input: string;\n componentRestrictions?: { country: string | string[] };\n location?: { lat: () => number; lng: () => number };\n radius?: number;\n types?: string[];\n language?: string;\n } = {\n input: query.trim(),\n };\n\n // Parse components option (e.g., \"country:au\" -> { country: \"AU\" })\n if (options?.components) {\n const componentParts = options.components.split('|');\n const restrictions: { country?: string[] } = {};\n const countries: string[] = [];\n\n componentParts.forEach((part) => {\n const [key, value] = part.split(':');\n if (key === 'country') {\n // Convert to uppercase for consistency with Google Maps API\n countries.push(...value.split(',').map(c => c.toUpperCase()));\n }\n });\n\n if (countries.length > 0) {\n request.componentRestrictions = { country: countries.length === 1 ? countries[0] : countries };\n }\n }\n\n if (options?.location) {\n const [lat, lng] = options.location.split(',').map(Number);\n if (window.google?.maps?.LatLng) {\n request.location = new window.google.maps.LatLng(lat, lng);\n }\n }\n\n if (options?.radius) {\n request.radius = options.radius;\n }\n\n if (options?.types) {\n request.types = [options.types];\n }\n\n if (options?.language) {\n request.language = options.language;\n }\n\n // Call AutocompleteService\n return new Promise<GooglePlaceAutocompletePrediction[]>((resolve, reject) => {\n autocompleteService.getPlacePredictions(request, (predictions, status) => {\n if (status === 'OK' && predictions) {\n log.debug(`Received ${predictions.length} predictions`);\n // Convert to our format\n const result: GooglePlaceAutocompletePrediction[] = predictions.map((pred) => ({\n description: pred.description,\n place_id: pred.place_id,\n structured_formatting: {\n main_text: pred.structured_formatting.main_text,\n secondary_text: pred.structured_formatting.secondary_text,\n },\n }));\n resolve(result);\n } else if (status === 'ZERO_RESULTS') {\n log.debug('No results found');\n resolve([]);\n } else {\n const errorMsg = `Google Places API error: ${status}`;\n log.error('Autocomplete fetch failed:', errorMsg);\n reject(new Error(errorMsg));\n }\n });\n });\n } catch (error) {\n if (error instanceof Error) {\n log.error('Autocomplete fetch failed:', error.message);\n throw error;\n }\n log.error('Autocomplete fetch failed: Unknown error');\n throw new Error('Failed to fetch autocomplete predictions');\n }\n });\n}\n\n/**\n * Fetch place details from Google Places API\n *\n * @param placeId - Google Place ID\n * @param apiKey - Google Places API key\n * @returns Promise resolving to place details\n *\n * @example\n * ```ts\n * const place = await fetchPlaceDetails('ChIJ...', 'your-api-key');\n * ```\n */\nexport async function fetchPlaceDetails(\n placeId: string,\n apiKey: string\n): Promise<{\n place_id: string;\n formatted_address?: string;\n address_components?: Array<{\n long_name: string;\n short_name: string;\n types: string[];\n }>;\n geometry?: {\n location?: {\n lat: () => number;\n lng: () => number;\n };\n };\n}> {\n if (!placeId) {\n throw new Error('Place ID is required');\n }\n\n if (!apiKey) {\n throw new Error('Google Places API key is required');\n }\n\n // Ensure Google Maps script is loaded\n if (!isGoogleMapsLoaded()) {\n await loadGoogleMapsScript(apiKey, 'places');\n }\n\n const requestKey = `google-places-details:${placeId}`;\n\n return getOrCreateRequest(requestKey, async () => {\n try {\n log.debug(`Fetching place details for place_id: ${placeId}`);\n\n if (!window.google?.maps?.places) {\n throw new Error('Google Maps Places library not available');\n }\n\n // Create a dummy element for PlacesService (it needs an element but we don't use it)\n const dummyElement = document.createElement('div');\n const placesService = new window.google.maps.places.PlacesService(dummyElement);\n\n // Call getDetails\n return new Promise<{\n place_id: string;\n formatted_address?: string;\n address_components?: Array<{\n long_name: string;\n short_name: string;\n types: string[];\n }>;\n geometry?: {\n location?: {\n lat: () => number;\n lng: () => number;\n };\n };\n }>((resolve, reject) => {\n placesService.getDetails(\n {\n placeId: placeId,\n fields: ['place_id', 'formatted_address', 'address_components', 'geometry'],\n },\n (place, status) => {\n if (status === 'OK' && place) {\n log.debug('Place details fetched successfully');\n resolve(place as any);\n } else if (status === 'NOT_FOUND') {\n log.error('Place not found:', placeId);\n reject(new Error('Place not found'));\n } else {\n const errorMsg = `Failed to fetch place details: ${status}`;\n log.error('Place details fetch failed:', errorMsg);\n reject(new Error(errorMsg));\n }\n }\n );\n });\n } catch (error) {\n if (error instanceof Error) {\n log.error('Place details fetch failed:', error.message);\n throw error;\n }\n log.error('Place details fetch failed: Unknown error');\n throw new Error('Failed to fetch place details');\n }\n });\n}\n\n/**\n * Parse address components from Google Places API response\n *\n * @param components - Array of address components from Google API\n * @returns Parsed address components\n */\nexport function parseAddressComponents(\n components: Array<{\n long_name: string;\n short_name: string;\n types: string[];\n }> | undefined\n): {\n street_number: string | null;\n route: string | null;\n suburb: string | null;\n state: string | null;\n postcode: string | null;\n country: string | null;\n} {\n if (!components || components.length === 0) {\n return {\n street_number: null,\n route: null,\n suburb: null,\n state: null,\n postcode: null,\n country: null,\n };\n }\n\n const result = {\n street_number: null as string | null,\n route: null as string | null,\n suburb: null as string | null,\n state: null as string | null,\n postcode: null as string | null,\n country: null as string | null,\n };\n\n for (const component of components) {\n const types = component.types || [];\n\n if (types.includes('street_number')) {\n result.street_number = component.long_name;\n } else if (types.includes('route')) {\n result.route = component.long_name;\n } else if (types.includes('locality') || types.includes('sublocality')) {\n result.suburb = component.long_name;\n } else if (types.includes('administrative_area_level_1')) {\n result.state = component.short_name;\n } else if (types.includes('postal_code')) {\n result.postcode = component.long_name;\n } else if (types.includes('country')) {\n result.country = component.short_name;\n }\n }\n\n return result;\n}\n\n/**\n * Create parsed address from Google Places API place result\n *\n * @param place - Place result from Google Places Details API\n * @returns Parsed address matching pace_address table structure\n */\nexport function createAddressFromPlaceResult(\n place: {\n place_id: string;\n formatted_address?: string;\n address_components?: Array<{\n long_name: string;\n short_name: string;\n types: string[];\n }>;\n geometry?: {\n location?: {\n lat: () => number;\n lng: () => number;\n };\n };\n }\n): ParsedAddress {\n const components = parseAddressComponents(place.address_components || []);\n\n return {\n place_id: place.place_id,\n full_address: place.formatted_address || null,\n street_number: components.street_number,\n route: components.route,\n suburb: components.suburb,\n state: components.state,\n postcode: components.postcode,\n country: components.country,\n lat: place.geometry?.location?.lat() ?? null,\n lng: place.geometry?.location?.lng() ?? null,\n };\n}\n\n/**\n * Get full address details by place_id\n * Useful for retrieving address from stored place_id without autocomplete search\n *\n * @param placeId - Google Place ID\n * @param apiKey - Google Places API key\n * @returns Promise resolving to parsed address\n *\n * @example\n * ```ts\n * const address = await getAddressByPlaceId('ChIJ...', 'your-api-key');\n * // Returns: { place_id: 'ChIJ...', full_address: '...', ... }\n * ```\n */\nexport async function getAddressByPlaceId(\n placeId: string,\n apiKey: string\n): Promise<ParsedAddress | null> {\n try {\n const place = await fetchPlaceDetails(placeId, apiKey);\n return createAddressFromPlaceResult(place);\n } catch (error) {\n log.error('Failed to get address by place_id:', error);\n return null;\n }\n}\n\n","\ninterface PerformanceBudget {\n metric: string;\n budget: number;\n actual: number;\n threshold: 'error' | 'warning' | 'info';\n}\n\ninterface PerformanceMetrics {\n bundleSize: number;\n chunkCount: number;\n treeshakingEffectiveness: number;\n dynamicImportUsage: number;\n}\n\ninterface MeasurementResult {\n passed: boolean;\n value: number;\n threshold: number;\n}\n\n// Performance budget thresholds with index signature\nexport const PERFORMANCE_BUDGETS: { [key: string]: { threshold: number } } = {\n COMPONENT_RENDER: { threshold: 50 },\n BUNDLE_SIZE: { threshold: 150000 },\n CHUNK_COUNT: { threshold: 10 },\n TREESHAKING_SCORE: { threshold: 70 },\n ERROR_BOUNDARY_TRIGGER: { threshold: 5 },\n MEMORY_INCREASE: { threshold: 1000 },\n LARGE_LIST_RENDER: { threshold: 500 },\n} as const;\n\nclass PerformanceBudgetMonitor {\n private metrics: Map<string, number> = new Map();\n private budgets: PerformanceBudget[] = [];\n\n measure(metric: string, value: number, metadata?: Record<string, unknown>): MeasurementResult {\n this.metrics.set(metric, value);\n \n // In production, this would send to a proper logging service\n // For now, we'll log to console for testing purposes\n if (import.meta.env.MODE === 'development' || import.meta.env.MODE === 'test' || process.env.NODE_ENV === 'test') {\n console.log('📊 Performance Metric: ' + metric + ' = ' + value, metadata);\n }\n\n // Get threshold for this metric\n const budgetConfig = PERFORMANCE_BUDGETS[metric];\n const threshold = budgetConfig?.threshold || 100;\n const passed = value <= threshold;\n\n return {\n passed,\n value,\n threshold\n };\n }\n\n setBudget(metric: string, budget: number, threshold: 'error' | 'warning' | 'info' = 'warning'): void {\n this.budgets.push({ metric, budget, actual: 0, threshold });\n }\n\n checkBudgets(): PerformanceBudget[] {\n const violations: PerformanceBudget[] = [];\n \n for (const budget of this.budgets) {\n const actual = this.metrics.get(budget.metric) || 0;\n budget.actual = actual;\n \n if (actual > budget.budget) {\n violations.push(budget);\n \n // In production, this would send to a proper logging service\n // For now, we'll log to console for testing purposes\n if (import.meta.env.MODE === 'development' || import.meta.env.MODE === 'test' || process.env.NODE_ENV === 'test') {\n if (budget.threshold === 'error') {\n console.error('❌ Performance budget exceeded: ' + budget.metric + ' (' + actual + ' > ' + budget.budget + ')');\n } else if (budget.threshold === 'warning') {\n console.warn('⚠️ Performance budget exceeded: ' + budget.metric + ' (' + actual + ' > ' + budget.budget + ')');\n } else {\n console.info('ℹ️ Performance budget exceeded: ' + budget.metric + ' (' + actual + ' > ' + budget.budget + ')');\n }\n }\n }\n }\n \n return violations;\n }\n\n getMetrics(): PerformanceMetrics {\n return {\n bundleSize: this.metrics.get('BUNDLE_SIZE') || 0,\n chunkCount: this.metrics.get('CHUNK_COUNT') || 0,\n treeshakingEffectiveness: this.metrics.get('TREESHAKING_SCORE') || 0,\n dynamicImportUsage: this.metrics.get('DYNAMIC_IMPORTS') || 0,\n };\n }\n\n reset(): void {\n this.metrics.clear();\n this.budgets.length = 0;\n }\n}\n\nexport const performanceBudgetMonitor = new PerformanceBudgetMonitor();\n\n// Set default performance budgets\nperformanceBudgetMonitor.setBudget('BUNDLE_SIZE', 150000, 'error'); // 150KB\nperformanceBudgetMonitor.setBudget('CHUNK_COUNT', 10, 'warning');\nperformanceBudgetMonitor.setBudget('TREESHAKING_SCORE', 70, 'warning');\nperformanceBudgetMonitor.setBudget('ERROR_BOUNDARY_TRIGGER', 5, 'error');\n"],"mappings":";;;;;AAaA,IAAM,MAAM,aAAa,uBAAuB;AAOhD,IAAM,mBAAmB,oBAAI,IAA0B;AAWhD,SAAS,mBACd,QACA,OACA,SACA,QACQ;AACR,QAAM,YAAY,UAAU,KAAK,UAAU,OAAO,IAAI;AACtD,QAAM,YAAY,UAAU;AAC5B,SAAO,GAAG,MAAM,IAAI,KAAK,IAAI,SAAS,IAAI,SAAS;AACrD;AA2BA,eAAsB,mBACpB,KACA,WACY;AAEZ,QAAM,kBAAkB,iBAAiB,IAAI,GAAG;AAChD,MAAI,iBAAiB;AACnB,QAAI,MAAM,wDAAwD,GAAG,EAAE;AACvE,WAAO;AAAA,EACT;AAGA,MAAI,MAAM,4BAA4B,GAAG,EAAE;AAC3C,QAAM,iBAAiB,UAAU,EAC9B,KAAK,CAAC,WAAW;AAEhB,qBAAiB,OAAO,GAAG;AAC3B,WAAO;AAAA,EACT,CAAC,EACA,MAAM,CAAC,UAAU;AAEhB,qBAAiB,OAAO,GAAG;AAC3B,UAAM;AAAA,EACR,CAAC;AAGH,mBAAiB,IAAI,KAAK,cAAc;AAExC,SAAO;AACT;AAOO,SAAS,wBAA8B;AAC5C,QAAM,QAAQ,iBAAiB;AAC/B,mBAAiB,MAAM;AACvB,MAAI,MAAM,WAAW,KAAK,qBAAqB;AACjD;AAOO,SAAS,0BAGd;AACA,SAAO;AAAA,IACL,OAAO,iBAAiB;AAAA,IACxB,MAAM,MAAM,KAAK,iBAAiB,KAAK,CAAC;AAAA,EAC1C;AACF;AAgCA,eAAsB,kBACpB,UACA,OACA,SACA,QACA,W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C;AAChH,cAAI,OAAO,cAAc,SAAS;AAChC,oBAAQ,MAAM,yCAAoC,OAAO,SAAS,OAAO,SAAS,QAAQ,OAAO,SAAS,GAAG;AAAA,UAC/G,WAAW,OAAO,cAAc,WAAW;AACzC,oBAAQ,KAAK,+CAAqC,OAAO,SAAS,OAAO,SAAS,QAAQ,OAAO,SAAS,GAAG;AAAA,UAC/G,OAAO;AACL,oBAAQ,KAAK,+CAAqC,OAAO,SAAS,OAAO,SAAS,QAAQ,OAAO,SAAS,GAAG;AAAA,UAC/G;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAEA,WAAO;AAAA,EACT;AAAA,EAEA,aAAiC;AAC/B,WAAO;AAAA,MACL,YAAY,KAAK,QAAQ,IAAI,aAAa,KAAK;AAAA,MAC/C,YAAY,KAAK,QAAQ,IAAI,aAAa,KAAK;AAAA,MAC/C,0BAA0B,KAAK,QAAQ,IAAI,mBAAmB,KAAK;AAAA,MACnE,oBAAoB,KAAK,QAAQ,IAAI,iBAAiB,KAAK;AAAA,IAC7D;AAAA,EACF;AAAA,EAEA,QAAc;AACZ,SAAK,QAAQ,MAAM;AACnB,SAAK,QAAQ,SAAS;AAAA,EACxB;AACF;AAEO,IAAM,2BAA2B,IAAI,yBAAyB;AAGrE,yBAAyB,UAAU,eAAe,MAAQ,OAAO;AACjE,yBAAyB,UAAU,eAAe,IAAI,SAAS;AAC/D,yBAAyB,UAAU,qBAAqB,IAAI,SAAS;AACrE,yBAAyB,UAAU,0BAA0B,GAAG,OAAO;","names":["log","request"]}
@@ -1,10 +1,10 @@
1
1
  export { a as UnifiedAuthContextType, d as UnifiedAuthProvider, c as UnifiedAuthProviderProps, u as useUnifiedAuth } from './UnifiedAuthProvider-BG0AL5eE.js';
2
- export { A as Alert, n as AlertDescription, m as AlertTitle, o as Avatar, q as AvatarFallback, p as AvatarImage, r as Badge, s as BadgeProps, t as BadgeVariant, B as Button, a as ButtonProps, al as Calendar, am as CalendarProps, C as Card, g as CardActions, i as CardActionsProps, f as CardContent, e as CardDescription, c as CardFooter, b as CardHeader, h as CardProps, d as CardTitle, u as Checkbox, J as Dialog, U as DialogBody, O as DialogClose, Q as DialogContent, _ as DialogContentProps, X as DialogDescription, a3 as DialogDescriptionProps, V as DialogFooter, a1 as DialogFooterProps, R as DialogHeader, a0 as DialogHeaderProps, M as DialogOverlay, $ as DialogOverlayProps, K as DialogPortal, Y as DialogProps, a4 as DialogSize, W as DialogTitle, a2 as DialogTitleProps, N as DialogTrigger, Z as DialogTriggerProps, aT as ErrorBoundary, aU as ErrorBoundaryProps, aV as ErrorBoundaryState, aZ as EventSelector, b0 as FileDisplay, b1 as FileDisplayProps, a_ as FileUpload, a$ as FileUploadProps, aJ as Footer, aK as FooterProps, aC as Form, aD as FormField, aF as FormFieldProps, aE as FormProps, aI as Header, I as Input, j as InputProps, L as Label, k as LabelProps, aW as LoadingSpinner, aG as LoginForm, aH as LoginFormProps, aP as NavigationItem, aN as NavigationMenu, aO as NavigationMenuProps, aQ as OrganisationSelector, aR as OrganisationSelectorProps, bj as PaceAppLayout, bi as PaceAppLayoutProps, bl as PaceLoginPage, bk as PaceLoginPageProps, P as Progress, w as ProgressProps, aL as ProtectedRoute, aM as ProtectedRouteProps, bb as PublicPageFooter, bh as PublicPageFooterProps, ba as PublicPageHeader, bg as PublicPageHeaderProps, b9 as PublicPageLayout, bf as PublicPageLayoutProps, bc as PublicPageProvider, a5 as Select, a9 as SelectContent, a6 as SelectGroup, ab as SelectItem, aa as SelectLabel, ac as SelectSeparator, a8 as SelectTrigger, a7 as SelectValue, aX as SessionRestorationLoader, aY as SessionRestorationLoaderProps, S as Switch, v as SwitchProps, x as Table, z as TableBody, D as TableCaption, E as TableCell, F as TableFooter, G as TableHead, y as TableHeader, H as TableRow, ad as Tabs, ag as TabsContent, ak as TabsContentProps, ae as TabsList, ai as TabsListProps, ah as TabsProps, af as TabsTrigger, aj as TabsTriggerProps, T as Textarea, l as TextareaProps, an as Toast, ap as ToastAction, av as ToastActionElement, au as ToastClose, at as ToastDescription, aw as ToastProps, aq as ToastProvider, as as ToastTitle, ar as ToastViewport, ao as Toaster, ax as Tooltip, az as TooltipContent, aA as TooltipProvider, aB as TooltipRoot, ay as TooltipTrigger, b8 as UseFileReferenceForRecordReturn, b6 as UseFileReferenceOptions, b7 as UseFileReferenceReturn, aS as UserMenu, b2 as useFileReference, b4 as useFileReferenceById, b3 as useFileReferenceForRecord, b5 as useFilesByCategory, be as useIsPublicPage, bd as usePublicPageContext } from './PublicPageProvider-BABf6JCh.js';
2
+ export { A as AddressField, k as AddressFieldProps, l as AddressFieldRef, o as Alert, q as AlertDescription, p as AlertTitle, r as Avatar, t as AvatarFallback, s as AvatarImage, u as Badge, v as BadgeProps, w as BadgeVariant, B as Button, a as ButtonProps, ao as Calendar, ap as CalendarProps, C as Card, g as CardActions, i as CardActionsProps, f as CardContent, e as CardDescription, c as CardFooter, b as CardHeader, h as CardProps, d as CardTitle, x as Checkbox, N as Dialog, X as DialogBody, U as DialogClose, V as DialogContent, a1 as DialogContentProps, _ as DialogDescription, a6 as DialogDescriptionProps, Y as DialogFooter, a4 as DialogFooterProps, W as DialogHeader, a3 as DialogHeaderProps, Q as DialogOverlay, a2 as DialogOverlayProps, O as DialogPortal, $ as DialogProps, a7 as DialogSize, Z as DialogTitle, a5 as DialogTitleProps, R as DialogTrigger, a0 as DialogTriggerProps, aW as ErrorBoundary, aX as ErrorBoundaryProps, aY as ErrorBoundaryState, b0 as EventSelector, b3 as FileDisplay, b4 as FileDisplayProps, b1 as FileUpload, b2 as FileUploadProps, aM as Footer, aN as FooterProps, aF as Form, aG as FormField, aI as FormFieldProps, aH as FormProps, aL as Header, I as Input, j as InputProps, L as Label, m as LabelProps, aZ as LoadingSpinner, aJ as LoginForm, aK as LoginFormProps, aS as NavigationItem, aQ as NavigationMenu, aR as NavigationMenuProps, aT as OrganisationSelector, aU as OrganisationSelectorProps, bm as PaceAppLayout, bl as PaceAppLayoutProps, bo as PaceLoginPage, bn as PaceLoginPageProps, P as Progress, z as ProgressProps, aO as ProtectedRoute, aP as ProtectedRouteProps, be as PublicPageFooter, bk as PublicPageFooterProps, bd as PublicPageHeader, bj as PublicPageHeaderProps, bc as PublicPageLayout, bi as PublicPageLayoutProps, bf as PublicPageProvider, a8 as Select, ac as SelectContent, a9 as SelectGroup, ae as SelectItem, ad as SelectLabel, af as SelectSeparator, ab as SelectTrigger, aa as SelectValue, a_ as SessionRestorationLoader, a$ as SessionRestorationLoaderProps, S as Switch, y as SwitchProps, D as Table, F as TableBody, G as TableCaption, H as TableCell, J as TableFooter, K as TableHead, E as TableHeader, M as TableRow, ag as Tabs, aj as TabsContent, an as TabsContentProps, ah as TabsList, al as TabsListProps, ak as TabsProps, ai as TabsTrigger, am as TabsTriggerProps, T as Textarea, n as TextareaProps, aq as Toast, as as ToastAction, ay as ToastActionElement, ax as ToastClose, aw as ToastDescription, az as ToastProps, at as ToastProvider, av as ToastTitle, au as ToastViewport, ar as Toaster, aA as Tooltip, aC as TooltipContent, aD as TooltipProvider, aE as TooltipRoot, aB as TooltipTrigger, bb as UseFileReferenceForRecordReturn, b9 as UseFileReferenceOptions, ba as UseFileReferenceReturn, aV as UserMenu, b5 as useFileReference, b7 as useFileReferenceById, b6 as useFileReferenceForRecord, b8 as useFilesByCategory, bh as useIsPublicPage, bg as usePublicPageContext } from './PublicPageProvider-DrLDztHt.js';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  export { u as useToast } from './useToast-C8gR5ir4.js';
5
- export { D as DataTable, a as DataTableProps } from './DataTable-Z9NLVJh0.js';
6
- export { A as AggregateConfig, c as DataRecord, a as DataTableAction, D as DataTableColumn, b as DataTableToolbarButton, E as EmptyStateConfig, G as GetRowId } from './types-DUyCRSTj.js';
7
- export { F as FileCategory, b as FileMetadata, a as FileReference, c as FileUploadOptions } from './file-reference-BjR39ktt.js';
5
+ export { D as DataTable, a as DataTableProps } from './DataTable-IVYljGJ6.js';
6
+ export { c as AggregateConfig, A as AutocompleteOptions, d as DataRecord, a as DataTableAction, D as DataTableColumn, b as DataTableToolbarButton, E as EmptyStateConfig, G as GetRowId, P as ParsedAddress } from './types-Bwgl--Xo.js';
7
+ export { F as FileCategory, b as FileMetadata, a as FileReference, c as FileUploadOptions } from './file-reference-D037xOFK.js';
8
8
  import 'react';
9
9
  import '@supabase/supabase-js';
10
10
  import './event-CW5YB_2p.js';
@@ -1,4 +1,5 @@
1
1
  import {
2
+ AddressField,
2
3
  Avatar,
3
4
  AvatarFallback,
4
5
  AvatarImage,
@@ -49,7 +50,7 @@ import {
49
50
  useFileReferenceById,
50
51
  useFileReferenceForRecord,
51
52
  useFilesByCategory
52
- } from "./chunk-HC67NW5K.js";
53
+ } from "./chunk-LBBUPSSC.js";
53
54
  import {
54
55
  Alert,
55
56
  AlertDescription,
@@ -90,28 +91,28 @@ import {
90
91
  TooltipProvider,
91
92
  TooltipRoot,
92
93
  TooltipTrigger
93
- } from "./chunk-HGPQUCBC.js";
94
- import "./chunk-445GEP27.js";
95
- import "./chunk-U6WNSFX5.js";
96
- import "./chunk-FSFQFJCU.js";
94
+ } from "./chunk-FMTK4XNN.js";
95
+ import "./chunk-3IC5WCMO.js";
96
+ import "./chunk-HEHYGYOX.js";
97
+ import "./chunk-63FOKYGO.js";
97
98
  import {
98
99
  ErrorBoundary,
99
100
  PublicPageProvider,
100
101
  useIsPublicPage,
101
102
  usePublicPageContext
102
- } from "./chunk-MX3EIJGQ.js";
103
+ } from "./chunk-C4OYJOV4.js";
103
104
  import {
104
105
  useToast
105
106
  } from "./chunk-6C4YBBJM.js";
106
- import "./chunk-XAUHJD3L.js";
107
+ import "./chunk-K2JGDXGU.js";
107
108
  import "./chunk-KQCRWDSA.js";
108
109
  import {
109
110
  UnifiedAuthProvider,
110
111
  useUnifiedAuth
111
- } from "./chunk-FXFJRTKI.js";
112
+ } from "./chunk-WK2Y6TGA.js";
112
113
  import {
113
114
  FileCategory
114
- } from "./chunk-IXSNYUCT.js";
115
+ } from "./chunk-SAUPYVLF.js";
115
116
  import "./chunk-QXHPKYJV.js";
116
117
  import {
117
118
  LoadingSpinner,
@@ -123,7 +124,7 @@ import {
123
124
  cn
124
125
  } from "./chunk-R77UEZ4E.js";
125
126
  import "./chunk-F2IMUDXZ.js";
126
- import "./chunk-FMUCXFII.js";
127
+ import "./chunk-YHCN776L.js";
127
128
  import "./chunk-VBXEHIUJ.js";
128
129
  import "./chunk-SQGMNID3.js";
129
130
  import "./chunk-PWLANIRT.js";
@@ -268,6 +269,7 @@ function DatePickerWithTimezone({
268
269
  ] });
269
270
  }
270
271
  export {
272
+ AddressField,
271
273
  Alert,
272
274
  AlertDescription,
273
275
  AlertTitle,