@firecms/core 3.0.0-canary.7 → 3.0.0-canary.9

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 (132) hide show
  1. package/README.md +1 -1
  2. package/dist/components/EntityCollectionTable/EntityCollectionRowActions.d.ts +1 -1
  3. package/dist/components/EntityCollectionTable/EntityCollectionTable.d.ts +2 -2
  4. package/dist/components/EntityCollectionTable/PropertyTableCell.d.ts +2 -2
  5. package/dist/components/EntityCollectionView/EntityCollectionView.d.ts +1 -2
  6. package/dist/components/EntityCollectionView/useSelectionController.d.ts +2 -0
  7. package/dist/components/EntityPreview.d.ts +25 -7
  8. package/dist/components/EntityView.d.ts +11 -0
  9. package/dist/components/FieldCaption.d.ts +5 -0
  10. package/dist/components/HomePage/NavigationCard.d.ts +8 -0
  11. package/dist/components/HomePage/{NavigationCollectionCard.d.ts → NavigationCardBinding.d.ts} +2 -2
  12. package/dist/components/HomePage/SmallNavigationCard.d.ts +6 -0
  13. package/dist/components/HomePage/index.d.ts +3 -1
  14. package/dist/components/VirtualTable/VirtualTableProps.d.ts +1 -1
  15. package/dist/components/index.d.ts +4 -2
  16. package/dist/core/{EntityView.d.ts → EntityEditView.d.ts} +2 -2
  17. package/dist/core/SideEntityView.d.ts +2 -2
  18. package/dist/form/EntityForm.d.ts +1 -1
  19. package/dist/form/components/StorageItemPreview.d.ts +3 -2
  20. package/dist/form/components/StorageUploadProgress.d.ts +1 -1
  21. package/dist/form/field_bindings/KeyValueFieldBinding.d.ts +1 -1
  22. package/dist/form/field_bindings/MapFieldBinding.d.ts +1 -1
  23. package/dist/form/field_bindings/StorageUploadFieldBinding.d.ts +4 -3
  24. package/dist/form/field_bindings/TextFieldBinding.d.ts +2 -2
  25. package/dist/form/validation.d.ts +1 -1
  26. package/dist/hooks/data/useDataSource.d.ts +2 -2
  27. package/dist/hooks/useBuildNavigationController.d.ts +5 -2
  28. package/dist/hooks/useProjectLog.d.ts +5 -1
  29. package/dist/hooks/useStorageSource.d.ts +2 -2
  30. package/dist/index.es.js +8333 -8060
  31. package/dist/index.es.js.map +1 -1
  32. package/dist/index.umd.js +5 -5
  33. package/dist/index.umd.js.map +1 -1
  34. package/dist/internal/useRestoreScroll.d.ts +1 -1
  35. package/dist/preview/PropertyPreview.d.ts +1 -1
  36. package/dist/preview/components/BooleanPreview.d.ts +5 -1
  37. package/dist/preview/components/EnumValuesChip.d.ts +1 -1
  38. package/dist/preview/components/ReferencePreview.d.ts +1 -7
  39. package/dist/types/analytics.d.ts +1 -1
  40. package/dist/types/auth.d.ts +13 -1
  41. package/dist/types/collections.d.ts +14 -1
  42. package/dist/types/entity_overrides.d.ts +6 -0
  43. package/dist/types/index.d.ts +2 -0
  44. package/dist/types/navigation.d.ts +10 -9
  45. package/dist/types/permissions.d.ts +5 -1
  46. package/dist/types/plugins.d.ts +15 -17
  47. package/dist/types/properties.d.ts +2 -2
  48. package/dist/types/property_config.d.ts +2 -2
  49. package/dist/types/roles.d.ts +31 -0
  50. package/dist/types/user.d.ts +5 -0
  51. package/dist/util/collections.d.ts +9 -1
  52. package/dist/util/icons.d.ts +8 -2
  53. package/dist/util/permissions.d.ts +4 -4
  54. package/dist/util/references.d.ts +4 -2
  55. package/dist/util/resolutions.d.ts +1 -1
  56. package/package.json +23 -23
  57. package/src/components/DeleteEntityDialog.tsx +4 -4
  58. package/src/components/EntityCollectionTable/EntityCollectionRowActions.tsx +2 -2
  59. package/src/components/EntityCollectionTable/EntityCollectionTable.tsx +273 -277
  60. package/src/components/EntityCollectionTable/EntityCollectionTableProps.tsx +1 -1
  61. package/src/components/EntityCollectionTable/PropertyTableCell.tsx +12 -13
  62. package/src/components/EntityCollectionTable/fields/TableReferenceField.tsx +8 -15
  63. package/src/components/EntityCollectionTable/fields/TableStorageUpload.tsx +3 -3
  64. package/src/components/EntityCollectionTable/internal/CollectionTableToolbar.tsx +1 -1
  65. package/src/components/EntityCollectionTable/internal/default_entity_actions.tsx +9 -5
  66. package/src/components/EntityCollectionView/EntityCollectionView.tsx +28 -49
  67. package/src/components/EntityCollectionView/EntityCollectionViewActions.tsx +5 -6
  68. package/src/components/EntityCollectionView/useSelectionController.tsx +30 -0
  69. package/src/components/EntityPreview.tsx +204 -70
  70. package/src/components/EntityView.tsx +84 -0
  71. package/src/components/FieldCaption.tsx +14 -0
  72. package/src/components/FireCMSAppBar.tsx +8 -0
  73. package/src/components/HomePage/DefaultHomePage.tsx +13 -9
  74. package/src/components/HomePage/NavigationCard.tsx +69 -0
  75. package/src/components/HomePage/NavigationCardBinding.tsx +116 -0
  76. package/src/components/HomePage/SmallNavigationCard.tsx +45 -0
  77. package/src/components/HomePage/index.tsx +3 -1
  78. package/src/components/ReferenceTable/ReferenceSelectionTable.tsx +3 -4
  79. package/src/components/ReferenceWidget.tsx +3 -3
  80. package/src/components/SelectableTable/filters/ReferenceFilterField.tsx +11 -19
  81. package/src/components/VirtualTable/VirtualTableProps.tsx +1 -1
  82. package/src/components/common/useDataSourceEntityCollectionTableController.tsx +1 -1
  83. package/src/components/index.tsx +4 -2
  84. package/src/core/Drawer.tsx +66 -39
  85. package/src/core/{EntityView.tsx → EntityEditView.tsx} +20 -37
  86. package/src/core/EntitySidePanel.tsx +2 -2
  87. package/src/core/FireCMS.tsx +18 -2
  88. package/src/core/NavigationRoutes.tsx +8 -0
  89. package/src/core/SideEntityView.tsx +2 -2
  90. package/src/form/EntityForm.tsx +19 -11
  91. package/src/form/components/StorageItemPreview.tsx +5 -3
  92. package/src/form/components/StorageUploadProgress.tsx +6 -5
  93. package/src/form/field_bindings/ArrayOfReferencesFieldBinding.tsx +8 -12
  94. package/src/form/field_bindings/KeyValueFieldBinding.tsx +15 -15
  95. package/src/form/field_bindings/MapFieldBinding.tsx +15 -15
  96. package/src/form/field_bindings/ReadOnlyFieldBinding.tsx +1 -1
  97. package/src/form/field_bindings/ReferenceFieldBinding.tsx +1 -0
  98. package/src/form/field_bindings/StorageUploadFieldBinding.tsx +14 -5
  99. package/src/form/field_bindings/TextFieldBinding.tsx +7 -5
  100. package/src/form/validation.ts +3 -4
  101. package/src/hooks/data/useCollectionFetch.tsx +1 -1
  102. package/src/hooks/data/useDataSource.tsx +8 -3
  103. package/src/hooks/data/useEntityFetch.tsx +1 -1
  104. package/src/hooks/useBuildNavigationController.tsx +79 -38
  105. package/src/hooks/useProjectLog.tsx +11 -3
  106. package/src/hooks/useReferenceDialog.tsx +2 -2
  107. package/src/hooks/useStorageSource.tsx +7 -2
  108. package/src/preview/PropertyPreview.tsx +1 -1
  109. package/src/preview/components/BooleanPreview.tsx +16 -3
  110. package/src/preview/components/EnumValuesChip.tsx +1 -1
  111. package/src/preview/components/ReferencePreview.tsx +54 -146
  112. package/src/preview/property_previews/StringPropertyPreview.tsx +8 -7
  113. package/src/types/analytics.ts +1 -0
  114. package/src/types/auth.tsx +17 -1
  115. package/src/types/collections.ts +16 -1
  116. package/src/types/entity_actions.tsx +4 -0
  117. package/src/types/entity_overrides.tsx +7 -0
  118. package/src/types/firecms.tsx +0 -1
  119. package/src/types/index.ts +2 -0
  120. package/src/types/navigation.ts +11 -10
  121. package/src/types/permissions.ts +6 -1
  122. package/src/types/plugins.tsx +22 -25
  123. package/src/types/properties.ts +3 -2
  124. package/src/types/property_config.tsx +2 -2
  125. package/src/types/roles.ts +41 -0
  126. package/src/types/side_entity_controller.tsx +1 -0
  127. package/src/types/user.ts +7 -0
  128. package/src/util/collections.ts +22 -0
  129. package/src/util/icons.tsx +11 -3
  130. package/src/util/permissions.ts +11 -8
  131. package/src/util/references.ts +36 -5
  132. package/src/components/HomePage/NavigationCollectionCard.tsx +0 -146
package/dist/index.umd.js CHANGED
@@ -1,7 +1,7 @@
1
- (function(w,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("react/jsx-runtime"),require("react"),require("notistack"),require("object-hash"),require("@firecms/formex"),require("@firecms/ui"),require("react-router-dom"),require("js-search"),require("react-fast-compare"),require("date-fns"),require("date-fns/locale"),require("react-window"),require("react-use-measure"),require("@hello-pangea/dnd"),require("react-dropzone"),require("react-image-file-resizer"),require("markdown-it"),require("react-markdown-editor-lite"),require("yup"),require("react-datepicker"),require("@radix-ui/react-portal")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","notistack","object-hash","@firecms/formex","@firecms/ui","react-router-dom","js-search","react-fast-compare","date-fns","date-fns/locale","react-window","react-use-measure","@hello-pangea/dnd","react-dropzone","react-image-file-resizer","markdown-it","react-markdown-editor-lite","yup","react-datepicker","@radix-ui/react-portal"],r):(w=typeof globalThis<"u"?globalThis:w||self,r(w["FireCMS Core"]={},w.jsxRuntime,w.React,w.notistack,w.hash,w.formex,w.ui,w.reactRouterDom,w.JsSearch,w.equal,w.dateFns,w.locales,w.reactWindow,w.useMeasure,w.dnd,w.reactDropzone,w.Resizer,w.MarkdownIt,w.MdEditor,w.yup,w.reactDatepicker,w.Portal))})(this,function(w,r,c,ko,_o,ye,p,fe,Nn,$,Tn,Pn,Qn,xo,at,Co,Dn,Mn,Xe,On,Eo,zn){"use strict";function At(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const a=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,a.get?a:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const dr=At(c),Bo=At(Nn),So=At(Pn),Ie=At(On),Vn=At(zn),Gn=({children:e})=>r.jsx(ko.SnackbarProvider,{maxSnack:3,autoHideDuration:3500,children:e}),Yn={mode:"light",setMode:e=>{},toggleMode:()=>{}},Nt=c.createContext(Yn),jn=Nt.Provider,pr=c.createContext({});function pe(e){return Io(Fo(e))}function Io(e){return e.startsWith("/")?e.slice(1):e}function Fo(e){return e.endsWith("/")?e.slice(0,-1):e}function Ln(e){return e.startsWith("/")?e:`/${e}`}function Un(e){const t=pe(e);if(t.includes("/")){const o=t.split("/");return o[o.length-1]}return t}function ur(e,t){const o=pe(e),a=o.split("/");if(a.length%2===0)throw Error(`resolveCollectionPathAliases: Collection paths must have an odd number of segments: ${e}`);const n=t.find(s=>s.id===a[0]);let i;if(n&&(i=n.path),a.length>1){const s=Tt(i??a[0],t);if(!s?.subcollections)return o;const l=o.split("/").slice(2).join("/");return(i??a[0])+"/"+a[1]+"/"+ur(l,s.subcollections)}else return i??o}function Tt(e,t){const o=pe(e).split("/");if(o.length%2===0)throw Error(`getCollectionByPathOrAlias: Collection paths must have an odd number of segments: ${e}`);const a=Pt(o);let n;for(let i=0;i<a.length;i++){const s=a[i],l=t&&t.sort((d,u)=>(d.id??"").localeCompare(u.id??"")).find(d=>d.id===s||d.path===s);if(l){if(s===e)n=l;else if(l.subcollections){const d=e.replace(s,"").split("/").slice(2).join("/");d.length>0&&(n=Tt(d,l.subcollections))}}if(n)break}return n}function Pt(e){const t=e.length>0&&e.length%2===0?e.splice(0,e.length-1):e,o=t.length,a=[];for(let n=o;n>0;n=n-2)a.push(t.slice(0,n).join("/"));return a}class mr{id;path;constructor(t,o){this.id=t,this.path=o}get pathWithId(){return`${this.path}/${this.id}`}isEntityReference(){return!0}}class Qt{latitude;longitude;constructor(t,o){this.latitude=t,this.longitude=o}}const No=(e,...t)=>({...t.reduce((o,a)=>({...o,[a]:e[a]}),{})});function Dt(e){return e&&typeof e=="object"&&!Array.isArray(e)}function Qe(e,t){const o=Dt(e),a=o?{...e}:e;return o&&Dt(t)&&Object.keys(t).forEach(n=>{Dt(t[n])?n in e?a[n]=Qe(e[n],t[n]):Object.assign(a,{[n]:t[n]}):Object.assign(a,{[n]:t[n]})}),a}function Ue(e,t){if(e&&typeof e=="object"){if(t in e)return e[t];if(t.includes(".")||t.includes("[")){let o=t.split(/[.[]/);t.includes("[")&&(o=o.map(l=>l.replace("]","")));const a=o[0],n=Array.isArray(e[a])&&!isNaN(parseInt(o[1])),i=n?e[a][parseInt(o[1])]:e[a],s=o.slice(n?2:1).join(".");return s===""?i:Ue(i,s)}}}function $n(e,t){let o={...e};const a=t.split("."),n=a.pop();for(const i of a)o=o[i];return n&&delete o[n],o}function fr(e){if(e!==void 0)return e===null?null:typeof e=="object"?Object.entries(e).filter(([t,o])=>typeof o!="function").map(([t,o])=>Array.isArray(o)?{[t]:o.map(a=>fr(a))}:typeof o=="object"?{[t]:fr(o)}:{[t]:o}).reduce((t,o)=>({...t,...o}),{}):e}function hr(e){if(!e)return null;if(typeof e=="object"){if("id"in e)return e.id;if(e instanceof Date)return e.toLocaleString();if(e instanceof Qt)return _o(e)}return _o(e,{ignoreUnknown:!0})}function gr(e,t){if(typeof e=="function")return e;if(Array.isArray(e))return e.map(o=>gr(o,t));if(typeof e=="object"){const o={};return e===null?e:(Object.keys(e).forEach(a=>{if(!Ar(e)){const n=gr(e[a],t),i=typeof n=="string",s=!t||t&&!i||t&&i&&n!=="";n!==void 0&&!Ar(n)&&s&&(o[a]=n)}}),o)}return e}function Ar(e){return e&&Object.getPrototypeOf(e)===Object.prototype&&Object.keys(e).length===0}function To(e,t){const o=i=>typeof i=="object"&&i!==null,a=i=>Array.isArray(i);if(!o(e)||!o(t))return e;const n=a(e)?[...e]:{...e};return Object.keys(t).forEach(i=>{i in n&&(o(n[i])&&o(t[i])?n[i]=To(n[i],t[i]):n[i]===t[i]&&(a(n)?n.splice(i,1):delete n[i]))}),n}const bt="type",Mt="value";function nt(e){return e.readOnly||e.dataType==="date"&&e.autoValue?!0:e.dataType==="reference"?!e.path:!1}function yt(e){return typeof e.disabled=="object"&&!!e.disabled.hidden}function we(e){return typeof e=="function"}function wt(e){return e?Object.entries(e).map(([t,o])=>{const a=Ot(o);return a===void 0?{}:{[t]:a}}).reduce((t,o)=>({...t,...o}),{}):{}}function Ot(e){if(!we(e))if(e.dataType==="map"&&e.properties){const t=wt(e.properties);return Object.keys(t).length===0?void 0:t}else return e.defaultValue?e.defaultValue:br(e.dataType)}function br(e){return e==="string"||e==="number"?null:e==="boolean"?!1:e==="date"?null:e==="array"?[]:e==="map"?{}:null}function Po({inputValues:e,properties:t,status:o,timestampNowValue:a,setDateToMidnight:n}){return yr(e,t,(i,s)=>{if(s.dataType==="date"){let l;return o==="existing"&&s.autoValue==="on_update"||(o==="new"||o==="copy")&&(s.autoValue==="on_update"||s.autoValue==="on_create")?l=a:l=i,s.mode==="date"&&(l=n(l)),l}else return i})??{}}function qn(e,t){const o=e;return Object.entries(t).forEach(([a,n])=>{e&&e[a]!==void 0?o[a]=e[a]:n.validation?.required&&(o[a]=null)}),o}function Ye(e){return new mr(e.id,e.path)}function yr(e,t,o){const a=Object.entries(t).map(([i,s])=>{const l=e&&e[i],d=zt(l,s,o);if(d!==void 0)return{[i]:d}}).reduce((i,s)=>({...i,...s}),{}),n={...e,...a};if(Object.keys(n).length!==0)return n}function zt(e,t,o){let a;if(t.dataType==="map"&&t.properties)a=yr(e,t.properties,o);else if(t.dataType==="array")if(t.of&&Array.isArray(e))a=e.map(n=>zt(n,t.of,o));else if(t.oneOf&&Array.isArray(e)){const n=t.oneOf?.typeField??bt,i=t.oneOf?.valueField??Mt;a=e.map(s=>{if(s===null)return null;if(typeof s!="object")return s;const l=s[n],d=t.oneOf?.properties[l];return!l||!d?s:{[n]:l,[i]:zt(s[i],d,o)}})}else a=e;else a=o(e,t);return a}function $e(e){return Array.isArray(e)?e:Object.entries(e).map(([t,o])=>typeof o=="string"?{id:t,label:o}:{...o,id:t})}function Vt(e,t){if(t)return e.find(o=>String(o.id)===String(t))}function Qo(e,t){const o=Vt(e,t);if(!o?.color)return p.getColorSchemeForSeed(t.toString());if(typeof o=="object"&&"color"in o){if(typeof o.color=="string")return p.CHIP_COLORS[o.color];if(typeof o.color=="object")return o.color}}function Wn(e){return typeof e=="object"&&e.disabled}function Do(e){if(e!==void 0)return typeof e=="object"?e.label:e}const Te=({collection:e,path:t,entityId:o,values:a,previousValues:n,userConfigPersistence:i,fields:s})=>{const l=i?.getCollectionConfig(t),d=Ue(l,"properties"),u=wt(e.properties),m=a??u,g=n??a??u,f=Object.entries(e.properties).map(([A,y])=>{const k=m?ye.getIn(m,A):void 0,v=Fe({propertyKey:A,propertyOrBuilder:y,values:m,previousValues:g,path:t,propertyValue:k,entityId:o,fields:s});return v?{[A]:v}:{}}).filter(A=>A!==null).reduce((A,y)=>({...A,...y}),{}),b=Qe(f,d),h=Object.entries(b).filter(([A,y])=>!!y?.dataType).map(([A,y])=>({[A]:y})).reduce((A,y)=>({...A,...y}),{});return{...e,properties:h,originalCollection:e}};function Fe({propertyOrBuilder:e,propertyValue:t,fromBuilder:o=!1,...a}){if(typeof e=="object"&&"resolved"in e)return e;let n=null;if(e)if(we(e)){const i=a.path;if(!i)throw Error("Trying to resolve a property builder without specifying the entity path");const s=e({...a,path:i,propertyValue:t,values:a.values??{},previousValues:a.previousValues??a.values??{}});if(!s)return null;n=Fe({...a,propertyValue:t,propertyOrBuilder:s,fromBuilder:!0})}else{const i=e;if(i.dataType==="map"&&i.properties){const s=wr({...a,properties:i.properties,propertyValue:t});n={...i,resolved:!0,fromBuilder:o,properties:s}}else i.dataType==="array"?n=qe({property:i,propertyValue:t,fromBuilder:o,...a}):(i.dataType==="string"||i.dataType==="number")&&i.enumValues&&(n=vr(i,o))}else return null;if(n||(n={...e,resolved:!0,fromBuilder:o}),n.propertyConfig&&!Bn(n.propertyConfig)){const i=a.fields;if(!i)throw Error(`Trying to resolve a property with key ${n.propertyConfig} that inherits from a custom property config but no custom property configs were provided. Use the property \`propertyConfigs\` in your app config to provide them`);const s=i[n.propertyConfig];if(!s)return console.warn(`Trying to resolve a property with key ${n.propertyConfig} that inherits from a custom property config but no custom property config with that key was found. Check the \`propertyConfigs\` in your app config`),console.warn("Available property configs",i),null;if(s.property){const l=s.property;"propertyConfig"in l&&delete l.propertyConfig;const d=Fe({propertyOrBuilder:l,propertyValue:t,...a});d&&(n=Qe(d,n))}}return n?{...n,resolved:!0}:null}function qe({propertyKey:e,property:t,propertyValue:o,...a}){if(t.of){if(Array.isArray(t.of))return{...t,resolved:!0,fromBuilder:a.fromBuilder,resolvedProperties:t.of.map((n,i)=>Fe({propertyKey:`${e}.${i}`,propertyOrBuilder:n,propertyValue:Array.isArray(o)?o[i]:void 0,...a,index:i}))};{const n=t.of,i=Array.isArray(o)?o.map((l,d)=>Fe({propertyKey:`${e}.${d}`,propertyOrBuilder:n,propertyValue:l,...a,index:d})).filter(l=>!!l):[],s=Fe({propertyKey:`${e}`,propertyOrBuilder:n,propertyValue:void 0,...a});if(!s)throw Error("When using a property builder as the 'of' prop of an ArrayProperty, you must return a valid child property");return{...t,resolved:!0,fromBuilder:a.fromBuilder,of:s,resolvedProperties:i}}}else if(t.oneOf){const n=t.oneOf?.typeField??bt,i=Array.isArray(o)?o.map((l,d)=>{const u=l&&l[n],m=t.oneOf?.properties[u];return!u||!m?null:Fe({propertyKey:`${e}.${d}`,propertyOrBuilder:m,propertyValue:o,...a})}).filter(l=>!!l):[],s=wr({properties:t.oneOf.properties,propertyValue:void 0,...a});return{...t,resolved:!0,oneOf:{...t.oneOf,properties:s},fromBuilder:a.fromBuilder,resolvedProperties:i}}else{if(t.Field)return{...t,resolved:!0,fromBuilder:a.fromBuilder};throw Error("The array property needs to declare an 'of' or a 'oneOf' property, or provide a custom `Field`")}}function wr({properties:e,propertyValue:t,...o}){return Object.entries(e).map(([a,n])=>{const i=t&&typeof t=="object"?Ue(t,a):void 0,s=Fe({propertyKey:a,propertyOrBuilder:n,propertyValue:i,...o});return s?{[a]:s}:{}}).filter(a=>a!==null).reduce((a,n)=>({...a,...n}),{})}function vr(e,t){return typeof e.enumValues=="object"?{...e,resolved:!0,enumValues:$e(e.enumValues)?.filter(o=>o&&o.id&&o.label)??[],fromBuilder:t??!1}:e}function Hn(e){return typeof e=="object"?Object.entries(e).map(([t,o])=>typeof o=="string"?{id:t,label:o}:o):Array.isArray(e)?e:void 0}function kr(e,t){return typeof e=="string"?t?.find(o=>o.key===e):e}function _r(e){const{path:t,collections:o=[],currentFullPath:a}=e,n=pe(t).split("/"),i=Pt(n),s=[];for(let l=0;l<i.length;l++){const d=i[l],u=o&&o.find(m=>m.id===d||m.path===d);if(u){const m=u.id??u.path,g=a&&a.length>0?a+"/"+m:m;s.push({type:"collection",path:g,collection:u});const f=pe(pe(t).replace(d,"")),b=f.length>0?f.split("/"):[];if(b.length>0){const h=b[0],A=g+"/"+h;if(s.push({type:"entity",entityId:h,path:g,parentCollection:u}),b.length>1){const y=b.slice(1).join("/");if(!u)throw Error("collection not found resolving path: "+u);const k=u.entityViews,v=k&&k.map(_=>kr(_,e.contextEntityViews)).filter(Boolean).find(_=>_.key===y);if(v){const _=a&&a.length>0?a+"/"+v.key:v.key;s.push({type:"custom_view",path:_,view:v})}else u.subcollections&&s.push(..._r({path:y,collections:u.subcollections,currentFullPath:A,contextEntityViews:e.contextEntityViews}))}}break}}return s}function xr(e,t){try{const o=Object.keys(e);return(t??o).map(n=>{if(e[n]){const i=e[n];return!we(i)&&i?.dataType==="map"&&i.properties?{[n]:{...i,properties:xr(i.properties,i.propertiesOrder)}}:{[n]:i}}else return}).filter(n=>n!==void 0).reduce((n,i)=>({...n,...i}),{})}catch(o){return console.error("Error sorting properties",o),e}}function Cr(e,t){if(e)return typeof e=="string"?e:e(t)}const Jn=/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g,Zn=e=>{const t=e.match(Jn);return t?t.map(o=>o.toLowerCase()).join("-"):""},Xn=/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g,Kn=e=>{const t=e.match(Xn);return t?t.map(o=>o.toLowerCase()).join("_"):""};function it(e=5){return Math.random().toString(36).slice(2,2+e)}function Rn(){return Math.floor(Math.random()*16777215).toString(16)}function Gt(e,t="_",o=!0){if(!e)return"";const a="ãàáäâẽèéëêìíïîõòóöôùúüûñç·/_,:;-",n=`aaaaaeeeeeiiiiooooouuuunc${t}${t}${t}${t}${t}${t}${t}`;for(let i=0,s=a.length;i<s;i++)e=e.replace(new RegExp(a.charAt(i),"g"),n.charAt(i));return e=e.toString().replace(/\s+/g,t).replace(/&/g,t).replace(/[^\w\\-]+/g,"").replace(new RegExp("\\"+t+"\\"+t+"+","g"),t).trim().replace(/^\s+|\s+$/g,""),o?e.toLowerCase():e}function ei(e){return e?e.includes("-")||e.includes("_")||!e.includes(" ")?e.replace(/[-_]/g," ").replace(/\w\S*/g,function(o){return o.charAt(0).toUpperCase()+o.substr(1)}):e:""}const Mo="MMMM dd, yyyy, HH:mm:ss",Oo="::";function Er(e){return zo(De(e))}function zo(e){return e.length===1?e[0]:e.reduce((t,o)=>`${t}${Oo}${o}`)}function De(e){return e.split("/").filter((t,o)=>o%2===0)}function ti(e){return e?e.toString():""}function Vo(e){if(!e)return;const t=e.match(/\/(.*?)\/([a-z]*)?$/i);return t?new RegExp(t[1],t[2]||""):new RegExp(e,"")}function ri(e){return e.match(/\/((?![*+?])(?:[^\r\n[/\\]|\\.|\[(?:[^\r\n\]\\]|\\.)*])+)\/((?:g(?:im?|mi?)?|i(?:gm?|mg?)?|m(?:gi?|ig?)?)?)/)?!0:!!e.match(/((?![*+?])(?:[^\r\n[/\\]|\\.|\[(?:[^\r\n\]\\]|\\.)*])+)/)}function Yt(e,t,o,a=300){const n=c.useRef(!1),i=()=>{t(),n.current=!1},s=c.useRef(void 0);c.useEffect(()=>(n.current=!0,clearTimeout(s.current),s.current=setTimeout(i,a),()=>{o&&i()}),[o,e])}function Go(e,t){const o=Fe({propertyKey:"ignore",propertyOrBuilder:e,fields:t});return o?o.dataType==="reference"?!0:o.dataType==="array"?Array.isArray(o.of)?!1:o.of?.dataType==="reference":!1:null}function oi(e){return r.jsx(p.CircleIcon,{size:e})}function jt(e,t){const o=e?.Icon??p.CircleIcon;return r.jsx(o,{size:t})}function Ae(e,t="small",o={}){if(we(e))return r.jsx(p.FunctionsIcon,{size:t});{const a=lr(e,o);return jt(a,t)}}function ai(e,t){return we(e)?"#888":lr(e,t)?.color??"#666"}function Ke(e,t){if(typeof e=="object"){if(t in e)return e[t];if(t.includes(".")){const o=t.split("."),a=e[o[0]];if(typeof a=="object"&&a.dataType==="map"&&a.properties)return Ke(a.properties,o.slice(1).join("."))}}}function Br(e,t){if(typeof e=="object"){if(t in e)return e[t];if(t.includes(".")){const o=t.split("."),a=e[o[0]];if(a.dataType==="map"&&a.properties)return Br(a.properties,o.slice(1).join("."))}}}function ni(e){return e.replace(/\.([^.]*)/g,"[$1]")}function Yo(e,t){if(!t)return e;const o={};return t.filter(Boolean).forEach(a=>{const n=Ke(e,a);typeof n=="object"&&n.dataType==="map"&&n.properties&&(o[a]={...n,properties:Yo(n.properties,n.propertiesOrder??[])}),n&&(o[a]=n)}),o}function ii(e){return e.propertiesOrder?e.propertiesOrder:[...Object.keys(e.properties),...(e.additionalFields??[]).map(t=>t.key)]}const Lt={read:!0,edit:!0,create:!0,delete:!0};function vt(e,t,o,a){const n=e.permissions;if(n===void 0)return Lt;if(typeof n=="object")return n;if(typeof n=="function")return n({entity:a,user:t.user,authController:t,collection:e,pathSegments:o});throw console.error("Permissions:",n),Error("New type of permission added and not mapped")}function Sr(e,t,o,a){return vt(e,t,o,a).edit??Lt.edit}function st(e,t,o,a){return vt(e,t,o,a).create??Lt.create}function Ut(e,t,o,a){return vt(e,t,o,a).delete??Lt.delete}const Ir={abc:"alphabet character font letter symbol text type",access_alarm:"clock time",access_alarms:"clock time",accessibility:"accessible body handicap help human people person user",accessibility_new:"accessible arms body handicap help human people person user",accessible:"accessibility body handicap help human people person user wheelchair",accessible_forward:"accessibility body handicap help human people person wheelchair",access_time:"clock time",account_balance:"bank bill building card cash coin commerce court credit currency dollars finance money online payment structure temple transaction",account_balance_wallet:"bank bill card cash coin commerce credit currency dollars finance money online payment transaction",account_box:"avatar face human people person profile square thumbnail user",account_circle:"avatar face human people person profile thumbnail user",account_tree:"analytics chart connect data diagram flow infographic measure metrics process project sitemap square statistics structure tracking",ac_unit:"air cold conditioner freeze snowflake temperature weather winter",adb:"android bridge debug",add:"+ create item new plus symbol",add_alarm:"clock plus time",add_alert:"+ active alarm announcement bell callout chime information new notifications notify plus reminder ring sound symbol",add_a_photo:"+ camera lens new photography picture plus symbol",add_box:"create new plus square symbol",add_business:"+ bill building card cash coin commerce company credit currency dollars market money new online payment plus retail shopping storefront symbol",add_card:"+ bill cash coin commerce cost credit currency dollars finance money new online payment plus price shopping symbol",add_chart:"+ analytics bars data diagram infographic measure metrics new plus statistics symbol tracking",add_circle:"+ create new plus",add_circle_outline:"+ create new plus",add_comment:"+ bubble chat communicate feedback message new plus speech symbol",add_ic_call:"+ cell contact device hardware mobile new plus symbol telephone",add_link:"attach clip new plus symbol",add_location:"+ destination direction gps maps new pin place plus stop symbol",add_location_alt:"+ destination direction maps new pin place plus stop symbol",add_moderator:"+ certified new plus privacy private protection security shield symbol verified",add_photo_alternate:"+ image landscape mountains new photography picture plus symbol",add_road:"+ destination direction highway maps new plus stop street symbol traffic",add_shopping_cart:"card cash checkout coin commerce credit currency dollars money online payment plus",add_task:"+ approve check circle completed increase mark ok plus select tick yes",add_to_drive:"+ app backup cloud data files folders gdrive google plus recovery storage",add_to_home_screen:"Android add arrow cell device hardware iOS mobile phone tablet to up",add_to_photos:"collection image landscape mountains photography picture plus",add_to_queue:"+ Android backlog chrome desktop device display hardware iOS lineup mac monitor new plus screen symbol television watch web window",adf_scanner:"document feeder machine office",adjust:"alter center circles control dot edit filter fix image mix move setting slider sort switch target tune",admin_panel_settings:"account avatar certified face human people person privacy private profile protection security shield user verified",ad_units:"Android banner cell device hardware iOS mobile notifications phone tablet top",agriculture:"automobile cars cultivation farm harvest maps tractor transport travel truck vehicle",air:"blowing breeze flow wave weather wind",airlines:"airplane airport flight transportation travel trip",airline_seat_flat:"bed body business class first human people person rest sleep travel",airline_seat_flat_angled:"bed body business class first human people person rest sleep travel",airline_seat_individual_suite:"bed body business class first human people person rest sleep travel",airline_seat_legroom_extra:"body feet human people person sitting space travel",airline_seat_legroom_normal:"body feet human people person sitting space travel",airline_seat_legroom_reduced:"body feet human people person sitting space travel",airline_seat_recline_extra:"body feet human legroom people person sitting space travel",airline_seat_recline_normal:"body extra feet human legroom people person sitting space travel",airline_stops:"arrow destination direction layover location maps place transportation travel trip",airplanemode_active:"flight flying on signal",airplanemode_inactive:"airport disabled enabled flight flying maps offline slash transportation travel",airplane_ticket:"airport boarding flight fly maps pass transportation travel",airplay:"apple arrow cast connect control desktop device display monitor screen signal television tv",airport_shuttle:"automobile bus cars commercial delivery direction maps mini public transportation travel truck van vehicle",alarm:"alart bell clock countdown date notification schedule time",alarm_add:"+ alart bell clock countdown date new notification plus schedule symbol time",alarm_off:"alart bell clock disabled duration enabled notification slash stop timer watch",alarm_on:"alart bell checkmark clock disabled duration enabled notification off ready slash start timer watch",album:"artist audio bvb cd computer data disk file music play record sound storage track vinyl",align_horizontal_center:"alignment format layout lines paragraph rules style text",align_horizontal_left:"alignment format layout lines paragraph rules style text",align_horizontal_right:"alignment format layout lines paragraph rules style text",align_vertical_bottom:"alignment format layout lines paragraph rules style text",align_vertical_center:"alignment format layout lines paragraph rules style text",align_vertical_top:"alignment format layout lines paragraph rules style text",all_inbox:"Inbox delivered delivery email letter message post send",all_inclusive:"endless forever infinite infinity loop mobius neverending strip sustainability sustainable",all_out:"arrows circle directional expand shape",alternate_email:"@ address contact tag",alt_route:"alternate alternative arrows direction maps navigation options other routes split symbol",analytics:"assessment bar chart data diagram infographic measure metrics statistics tracking",anchor:"google logo",android:"brand character logo mascot operating system toy",animation:"circles film motion movement movie moving sequence video",announcement:"! alert attention balloon bubble caution chat comment communicate danger error exclamation feedback important mark message news notification speech symbol warning",aod:"Android always device display hardware homescreen iOS mobile phone tablet",apartment:"accommodation architecture building city company estate flat home house office places real residence residential shelter units workplace",api:"developer development enterprise software",app_blocking:"Android applications cancel cell device hardware iOS mobile phone stopped tablet",apple:"brand logo",app_registration:"apps edit pencil register",approval:"apply approvals approve certificate certification disapproval drive file impression ink mark postage stamp",apps:"all applications circles collection components dots grid homescreen icons interface squares ui ux",app_settings_alt:"Android applications cell device gear hardware iOS mobile phone tablet",app_shortcut:"bookmarked favorite highlight important mobile saved software special star",apps_outage:"all applications circles collection components dots grid interface squares ui ux",architecture:"art compass design drawing engineering geometric tool",archive:"inbox mail store",arrow_back:"application components direction interface left navigation previous screen ui ux website",arrow_back_ios:"application chevron components direction interface left navigation previous screen ui ux website",arrow_back_ios_new:"application chevron components direction interface left navigation previous screen ui ux website",arrow_circle_down:"direction navigation",arrow_circle_up:"direction navigation",arrow_downward:"application components direction interface navigation screen ui ux website",arrow_drop_down:"application components direction interface navigation screen ui ux website",arrow_drop_down_circle:"application components direction interface navigation screen ui ux website",arrow_drop_up:"application components direction interface navigation screen ui ux website",arrow_forward:"application arrows components direction interface navigation right screen ui ux website",arrow_forward_ios:"application chevron components direction interface navigation next right screen ui ux website",arrow_left:"application backstack backward components direction interface navigation previous screen ui ux website",arrow_right:"application components continue direction forward interface navigation screen ui ux website",arrow_right_alt:"arrows direction east navigation pointing shape",arrow_upward:"application components direction interface navigation screen submit ui ux website",article:"clarify document file news page paper text writing",art_track:"album artist audio display format image insert music photography picture sound tracks",aspect_ratio:"expand image monitor resize resolution scale screen square",assessment:"analytics bars chart data diagram infographic measure metrics report statistics tracking",assignment:"article clipboard document task text writing",assignment_ind:"account clipboard document face people person profile task user",assignment_late:"! alert announcement attention caution clipboard danger document error exclamation important mark notification symbol task warning",assignment_return:"arrow back clipboard document left point retun task",assignment_returned:"arrow clipboard document down point task",assignment_turned_in:"approve checkmark clipboard complete document done finished ok select task tick validate verified yes",assistant:"bubble chat comment communicate feedback message recommendation speech star suggestion twinkle",assistant_direction:"destination location maps navigate navigation pin place right stop",assistant_photo:"flag recommendation smart star suggestion",assured_workload:"compliance confidential federal government regulatory secure sensitive",atm:"alphabet automated bill card cart cash character coin commerce credit currency dollars font letter machine money online payment shopping symbol teller text type",attach_email:"attachment clip compose envelop letter link message send",attach_file:"add item link mail media paperclip",attachment:"compose file image item link paperclip",attach_money:"bill card cash coin commerce cost credit currency dollars finance online payment price profit sale symbol",attractions:"amusement entertainment ferris fun maps park places wheel",attribution:"attribute body copyright copywriter human people person",audio_file:"document key music note sound track",audiotrack:"key music note sound",auto_awesome:"adjust editing enhance filter image photography photos setting stars",auto_awesome_mosaic:"adjust collage editing enhance filter grid image layout photographs photography photos pictures setting",auto_awesome_motion:"adjust animation collage editing enhance filter image live photographs photography photos pictures setting video",auto_delete:"bin can clock date garbage remove schedule time trash",auto_fix_high:"adjust editing enhance erase magic modify pen stars tool wand",auto_fix_normal:"edit erase magic modify stars wand",auto_fix_off:"disabled edit enabled erase magic modify on slash stars wand",autofps_select:"A alphabet character font frame frequency letter per rate seconds symbol text type",auto_graph:"analytics chart data diagram infographic line measure metrics stars statistics tracking",auto_mode:"around arrows direction inprogress loading navigation nest refresh renew rotate turn",autorenew:"around arrows cached direction inprogress loader loading navigation pending refresh rotate status turn",auto_stories:"audiobook flipping pages reading story",av_timer:"clock countdown duration minutes seconds stopwatch",baby_changing_station:"babies bathroom body children father human infant kids mother newborn people person toddler wc young",backpack:"bookbag knapsack storage travel",backspace:"arrow cancel clear correct delete erase remove",backup:"arrow cloud data drive files folders point storage submit upload",backup_table:"drive files folders format layout stack storage",badge:"account avatar card certified employee face human identification name people person profile security user work",bakery_dining:"bread breakfast brunch croissant food",balance:"equal equilibrium equity impartiality justice parity stability. steadiness symmetry",balcony:"architecture doors estate home house maps outside place real residence residential stay terrace window",ballot:"bullet bulllet election list point poll vote",bar_chart:"analytics anlytics data diagram infographic measure metrics statistics tracking",batch_prediction:"bulb idea light",bathroom:"closet home house place plumbing shower sprinkler wash water wc",bathtub:"bathing bathroom clean home hotel human person shower travel",battery_alert:"! attention caution cell charge danger error exclamation important mark mobile notification power symbol warning",battery_charging_full:"cell charge lightening lightning mobile power thunderbolt",battery_full:"cell charge mobile power",battery_saver:"+ add charge charging new plus power symbol",battery_std:"cell charge mobile plus power standard",battery_unknown:"? assistance cell charge help information mark mobile power punctuation question support symbol",beach_access:"parasol places summer sunny umbrella",bed:"bedroom double full furniture home hotel house king night pillows queen rest size sleep",bedroom_baby:"babies children home horse house infant kid newborn rocking toddler young",bedroom_child:"children furniture home hotel house kid night pillows rest size sleep twin young",bedroom_parent:"double full furniture home hotel house king master night pillows queen rest sizem sleep",bedtime:"nightime sleep",bedtime_off:"nightime sleep",beenhere:"approve archive bookmark checkmark complete done favorite label library reading remember ribbon save select tag tick validate verified yes",bento:"box dinner food lunch meal restaurant takeout",bike_scooter:"automobile cars maps transportation vehicle vespa",biotech:"chemistry laboratory microscope research science technology test",blender:"appliance cooking electric juicer kitchen machine vitamix",blinds_closed:"cover curtains nest shutter sunshade",block:"allowed avoid banned cancel close disable entry exit not prohibited quit remove stop",bloodtype:"donate droplet emergency hospital medicine negative positive water",bluetooth:"cast connection device network paring streaming symbol wireless",bluetooth_audio:"connection device music signal sound symbol",bluetooth_connected:"cast connection device network paring streaming symbol wireless",bluetooth_disabled:"cast connection device enabled network offline paring slash streaming symbol wireless",bluetooth_drive:"automobile cars cast connection device maps paring streaming symbol transportation travel vehicle wireless",bluetooth_searching:"connection device network paring symbol wireless",blur_circular:"circle dots editing effect enhance filter",blur_linear:"dots editing effect enhance filter",blur_off:"disabled dots editing effect enabled enhance on slash",blur_on:"disabled dots editing effect enabled enhance filter off slash",bolt:"electric energy fast flash lightning power thunderbolt",book:"blog bookmark favorite label library reading remember ribbon save tag",bookmark:"archive favorite follow label library reading remember ribbon save tag",bookmark_add:"+ favorite plus remember ribbon save symbol",bookmark_added:"approve check complete done favorite remember save select tick validate verified yes",bookmark_border:"archive favorite label library outline reading remember ribbon save tag",bookmark_remove:"delete favorite minus remember ribbon save subtract",bookmarks:"favorite label layers library multiple reading remember ribbon save stack tag",book_online:"Android admission appointment cell device event hardware iOS mobile pass phone reservation tablet ticket",border_all:"doc editing editor spreadsheet stroke text type writing",border_bottom:"doc editing editor spreadsheet stroke text type writing",border_clear:"doc editing editor spreadsheet stroke text type writing",border_color:"all create doc editing editor marker pencil spreadsheet stroke text type writing",border_horizontal:"doc editing editor spreadsheet stroke text type writing",border_inner:"doc editing editor spreadsheet stroke text type writing",border_left:"doc editing editor spreadsheet stroke text type writing",border_outer:"doc editing editor spreadsheet stroke text type writing",border_right:"doc editing editor spreadsheet stroke text type writing",border_style:"color doc editing editor spreadsheet stroke text type writing",border_top:"doc editing editor spreadsheet stroke text type writing",border_vertical:"doc editing editor spreadsheet stroke text type writing",boy:"body gender human male people person social symbol",branding_watermark:"components copyright design emblem format identity interface layout logo screen stamp ui ux website window",breakfast_dining:"bakery bread butter food toast",brightness_1:"circle control crescent cresent level moon screen",brightness_2:"circle control crescent cresent level moon night screen",brightness_3:"circle control crescent cresent level moon night screen",brightness_4:"circle control crescent cresent dark level moon night screen sun",brightness_5:"circle control crescent cresent level moon screen sun",brightness_6:"circle control crescent cresent level moon screen sun",brightness_7:"circle control crescent cresent level light moon screen sun",brightness_auto:"A control display level mobile monitor phone screen",brightness_high:"auto control mobile monitor phone",brightness_low:"auto control mobile monitor phone",brightness_medium:"auto control mobile monitor phone",broken_image:"corrupt error landscape mountains photography picture torn",browser_not_supported:"disabled enabled internet off on page screen slash website www",browser_updated:"Android arrow chrome desktop device display download hardware iOS mac monitor screen web window",brunch_dining:"breakfast champagne champaign drink food lunch meal",brush:"art design draw editing painting tool",bubble_chart:"analytics bars data diagram infographic measure metrics statistics tracking",bug_report:"animal file fix insect issue problem testing ticket virus warning",build:"adjust fix repair spanner tool wrench",build_circle:"adjust fix repair tool wrench",bungalow:"architecture cottage estate home house maps place real residence residential stay traveling",burst_mode:"image landscape mountains multiple photography picture",bus_alert:"! attention automobile cars caution danger error exclamation important maps mark notification symbol transportation vehicle warning",business:"address apartment architecture building company estate flat home office place real residence residential shelter structure",business_center:"baggage briefcase places purse suitcase work",cabin:"architecture camping cottage estate home house log maps place real residence residential stay traveling wood",cable:"connection device electronics usb wire",cached:"around arrows inprogress loader loading refresh reload renew rotate",cake:"baked birthday candles celebration dessert food frosting party pastries pastry pie social sweet",calculate:"+ - = calculator count finance math",calendar_today:"date event month remember reminder schedule week",calendar_view_day:"date event format grid layout month remember reminder schedule today week",calendar_view_month:"date event format grid layout schedule today",calendar_view_week:"date event format grid layout month schedule today",call:"cell contact device hardware mobile talk telephone",call_end:"cell contact device hardware mobile talk telephone",call_made:"arrow device mobile",call_merge:"arrow device mobile",call_missed:"arrow device mobile",call_missed_outgoing:"arrow device mobile",call_received:"arrow device mobile",call_split:"arrow device mobile",call_to_action:"alert bar components cta design information interface layout message notification screen ui ux website window",camera:"album aperture lens photography picture record screenshot shutter",camera_alt:"image photography picture",camera_enhance:"important lens photography picture quality special star",camera_front:"body human lens mobile person phone photography portrait selfie",camera_indoor:"architecture building estate filming home house image inside motion nest picture place real residence residential shelter videography",camera_outdoor:"architecture building estate filming home house image motion nest outside picture place real residence residential shelter videography",camera_rear:"front lens mobile phone photography picture portrait selfie",camera_roll:"film image library photography",cameraswitch:"arrows flip rotate swap view",campaign:"alert announcement loud megaphone microphone notification speaker",cancel:"circle close cross disable exit status stop",cancel_presentation:"close device exit no quit remove screen share slide stop website window",cancel_schedule_send:"email no quit remove share stop x",candlestick_chart:"analytics data diagram finance infographic measure metrics statistics tracking",card_giftcard:"account balance bill cart cash certificate coin commerce creditcard currency dollars money online payment present shopping",card_membership:"bill bookmark cash certificate coin commerce cost creditcard currency dollars finance loyalty money online payment shopping subscription",card_travel:"bill cash coin commerce cost creditcard currency dollars finance membership miles money online payment trip",carpenter:"building construction cutting handyman repair saw tool",car_rental:"automobile cars key maps transportation vehicle",car_repair:"automobile cars maps transportation vehicle",cases:"baggage briefcase business purse suitcase",casino:"dice dots entertainment gamble gambling games luck places",cast:"Android airplay chromecast connect desktop device display hardware iOS mac monitor screencast streaming television tv web window wireless",cast_connected:"Android airplay chromecast desktop device display hardware iOS mac monitor screencast streaming television tv web window wireless",cast_for_education:"Android airplay chrome connect desktop device display hardware iOS learning lessons mac monitor screencast streaming teaching television tv web window wireless",catching_pokemon:"go pokestop travel",category:"categories circle collection items product sort square triangle",celebration:"activity birthday event fun party",cell_tower:"broadcast casting network signal transmitting wireless",cell_wifi:"connection data internet mobile network phone service signal wireless",center_focus_strong:"camera image lens photography zoom",center_focus_weak:"camera image lens photography zoom",chair:"comfort couch decoration furniture home house living lounging loveseat room seating sofa",chair_alt:"cahir furniture home house kitchen lounging seating table",chalet:"architecture cottage estate home house maps place real residence residential stay traveling",change_circle:"around arrows direction navigation rotate",change_history:"shape triangle",charging_station:"Android battery cell device electric hardware iOS lightning mobile phone tablet thunderbolt",chat:"bubble comment communicate feedback message speech talk text",chat_bubble:"comment communicate feedback message speech talk text",chat_bubble_outline:"comment communicate feedback message speech talk text",check:"checkmark complete confirm correct done enter okay purchased select success tick yes",check_box:"approved button checkmark component control form ok selected selection square success tick toggle ui yes",check_box_outline_blank:"button checkmark component control deselected empty form selection square tick toggle ui",check_circle:"approve checkmark complete done download finished ok select success tick upload validate verified yes",check_circle_outline:"approve checkmark complete done finished ok select success tick validate verified yes",checkroom:"check closet clothes coat hanger",chevron_left:"arrows back direction triangle",chevron_right:"arrows direction forward triangle",child_care:"babies baby children face infant kids newborn toddler young",child_friendly:"baby care carriage children infant kid newborn stroller toddler young",chrome_reader_mode:"text",circle:"bullet button dot full geometry moon period radio",circle_notifications:"active alarm alert bell chime notify reminder ring sound",class:"archive bookmark category favorite item label library reading remember ribbon save tag",clean_hands:"bacteria disinfect germs gesture sanitizer",cleaning_services:"dust sweep",clear:"allowed back cancel correct cross delete disable erase exit not times",clear_all:"delete document erase format lines list notifications wipe",close:"allowed cancel cross disable exit not status stop times",closed_caption:"accessible alphabet character decoder font language letter media movies subtitles symbol text tv type",closed_caption_disabled:"accessible alphabet character decoder enabled font language letter media movies off slash subtitles symbol text tv type",closed_caption_off:"accessible alphabet character decoder font language letter media movies outline subtitles symbol text tv type",close_fullscreen:"action arrows collapse direction minimize",cloud:"connection internet network sky upload weather",cloud_circle:"application backup connection drive files folders internet network sky storage upload",cloud_done:"application approve backup checkmark complete connection drive files folders internet network ok select sky storage tick upload validate verified yes",cloud_download:"application arrow backup connection drive files folders internet network sky storage upload",cloud_off:"application backup connection disabled drive enabled files folders internet network offline sky slash storage upload",cloud_queue:"connection internet network sky upload",cloud_sync:"application around backup connection drive files folders inprogress internet loading network refresh renew rotate sky storage turn upload",cloud_upload:"application arrow backup connection download drive files folders internet network sky storage",co2:"carbon dioxide gas",code:"brackets css developer engineering html parenthesis platform",code_off:"brackets css developer disabled enabled engineering html on platform slash",coffee:"beverage cup drink mug plate set tea",coffee_maker:"appliances beverage cup drink machine mug",collections:"album gallery image landscape library mountains photography picture stack",collections_bookmark:"album archive favorite gallery label library reading remember ribbon save stack tag",colorize:"color dropper extract eye picker pipette tool",color_lens:"art paint pallet",comment:"bubble chat communicate document feedback message note outline speech",comment_bank:"archive bookmark bubble cchat communicate favorite label library message remember ribbon save speech tag",comments_disabled:"bubble chat communicate enabled feedback message offline on slash speech",commit:"accomplish bind circle dedicate execute line perform pledge",commute:"automobile car direction maps public train transportation trip vehicle",compare:"adjustment editing edits enhance fix images photography photos scan settings",compare_arrows:"collide directional facing left pointing pressure push right together",compass_calibration:"connection internet location maps network refresh service signal wifi wireless",compress:"arrows collide pressure push together",computer:"Android chrome desktop device hardware iOS laptop mac monitor pc web window",confirmation_number:"admission entertainment event ticket",connected_tv:"Android airplay chrome desktop device display hardware iOS mac monitor screencast streaming television web window wireless",connecting_airports:"airplanes flight transportation travel trip",connect_without_contact:"communicating distance people signal socialize",construction:"build carpenter equipment fix hammer improvement industrial industry repair tools wrench",contactless:"applepay bluetooth cash connection connectivity credit device finance payment signal tap transaction wifi wireless",contact_mail:"account address avatar communicate email face human information message people person profile user",contact_page:"account avatar data document drive face folders human people person profile sheet slide storage user writing",contact_phone:"account avatar call communicate face human information message mobile number people person profile user",contacts:"account address avatar call cell face human information mobile number people person phone profile user",contact_support:"? alert announcement bubble chat comment communicate help information mark message punctuation speech symbol vquestion",content_copy:"cut document duplicate file multiple past",content_cut:"copy document file past scissors trim",content_paste:"clipboard copy cut document file multiple",content_paste_go:"clipboard disabled document enabled file slash",content_paste_off:"clipboard disabled document enabled file slash",content_paste_search:"clipboard document file find trace track",contrast:"black editing effect filter grayscale images photography pictures settings white",control_camera:"adjust arrows center direction left move right",control_point:"+ add circle plus",control_point_duplicate:"+ add circle multiple new plus symbol",co_present:"arrow co-present presentation screen share slides togather website",copy_all:"content cut document file multiple page paper past",copyright:"alphabet character circle emblem font legal letter owner symbol text",coronavirus:"19 bacteria covid disease germs illness sick social",corporate_fare:"architecture building business estate organization place real residence residential shelter",cottage:"architecture beach estate home house lake lodge maps place real residence residential stay traveling",countertops:"home house kitchen sink table",create:"compose editing input item new pencil write writing",create_new_folder:"+ add data directory document drive file plus sheet slide storage symbol",credit_card:"bill cash charge coin commerce cost creditcard currency dollars finance information money online payment price shopping symbol",credit_card_off:"charge commerce cost disabled enabled finance money online payment slash",credit_score:"approve bill card cash check coin commerce complete cost currency dollars done finance loan mark money ok online payment select symbol tick validate verified yes",crib:"babies baby bassinet bed children cradle infant kid newborn sleeping toddler",crop:"adjustments area editing frame images photos rectangle settings size square",crop_169:"adjustments area by editing frame images photos picture rectangle settings size square",crop_32:"adjustments area by editing frame images photos picture rectangle settings size square",crop_54:"adjustments area by editing frame images photos picture rectangle settings size square",crop_75:"adjustments area by editing frame images photos picture rectangle settings size square",crop_din:"adjustments area editing frame images photos picture rectangle settings size square",crop_free:"adjustments barcode editing focus frame image photos qrcode settings size square zoom",crop_landscape:"adjustments area editing frame images photos picture settings size square",crop_original:"adjustments area editing frame images photos picture settings size square",crop_portrait:"adjustments area editing frame images photos picture rectangle settings size square",crop_rotate:"adjustments area arrows editing frame images photos settings size turn",crop_square:"adjustments area editing frame images photos rectangle settings size",css:"alphabet brackets character code developer engineering font html letter platform symbol text type",currency_exchange:"360 around arrows cash coin commerce direction dollars inprogress money pay renew rotate sync turn universal",currency_franc:"bill card cash coin commerce cost credit dollars finance money online payment price shopping symbol",currency_lira:"bill card cash coin commerce cost credit dollars finance money online payment price shopping symbol",currency_pound:"bill card cash coin commerce cost credit dollars finance money online payment price shopping symbol",currency_ruble:"bill card cash coin commerce cost credit dollars finance money online payment price shopping symbol",currency_rupee:"bill card cash coin commerce cost credit dollars finance money online payment price shopping symbol",currency_yen:"bill card cash coin commerce cost credit dollars finance money online payment price shopping symbol",currency_yuan:"bill card cash coin commerce cost credit dollars finance money online payment price shopping symbol",curtains:"blinds cover nest open shutter sunshade",curtains_closed:"blinds cover nest shutter sunshade",dangerous:"broken fix no sign stop update warning wrong",dark_mode:"application device interface moon night silent theme ui ux website",dashboard:"cards format layout rectangle shapes square website",dashboard_customize:"cards format layout rectangle shapes square website",data_saver_off:"analytics bars chart diagram donut infographic measure metrics ring statistics tracking",data_saver_on:"+ add analytics chart diagram infographic measure metrics new plus ring statistics symbol tracking",data_thresholding:"hidden privacy thresold",data_usage:"analytics chart circle diagram infographic measure metrics statistics tracking",date_range:"agenda calendar event month remember reminder schedule time today week",deblur:"adjust editing enhance face image lines photography sharpen",deck:"chairs furniture garden home house outdoors outside patio social terrace umbrella yard",dehaze:"adjust editing enhance image lines photography remove",delete:"bin garbage junk recycle remove trashcan",delete_forever:"bin cancel exit garbage junk recycle remove trashcan",delete_outline:"bin can garbage remove trash",delete_sweep:"bin garbage junk recycle remove trashcan",delivery_dining:"food meal restaurant scooter takeout transportation vehicle vespa",density_large:"horizontal lines rules",density_medium:"horizontal lines rules",density_small:"horizontal lines rules",departure_board:"automobile bus cars clock maps public schedule time transportation travel vehicle",description:"article bill data document drive file folders invoice item notes page paper sheet slide text writing",desktop_access_disabled:"Android apple chrome device display enabled hardware iOS mac monitor offline pc screen slash web window",desktop_mac:"Android apple chrome device display hardware iOS monitor pc screen web window",desktop_windows:"Android chrome device display hardware iOS mac monitor pc screen television tv web",details:"editing enhance image photography sharpen triangle",developer_board:"computer development devkit hardware microchip processor",developer_board_off:"computer development disabled enabled hardware microchip on processor slash",developer_mode:"Android bracket cell code development device engineer hardware iOS mobile phone tablet",device_hub:"Android circle computer desktop hardware iOS laptop mobile monitor phone square tablet triangle watch wearable web",devices:"Android computer desktop hardware iOS laptop mobile monitor phone tablet watch wearable web",devices_other:"Android cell chrome desktop gadget hardware iOS ipad mac mobile monitor phone smartwatch tablet vr wearables window",device_thermostat:"celsius fahrenheit temperature thermometer",device_unknown:"? Android assistance cell hardware help iOS information mark mobile phone punctuation question support symbol tablet",dialer_sip:"alphabet call cell character contact device font hardware initiation internet letter mobile over protocol routing session symbol telephone text type voice",dialpad:"buttons call contact device dots mobile numbers phone",diamond:"fashion gems jewelry logo retail valuables",difference:"compare content copy cut document duplicate file multiple past",dining:"cafeteria cutlery diner eating fork room spoon",dinner_dining:"breakfast food fork lunch meal restaurant spaghetti utensils",directions:"arrow maps naviate right route sign traffic",directions_bike:"bicycle human maps person public route transportation",directions_boat:"automobile cars ferry maps public transportation vehicle",directions_boat_filled:"automobile cars ferry maps public transportation vehicle",directions_bus:"automobile cars maps public transportation vehicle",directions_bus_filled:"automobile cars maps public transportation vehicle",directions_car:"automobile cars maps public transportation vehicle",directions_car_filled:"automobile cars maps public transportation vehicle",directions_off:"arrow disabled enabled maps right route sign slash traffic",directions_railway:"automobile cars maps public train transportation vehicle",directions_railway_filled:"automobile cars maps public train transportation vehicle",directions_run:"body health human jogging maps people person route running walk",directions_subway:"automobile cars maps public rail train transportation vehicle",directions_subway_filled:"automobile cars maps public rail train transportation vehicle",directions_transit:"automobile cars maps metro public rail subway train transportation vehicle",directions_transit_filled:"automobile cars maps public rail subway train transportation vehicle",directions_walk:"body human jogging maps people person route run",dirty_lens:"camera photography picture splat",disabled_by_default:"box cancel close exit no quit remove square stop",disc_full:"! alert attention caution cd danger error exclamation important mark music notification storage symbol vinyl warning",display_settings:"Android application change chrome desktop details device gear hardware iOS information mac monitor options personal screen service web window",dns:"address bars domain information ip list lookup name network server system",dock:"Android cell charger charging connector device hardware iOS mobile phone power station tablet",document_scanner:"article data drive file folders notes page paper sheet slide text writing",do_disturb:"cancel close denied deny remove silence stop",do_disturb_alt:"cancel close denied deny remove silence stop",do_disturb_off:"cancel close denied deny disabled enabled on remove silence slash stop",do_disturb_on:"cancel close denied deny disabled enabled off remove silence slash stop",domain:"apartment architecture building business estate home place real residence residential shelter web www",domain_add:"+ apartment architecture building business estate home new place plus real residence residential shelter symbol web www",domain_disabled:"apartment architecture building business company enabled estate home internet maps office offline on place real residence residential slash website",domain_verification:"application approve check complete design desktop done interface internet layout mark ok screen select tick ui ux validate verified website window www yes",done:"approve checkmark complete finished ok select success tick validate verified yes",done_all:"approve checkmark complete finished layers multiple ok select stack success tick validate verified yes",done_outline:"all approve checkmark complete finished ok select success tick validate verified yes",do_not_disturb:"cancel close denied deny remove silence stop",do_not_disturb_alt:"cancel close denied deny remove silence stop",do_not_disturb_off:"cancel close denied deny disabled enabled on remove silence slash stop",do_not_disturb_on:"cancel close denied deny disabled enabled off remove silence slash stop",do_not_disturb_on_total_silence:"busy mute on quiet total",do_not_step:"boot disabled enabled feet foot off on shoe slash sneaker",do_not_touch:"disabled enabled fingers gesture hand off on slash",donut_large:"analytics chart circle complete data diagram infographic inprogress, measure metrics pie statistics tracking",donut_small:"analytics chart circle data diagram infographic inprogress measure metrics pie statistics tracking",door_back:"closed doorway entrance exit home house",doorbell:"alarm home house ringing",door_front:"closed doorway entrance exit home house",door_sliding:"automatic doorway double entrance exit glass home house two",double_arrow:"arrows chevron direction multiple navigation right",downhill_skiing:"athlete athletic body entertainment exercise hobby human people person ski snow social sports travel winter",download:"arrow downloads drive install upload",download_done:"arrows check downloads drive installed ok tick upload",download_for_offline:"arrow circle for install offline upload",downloading:"arrow circle downloads install pending progress upload",drafts:"document email envelope file letter message read",drag_handle:"application components design interface layout lines menu move screen ui ux website window",drag_indicator:"application circles components design dots drop interface layout mobile monitor move phone screen shape shift tablet ui ux website window",drive_eta:"automobile cars destination direction estimate maps public transportation travel trip vehicle",drive_file_move:"arrows data direction document folders right sheet side slide storage",drive_file_rename_outline:"compose create draft editing input pencil write writing",drive_folder_upload:"arrow data document file sheet slide storage",dry:"air bathroom dryer fingers gesture hand wc",dry_cleaning:"hanger hotel laundry places service towel",duo:"call chat conference device video",dvr:"Android audio chrome computer desktop device display electronic hardware iOS laptop list mac monitor recorder screen tv video web window",dynamic_feed:"layer live multiple post refresh update",dynamic_form:"code electric fast lightning lists questionnaire thunderbolt",earbuds:"accessory audio earphone headphone listen music sound",earbuds_battery:"accessory audio charging earphone headphone listen music sound",east:"arrow directional maps navigation right",edgesensor_high:"Android cell device hardware iOS mobile move phone sensitivity tablet vibrate",edgesensor_low:"Android cell device hardware iOS mobile move phone sensitivity tablet vibrate",edit:"compose create editing input new pencil write writing",edit_attributes:"approve attribution check complete done mark ok select tick validate verified yes",edit_location:"destination direction gps maps pencil pin place stop write",edit_location_alt:"pencil pin",edit_notifications:"active alarm alert bell chime compose create draft editing input new notify pencil reminder ring sound write writing",edit_off:"compose create disabled draft editing enabled input new offline on pencil slash write writing",edit_road:"destination direction highway maps pencil street traffic",egg:"breakfast brunch food",egg_alt:"breakfast brunch food",eighteen_mp:"camera digits font image letters megapixels numbers quality resolution symbol text type",eight_k:"8000 8K alphabet character digit display font letter number pixels resolution symbol text type video",eight_k_plus:"+ 7000 8K alphabet character digit display font letter number pixels resolution symbol text type video",eight_mp:"camera digit font image letters megapixels number quality resolution symbol text type",eightteen_mp:"camera digits font image letters megapixels numbers quality resolution symbol text type",eject:"arrow disc drive dvd player remove triangle up usb",elderly:"body cane human old people person senior",elderly_woman:"body cane female gender girl human lady old people person senior social symbol women",electrical_services:"charge cord plug power wire",electric_bike:"automobile cars electricity maps scooter transportation travel vehicle vespa",electric_bolt:"energy fast lightning nest thunderbolt",electric_car:"automobile cars electricity maps transportation travel vehicle",electric_meter:"energy fast lightning measure nest thunderbolt usage voltage volts",electric_moped:"automobile bike cars maps scooter transportation travel vehicle vespa",electric_rickshaw:"automobile cars india maps transportation truck vehicle",electric_scooter:"automobile bike cars maps transportation vehicle vespa",elevator:"body down human people person up",eleven_mp:"camera digits font image letters megapixels numbers quality resolution symbol text type",email:"envelope letter message note post receive send write",e_mobiledata:"alphabet font letter text type",emoji_emotions:"emoticon expressions face feelings glad happiness happy like mood person pleased smiley smiling social survey",emoji_events:"achievement award chalice champion cup first prize reward sport trophy winner",emoji_food_beverage:"coffee cup dring drink mug plate set tea",emoji_nature:"animal bee daisy flower honey insect ladybug petals spring summer",emoji_objects:"creative idea lamp lightbulb solution thinking",emoji_people:"arm body greeting human person social wave waving",emoji_symbols:"ampersand character hieroglyph music note percent sign",emoji_transportation:"architecture automobile building cars commute company direction estate maps office place public real residence residential shelter travel vehicle",energy_savings_leaf:"eco leaves nest usage",engineering:"body cogs cogwheel construction fixing gears hat helmet human maintenance people person setting worker",enhanced_encryption:"+ add locked new password plus privacy private protection safety secure security symbol",equalizer:"adjustment analytics chart data graph measure metrics music noise sound static statistics tracking volume",error:"! alert announcement attention caution circle danger exclamation feedback important mark notification problem symbol warning",error_outline:"! alert announcement attention caution circle danger exclamation feedback important mark notification problem symbol warning",escalator:"down staircase up",escalator_warning:"body child human kid parent people person",euro:"bill card cash coin commerce cost credit currency dollars euros finance money online payment price profit shopping symbol",euro_symbol:"bill card cash coin commerce cost credit currency dollars finance money online payment price profit",event:"agenda calendar date item mark month range remember reminder today week",event_available:"agenda approve calendar check complete done item mark ok schedule select tick time validate verified yes",event_busy:"agenda calendar cancel close date exit item no remove schedule stop time unavailable",event_note:"agenda calendar date item schedule text time writing",event_repeat:"around calendar date day inprogress loading month refresh renew rotate schedule turn",event_seat:"assigned bench chair furniture reservation row section sit",ev_station:"automobile cars charge charging electricity filling fuel gasoline maps places power station transportation vehicle",exit_to_app:"application arrow back components design export interface layout leave login logout mobile monitor move output phone pointing quit register right screen signin signout signup tablet ux website window",expand:"arrows compress enlarge grow move push together",expand_circle_down:"arrows chevron collapse direction expandable list more",expand_less:"arrows chevron collapse direction expandable list up",expand_more:"arrows chevron collapse direction down expandable list",explicit:"adult alphabet character content font language letter media movies music parent rating supervision symbol text type",explore:"compass destination direction east location maps needle north south travel west",explore_off:"compass destination direction disabled east enabled location maps needle north slash south travel west",exposure:"add brightness contrast editing effect image minus photography picture plus settings subtract",extension:"add-ons app extended game item jigsaw piece plugin puzzle shape",extension_off:"disabled enabled extended jigsaw piece puzzle shape slash",face:"account avatar emoji eyes human login logout people person profile recognition security social thumbnail unlock user",facebook:"brand logo social",face_retouching_natural:"editing effect emoji emotion faces image photography settings star tag",face_retouching_off:"disabled editing effect emoji emotion enabled faces image natural photography settings slash tag",fact_check:"approve complete done list mark ok select tick validate verified yes",factory:"industry manufacturing warehouse",family_restroom:"bathroom children father kids mother parents wc",fastfood:"drink hamburger maps meal places",fast_forward:"control ff media music play speed time tv video",fast_rewind:"back control media music play speed time tv video",favorite:"appreciate health heart like love remember save shape success",favorite_border:"health heart like love outline remember save shape success",fax:"machine office phone send",featured_play_list:"audio collection highlighted item music playlist recommended",featured_video:"advertisement advertisment highlighted item play recommended watch,advertised",feed:"article headline information newspaper public social timeline",feedback:"! alert announcement attention bubble caution chat comment communicate danger error exclamation important mark message notification speech symbol warning",female:"gender girl lady social symbol woman women",fence:"backyard barrier boundaries boundary home house protection",festival:"circus event local maps places tent tour travel",fiber_dvr:"alphabet character digital electronics font letter network recorder symbol text tv type video",fiber_manual_record:"circle dot play watch",fiber_new:"alphabet character font letter network symbol text type",fiber_pin:"alphabet character font letter network symbol text type",fiber_smart_record:"circle dot play watch",fifteen_mp:"camera digits font image letters megapixels numbers quality resolution symbol text type",file_copy:"bill clone content cut document duplicate invoice item multiple page past",file_download:"arrows downloads drive export install upload",file_download_done:"arrows check downloads drive installed tick upload",file_download_off:"arrow disabled drive enabled export install on save slash upload",file_open:"arrow document drive left page paper",file_present:"clip data document drive folders note paper reminder sheet slide storage writing",file_upload:"arrows download drive export",filter:"editing effect image landscape mountains photography picture settings",filter_1:"digit editing effect images multiple number photography pictures settings stack symbol",filter_2:"digit editing effect images multiple number photography pictures settings stack symbol",filter_3:"digit editing effect images multiple number photography pictures settings stack symbol",filter_4:"digit editing effect images multiple number photography pictures settings stack symbol",filter_5:"digit editing effect images multiple number photography pictures settings stack symbol",filter_6:"digit editing effect images multiple number photography pictures settings stack symbol",filter_7:"digit editing effect images multiple number photography pictures settings stack symbol",filter_8:"digit editing effect images multiple number photography pictures settings stack symbol",filter_9:"digit editing effect images multiple number photography pictures settings stack symbol",filter_9_plus:"+ digit editing effect images multiple number photography pictures settings stack symbol",filter_alt:"edit funnel options refine sift",filter_alt_off:"[offline] disabled edit funnel options refine sift slash",filter_b_and_w:"black contrast editing effect grayscale images photography pictures settings white",filter_center_focus:"camera dot edit image photography picture",filter_drama:"camera cloud editing effect image photography picture sky",filter_frames:"boarders border camera center editing effect filters focus image options photography picture",filter_hdr:"camera editing effect image mountains photography picture",filter_list:"lines organize sort",filter_list_off:"[offline] alt disabled edit options refine sift slash",filter_none:"multiple stack",filter_tilt_shift:"blur center editing effect focus images photography pictures",filter_vintage:"editing effect flower images photography pictures",find_in_page:"data document drive file folders glass look magnifying paper search see sheet slide writing",find_replace:"around arrows glass inprogress loading look magnifying refresh renew rotate search see",fingerprint:"biometrics identification identity reader thumbprint touchid verification",fire_extinguisher:"emergency water",fireplace:"chimney flame home house living pit room warm winter",first_page:"arrow back chevron left rewind",fitbit:"athlete athletic exercise fitness hobby",fitness_center:"athlete dumbbell exercise gym health hobby places sport weights workout",fit_screen:"enlarge format layout reduce scale size",five_g:"5g alphabet cellular character data digit font letter mobile network number phone signal speed symbol text type wifi",five_k:"5000 5K alphabet character digit display font letter number pixels resolution symbol text type video",five_k_plus:"+ 5000 5K alphabet character digit display font letter number pixels resolution symbol text type video",five_mp:"camera digit font image letters megapixels number quality resolution symbol text type",fivteen_mp:"camera digits font image letters megapixels numbers quality resolution symbol text type",flag:"country goal mark nation report start",flag_circle:"country goal mark nation report round start",flaky:"approve check close complete contrast done exit mark no ok options select stop tick verified yes",flare:"bright editing effect images lensflare light photography pictures shine sparkle star sun",flash_auto:"camera electric fast lightning thunderbolt",flashlight_off:"disabled enabled on slash",flashlight_on:"disabled enabled off slash",flash_off:"camera disabled electric enabled fast lightning on slash thunderbolt",flash_on:"camera disabled electric enabled fast lightning off slash thunderbolt",flatware:"cafeteria cutlery diner dining eating fork room spoon",flight:"airplane airport flying transportation travel trip",flight_class:"airplane business first seat transportation travel trip window",flight_land:"airplane airport arrival arriving flying landing transportation travel",flight_takeoff:"airplane airport departed departing flying landing transportation travel",flip:"editing image orientation scanning",flip_camera_android:"center editing front image mobile orientation rear reverse rotate turn",flip_camera_ios:"android editing front image mobile orientation rear reverse rotate turn",flip_to_back:"arrangement format front layout move order sort",flip_to_front:"arrangement back format layout move order sort",flutter_dash:"bird mascot",fmd_bad:"! alert attention caution danger destination direction error exclamation important location maps mark notification pin place symbol warning",fmd_good:"destination direction location maps pin place stop",folder:"data directory document drive file folders sheet slide storage",folder_delete:"bin can data document drive file folders garbage remove sheet slide storage trash",folder_off:"[online] data disabled document drive enabled file folders sheet slash slide storage",folder_open:"data directory document drive file folders sheet slide storage",folder_shared:"account collaboration data directory document drive face human people person profile sheet slide storage team user",folder_special:"bookmark data directory document drive favorite file highlight important marked saved shape sheet slide star storage",folder_zip:"compress data document drive file folders open sheet slide storage",follow_the_signs:"arrow body directional human people person right social",font_download:"A alphabet character letter square symbol text type",font_download_off:"alphabet character disabled enabled letter slash square symbol text type",food_bank:"architecture building charity eat estate fork house knife meal place real residence residential shelter utensils",forest:"jungle nature plantation plants trees woodland",fork_left:"arrows directions maps navigation path route sign traffic",fork_right:"arrows directions maps navigation path route sign traffic",format_align_center:"alignment doc editing editor lines spreadsheet text type writing",format_align_justify:"alignment density doc editing editor extra lines small spreadsheet text type writing",format_align_left:"alignment doc editing editor lines spreadsheet text type writing",format_align_right:"alignment doc editing editor lines spreadsheet text type writing",format_bold:"B alphabet character doc editing editor font letter spreadsheet styles symbol text type writing",format_clear:"T alphabet character disabled doc editing editor enabled font letter off slash spreadsheet style symbol text type writing",format_color_fill:"bucket doc editing editor paint spreadsheet style text type writing",format_color_reset:"clear disabled doc droplet editing editor enabled fill liquid off on paint slash spreadsheet style text type water writing",format_color_text:"doc editing editor fill paint spreadsheet style type writing",format_indent_decrease:"alignment doc editing editor indentation paragraph spreadsheet text type writing",format_indent_increase:"alignment doc editing editor indentation paragraph spreadsheet text type writing",format_italic:"alphabet character doc editing editor font letter spreadsheet style symbol text type writing",format_line_spacing:"alignment doc editing editor spreadsheet text type writing",format_list_bulleted:"alignment doc editing editor notes spreadsheet task text todo type writing",format_list_numbered:"alignment digit doc editing editor notes spreadsheet symbol task text todo type writing",format_list_numbered_rtl:"alignment digit doc editing editor notes spreadsheet symbol task text todo type writing",format_overline:"alphabet character doc editing editor font letter spreadsheet style symbol text type under writing",format_paint:"brush color doc editing editor fill paintroller spreadsheet style text type writing",format_quote:"doc editing editor quotation spreadsheet text type writing",format_shapes:"alphabet character color doc editing editor fill font letter paint spreadsheet style symbol text type writing",format_size:"alphabet character color doc editing editor fill font letter paint spreadsheet style symbol text type writing",format_strikethrough:"alphabet character doc editing editor font letter spreadsheet style symbol text type writing",format_textdirection_l_to_r:"alignment doc editing editor ltr paragraph spreadsheet type writing",format_textdirection_r_to_l:"alignment doc editing editor paragraph rtl spreadsheet type writing",format_underlined:"alphabet character doc editing editor font letter spreadsheet style symbol text type writing",forum:"bubble chat comment communicate community conversation feedback hub messages speech talk",forward:"arrow mail message playback right sent",forward_10:"arrow circle controls digit fast music number play rotate seconds speed symbol time video",forward_30:"arrow circle controls digit fast music number rotate seconds speed symbol time video",forward_5:"10 arrow circle controls digit fast music number rotate seconds speed symbol time video",forward_to_inbox:"arrow email envelop letter message send",foundation:"architecture base basis building construction estate home house real residential",four_g_mobiledata:"alphabet cellular character digit font letter network number phone signal speed symbol text type wifi",four_g_plus_mobiledata:"alphabet cellular character digit font letter network number phone signal speed symbol text type wifi",four_k:"4000 4K alphabet character digit display font letter number pixels resolution symbol text type video",four_k_plus:"+ 4000 4K alphabet character digit display font letter number pixels resolution symbol text type video",four_mp:"camera digit font image letters megapixels number quality resolution symbol text type",fourteen_mp:"camera digits font image letters megapixels numbers quality resolution symbol text type",free_breakfast:"beverage cafe coffee cup drink mug tea",fullscreen:"adjust application components interface size ui ux view website",fullscreen_exit:"adjust application components interface size ui ux view website",functions:"average calculate count doc editing editor math sigma spreadsheet style sum text type writing",gamepad:"buttons console controller device gaming playstation video",games:"adjust arrows controller direction dpad gaming left move nintendo playstation right xbox",garage:"automobile automotive cars direction maps transportation travel vehicle",gas_meter:"droplet energy measure nest usage water",gavel:"agreement contract court document government hammer judge law mallet official police rules terms",gesture:"drawing finger gestures hand line motion",get_app:"arrows downloads export install play pointing retrieve upload",gif:"alphabet animated animation bitmap character font format graphics interchange letter symbol text type",gif_box:"alphabet animated animation bitmap character font format graphics interchange letter symbol text type",girl:"body female gender human lady people person social symbol woman women",gite:"architecture estate home hostel house maps place real residence residential stay traveling",git_hub:"brand code",g_mobiledata:"alphabet character font letter network service symbol text type",golf_course:"athlete athletic ball club entertainment flag golfer golfing hobby hole places putt sports",google:"brand logo",gpp_bad:"cancel certified close error exit no privacy private protection remove security shield sim stop verified",gpp_good:"certified check ok pass security shield sim tick",gpp_maybe:"! alert attention caution certified danger error exclamation important mark notification privacy private protection security shield sim symbol verified warning",gps_fixed:"destination direction location maps pin place pointer stop tracking",gps_not_fixed:"destination direction disabled enabled fixed location maps not off online place pointer slash tracking",gps_off:"destination direction disabled enabled fixed location maps not offline place pointer slash tracking",grade:"achievement important likes marked rated rating reward saved shape special star",gradient:"color editing effect filter images photography pictures",grading:"approve check complete document done feedback grade mark ok reviewed select tick validate verified writing yes",grain:"dots editing effect filter images photography pictures",graphic_eq:"audio equalizer music recording sound voice",grass:"backyard fodder ground home lawn plant turf",grid3x3:"layout line space",grid4x4:"by layout lines space",grid_goldenratio:"layout lines space",grid_off:"collage disabled enabled image layout on slash view",grid_on:"collage disabled enabled image layout off sheet slash view",grid_view:"application blocks components dashboard design interface layout screen square tiles ui ux website window",group:"accounts committee face family friends humans network people persons profiles social team users",group_add:"accounts committee face family friends humans increase more network people persons plus profiles social team users",group_remove:"accounts committee face family friends humans network people persons profiles social team users",groups:"body club collaboration crowd gathering human meeting people person social teams",group_work:"alliance circle collaboration film partnership reel teamwork together",g_translate:"emblem google language logo mark speaking speech translator words",hail:"body human people person pick public stop taxi transportation",handyman:"build construction fix hammer repair screwdriver tools",hardware:"break construction hammer nail repair tool",hd:"alphabet character definition display font high letter movies quality resolution screen symbol text tv type video",hdr_auto:"A alphabet camera character circle dynamic font high letter photo range symbol text type",hdr_auto_select:"+ A alphabet camera character circle dynamic font high letter photo range symbol text type",hdr_enhanced_select:"add alphabet character dynamic font high letter plus range symbol text type",hdr_off:"alphabet character disabled dynamic enabled enhance font high letter range select slash symbol text type",hdr_off_select:"alphabet camera character circle disabled dynamic enabled font high letter photo range slash symbol text type",hdr_on:"add alphabet character dynamic enhance font high letter plus range select symbol text type",hdr_on_select:"+ alphabet camera character circle dynamic font high letter photo range symbol text type",hdr_plus:"+ add alphabet character circle dynamic enhance font high letter range select symbol text type",hdr_strong:"circles dots dynamic enhance high range",hdr_weak:"circles dots dynamic enhance high range",headphones:"accessory audio device earphone headset listen music sound",headphones_battery:"accessory audio charging device earphone headset listen music sound",headset:"accessory audio device earbuds earmuffs earphone headphones listen music sound",headset_mic:"accessory audio chat device earphone headphones listen music sound talk",headset_off:"accessory audio chat device disabled earphone enabled headphones listen mic music slash sound talk",healing:"bandage bandaid editing emergency fix health hospital image medicine",health_and_safety:"+ add certified plus privacy private protection security shield symbol verified",hearing:"accessibility accessible aid handicap help impaired listen sound volume",hearing_disabled:"accessibility accessible aid enabled handicap help impaired listen off on slash sound volume",heart_broken:"break core crush health nucleus split",heat_pump:"air conditioner cool energy furnance nest usage",height:"arrows color doc down editing editor fill format paint resize spreadsheet stretch style text type up writing",help:"? alert announcement assistance circle information mark punctuation question shape support symbol",help_center:"? assistance information mark punctuation question support symbol",help_outline:"? alert announcement assistance circle information mark punctuation question shape support symbol",hevc:"alphabet character coding efficiency font high letter symbol text type video",hexagon:"shape sides six",hide_image:"disabled enabled landscape mountains off on photography picture slash",hide_source:"circle disabled enabled offline on shape slash",highlight:"color doc editing editor emphasize fill flashlight format marker paint spreadsheet style text type writing",highlight_alt:"arrow box click cursor draw focus pointer selection target",highlight_off:"cancel circle clear click close delete disable exit focus no quit remove stop target times",high_quality:"alphabet character definition display font hq letter movies resolution screen symbol text tv type",hiking:"backpacking bag climbing duffle mountain social sports stick trail travel walking",history:"arrow backwards clock date refresh renew reverse revert rotate schedule time turn undo",history_edu:"document education feather letter paper pen quill school tools write writing",history_toggle_off:"clock date schedule time",hls:"alphabet character developer engineering font letter platform symbol text type",hls_off:"[offline] alphabet character developer disabled enabled engineering font letter platform slash symbol text type",h_mobiledata:"alphabet character font letter network service symbol text type",holiday_village:"architecture beach camping cottage estate home house lake lodge maps place real residence residential stay traveling vacation",home:"address application--house architecture building components design estate homepage interface layout place real residence residential screen shelter structure unit ux website window",home_max:"device gadget hardware internet iot nest smart things",home_mini:"Internet device gadget hardware iot nest smart things",home_repair_service:"equipment fix kit mechanic repairing toolbox tools workshop",home_work:"architecture building estate house office place real residence residential shelter",horizontal_rule:"gmail line novitas",horizontal_split:"bars format layout lines stacked",hotel:"bed body human people person sleep stay travel trip",hot_tub:"bathing bathroom bathtub hotel human jacuzzi person shower spa steam travel water",hourglass_bottom:"countdown half loading minutes time waiting",hourglass_disabled:"clock countdown empty enabled loading minutes off on slash time waiting",hourglass_empty:"countdown loading minutes start time waiting",hourglass_full:"countdown loading minutes time waiting",hourglass_top:"countdown half loading minutes time waiting",house:"architecture building estate family homepage places real residence residential shelter",houseboat:"architecture beach estate floating home maps place real residence residential sea stay traveling vacation",house_siding:"architecture building construction estate exterior facade home real residential",how_to_reg:"approve ballot check complete done election mark ok poll register registration select tick to validate verified vote yes",how_to_vote:"ballot election poll",h_plus_mobiledata:"+ alphabet character font letter network service symbol text type",html:"alphabet brackets character code css developer engineering font letter platform symbol text type",http:"alphabet character font internet letter network symbol text transfer type url website",https:"connection encrypt internet key locked network password privacy private protection safety secure security ssl web",hub:"center connection core focal network nucleus point topology",hvac:"air conditioning heating ventilation",icecream:"dessert food snack",ice_skating:"athlete athletic entertainment exercise hobby shoe skates social sports travel",image:"disabled enabled frame hide landscape mountains off on photography picture slash",image_aspect_ratio:"photography picture rectangle square",image_not_supported:"disabled enabled landscape mountains off on photography picture slash",image_search:"find glass landscape look magnifying mountains photography picture see",imagesearch_roller:"art paint",important_devices:"Android cell computer desktop hardware iOS mobile monitor phone star tablet web",import_contacts:"address book friends information magazine open",import_export:"arrows direction down explort up",inbox:"archive email incoming message",indeterminate_check_box:"application button components control design form interface minus screen selected selection square toggle ui undetermined ux website",info:"about alert announcement announcment assistance bubble circle details help information service support",input:"arrow box download login move right",insert_chart:"analytics barchart bars data diagram infographic measure metrics statistics tracking",insert_chart_outlined:"analytics bars data diagram infographic measure metrics statistics tracking",insert_comment:"add bubble chat feedback message",insert_drive_file:"bill document format invoice item sheet slide",insert_emoticon:"account emoji face happy human like people person profile sentiment smiley user",insert_invitation:"agenda calendar date event mark month range remember reminder today week",insert_link:"add anchor attach clip file mail media",insert_page_break:"document file paper",insert_photo:"image landscape mountains photography picture wallpaper",insights:"analytics bars chart data diagram infographic measure metrics stars statistics tracking",instagram:"brand logo social",install_desktop:"Android chrome device display fix hardware iOS mac monitor place pwa screen web window",install_mobile:"Android cell device hardware iOS phone pwa tablet",integration_instructions:"brackets clipboard code css developer document engineering html platform",interests:"circle heart shapes social square triangle",interpreter_mode:"language microphone person speaking symbol",inventory:"archive box buy check clipboard document e-commerce file list organize packages product purchase shop stock store supply",inventory2:"archive box file organize packages product stock storage supply",invert_colors:"droplet editing hue inverted liquid palette tone water",invert_colors_off:"disabled droplet enabled hue inverted liquid offline opacity palette slash tone water",ios_share:"arrows button direction export internet link send sharing social up website",iron:"appliance clothes electric ironing machine object",iso:"add editing effect image minus photography picture plus sensor shutter speed subtract",javascript:"alphabet brackets character code css developer engineering font html letter platform symbol text type",join_full:"circle combine command left outter right sql",join_inner:"circle command matching sql values",join_left:"circle command matching sql values",join_right:"circle command matching sql values",kayaking:"athlete athletic body canoe entertainment exercise hobby human lake paddle paddling people person rafting river row social sports summer travel water",key:"blackout password restricted secret unlock",keyboard:"computer device hardware input keypad letter office text type",keyboard_alt:"computer device hardware input keypad letter office text type",keyboard_arrow_down:"arrows chevron open",keyboard_arrow_left:"arrows chevron",keyboard_arrow_right:"arrows chevron open start",keyboard_arrow_up:"arrows chevron submit",keyboard_backspace:"arrow left",keyboard_capslock:"arrow up",keyboard_command_key:"button command control key",keyboard_control_key:"control key",keyboard_double_arrow_down:"arrows direction multiple navigation",keyboard_double_arrow_left:"arrows direction multiple navigation",keyboard_double_arrow_right:"arrows direction multiple navigation",keyboard_double_arrow_up:"arrows direction multiple navigation",keyboard_hide:"arrow computer device down hardware input keypad text",keyboard_option_key:"alt key modifier",keyboard_return:"arrow back left",keyboard_tab:"arrow next right",keyboard_voice:"microphone noise recorder speaker",key_off:"[offline] disabled enabled on password slash unlock",king_bed:"bedroom double furniture home hotel house night pillows queen rest sleep",kitchen:"appliance cabinet cold food freezer fridge home house ice places refrigerator storage",kitesurfing:"athlete athletic beach body entertainment exercise hobby human people person social sports travel water",label:"badge favorite indent item library mail remember save stamp sticker tag",label_important:"badge favorite important. indent item library mail remember save stamp sticker tag wing",label_off:"disabled enabled favorite indent library mail on remember save slash stamp sticker tag wing",lan:"computer connection data internet network service",landscape:"image mountains nature photography picture",language:"country earth globe i18n internet l10n planet website world www",laptop:"Android chrome computer connect desktop device display hardware iOS link mac monitor smart tv web windows",laptop_chromebook:"Android chromebook device display hardware iOS mac monitor screen web window",laptop_mac:"Android apple chrome device display hardware iOS monitor screen web window",laptop_windows:"Android chrome device display hardware iOS mac monitor screen web",last_page:"application arrow chevron components end forward interface right screen ui ux website",launch:"application arrow box components core interface internal new open screen ui ux website window",layers:"arrange disabled enabled interaction maps off overlay pages slash stack",layers_clear:"arrange delete disabled enabled interaction maps off overlay pages slash",leaderboard:"analytics bars chart data diagram infographic measure metrics statistics tracking",leak_add:"connection data link network service signals synce wireless",leak_remove:"connection data disabled enabled link network offline service signals slash synce wireless",legend_toggle:"analytics chart data diagram infographic measure metrics monitoring stackdriver statistics tracking",lens:"circle full geometry moon",lens_blur:"camera dim dot effect foggy fuzzy image photo soften",library_add:"+ collection layers multiple music new plus save stacked symbol video",library_add_check:"approve collection complete done layers mark multiple music ok select stacked tick validate verified video yes",library_books:"add album audio collection reading",library_music:"add album audio collection song sounds",light:"bulb ceiling hanging inside interior lamp lighting pendent room",lightbulb:"alert announcement idea information learning mode",lightbulb_circle:"alert announcement idea information",light_mode:"brightness day device lighting morning mornng sky sunny",linear_scale:"application components design interface layout measure menu screen slider ui ux website window",line_axis:"dash horizontal stroke vertical",line_style:"dash dotted editor rule spacing",line_weight:"editor height size spacing style thickness",link:"anchor chain clip connection external hyperlink linked links multimedia unlisted url",linked_camera:"connection lens network photography picture signals sync wireless",linked_in:"brand logo social",link_off:"anchor attached chain clip connection disabled enabled linked links multimedia slash unlink url",liquor:"alcohol bar bottle club cocktail drink food party store wine",list:"editor file format index menu options playlist task todo",list_alt:"box contained editor format lines reorder sheet stacked task title todo",live_help:"? alert announcement assistance bubble chat comment communicate faq information mark message punctuation question speech support symbol",live_tv:"Android antennas chrome desktop device hardware iOS mac monitor movie play stream television web window",living:"chair comfort couch decoration furniture home house lounging loveseat room seating sofa",local_activity:"event star things ticket",local_airport:"airplane flight flying transportation travel trip",local_atm:"bill card cart cash coin commerce credit currency dollars financial money online payment price profit shopping symbol",local_bar:"alcohol bottle club cocktail drink food liquor martini wine",local_cafe:"bottle coffee cup drink food mug restaurant tea",local_car_wash:"automobile cars maps transportation travel vehicle",local_convenience_store:"-- 24 bill building business card cash coin commerce company credit currency dollars maps market money new online payment plus shopping storefront symbol",local_dining:"cutlery eat food fork knife meal restaurant spoon",local_drink:"cup droplet glass liquid park water",local_fire_department:"911 firefighter flame hot",local_florist:"flower shop",local_gas_station:"auto car filling fuel gasoline oil station vehicle",local_grocery_store:"market shop",local_hospital:"911 aid cross doctor emergency first health medical medicine plus",local_hotel:"bed body human people person sleep stay travel trip",local_laundry_service:"cleaning clothing dryer hotel washer",local_library:"book community learning person read",local_mall:"bill building business buy card cart cash coin commerce credit currency dollars handbag money online payment shopping storefront",local_offer:"deal discount price shopping store tag",local_parking:"alphabet auto car character font garage letter symbol text type vehicle",local_pharmacy:"911 aid cross emergency first food hospital medicine places",local_phone:"booth call telecommunication",local_pizza:"drink fastfood meal",local_police:"911 badge law officer protection security shield",local_post_office:"delivery email envelop letter message package parcel postal send stamp",local_printshop:"draft fax ink machine office paper printer send",local_see:"camera lens photography picture",local_shipping:"automobile cars delivery letter mail maps office package parcel postal semi send shopping stamp transportation truck vehicle",local_taxi:"automobile cab call cars direction lyft maps public transportation uber vehicle yellow",location_city:"apartments architecture buildings business company estate home landscape place real residence residential shelter town urban",location_disabled:"destination direction enabled maps off pin place pointer slash stop tracking",location_off:"destination direction disabled enabled gps maps pin place room slash stop",location_on:"destination direction disabled enabled gps maps off pin place room slash stop",location_searching:"destination direction maps pin place pointer stop tracking",lock:"connection key locked logout padlock password privacy private protection safety secure security signout",lock_clock:"date locked password privacy private protection safety schedule secure security time",lock_open:"connection key login padlock password privacy private protection register safety secure security signin signup unlocked",lock_reset:"around inprogress loading locked password privacy private protection refresh renew rotate safety secure security turn",login:"access application arrow components design enter interface left screen ui ux website",logo_dev:"dev.to",logout:"application arrow components design exit interface leave login right screen ui ux website",looks:"circle half rainbow",looks_3:"digit numbers square symbol",looks_4:"digit numbers square symbol",looks_5:"digit numbers square symbol",looks_6:"digit numbers square symbol",looks_one:"1 digit numbers square symbol",looks_two:"2 digit numbers square symbol",loop:"around arrows direction inprogress loader loading music navigation refresh renew repeat rotate turn",loupe:"+ add details focus glass magnifying new plus symbol",low_priority:"arrange arrow backward bottom list move order task todo",loyalty:"badge card credit heart love membership miles points program sale subscription tag travel trip",lte_mobiledata:"alphabet character font internet letter network speed symbol text type wifi wireless",lte_plus_mobiledata:"+ alphabet character font internet letter network speed symbol text type wifi wireless",luggage:"airport baggage carry flight hotel on suitcase travel trip",lunch_dining:"breakfast dinner drink fastfood hamburger meal",lyrics:"audio bubble chat comment communicate feedback key message music note song sound speech track",mail:"email envelope inbox letter message send",mail_lock:"email envelop letter locked message password privacy private protection safety secure security send",mail_outline:"email envelope letter message note post receive send write",male:"boy gender man social symbol",man:"boy gender male social symbol",manage_accounts:"change details face gear options people person profile service-human settings user",manage_search:"glass history magnifying text",map:"destination direction location maps pin place route stop travel",maps_home_work:"building house office",maps_ugc:"+ add bubble comment communicate feedback message new plus speech symbol",margin:"design layout padding size square",mark_as_unread:"envelop letter mail postal receive send",mark_chat_read:"approve bubble check comment communicate complete done message ok select sent speech tick verified yes",mark_chat_unread:"bubble circle comment communicate message notification speech",mark_email_read:"approve check complete done envelop letter message note ok select send sent tick yes",mark_email_unread:"check circle envelop letter message note notification send",markunread:"email envelope letter message send",markunread_mailbox:"deliver envelop letter postal postbox receive send",masks:"air cover covid face hospital medical pollution protection respirator sick social",maximize:"application components design interface line screen shape ui ux website",media_bluetooth_off:"connection connectivity device disabled enabled music note offline paring signal slash symbol wireless",media_bluetooth_on:"connection connectivity device disabled enabled music note off online paring signal slash symbol wireless",mediation:"alternative arrows compromise direction dots negotiation party right structure",medical_services:"aid bag briefcase emergency first kit medicine",medication:"doctor drug emergency hospital medicine pharmacy pills prescription",meeting_room:"building doorway entrance home house interior logout office open places signout",memory:"card chip digital micro processor sd storage",menu:"application components hamburger interface lines playlist screen ui ux website",menu_book:"dining food meal page restaurant",menu_open:"application arrow chevron components hamburger interface left lines screen ui ux website",merge:"arrows directions maps navigation path route sign traffic",merge_type:"arrow combine direction format text",message:"bubble chat comment communicate feedback speech talk text",mic:"hearing microphone noise record search sound speech voice",mic_external_off:"audio disabled enabled microphone slash sound voice",mic_external_on:"audio disabled enabled microphone off slash sound voice",mic_none:"hearing microphone noise record sound voice",mic_off:"audio disabled enabled hearing microphone noise recording slash sound voice",microwave:"appliance cooking electric heat home house kitchen machine",military_tech:"army award badge honor medal merit order privilege prize rank reward ribbon soldier star status trophy winner",minimize:"application components design interface line screen shape ui ux website",missed_video_call:"arrow camera filming hardware image motion picture record videography",mms:"bubble chat comment communicate feedback image landscape message mountains multimedia photography picture speech",mobiledata_off:"arrow disabled down enabled internet network on slash speed up wifi wireless",mobile_friendly:"Android approve cell check complete device done hardware iOS mark ok phone select tablet tick validate verified yes",mobile_off:"Android cell device disabled enabled hardware iOS phone silence slash tablet",mobile_screen_share:"Android arrow cell device hardware iOS mirror monitor phone screencast streaming tablet tv wireless",mode:"compose create draft draw edit pencil write",mode_comment:"bubble chat comment communicate feedback message mode speech",mode_edit:"compose create draft draw pencil write",mode_edit_outline:"compose create draft draw pencil write",model_training:"arrow bulb idea inprogress light loading refresh renew restore reverse rotate",mode_night:"dark disturb moon sleep weather",mode_of_travel:"arrow destination direction location maps pin place stop transportation trip",mode_standby:"disturb power sleep target",monetization_on:"bill card cash circle coin commerce cost credit currency dollars finance money online payment price profit sale shopping symbol",money:"100 bill card cash coin commerce cost credit currency digit dollars finance number online payment price profit shopping symbol",money_off:"bill card cart cash coin commerce credit currency disabled dollars enabled finance money online payment price profit shopping slash symbol",money_off_csred:"bill card cart cash coin commerce credit currency disabled dollars enabled online payment shopping slash symbol",monitor:"Android chrome device display hardware iOS mac screen web window",monitor_weight:"body device diet health scale smart",monochrome_photos:"black camera image photography picture white",mood:"emoji emoticon emotions expressions face feelings glad happiness happy like person pleased smiley smiling social survey",mood_bad:"disappointment dislike emoji emoticon emotions expressions face feelings person rating smiley social survey unhappiness unhappy unpleased unsmile unsmiling",moped:"automobile bike cars direction maps motorized public scooter transportation vehicle vespa",more:"3 archive badge bookmark dots etc favorite indent label remember save stamp sticker tab tag three",more_horiz:"3 application components dots etc horizontal interface ios pending screen status three ui ux website",more_time:"+ add clock date new plus schedule symbol",more_vert:"3 android application components dots etc interface screen three ui ux vertical website",motion_photos_auto:"A alphabet animation automatic character circle font gif letter live symbol text type video",motion_photos_off:"animation circle disabled enabled slash video",mouse:"click computer cursor device hardware wireless",move_down:"arrow direction jump navigation transfer",move_to_inbox:"archive arrow down email envelop incoming letter message move send to",move_up:"arrow direction jump navigation transfer",movie:"cinema film media screen show slate tv video watch",movie_creation:"clapperboard film movies slate video",movie_filter:"clapperboard creation film movies slate stars video",moving:"arrow direction navigation travel up",mp:"alphabet character font image letter megapixel photography pixels quality resolution symbol text type",multiline_chart:"analytics bars data diagram infographic line measure metrics multiple statistics tracking",multiple_stop:"arrows directions dots left maps navigation right",museum:"architecture attraction building estate event exhibition explore local palces places real see shop store tour",music_note:"audiotrack key sound",music_off:"audiotrack disabled enabled key note on slash sound",music_video:"band mv recording screen tv watch",my_location:"destination direction maps navigation pin place point stop",nat:"communication",nature:"forest outdoor outside park tree wilderness",nature_people:"activity body forest human outdoor outside park person tree wilderness",navigate_before:"arrows direction left",navigate_next:"arrows direction right",navigation:"arrow destination direction location maps pin place point stop",nearby_error:"! alert attention caution danger exclamation important mark notification symbol warning",nearby_off:"disabled enabled on slash",near_me:"arrow destination direction location maps navigation pin place point stop",near_me_disabled:"destination direction enabled location maps navigation off pin place point slash",nest_cam_wired_stand:"camera filming hardware image motion picture videography",network_cell:"cellular data internet mobile phone speed wifi wireless",network_check:"connection internet meter signal speed tick wifi wireless",network_locked:"alert available cellular connection data error internet mobile not privacy private protection restricted safety secure security service signal warning wifi wireless",network_wifi:"cellular data internet mobile phone speed wireless",new_releases:"! alert announcement attention burst caution danger error exclamation important mark notification star symbol warning",newspaper:"article data document drive file folders magazine media notes page sheet slide text writing",next_plan:"arrow circle right",next_week:"arrow baggage briefcase business suitcase",nfc:"communication data field mobile near wireless",nightlife:"alcohol bar bottle club cocktail dance drink food glass liquor music note wine",nightlight:"dark disturb mode moon sleep weather",nightlight_round:"dark half mode moon",night_shelter:"architecture bed building estate homeless house place real sleep",nights_stay:"cloud crescent dark mode moon phases silence silent sky time weather",nine_k:"9000 9K alphabet character digit display font letter number pixels resolution symbol text type video",nine_k_plus:"+ 9000 9K alphabet character digit display font letter number pixels resolution symbol text type video",nine_mp:"camera digit font image letters megapixels number quality resolution symbol text type",nineteen_mp:"camera digits font image letters megapixels numbers quality resolution symbol text type",no_accounts:"avatar disabled enabled face human offline people person profile slash thumbnail unavailable unidentifiable unknown user",no_backpack:"accessory bookbag knapsack travel",no_cell:"Android device disabled enabled hardware iOS mobile off phone slash tablet",no_drinks:"alcohol beverage bottle cocktail food liquor wine",no_encryption:"disabled enabled lock off password safety security slash",no_encryption_gmailerrorred:"disabled enabled locked off slash",no_flash:"camera disabled enabled image lightning off on photography picture slash thunderbolt",no_food:"disabled drink enabled fastfood hamburger meal off on slash",no_luggage:"baggage carry disabled enabled off on slash suitcase travel",no_meals:"dining disabled eat enabled food fork knife off restaurant slash spoon utensils",no_meeting_room:"building disabled doorway enabled entrance home house interior office on open places slash",no_photography:"camera disabled enabled image off on picture slash",nordic_walking:"athlete athletic body entertainment exercise hiking hobby human people person social sports travel walker",north:"arrow directional maps navigation up",north_east:"arrow maps navigation noth right up",north_west:"arrow directional left maps navigation up",no_sim:"camera card device eject insert memory phone storage",no_stroller:"baby care carriage children disabled enabled infant kid newborn off on parents slash toddler young",not_accessible:"accessibility body handicap help human person wheelchair",note:"bookmark message paper",note_add:"+ -doc create data document drive file folders new page paper plus sheet slide symbol writing",note_alt:"clipboard document file memo page paper writing",notes:"comment document text write writing",notification_add:"+ active alarm alert bell chime notifications notify plus reminder ring sound symbol",notification_important:"! active alarm alert announcement attention bell caution chime danger error exclamation feedback mark notifications notify problem reminder ring sound symbol warning",notifications:"active alarm alert bell chime notify reminder ring sound",notifications_active:"alarm alert bell chime notify reminder ringing sound",notifications_none:"alarm alert bell notify reminder ring sound",notifications_off:"active alarm alert bell chime disabled enabled notify offline reminder ring slash sound",notifications_paused:"--- active alarm aleet alert bell chime ignore notify pause quiet reminder ring sleep snooze sound zzz",not_interested:"allowed banned cancel circle close disabled dislike exit interested not off prohibited quit remove stop",not_listed_location:"? assistance destination direction help information maps pin place punctuation questionmark stop support symbol",no_transfer:"automobile bus cars direction disabled enabled maps off public slash transportation vehicle",not_started:"circle media pause play video",offline_bolt:"circle electric fast flash lightning spark thunderbolt",offline_pin:"approve checkmark circle complete done ok select tick validate verified yes",offline_share:"Android arrow cell connect device direction hardware iOS link mobile multiple phone right tablet",oil_barrel:"droplet gasoline nest water",ondemand_video:"Android chrome desktop device hardware iOS mac monitor play television tv web window",on_device_training:"arrow bulb call cell contact hardware idea inprogress light loading mobile model refresh renew restore reverse rotate telephone",one_k:"1000 1K alphabet character digit display font letter number pixels resolution symbol text type video",one_kk:"10000 10K alphabet character digit display font letter number pixels resolution symbol text type video",one_k_plus:"+ 1000 1K alphabet character digit display font letter number pixels resolution symbol text type video",online_prediction:"bulb connection idea light network signal wireless",opacity:"color droplet hue inverted liquid palette tone water",open_in_browser:"arrow box new up website window",open_in_full:"action arrows expand grow move",open_in_new:"application arrow box components interface screen ui ux website window",open_in_new_off:"arrow box disabled enabled export on slash window",open_with:"arrows directional expand move",other_houses:"architecture cottage estate home maps place real residence residential stay traveling",outbound:"arrow circle directional right up",outbox:"mail send sent",outdoor_grill:"barbecue barbeque bbq charcoal cooking home house outside",outlet:"connecter electricity plug power",outlined_flag:"country goal mark nation report start",padding:"design layout margin size square",pages:"article gplus paper post star",pageview:"document find glass magnifying paper search",paid:"circle currency money payment transaction",palette:"art colors filters paint",panorama:"angle image mountains photography picture view wide",panorama_fish_eye:"angle circle image photography picture wide",panorama_horizontal:"angle image photography picture wide",panorama_horizontal_select:"angle image photography picture wide",panorama_photosphere:"angle horizontal image photography picture wide",panorama_photosphere_select:"angle horizontal image photography picture wide",panorama_vertical:"angle image photography picture wide",panorama_vertical_select:"angle image photography picture wide",panorama_wide_angle:"image photography picture",panorama_wide_angle_select:"image photography picture",pan_tool:"drag fingers gesture hands human move scan stop touch wait",paragliding:"athlete athletic body entertainment exercise fly hobby human parachute people person skydiving social sports travel",park:"attraction fresh local nature outside plant tree",party_mode:"camera lens photography picture",password:"key login pin security star unlock",pattern:"key login password pin security star unlock",pause:"controls media music pending player status video wait",pause_circle:"controls media music video",pause_circle_filled:"controls media music pending status video wait",pause_circle_outline:"controls media music pending status video wait",pause_presentation:"application desktop device pending screen share slides status wait website window www",payment:"bill cash charge coin commerce cost creditcard currency dollars finance financial information money online price shopping symbol",payments:"bill card cash coin commerce cost credit currency dollars finance layer money multiple online price shopping symbol",pedal_bike:"automobile bicycle cars direction human maps public route scooter transportation vehicle vespa",pending:"circle dots loading progress waiting",pending_actions:"clipboard clock date document remember schedule time",pentagon:"five shape sides",people:"accounts committee community face family friends group humans network persons profiles social team users",people_alt:"accounts committee face family friends group humans network persons profiles social team users",people_outline:"accounts committee face family friends group humans network persons profiles social team users",percent:"math number symbol",perm_camera_mic:"image microphone min photography picture speaker",perm_contact_calendar:"account agenda date face human information people person profile schedule time user",perm_data_setting:"cellular configure gear information network settings wifi wireless",perm_device_information:"Android alert announcement cell hardware iOS important mobile phone tablet",perm_identity:"account avatar face human information people person profile save, thumbnail user",perm_media:"collection data directories document file folders images landscape mountains photography picture save storage",perm_phone_msg:"bubble call cell chat comment communicate contact device message mobile recording save speech telephone voice",perm_scan_wifi:"alert announcement connection information internet network service signal wireless",person:"account avatar face human people profile user",person_add:"+ account avatar face friend human new people plus profile symbol user",person_add_alt:"+ account face human people plus profile user",person_add_disabled:"+ account enabled face human new offline people plus profile slash symbol user",personal_video:"Android cam chrome desktop device hardware iOS mac monitor television tv web window",person_off:"account avatar disabled enabled face human people profile slash user",person_outline:"account avatar face human people profile user",person_pin:"account avatar destination direction face gps human location maps people place profile stop user",person_pin_circle:"account destination direction face gps human location maps people place profile stop user",person_remove:"account avatar delete face human minus people profile unfriend user",person_search:"account avatar face find glass human look magnifying people profile user",pest_control:"bug exterminator insects",pest_control_rodent:"exterminator mice",pets:"animal cat claw dog hand paw",phishing:"fishing fraud hook scam",phone:"call cell chat contact device hardware mobile telephone text",phone_android:"cell device hardware iOS mobile tablet",phone_bluetooth_speaker:"call cell connection connectivity contact device hardware mobile signal symbol telephone wireless",phone_callback:"arrow cell contact device down hardware mobile telephone",phone_disabled:"call cell contact device enabled hardware mobile offline slash telephone",phone_enabled:"call cell contact device hardware mobile telephone",phone_forwarded:"arrow call cell contact device direction hardware mobile right telephone",phone_iphone:"Android apple cell device hardware iOS mobile tablet",phonelink:"Android chrome computer connect desktop device hardware iOS mac mobile sync tablet web windows",phonelink_erase:"Android cancel cell close connection device exit hardware iOS mobile no remove stop tablet",phonelink_lock:"Android cell connection device erase hardware iOS locked mobile password privacy private protection safety secure security tablet",phonelink_off:"Android chrome computer connect desktop device disabled enabled hardware iOS mac mobile slash sync tablet web windows",phonelink_ring:"Android cell connection data device hardware iOS mobile network service signal tablet wireless",phonelink_setup:"Android call chat device hardware iOS information mobile settings tablet text",phone_locked:"call cell contact device hardware mobile password privacy private protection safety secure security telephone",phone_missed:"arrow call cell contact device hardware mobile telephone",phone_paused:"call cell contact device hardware mobile telephone wait",photo:"image mountains photography picture",photo_album:"archive bookmark image label library mountains photography picture ribbon save tag",photo_camera:"image photography picture",photo_camera_back:"image landscape mountains photography picture rear",photo_camera_front:"account face human image people person photography picture portrait profile user",photo_filter:"filters image photography picture stars",photo_library:"album image mountains photography picture",photo_size_select_actual:"image mountains photography picture",photo_size_select_large:"adjust album editing image library mountains photography picture",photo_size_select_small:"adjust album editing image large library mountains photography picture",php:"alphabet brackets character code css developer engineering font html letter platform symbol text type",piano:"instrument keyboard keys musical social",piano_off:"disabled enabled instrument keyboard keys musical on slash social",picture_as_pdf:"alphabet character document file font image letter multiple photography symbol text type",picture_in_picture:"cropped overlap photo position shape",picture_in_picture_alt:"cropped overlap photo position shape",pie_chart:"analytics bars data diagram infographic measure metrics statistics tracking",pie_chart_outline:"analytics bars data diagram infographic measure metrics statistics tracking",pie_chart_outlined:"graph",pin:"1 2 3 digit key login logout number password pattern security star symbol unlock",pinch:"arrows compress direction finger grasp hand navigation nip squeeze tweak",pin_drop:"destination direction gps location maps navigation place stop",pinterest:"brand logo social",pivot_table_chart:"analytics arrows bars data diagram direction drive editing grid infographic measure metrics rotate sheet statistics tracking",pix:"bill brazil card cash commerce credit currency finance money payment",place:"destination direction location maps navigation pin point stop",plagiarism:"document find glass look magnifying page paper search see",play_arrow:"controls media music player start video",play_circle:"arrow controls media music video",play_circle_filled:"arrow controls media music start video",play_circle_filled_white:"start",play_circle_outline:"arrow controls media music start video",play_disabled:"controls enabled media music off slash video",play_for_work:"arrow circle down google half",play_lesson:"audio bookmark digital ebook lesson multimedia play reading ribbon",playlist_add:"+ collection music new plus symbol task todo",playlist_add_check:"approve checkmark collection complete done music ok select task tick todo validate verified yes",playlist_add_check_circle:"album artist audio cd collection mark music record sound track",playlist_add_circle:"album artist audio cd check collection mark music record sound track",playlist_play:"arow arrow collection music",playlist_remove:"- collection minus music",plumbing:"build construction fix handyman repair tools wrench",plus_one:"1 add digit increase number symbol",podcasts:"broadcast casting network signal transmitting wireless",point_of_sale:"checkout cost machine merchant money payment pos retail system transaction",policy:"certified find glass legal look magnifying privacy private protection search security see shield verified",poll:"analytics barchart bars data diagram infographic measure metrics statistics survey tracking vote",pool:"athlete athletic beach body entertainment exercise hobby human ocean people person places sea sports swimming water",portable_wifi_off:"connected connection data device disabled enabled internet network offline service signal slash usage wireless",portrait:"account face human people person photo picture profile user",post_add:"+ data document drive file folders item page paper plus sheet slide text writing",power:"charge cord electrical online outlet plug socket",power_input:"dc lines supply",power_off:"charge cord disabled electrical enabled on outlet plug slash",power_settings_new:"information off save shutdown",precision_manufacturing:"arm automatic chain conveyor crane factory industry machinery mechanical production repairing robot supply warehouse",pregnant_woman:"baby birth body female human lady maternity mom mother people person user women",present_to_all:"arrow presentation screen share slides website",preview:"design eye layout reveal screen see show website window www",price_change:"arrows bill card cash coin commerce cost credit currency dollars down finance money online payment shopping symbol up",price_check:"approve bill card cash coin commerce complete cost credit currency dollars done finance mark money ok online payment select shopping symbol tick validate verified yes",print:"draft fax ink machine office paper printer send",print_disabled:"enabled off on paper printer slash",priority_high:"! alert attention caution danger error exclamation important mark notification symbol warning",privacy_tip:"alert announcement announcment assistance certified details help information private protection security service shield support verified",production_quantity_limits:"! alert attention bill card cart cash caution coin commerce credit currency danger dollars error exclamation important mark money notification online payment shopping symbol warning",propane:"gas nest",propane_tank:"bbq gas grill nest",psychology:"behavior body brain cognitive function gear head human intellectual mental mind people person preferences psychiatric science settings social therapy thinking thoughts",public:"country earth global globe language map network planet social space web world",public_off:"disabled earth enabled global globe map network on planet slash social space web world",publish:"arrow cloud file import submit upload",published_with_changes:"approve arrows check complete done inprogress loading mark ok refresh renew replace rotate select tick validate verified yes",push_pin:"location marker place remember save",qr_code:"barcode camera media product quick response smartphone urls",qr_code_2:"barcode camera media product quick response smartphone urls",qr_code_scanner:"barcode camera media product quick response smartphone urls",query_builder:"clock date hour minute save schedule time",query_stats:"analytics chart data diagram find glass infographic line look magnifying measure metrics search see statistics tracking",question_answer:"bubble chat comment communicate conversation converse feedback message speech talk",question_mark:"? assistance help information mark punctuation question support symbol",queue:"add collection layers multiple music playlist stack stream video",queue_music:"add collection playlist stream",queue_play_next:"+ add arrow collection desktop device display hardware monitor music new playlist plus screen steam symbol tv video",quickreply:"bubble chat comment communicate fast lightning message speech thunderbolt",quiz:"? assistance faq help information mark punctuation question support symbol test",radar:"detect military near network position scan",radio:"antenna audio device frequency hardware listen media music player signal tune",radio_button_checked:"application bullet circle components design form interface off point record screen selected toggle ui ux website",radio_button_unchecked:"bullet circle deselected form off point record toggle",railway_alert:"! attention automobile bike cars caution danger direction error exclamation important maps mark notification public scooter subway symbol train transportation vehicle vespa warning",ramen_dining:"breakfast dinner drink fastfood lunch meal noodles restaurant",ramp_left:"arrows directions maps navigation path route sign traffic",ramp_right:"arrows directions maps navigation path route sign traffic",rate_review:"chat comment feedback message pencil stars write",raw_off:"alphabet character disabled enabled font image letter original photography slash symbol text type",raw_on:"alphabet character disabled enabled font image letter off original photography slash symbol text type",read_more:"arrow text",receipt:"bill credit invoice paper payment sale transaction",receipt_long:"bill check document list paperwork record store transaction",recent_actors:"account avatar cards carousel contacts face human layers list people person profile thumbnail user",recommend:"approved circle confirm favorite gesture hand like reaction social support thumbs well",record_voice_over:"account face human people person profile recording sound speaking speech transcript user",rectangle:"four parallelograms polygons quadrilaterals recangle shape sides",reddit:"brand logo social",redeem:"bill cart cash certificate coin commerce credit currency dollars giftcard money online payment present shopping",redo:"arrow backward forward next repeat rotate undo",reduce_capacity:"arrow body covid decrease down human people person social",refresh:"around arrows direction inprogress loading navigation refresh renew right rotate turn",remember_me:"Android avatar device hardware human iOS identity mobile people person phone profile tablet user",remove:"can delete line minus negative substract subtract trash",remove_circle:"allowed banned block can delete disable minus negative not substract trash",remove_circle_outline:"allowed banned block can delete disable minus negative not substract trash",remove_done:"approve check complete disabled enabled finished mark multiple off ok select slash tick yes",remove_from_queue:"collection desktop device display hardware list monitor screen steam television",remove_moderator:"certified disabled enabled off privacy private protection security shield slash verified",remove_red_eye:"iris looking preview see sight vision",remove_road:"- cancel close destination direction exit highway maps minus new no stop street symbol traffic",remove_shopping_cart:"card cash checkout coin commerce credit currency disabled dollars enabled off online payment slash tick",reorder:"format lines list stacked",repeat:"arrows controls media music video",repeat_on:"arrows controls media music video",repeat_one:"1 arrows controls digit media music number symbol video",repeat_one_on:"arrows controls digit media music number symbol video",replay:"arrows controls music refresh reload renew repeat retry rewind undo video",replay_10:"arrows controls digit music number refresh renew repeat rewind symbol ten video",replay_30:"arrows controls digit music number refresh renew repeat rewind symbol thirty video",replay_5:"arrows controls digit five music number refresh renew repeat rewind symbol video",replay_circle_filled:"arrows controls music refresh renew repeat video",reply:"arrow backward left mail message send share",reply_all:"arrows backward group left mail message multiple send share",report:"! alert attention caution danger error exclamation important mark notification octagon symbol warning",report_gmailerrorred:"! alert attention caution danger exclamation important mark notification octagon symbol warning",report_off:"! alert attention caution danger disabled enabled error exclamation important mark notification octagon offline slash symbol warning",report_problem:"! alert announcement attention caution danger error exclamation feedback important mark notification symbol triangle warning",request_quote:"bill card cash coin commerce cost credit currency dollars finance money online payment price shopping symbol",reset_tv:"arrow device hardware monitor television",restart_alt:"around arrow inprogress loading reboot refresh renew repeat reset",restaurant:"breakfast cutlery dining dinner eat food fork knife local lunch meal places spoon utensils",restaurant_menu:"book dining eat food fork knife local meal spoon",restore:"arrow backwards clock date history refresh renew reverse rotate schedule time turn undo",restore_from_trash:"arrow backwards can clock date delete garbage history refresh remove renew reverse rotate schedule time turn up",restore_page:"arrow data doc file history paper refresh rotate sheet storage undo web",reviews:"bubble chat comment communicate feedback message rate rating recommendation speech",rice_bowl:"dinner food lunch meal restaurant",ring_volume:"calling cell contact device hardware incoming mobile ringer sound telephone",r_mobiledata:"alphabet character font letter symbol text type",rocket:"spaceship",rocket_launch:"spaceship takeoff",roller_shades:"blinds cover curtains nest open shutter sunshade",roller_shades_closed:"blinds cover curtains nest shutter sunshade",roofing:"architecture building chimney construction estate home house real residence residential service shelter",room:"destination direction gps location maps marker pin place spot stop",room_preferences:"building doorway entrance gear home house interior office open settings",room_service:"alert bell concierge delivery hotel notify",rotate_90_degrees_ccw:"arrows direction editing image photo turn",rotate_90_degrees_cw:"arrows ccw direction editing image photo turn",rotate_left:"around arrow circle direction inprogress loading refresh reload renew reset turn",rotate_right:"around arrow circle direction inprogress loading refresh renew turn",roundabout_left:"arrows directions maps navigation path route sign traffic",roundabout_right:"arrows directions maps navigation path route sign traffic",rounded_corner:"adjust edit shape square transform",route:"directions maps path sign traffic",router:"box cable connection device hardware internet network signal wifi",rowing:"activity boat body canoe human people person sports water",rss_feed:"application blog connection data internet network service signal website wifi wireless",rsvp:"alphabet character font invitation invite letter plaît respond répondez sil symbol text type vous",rtt:"call real rrt text time",rule:"approve check done incomplete line mark missing no ok select tick validate verified wrong x yes",rule_folder:"approve cancel check close complete data document done drive exit file mark no ok remove select sheet slide storage tick validate verified yes",run_circle:"body exercise human people person running",running_with_errors:"! alert attention caution danger duration exclamation important mark notification processing symbol time warning",rv_hookup:"arrow attach automobile automotive back cars connect direction left maps public right trailer transportation travel truck van vehicle",safety_divider:"apart distance separate social space",sailing:"entertainment fishing hobby ocean sailboat sea social sports travel water",sanitizer:"bacteria bottle clean covid disinfect germs pump",satellite:"bluetooth connection connectivity data device image internet landscape location maps mountains network photography picture scan service signal symbol wifi wireless--",satellite_alt:"alternative artificial communication space station television",save:"data diskette document drive file floppy multimedia storage write",save_alt:"arrow diskette document down file floppy multimedia write",save_as:"compose create data disk document draft drive editing file floppy input multimedia pencil storage write writing",saved_search:"find glass important look magnifying marked see star",savings:"bank bill card cash coin commerce cost credit currency dollars finance money online payment piggy symbol",scale:"measure monitor weight",scanner:"copy device hardware machine",scatter_plot:"analytics bars chart circles data diagram dot infographic measure metrics statistics tracking",schedule:"calendar clock date mark save time",schedule_send:"calendar clock date email letter remember share time",schema:"analytics chart data diagram flow infographic measure metrics statistics tracking",school:"academy achievement cap class college education graduation hat knowledge learning university",science:"beaker chemical chemistry experiment flask glass laboratory research tube",score:"2k alphabet analytics bars character chart data diagram digit font infographic letter measure metrics number statistics symbol text tracking type",screen_lock_landscape:"Android device hardware iOS mobile phone rotate security tablet",screen_lock_portrait:"Android device hardware iOS mobile phone rotate security tablet",screen_lock_rotation:"Android arrow device hardware iOS mobile phone rotate tablet turn",screen_rotation:"Android arrow device hardware iOS mobile phone rotate tablet turn",screen_search_desktop:"Android arrow device hardware iOS lock monitor rotate web",screen_share:"Android arrow cast chrome device display hardware iOS laptop mac mirror monitor steam streaming web window",screenshot:"Android cell crop device hardware iOS mobile phone tablet",screenshot_monitor:"Android chrome desktop device display hardware iOS mac screengrab web window",sd:"alphabet camera card character data device digital drive flash font image letter memory photo secure symbol text type",sd_card:"camera digital memory photos secure storage",sd_card_alert:"! attention camera caution danger digital error exclamation important mark memory notification photos secure storage symbol warning",sd_storage:"camera card data digital memory microsd secure",search:"filter find glass look magnifying see up",search_off:"cancel close disabled enabled find glass look magnifying on see slash stop x",security:"certified privacy private protection shield verified",security_update:"Android arrow device download hardware iOS mobile phone tablet",security_update_good:"Android checkmark device hardware iOS mobile ok phone tablet tick",security_update_warning:"! Android alert attention caution danger device download error exclamation hardware iOS important mark mobile notification phone symbol tablet",segment:"alignment fonts format lines list paragraph part piece rules style text",select_all:"selection square tool",self_improvement:"body calm care chi human meditate meditation people person relax sitting wellbeing yoga zen",sell:"bill card cart cash coin commerce credit currency dollars money online payment price shopping tag",send:"chat email message paper plane reply right share telegram",send_and_archive:"arrow download email letter save share",send_time_extension:"deliver dispatch envelop mail message schedule",send_to_mobile:"Android arrow device export forward hardware iOS phone right share tablet",sensors:"connection network scan signal wireless",sensors_off:"connection disabled enabled network scan signal slash wireless",sentiment_dissatisfied:"angry disappointed dislike emoji emoticon emotions expressions face feelings frown mood person sad smiley survey unhappy unsatisfied upset",sentiment_neutral:"emotionless emotions expressions face feelings indifference mood okay person survey",sentiment_satisfied:"emoji emoticon emotions expressions face feelings glad happiness happy like mood person pleased smiley smiling survey",sentiment_satisfied_alt:"account emoji face happy human people person profile smile user",sentiment_very_dissatisfied:"angry disappointed dislike emoji emoticon emotions expressions face feelings mood person sad smiley sorrow survey unhappy unsatisfied upset",sentiment_very_satisfied:"emoji emoticon emotions expressions face feelings glad happiness happy like mood person pleased smiley smiling survey",set_meal:"chopsticks dinner fish food lunch restaurant teishoku",settings:"application change details gear information options personal service",settings_accessibility:"body details human information people personal preferences profile user",settings_applications:"change details gear information options personal save service",settings_backup_restore:"arrow backwards history refresh reverse rotate time undo",settings_bluetooth:"connection connectivity device network signal symbol wifi",settings_brightness:"dark filter light mode sun",settings_cell:"Android cellphone device hardware iOS mobile tablet",settings_ethernet:"arrows brackets computer connection connectivity dots internet network parenthesis wifi",settings_input_antenna:"airplay arrows computer connection connectivity dots internet network screencast stream wifi wireless",settings_input_component:"audio av cables connection connectivity internet plugs points video wifi",settings_input_composite:"cable component connection connectivity plugs points",settings_input_hdmi:"cable connection connectivity definition high plugin points video wire",settings_input_svideo:"cable connection connectivity definition plugin plugs points standard svideo,",settings_overscan:"arrows expand image photo picture",settings_phone:"call cell contact device hardware mobile telephone",settings_power:"information off save shutdown",settings_remote:"bluetooth connection connectivity control device signal wifi wireless",settings_suggest:"change details gear options recommendation service suggestion system",settings_system_daydream:"backup cloud drive storage",settings_voice:"microphone recorder speaker",seven_k:"7000 7K alphabet character digit display font letter number pixels resolution symbol text type video",seven_k_plus:"+ 7000 7K alphabet character digit display font letter number pixels resolution symbol text type video",seven_mp:"camera digit font image letters megapixels number quality resolution symbol text type",seventeen_mp:"camera digits font image letters megapixels numbers quality resolution symbol text type",share:"android connect contect link multimedia multiple network options send shared sharing social",share_location:"destination direction gps maps pin place stop tracking",shield:"certified privacy private protection secure security verified",shop:"arrow bag bill briefcase buy card cart cash coin commerce credit currency dollars google money online payment play purchase shopping store",shop_2:"add arrow buy cart google play purchase shopping",shopping_bag:"bill business buy card cart cash coin commerce credit currency dollars money online payment storefront",shopping_basket:"add bill buy card cart cash checkout coin commerce credit currency dollars money online payment purchase",shopping_cart:"add bill buy card cash checkout coin commerce credit currency dollars money online payment purchase",shopping_cart_checkout:"arrow cash coin commerce currency dollars money online payment right",shop_two:"add arrow briefcase buy cart google play purchase shopping",shortcut:"arrow direction forward right",short_text:"brief comment document lines note write writing",show_chart:"analytics bars chart data diagram infographic line measure metrics presentation show statistics stock tracking",shower:"bathroom closet home house place plumbing sprinkler wash water wc",shuffle:"arrows controls music random video",shuffle_on:"arrows controls music random video",shutter_speed:"aperture camera duration image lens photography photos picture setting stop timer watch",sick:"covid discomfort emotions expressions face feelings fever flu ill mood pain person survey upset",signal_cellular_0_bar:"data internet mobile network phone speed wifi wireless",signal_cellular_4_bar:"data internet mobile network phone speed wifi wireless",signal_cellular_alt:"analytics bar chart data diagram infographic internet measure metrics mobile network phone statistics tracking wifi wireless",signal_cellular_connected_no_internet_0_bar:"! alert attention caution danger data error exclamation important mark mobile network notification phone symbol warning wifi wireless",signal_cellular_connected_no_internet_1_bar:"network",signal_cellular_connected_no_internet_2_bar:"network",signal_cellular_connected_no_internet_3_bar:"network",signal_cellular_connected_no_internet_4_bar:"! alert attention caution danger data error exclamation important mark mobile network notification phone symbol warning wifi wireless",signal_cellular_nodata:"internet mobile network offline phone quit wifi wireless x",signal_cellular_no_sim:"camera card chip device disabled enabled memory network offline phone slash storage",signal_cellular_null:"data internet mobile network phone wifi wireless",signal_cellular_off:"data disabled enabled internet mobile network offline phone slash wifi wireless",signal_wifi_bad:"bar cancel cellular close data exit internet mobile network no phone quit remove stop wireless",signal_wifi_connected_no_internet4:"cellular data mobile network offline phone wireless x",signal_wifi_off:"cellular data disabled enabled internet mobile network phone slash speed wireless",signal_wifi_statusbar4_bar:"cellular data internet mobile network phone speed wireless",signal_wifi_statusbar_connected_no_internet4:"! alert attention caution cellular danger data error exclamation important mark mobile network notification phone speed symbol warning wireless",signal_wifi_statusbar_null:"cellular data internet mobile network phone speed wireless",signpost:"arrow direction left maps right signal signs street traffic",sim_card:"camera chip device memory network phone storage",sim_card_alert:"! attention camera caution danger digital error exclamation important mark memory notification photos sd secure storage symbol warning",sim_card_download:"arrow camera chip device memory phone storage",single_bed:"bedroom double furniture home hotel house king night pillows queen rest sleep twin",sip:"alphabet call character dialer font initiation internet letter over phone protocol routing session symbol text type voice",six_k:"6000 6K alphabet character digit display font letter number pixels resolution symbol text type video",six_k_plus:"+ 6000 6K alphabet character digit display font letter number pixels resolution symbol text type video",six_mp:"camera digit font image letters megapixels number quality resolution symbol text type",sixteen_mp:"camera digits font image letters megapixels numbers quality resolution symbol text type",sixty_fps:"camera digit frames number symbol video",sixty_fps_select:"camera digits frame frequency numbers per rate seconds video",skateboarding:"athlete athletic body entertainment exercise hobby human people person skateboarder social sports",skip_next:"arrow back controls forward music play previous transport video",skip_previous:"arrow backward controls forward music next play transport video",sledding:"athlete athletic body entertainment exercise hobby human people person sledge snow social sports travel winter",slideshow:"movie photos play presentation square video view",slow_motion_video:"arrow circle controls music play speed time",smart_button:"action auto components composer function interface special stars ui ux website",smart_display:"airplay chrome connect device screencast stream television tv video wireless",smartphone:"Android call cell chat device hardware iOS mobile tablet text",smart_screen:"Android airplay cell connect device hardware iOS mobile phone screencast stream tablet video",smart_toy:"games robot",smoke_free:"cigarette disabled enabled never no off places prohibited slash smoking tobacco warning zone",smoking_rooms:"allowed cigarette places smoke tobacco zone",sms:"3 bubble chat comment communication conversation dots message more service speech three",sms_failed:"! alert attention bubbles caution chat comment communication conversation danger error exclamation important mark message notification service speech symbol warning",snippet_folder:"data document drive file sheet slide storage",snooze:"alarm bell clock duration notification set timer watch",snowboarding:"athlete athletic body entertainment exercise hobby human people person social sports travel winter",snowmobile:"automobile car direction skimobile social sports transportation travel vehicle winter",snowshoeing:"body human people person sports travel walking winter",soap:"bathroom clean fingers gesture hand wash wc",social_distance:"6 apart body ft human people person space",solar_power:"eco energy heat nest sunny",sort:"filter find lines list organize",sort_by_alpha:"alphabetize az by character font letters list order organize symbol text type",soup_kitchen:"breakfast brunch dining food lunch meal",source:"code composer content creation data document file folder mode storage view",south:"arrow directional down maps navigation",south_america:"america continent landscape place region south",south_east:"arrow directional down maps navigation right",south_west:"arrow directional down left maps navigation",spa:"aromatherapy flower healthcare leaf massage meditation nature petals places relax wellbeing wellness",space_bar:"keyboard line",speaker:"audio box electronic loud music sound stereo system video",speaker_group:"audio box electronic loud multiple music sound stereo system video",speaker_notes:"bubble cards chat comment communicate format list message speech text",speaker_notes_off:"bubble cards chat comment communicate disabled enabled format list message on slash speech text",speaker_phone:"Android cell device hardware iOS mobile sound tablet volume",speed:"arrow clock controls dial fast gauge measure motion music slow speedometer test velocity video",spellcheck:"alphabet approve character checkmark edit font letter ok processor select symbol text tick type word write yes",splitscreen:"grid layout multitasking two",spoke:"connection network radius",sports:"athlete athletic basketball blowing coach entertainment exercise game hobby instrument live referee soccer social sound trophy warning whistle",sports_bar:"alcohol beer drink liquor pint places pub",sports_baseball:"athlete athletic entertainment exercise game hobby social",sports_basketball:"athlete athletic entertainment exercise game hobby social",sports_cricket:"athlete athletic ball bat entertainment exercise game hobby social",sports_esports:"controller entertainment gamepad gaming hobby online playstation social video xbox",sports_football:"american athlete athletic entertainment exercise game hobby social",sports_golf:"athlete athletic ball club entertainment exercise game golfer golfing hobby social",sports_handball:"athlete athletic body entertainment exercise game hobby human people person social",sports_hockey:"athlete athletic entertainment exercise game hobby ice social sticks",sports_kabaddi:"athlete athletic body combat entertainment exercise fighting game hobby human judo martial people person social wrestle wrestling",sports_martial_arts:"athlete athletic entertainment exercise hobby human karate people person social",sports_mma:"arts athlete athletic boxing combat entertainment exercise fighting game glove hobby martial mixed social",sports_motorsports:"athlete athletic automobile bike drive driving entertainment helmet hobby motorcycle protect social vehicle",sports_rugby:"athlete athletic ball entertainment exercise game hobby social",sports_score:"destination flag goal",sports_soccer:"athlete athletic entertainment exercise football game hobby social",sports_tennis:"athlete athletic ball bat entertainment exercise game hobby racket social",sports_volleyball:"athlete athletic entertainment exercise game hobby social",square:"draw four quadrangle shape sides",square_foot:"construction feet inches length measurement ruler school set tools",ssid_chart:"graph lines network wifi",stacked_bar_chart:"analytics chart-chart data diagram infographic measure metrics statistics tracking",stacked_line_chart:"analytics data diagram infographic measure metrics statistics tracking",stadium:"activity amphitheater arena coliseum event local star things ticket",stairs:"down staircase up",star:"best bookmark favorite highlight ranking rate rating save toggle",star_border:"best bookmark favorite highlight outline ranking rate rating save toggle",star_border_purple_500:"best bookmark favorite highlight outline ranking rate rating save toggle",star_half:"0.5 1/2 achievement bookmark favorite highlight important marked ranking rate rating reward saved shape special toggle",star_outline:"bookmark favorite half highlight ranking rate rating save toggle",star_purple_500:"best bookmark favorite highlight ranking rate rating save toggle",star_rate:"achievement bookmark favorite highlight important marked ranking rating reward saved shape special",stars:"achievement bookmark circle favorite highlight important like love marked ranking rate rating reward saved shape special",start:"arrow keyboard next right",stay_current_landscape:"Android device hardware iOS mobile phone tablet",stay_current_portrait:"Android device hardware iOS mobile phone tablet",stay_primary_landscape:"Android current device hardware iOS mobile phone tablet",stay_primary_portrait:"Android current device hardware iOS mobile phone tablet",sticky_note_2:"bookmark message paper text writing",stop:"arrow controls music pause player square video",stop_circle:"controls music pause play square video",stop_screen_share:"Android arrow cast chrome device disabled display enabled hardware iOS laptop mac mirror monitor offline slash steam streaming web window",storage:"computer database drive memory network server",store:"bill building business buy card cash coin company credit currency dollars e-commerce market money online payment purchase shopping storefront",storefront:"business buy cafe commerce market merchant places restaurant retail sell shopping stall",store_mall_directory:"building",storm:"forecast hurricane temperature twister weather wind",straight:"arrows directions maps navigation path route sign traffic up",straighten:"length measurement piano ruler size",stream:"cast connected feed live network signal wireless",streetview:"gps location maps",strikethrough_s:"alphabet character cross doc editing editor font letter out spreadsheet styles symbol text type writing",stroller:"baby care carriage children infant kid newborn toddler young",style:"booklet cards filters options tags",subdirectory_arrow_left:"arrow down navigation",subdirectory_arrow_right:"arrow down navigation",subject:"alignment document email full justify lines list note text writing",subscript:"2 doc editing editor gmail novitas spreadsheet style symbol text writing",subscriptions:"enroll media order playlist queue signup subscribe youtube",subtitles:"accessibility accessible captions character closed decoder language media movies translate tv",subtitles_off:"accessibility accessible caption closed disabled enabled language slash translate video",subway:"automobile bike cars maps metro rail scooter train transportation travel tunnel underground vehicle vespa",summarize:"document list menu note report summary",superscript:"2 doc editing editor gmail novitas spreadsheet style symbol text writing",supervised_user_circle:"account avatar control face human parental parents people person profile supervisor",supervisor_account:"administrator avatar control face human parental parents people person profile supervised user",support:"assist help lifebuoy rescue safety",support_agent:"care customer face headphone person representative service",surfing:"athlete athletic beach body entertainment exercise hobby human people person sea social sports summer water",surround_sound:"audio circle signal speaker system volume volumn wireless",swap_calls:"arrows device direction mobile share",swap_horiz:"arrows back direction forward horizontal",swap_horizontal_circle:"arrows back direction forward",swap_vert:"arrows back direction down navigation up vertical",swap_vertical_circle:"arrows back direction down horizontal up",swipe:"arrows fingers gesture hands touch",swipe_down:"arrows direction disable enable finger hands hit navigation strike swing swpie take",swipe_down_alt:"arrows direction disable enable finger hands hit navigation strike swing swpie take",swipe_left:"arrows finger hand hit navigation reject strike swing take",swipe_left_alt:"arrows finger hand hit navigation reject strike swing take",swipe_right:"accept arrows direction finger hands hit navigation strike swing swpie take",swipe_right_alt:"accept arrows direction finger hands hit navigation strike swing swpie take",swipe_up:"arrows direction disable enable finger hands hit navigation strike swing swpie take",swipe_up_alt:"arrows direction disable enable finger hands hit navigation strike swing swpie take",swipe_vertical:"arrows direction finger hands hit navigation strike swing swpie take verticle",switch_access_shortcut:"arrows direction navigation new north star symbol up",switch_access_shortcut_add:"+ arrows direction navigation new north plus star symbol up",switch_account:"choices face human multiple options people person profile social user",switch_camera:"arrows photography picture",switch_left:"arrows directional navigation toggle",switch_right:"arrows directional navigation toggle",switch_video:"arrows camera photography videos",sync:"360 around arrows direction inprogress loading refresh renew rotate turn",sync_alt:"arrows horizontal internet technology update wifi",sync_disabled:"360 around arrows direction enabled inprogress loading off refresh renew rotate slash turn",sync_lock:"around arrows locked password privacy private protection renew rotate safety secure security turn",sync_problem:"! 360 alert around arrows attention caution danger direction error exclamation important inprogress loading mark notification refresh renew rotate symbol turn warning",system_security_update:"Android arrow cell device down hardware iOS mobile phone tablet",system_security_update_good:"Android approve cell check complete device done hardware iOS mark mobile ok phone select tablet tick validate verified yes",system_security_update_warning:"! Android alert attention caution cell danger device error exclamation hardware iOS important mark mobile notification phone symbol tablet",system_update:"Android arrows cell device direction download hardware iOS install mobile phone tablet",system_update_alt:"arrow download export",tab:"browser computer documents folder internet tabs website windows",table_chart:"analytics bars data diagram grid infographic measure metrics statistics tracking",table_rows:"grid layout lines stacked",tablet:"Android device hardware iOS ipad mobile web",tablet_android:"device hardware iOS ipad mobile web",tablet_mac:"Android apple device hardware iOS ipad mac mobile tablet web",table_view:"format grid group layout multiple",tab_unselected:"browser computer documents folder internet tabs website windows",tag:"hashtag key media number pound social trend",tag_faces:"emoji emotion happy satisfied smile",takeout_dining:"box container delivery food meal restaurant",tap_and_play:"Android cell connection device hardware iOS internet mobile network nfc phone signal tablet to wifi wireless",tapas:"appetizer brunch dinner food lunch restaurant snack",task:"approve check complete data document done drive file folders mark ok page paper select sheet slide tick validate verified writing yes",task_alt:"approve check circle complete done mark ok select tick validate verified yes",taxi_alert:"! attention automobile cab cars caution danger direction error exclamation important lyft maps mark notification public symbol transportation uber vehicle warning yellow",telegram:"brand call chat logo messaging voice",ten_mp:"camera digits font image letters megapixels numbers quality resolution symbol text type",terminal:"application code emulator program software",terrain:"geography landscape mountain",text_decrease:"- alphabet character font letter minus remove resize subtract symbol type",text_fields:"T add alphabet character font input letter symbol type",text_format:"A alphabet character font letter square style symbol type",text_increase:"+ add alphabet character font letter new plus resize symbol type",text_rotate_up:"A alphabet arrow character field font letter move symbol type",text_rotate_vertical:"A alphabet arrow character down field font letter move symbol type verticle",text_rotation_angledown:"A alphabet arrow character field font letter move rotate symbol type",text_rotation_angleup:"A alphabet arrow character field font letter move rotate symbol type",text_rotation_down:"A alphabet arrow character field font letter move rotate symbol type",text_rotation_none:"A alphabet arrow character field font letter move rotate symbol type",textsms:"bubble chat comment communicate dots feedback message speech",text_snippet:"data document file notes storage writing",texture:"diagonal lines pattern stripes",theater_comedy:"broadway event movie musical places show standup tour watch",theaters:"film media movies photography showtimes video watch",thermostat:"forecast temperature weather",thermostat_auto:"A celsius fahrenheit temperature thermometer",thirteen_mp:"camera digits font image letters megapixels numbers quality resolution symbol text type",thirty_fps:"alphabet camera character digit font frames letter number symbol text type video",thirty_fps_select:"camera digits frame frequency image numbers per rate seconds video",three_d_rotation:"3d D alphabet arrows av camera character digit font letter number symbol text type vr",three_g_mobiledata:"alphabet cellular character digit font letter network number phone signal speed symbol text type wifi",three_k:"3000 3K alphabet character digit display font letter number pixels resolution symbol text type video",three_k_plus:"+ 3000 3K alphabet character digit display font letter number pixels resolution symbol text type video",three_mp:"camera digit font image letters megapixels number quality resolution symbol text type",three_p:"account avatar bubble chat comment communicate face human message party people person profile speech user",three_sixty:"arrow av camera direction rotate rotation vr",thumb_down:"dislike downvote favorite fingers gesture hands ranking rate rating reject up",thumb_down_alt:"bad decline disapprove dislike feedback hand hate negative no reject social veto vote",thumb_down_off_alt:"bad decline disapprove dislike favorite feedback filled fingers gesture hands hate negative no ranking rate rating reject sad social veto vote",thumbs_up_down:"dislike favorite fingers gesture hands rate rating vote",thumb_up:"approve dislike down favorite fingers gesture hands ranking rate rating success upvote",thumb_up_alt:"agreed approved confirm correct favorite feedback good hand happy like okay positive satisfaction social success vote yes",thumb_up_off_alt:"agreed approved confirm correct favorite feedback fingers gesture good hands happy like okay positive ranking rate rating satisfaction social vote yes",timelapse:"duration motion photo timer video",timeline:"analytics chart data graph history line movement points tracking trending zigzag zigzap",timer:"alarm alart bell clock disabled duration enabled notification off slash stopwatch wait",timer_10:"digits duration numbers seconds",timer_10_select:"alphabet camera character digit font letter number seconds symbol text type",timer_3:"digits duration numbers seconds",timer_3_select:"alphabet camera character digit font letter number seconds symbol text type",timer_off:"alarm alart bell clock disabled duration enabled notification slash stopwatch",times_one_mobiledata:"alphabet cellular character digit font letter network number phone signal speed symbol text type wifi",time_to_leave:"automobile cars destination direction drive estimate eta maps public transportation travel trip vehicle",tips_and_updates:"alert announcement electricity idea information lamp lightbulb stars",title:"T alphabet character font header letter subject symbol text type",toc:"content format lines list reorder stacked table text titles",today:"agenda calendar date event mark month range remember reminder schedule time week",toggle_off:"application components configuration control design disable inable inactive interface selection settings slider switch ui ux website",toggle_on:"application components configuration control design disable inable inactive interface off selection settings slider switch ui ux website",token:"badge hexagon mark shield sign symbol",toll:"bill booth card cash circles coin commerce credit currency dollars highway money online payment ticket",tonality:"circle editing filter image photography picture",topic:"data document drive file folder sheet slide storage",tornado:"crisis disaster natural rain storm weather wind",touch_app:"arrow command fingers gesture hand press swipe tap",tour:"destination flag places travel visit",toys:"car fan games kids windmill",track_changes:"bullseye circle evolve lines movement radar rotate shift target",traffic:"direction light maps signal street",train:"automobile cars direction maps public rail subway transportation vehicle",tram:"automobile cars direction maps public rail subway train transportation vehicle",transfer_within_a_station:"arrows body direction human left maps people person public right route stop transit transportation vehicle walk",transform:"adjust crop editing image photo picture",transgender:"female lgbt neutral neutrual social symbol",transit_enterexit:"arrow direction maps navigation route transportation",translate:"alphabet language letter speaking speech text translator words",travel_explore:"earth find glass global globe look magnifying map network planet search see social space web world",trending_down:"analytics arrow change chart data diagram infographic measure metrics movement rate rating sale statistics tracking",trending_flat:"arrow change chart data graph metric movement rate right tracking",trending_up:"analytics arrow change chart data diagram infographic measure metrics movement rate rating statistics tracking",trip_origin:"circle departure",try:"bookmark bubble chat comment communicate favorite feedback highlight important marked message saved shape special speech star",tty:"call cell contact deaf device hardware impaired mobile speech talk telephone text",tune:"adjust editing options settings sliders",tungsten:"electricity indoor lamp lightbulb setting",turned_in:"archive bookmark favorite item label library reading remember ribbon save submit tag",turned_in_not:"archive bookmark favorite item label library outline reading remember ribbon save submit tag",turn_left:"arrows directions maps navigation path route sign traffic",turn_right:"arrows directions maps navigation path route sign traffic",turn_sharp_left:"arrows directions maps navigation path route sign traffic",turn_sharp_right:"arrows directions maps navigation path route sign traffic",turn_slight_left:"arrows directions maps navigation path right route sign traffic",turn_slight_right:"arrows directions maps navigation path route sharp sign traffic",tv:"device display linear living monitor room screencast stream television video wireless",tv_off:"Android chrome desktop device disabled enabled hardware iOS mac monitor slash television web window",twelve_mp:"camera digits font image letters megapixels numbers quality resolution symbol text type",twenty_four_mp:"camera digits font image letters megapixels numbers quality resolution symbol text type",twenty_one_mp:"camera digits font image letters megapixels numbers quality resolution symbol text type",twenty_three_mp:"camera digits font image letters megapixels numbers quality resolution symbol text type",twenty_two_mp:"camera digits font image letters megapixels numbers quality resolution symbol text type",twenty_zero_mp:"camera digits font image letters megapixels numbers quality resolution symbol text type",twitter:"brand logo social",two_k:"2000 2K alphabet character digit display font letter number pixels resolution symbol text type video",two_k_plus:"+ alphabet character digit font letter number symbol text type",two_mp:"camera digit font image letters megapixels number quality resolution symbol text type",two_wheeler:"automobile bicycle cars direction maps moped motorbike motorcycle public ride riding scooter transportation travel twom vehicle wheeler wheels",umbrella:"beach protection rain sunny",unarchive:"arrow inbox mail store undo up",undo:"arrow backward mail previous redo repeat rotate",unfold_less:"arrows chevron collapse direction expandable inward list navigation up",unfold_more:"arrows chevron collapse direction down expandable list navigation",unpublished:"approve check circle complete disabled done enabled mark off ok select slash tick validate verified yes",unsubscribe:"cancel close email envelop esubscribe message newsletter off remove send",upcoming:"alarm calendar mail message notification",update:"arrow backwards clock forward future history load refresh reverse rotate schedule time",update_disabled:"arrow backwards clock enabled forward history load off on refresh reverse rotate schedule slash time",upgrade:"arrow export instal line replace update",upload:"arrows download drive",upload_file:"arrow data document download drive folders page paper sheet slide writing",usb:"cable connection device wire",usb_off:"cable connection device wire",u_turn_left:"arrows directions maps navigation path route sign traffic u-turn",u_turn_right:"arrows directions maps navigation path route sign traffic u-turn",vaccines:"aid covid doctor drug emergency hospital immunity injection medical medication medicine needle pharmacy sick syringe vaccination vial",verified:"approve badge burst check complete done mark ok select star tick validate yes",verified_user:"approve audit certified checkmark complete done ok privacy private protection security select shield tick validate yes",vertical_align_bottom:"alignment arrow doc down editing editor spreadsheet text type writing",vertical_align_center:"alignment arrow doc down editing editor spreadsheet text type up writing",vertical_align_top:"alignment arrow doc editing editor spreadsheet text type up writing",vertical_shades:"blinds cover curtains nest open shutter sunshade",vertical_shades_closed:"blinds cover curtains nest roller shutter sunshade",vertical_split:"design format grid layout paragraph text website writing",vibration:"Android alert cell device hardware iOS mobile mode motion notification phone silence silent tablet vibrate",video_call:"+ add camera chat conference filming hardware image motion new picture plus screen symbol videography",videocam:"camera chat conference filming hardware image motion picture screen videography",video_camera_back:"image landscape mountains photography picture rear",video_camera_front:"account face human image people person photography picture profile user",videocam_off:"camera chat conference disabled enabled filming hardware image motion offline picture screen slash videography",video_file:"camera document filming hardware image motion picture videography",videogame_asset:"console controller device gamepad gaming nintendo playstation xbox",videogame_asset_off:"console controller device disabled enabled gamepad gaming playstation slash",video_label:"device item screen window",video_library:"arrow collection play",video_settings:"change details gear information options play screen service window",video_stable:"filming recording setting stability taping",view_agenda:"blocks cards design format grid layout website,stacked",view_array:"blocks design format grid layout website",view_carousel:"banner blocks cards design format grid images layout website",view_column:"blocks design format grid layout vertical website",view_comfy:"grid layout pattern squares",view_comfy_alt:"cozy design format layout web",view_compact:"grid layout pattern squares",view_compact_alt:"dense design format layout web",view_cozy:"comfy design format layout web",view_day:"blocks calendar cards carousel design format grid layout website week",view_headline:"blocks design format grid layout paragraph text website",view_in_ar:"3d augmented cube daydream headset reality square vr",view_kanban:"grid layout pattern squares",view_list:"blocks design format grid layout lines reorder stacked title website",view_module:"blocks design format grid layout reorder squares stacked title website",view_quilt:"blocks design format grid layout reorder squares stacked title website",view_sidebar:"design format grid layout web",view_stream:"blocks design format grid layout lines list reorder stacked title website",view_timeline:"grid layout pattern squares",view_week:"bars blocks columns day design format grid layout website",vignette:"border editing effect filter gradient image photography setting",villa:"architecture beach estate home house maps place real residence residential stay traveling vacation",visibility:"eye on password preview reveal see shown visability",visibility_off:"disabled enabled eye hidden invisible on password reveal see show slash view visability",voice_chat:"bubble camera comment communicate facetime feedback message speech video",voicemail:"call device message missed mobile phone recording",voice_over_off:"account disabled enabled face human people person profile recording slash speaking speech transcript user",volume_down:"audio av control music quieter shh soft sound speaker tv",volume_mute:"audio control music sound speaker tv",volume_off:"audio av control disabled enabled low music mute slash sound speaker tv",volume_up:"audio control music sound speaker tv",volunteer_activism:"donation fingers gesture giving hands heart love sharing",vpn_key:"login network passcode password register security signin signup unlock",vpn_key_off:"[offline] disabled enabled network on passcode password slash unlock",vpn_lock:"earth globe locked network password privacy private protection safety secure security virtual world",vrpano:"angle image landscape mountains panorama photography picture view wide",wallpaper:"background image landscape photography picture",warehouse:"garage industry manufacturing storage",warning:"! alert announcement attention caution danger error exclamation feedback important mark notification problem symbol triangle",warning_amber:"! alert attention caution danger error exclamation important mark notification symbol triangle",wash:"bathroom clean fingers gesture hand wc",watch:"Android clock gadget iOS smartwatch time vr wearables web wristwatch",watch_later:"clock date hour minute schedule time",watch_off:"Android clock close gadget iOS shut time vr wearables web wristwatch",water:"aqua beach lake ocean river waves weather",water_damage:"architecture building droplet estate house leak plumbing real residence residential shelter",waterfall_chart:"analytics bar data diagram infographic measure metrics statistics tracking",waves:"beach lake ocean pool river sea swim water",wb_auto:"A W alphabet automatic balance character editing font image letter photography symbol text type white wp",wb_cloudy:"balance editing white wp",wb_incandescent:"balance bright editing lamp lightbulb lighting settings white wp",wb_iridescent:"balance bright editing lighting settings white wp",wb_shade:"balance house lighting white",wb_sunny:"balance bright lighting weather white",wc:"bathroom closet female gender man person restroom toilet unisex wash water women",web:"blocks browser internet page screen website www",web_asset:"-website application browser design desktop download image interface internet layout screen ui ux video window www",web_asset_off:"browser disabled enabled internet on screen slash webpage website windows www",webhook:"api developer development enterprise software",weekend:"chair couch furniture home living lounge relax room seat",west:"arrow directional left maps navigation",whatshot:"arrow circle direction fire frames round trending",wheelchair_pickup:"accessibility accessible body handicap help human person",where_to_vote:"approve ballot check complete destination direction done election location maps mark ok pin place poll select stop tick validate verified yes",widgets:"app blocks box menu setting squares ui",wifi:"connection data internet network scan service signal wireless",wifi_calling:"cell connection connectivity contact device hardware mobile signal telephone wireless",wifi_calling_3:"cellular data internet mobile network phone speed wireless",wifi_channel:"(scan) [cellular connection data internet mobile] network service signal wireless",wifi_find:"(scan) [cellular connection data detect discover glass internet look magnifying mobile] network notice search service signal wireless",wifi_lock:"cellular connection data internet locked mobile network password privacy private protection safety secure security service signal wireless",wifi_off:"connection data disabled enabled internet network offline scan service signal slash wireless",wifi_password:"(scan) [cellular connection data internet lock mobile] network secure service signal wireless",wifi_protected_setup:"around arrows rotate",wifi_tethering:"cellular connection data internet mobile network phone scan service signal speed wireless",wifi_tethering_off:"cellular connection data disabled enabled internet mobile network offline phone scan service signal slash speed wireless",window:"close glass grid home house interior layout outside",wind_power:"eco energy nest windy",wine_bar:"alcohol cocktail cup drink glass liquor",work:"-briefcase baggage business job suitcase",work_history:"arrow backwards baggage briefcase business clock date job refresh renew reverse rotate schedule suitcase time turn",work_off:"baggage briefcase business disabled enabled job on slash suitcase",work_outline:"baggage briefcase business job suitcase",workspace_premium:"certification degree ecommerce guarantee medal permit ribbon verification",workspaces:"circles collaboration dot filled group team",wrap_text:"arrow doc editing editor spreadsheet type write writing",wrong_location:"cancel close destination direction exit maps no pin place quit remove stop",wysiwyg:"composer mode screen software system text view visibility website window",yard:"backyard flower garden home house nature pettle plants",you_tube:"brand logo social video",youtube_searched_for:"arrow backwards find glass history inprogress loading look magnifying refresh renew restore reverse rotate see yt",zoom_in:"bigger find glass grow look magnifier magnifying plus scale search see size",zoom_in_map:"arrows destination location maps move place stop",zoom_out:"find glass look magnifier magnifying minus negative scale search see size smaller",zoom_out_map:"arrows destination location maps move place stop"},$t=new Bo.Search("key");$t.addIndex("synonyms"),$t.addDocuments(p.iconKeys.map(e=>({key:e,synonyms:Ir[e]??[]})));function si(e){let t=0,o,a;for(o=0;o<e.length;o++)a=e.charCodeAt(o),t=(t<<5)-t+a,t|=0;return Math.abs(t)}function jo(e,t){if(e&&(e=Gt(e),e in Wt))return e in Wt?r.jsx(p.Icon,{iconKey:e,size:"medium",className:t}):void 0}const qt=c.memo(function({collectionOrView:t,className:o}){const a=jo(t.icon,o);if(t?.icon&&a)return a;let n=Gt(("singularName"in t?t.singularName:void 0)??t.name),i;n in Wt&&(i=n),i||(n=Gt(t.path),n in Wt&&(i=n));const s=p.coolIconKeys.length;return i||(i=p.coolIconKeys[si(t.path)%s]),r.jsx(p.Icon,{iconKey:i,size:"medium",className:o})},(e,t)=>$(e.collectionOrView.icon,t.collectionOrView.icon)),Wt=p.iconKeys.reduce((e,t)=>(e[t]=t,e),{});function li(e,t){if(t!==void 0&&t===1)return e;const o={"(quiz)$":"$1zes","^(ox)$":"$1en","([m|l])ouse$":"$1ice","(matr|vert|ind)ix|ex$":"$1ices","(x|ch|ss|sh)$":"$1es","([^aeiouy]|qu)y$":"$1ies","(hive)$":"$1s","(?:([^f])fe|([lr])f)$":"$1$2ves","(shea|lea|loa|thie)f$":"$1ves",sis$:"ses","([ti])um$":"$1a","(tomat|potat|ech|her|vet)o$":"$1oes","(bu)s$":"$1ses","(alias)$":"$1es","(octop)us$":"$1i","(ax|test)is$":"$1es","(us)$":"$1es","([^s]+)$":"$1s"},a={move:"moves",foot:"feet",goose:"geese",sex:"sexes",child:"children",man:"men",tooth:"teeth",person:"people"};if(["sheep","fish","deer","moose","series","species","money","rice","information","equipment","bison","cod","offspring","pike","salmon","shrimp","swine","trout","aircraft","hovercraft","spacecraft","sugar","tuna","you","wood"].indexOf(e.toLowerCase())>=0)return e;for(const i in a){const s=new RegExp(`${i}$`,"i"),l=a[i];if(s.test(e))return e.replace(s,l)}for(const i in o){const s=new RegExp(i,"i");if(s.test(e))return e.replace(s,o[i])}return e}function ci(e,t){if(t!==void 0&&t!==1)return e;const o={"(quiz)zes$":"$1","(matr)ices$":"$1ix","(vert|ind)ices$":"$1ex","^(ox)en$":"$1","(alias)es$":"$1","(octop|vir)i$":"$1us","(cris|ax|test)es$":"$1is","(shoe)s$":"$1","(o)es$":"$1","(bus)es$":"$1","([m|l])ice$":"$1ouse","(x|ch|ss|sh)es$":"$1","(m)ovies$":"$1ovie","(s)eries$":"$1eries","([^aeiouy]|qu)ies$":"$1y","([lr])ves$":"$1f","(tive)s$":"$1","(hive)s$":"$1","(li|wi|kni)ves$":"$1fe","(shea|loa|lea|thie)ves$":"$1f","(^analy)ses$":"$1sis","((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$":"$1$2sis","([ti])a$":"$1um","(n)ews$":"$1ews","(h|bl)ouses$":"$1ouse","(corpse)s$":"$1","(us)es$":"$1",s$:""},a={move:"moves",foot:"feet",goose:"geese",sex:"sexes",child:"children",man:"men",tooth:"teeth",person:"people"};if(["sheep","fish","deer","moose","series","species","money","rice","information","equipment","bison","cod","offspring","pike","salmon","shrimp","swine","trout","aircraft","hovercraft","spacecraft","sugar","tuna","you","wood"].indexOf(e.toLowerCase())>=0)return e;for(const i in a){const s=new RegExp(`${a[i]}$`,"i");if(s.test(e))return e.replace(s,i)}for(const i in o){const s=new RegExp(i,"i");if(s.test(e))return e.replace(s,o[i])}return e}function Lo(e,t,o,a=3){const n=Object.keys(e.properties);let i=o?.filter(s=>n.includes(s));return i&&i.length>0?i:(i=n,i.filter(s=>{const l=e.properties[s];return l&&!we(l)&&!Go(l,t)}).slice(0,a))}function Fr(e,t=""){return e&&Object.keys(e).reduce((o,a)=>{const n=t?`${t}.${a}`:a;return typeof e[a]=="object"&&e[a]!==null?Array.isArray(e[a])?e[a].forEach((i,s)=>{Object.assign(o,Fr(i,`${n}[${s}]`))}):Object.assign(o,Fr(e[a],n)):o[n]=e[a],o},{})}function Uo(e){return e.reduce((t,o)=>(Object.entries(o).forEach(([a,n])=>{if(Array.isArray(n)&&(t[a]=Math.max(t[a]||0,n.length)),typeof n=="object"&&n!==null){const i=Uo([n]);Object.entries(i).forEach(([s,l])=>{const d=`${a}.${s}`;t[d]=Math.max(t[d]||0,l)})}}),t),{})}function $o(e){return Object.keys(e).forEach(t=>{const o=e[t];o.editable=!0,o.dataType==="map"&&o.properties&&$o(o.properties)}),e}function qo(e){return Object.entries(e).reduce((t,[o,a])=>{if(!we(a)&&a.dataType==="map"&&a.properties){const n={...a,properties:qo(a.properties)};t[o]=n}return we(a)?t[o]=a:t[o]={...a,editable:!1},t},{})}function Nr(e,t,o){if(e){const n=e({collection:t,parentPaths:o})??t;return n.subcollections&&(n.subcollections=n.subcollections.map(i=>Nr(e,i,[...o,t.path]))),n}else return t}function Wo(e,t,o=[],a){const n=(t??[]).map(l=>{const d=e?.find(u=>u.id===l.id);return d?Ho(d,l,o,a):Nr(a,l,o)}),i=n.map(l=>l.id),s=e.filter(l=>!i.includes(l.id)).map(l=>a?Nr(a,l,o):l);return[...n,...s]}function Ho(e,t,o=[],a){const n=Wo(e?.subcollections??[],t?.subcollections??[],[...o,e.path],a),i={...e.properties};Object.keys(t.properties).forEach(f=>{const b=e.properties[f];b?i[f]=Jo(b,t.properties[f]):i[f]=t.properties[f]});const s=Qe(e,t),l=Zo(e),d=Zo(t),u=[...new Set([...d,...l])],m=[...new Set([...e.entityViews??[],...t.entityViews??[]])];let g={...s,subcollections:n,properties:xr(i,u),propertiesOrder:u,entityViews:m};if(a){const f=a({collection:g,parentPaths:o});f&&(g=f)}return g}function Jo(e,t){if(we(t))return t;if(we(e))return e;{const o=Qe(e,t),a=!!e.editable,n=!!t.editable;if(t.dataType==="map"&&t.properties){const i="properties"in e?e.properties:{},s="properties"in t?t.properties:{},l="propertiesOrder"in e&&e.propertiesOrder?e.propertiesOrder:Object.keys(i),d="propertiesOrder"in t&&t.propertiesOrder?t.propertiesOrder:"properties"in t?Object.keys(t.properties):[],u=[...new Set([...l,...d])],m={...i};return Object.keys(t.properties).forEach(g=>{const f=i[g];f&&(m[g]=Jo(f,s[g]))}),{...o,editable:a&&n,properties:m,propertiesOrder:u}}return{...o,editable:a&&n}}}function Zo(e){if(e.propertiesOrder&&e.propertiesOrder.length>0){const t=e.propertiesOrder;return e.additionalFields&&e.additionalFields.forEach(o=>{t.includes(o.key)||t.push(o.key)}),t}return[...Object.keys(e.properties),...(e.additionalFields??[])?.map(t=>t.key)]}function di(e){return e}function pi(e){return e}function ui(e){return e}function mi(e){return e}function fi(e){return e}function hi(e){return e}function gi(e){return e}function Ai(e){return e}function bi(e){return e}function Xo(e,t,o="",a=0,n){a>n||(e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(e).forEach(i=>{Xo(e[i],t[i],o+"."+i,a+1,n)}):e!==t&&console.log("Changed props:",o))}function yi(e,t=3){const o=c.useRef(e);c.useEffect(()=>{Xo(e,o.current,"",0,t),o.current=e})}const wi="100vw",vi="55vw",Ko="768px",Ro=c.createContext({}),ze=()=>c.useContext(Ro),ea=c.createContext({}),ue=()=>c.useContext(ea),We=()=>c.useContext(pr),ta=c.createContext({}),kt=()=>c.useContext(ta),ra=c.createContext({}),He=()=>c.useContext(ra),oa=c.createContext({}),lt=()=>c.useContext(oa),Je=()=>{const{enqueueSnackbar:e,closeSnackbar:t}=ko.useSnackbar(),o=c.useCallback(n=>{const{type:i,message:s,autoHideDuration:l}=n;e({message:s,variant:i,autoHideDuration:l})},[]),a=c.useCallback(()=>{t()},[]);return c.useMemo(()=>({open:o,close:a}),[o,a])},aa=c.createContext(void 0),ct=()=>c.useContext(aa),na=c.createContext({}),ki=({children:e})=>{const[t,o]=c.useState([]),a=c.useRef(t),n=l=>{a.current=l,o(l)},i=c.useCallback(()=>{if(t.length===0)return;const l=[...t.slice(0,-1)];n(l)},[t]),s=c.useCallback(l=>{const d=[...t,l];return n(d),{closeDialog:()=>{const u=a.current.filter(m=>m.key!==l.key);n(u)}}},[t]);return r.jsxs(na.Provider,{value:{open:s,close:i},children:[e,t.map((l,d)=>r.jsx(l.Component,{open:!0,closeDialog:i},`dialog_${d}`))]})},_i=()=>c.useContext(na),ia=c.createContext({}),re=()=>c.useContext(ia),sa=c.createContext({}),dt=()=>c.useContext(sa),he=()=>{const e=We(),t=kt(),o=He(),a=ue(),n=ze(),i=lt(),s=Je(),l=ct(),d=_i(),u=re(),m=dt(),g=c.useRef({authController:e,sideDialogsController:t,sideEntityController:o,navigation:a,dataSource:n,storageSource:i,snackbarController:s,userConfigPersistence:l,dialogsController:d,customizationController:u,analyticsController:m});return c.useEffect(()=>{g.current={authController:e,sideDialogsController:t,sideEntityController:o,navigation:a,dataSource:n,storageSource:i,snackbarController:s,userConfigPersistence:l,dialogsController:d,customizationController:u,analyticsController:m}},[e,d,a,t]),g.current};function xi({path:e,collection:t,filterValues:o,sortBy:a,itemCount:n,searchString:i}){const s=ze(),d=ue().resolveAliasesFrom(e),u=a?a[0]:void 0,m=a?a[1]:void 0,g=he(),[f,b]=c.useState([]),[h,A]=c.useState(!1),[y,k]=c.useState(),[v,_]=c.useState(!1);return c.useEffect(()=>{A(!0);const C=async B=>{if(t.callbacks?.onFetch)try{B=await Promise.all(B.map(x=>t.callbacks.onFetch({collection:t,path:d,entity:x,context:g})))}catch(x){console.error(x)}A(!1),k(void 0),b(B.map(x=>({...x}))),_(!n||B.length<n)},E=B=>{console.error("ERROR",B),A(!1),b([]),k(B)};return s.listenCollection?s.listenCollection({path:d,collection:t,onUpdate:C,onError:E,searchString:i,filter:o,limit:n,startAfter:void 0,orderBy:u,order:m}):(s.fetchCollection({path:d,collection:t,searchString:i,filter:o,limit:n,startAfter:void 0,orderBy:u,order:m}).then(C).catch(E),()=>{})},[d,n,m,u,o,i]),{data:f,dataLoading:h,dataLoadingError:y,noMoreToLoad:v}}const Tr={};function Pr({path:e,entityId:t,collection:o,useCache:a=!1}){const n=ze(),s=ue().resolveAliasesFrom(e),l=he(),[d,u]=c.useState(),[m,g]=c.useState(!0),[f,b]=c.useState();return c.useEffect(()=>{g(!0);const h=async y=>{if(o.callbacks?.onFetch&&y)try{y=await o.callbacks.onFetch({collection:o,path:s,entity:y,context:l})}catch(k){console.error(k)}Tr[`${s}/${t}`]=y,u(y),g(!1),b(void 0)},A=y=>{console.error("ERROR fetching entity",y),g(!1),u(void 0),b(y)};return t&&a&&Tr[`${s}/${t}`]?(u(Tr[`${s}/${t}`]),g(!1),b(void 0),()=>{}):t&&s&&o?n.listenEntity?n.listenEntity({path:s,entityId:t,collection:o,onUpdate:h,onError:A}):(n.fetchEntity({path:s,entityId:t,collection:o}).then(h).catch(A),()=>{}):(h(void 0),()=>{})},[t,s]),{entity:d,dataLoading:m,dataLoadingError:f}}async function Qr({collection:e,path:t,entityId:o,values:a,previousValues:n,status:i,dataSource:s,context:l,onSaveSuccess:d,onSaveFailure:u,onPreSaveHookError:m,onSaveSuccessHookError:g}){if(i!=="new"&&!o)throw new Error("Entity id must be specified when updating an existing entity");let f;const b=l.customizationController,h=l.navigation.resolveAliasesFrom(t),A=e.callbacks;if(A?.onPreSave)try{const y=Te({collection:e,path:t,values:n,entityId:o,fields:b.propertyConfigs});f=await A.onPreSave({collection:y,path:t,resolvedPath:h,entityId:o,values:a,previousValues:n,status:i,context:l})}catch(y){console.error(y),m&&m(y);return}else f=a;return s.saveEntity({collection:e,path:h,entityId:o,values:f,previousValues:n,status:i}).then(y=>{try{if(A?.onSaveSuccess){const k=Te({collection:e,path:t,values:f,entityId:o,fields:b.propertyConfigs});A.onSaveSuccess({collection:k,path:t,resolvedPath:h,entityId:y.id,values:f,previousValues:n,status:i,context:l})}}catch(k){g&&g(k)}d&&d(y)}).catch(y=>{if(A?.onSaveFailure){const k=Te({collection:e,path:t,values:f,entityId:o,fields:b.propertyConfigs});A.onSaveFailure({collection:k,path:t,resolvedPath:h,entityId:o,values:f,previousValues:n,status:i,context:l})}u&&u(y)})}async function la({dataSource:e,entity:t,collection:o,callbacks:a,onDeleteSuccess:n,onDeleteFailure:i,onPreDeleteHookError:s,onDeleteSuccessHookError:l,context:d}){console.debug("Deleting entity",t.path,t.id);const u={entity:t,collection:o,entityId:t.id,path:t.path,context:d};if(a?.onPreDelete)try{await a.onPreDelete(u)}catch(m){return console.error(m),s&&s(t,m),!1}return e.deleteEntity({entity:t}).then(()=>{n&&n(t);try{return a?.onDelete&&a.onDelete(u),!0}catch(m){return l&&l(t,m),!1}}).catch(m=>(i&&i(t,m),!1))}function ca({path:e,context:t}){const o=t.dataSource,a=t.navigation;if(!a)throw Error("Calling getNavigationFrom, but main navigation has not yet been initialised");const i=_r({path:e,collections:a.collections??[]}).map(s=>{if(s.type==="collection")return Promise.resolve(s);if(s.type==="entity"){const l=a.getCollection(s.path,s.entityId);if(!l)throw Error(`No collection defined in the navigation for the entity with path ${s.path}`);return o.fetchEntity({path:s.path,entityId:s.entityId,collection:l}).then(d=>{if(d)return{...s,entity:d}})}else{if(s.type==="custom_view")return Promise.resolve(s);throw Error("Unmapped element in useEntitiesFromPath")}}).filter(s=>!!s);return Promise.all(i)}function Ci({path:e}){const t=he(),[o,a]=c.useState(),[n,i]=c.useState(!1),[s,l]=c.useState();return c.useEffect(()=>{t.navigation&&(i(!0),l(void 0),ca({path:e,context:t}).then(u=>{a(u)}).catch(u=>l(u)).finally(()=>i(!1)))},[e,t]),t.navigation?{data:o,dataLoading:n,dataLoadingError:s}:{dataLoading:!0}}const Dr=()=>c.useContext(Nt),da=e=>{const{onSuccess:t,onError:o,disableClipboardAPI:a=!1,copiedDuration:n}=e||{},i=c.useRef(null),[s,l]=c.useState(!1),[d,u]=c.useState("");c.useEffect(()=>{n&&setTimeout(()=>l(!1),n)},[s]);const m=()=>navigator.clipboard!==void 0,g=c.useCallback(v=>{if(o)o(v);else throw new Error(v)},[o]),f=c.useCallback(v=>{t&&t(v),l(!0),u(v)},[t]),b=c.useCallback(v=>{navigator.clipboard.writeText(v).then(()=>f(v)).catch(_=>{g(_),l(!1)})},[g,f]),h=()=>{m()&&navigator.clipboard.writeText("")},A=v=>k("copy",typeof v=="object"?void 0:v),y=()=>k("cut"),k=c.useCallback((v="copy",_)=>{const C=i.current,E=C&&(C.tagName==="INPUT"||C.tagName==="TEXTAREA"),B=i.current;m()&&!a&&(_?b(_):C?E?(b(B.value),v==="cut"&&(B.value="")):b(C.innerText):g("Both the ref & text were undefined"))},[a,b,g]);return{ref:i,isCoppied:s,clipboard:d,clearClipboard:h,isSupported:m,copy:A,cut:y}},Ei={xs:0,sm:640,md:768,lg:1024,xl:1280,"2xl":1536,"3xl":1920};let _t=pa("lg");const Ht=[],Bi=()=>{Ht.forEach(e=>e(_t))};typeof window<"u"&&window.addEventListener("resize",()=>{const e=pa("lg");e!==_t&&(_t=e,Bi())});const Me=()=>{const[e,t]=c.useState(_t);return c.useEffect(()=>{const o=a=>{t(a)};return Ht.push(o),t(_t),()=>{const a=Ht.indexOf(o);a>-1&&Ht.splice(a,1)}},[]),e};function pa(e="lg"){return typeof window>"u"?!1:window.matchMedia(`(min-width: ${Ei[e]+1}px)`).matches}function ua(e){return r.jsx(p.Tooltip,{...e,tooltipClassName:"!text-red-500 bg-red-50",children:e.children})}function ge({title:e,error:t,tooltip:o}){const a=t instanceof Error?t.message:t;console.error("ErrorView",t);const n=r.jsxs("div",{className:"flex items-center m-2",children:[r.jsx(p.ErrorIcon,{size:"small",color:"error"}),r.jsxs("div",{className:"pl-2",children:[e&&r.jsx(p.Typography,{variant:"body2",className:"font-medium",children:e}),r.jsx(p.Typography,{variant:"body2",children:a})]})]});return o?r.jsx(ua,{title:o,children:n}):n}function Re(){return r.jsx("div",{className:"rounded-full bg-gray-200 bg-opacity-30 dark:bg-opacity-20 w-5 h-2 inline-block"})}const Si=40,Ii=100,Fi=200;function pt(e){if(e==="tiny")return Si;if(e==="small")return Ii;if(e==="medium")return Fi;throw Error("Thumbnail size not mapped")}function Ze(e){switch(e){case"xs":case"s":return"tiny";case"m":return"small";case"l":case"xl":return"medium";default:throw Error("Missing mapping value in getPreviewSizeFrom: "+e)}}function ma({size:e,url:t}){const[o,a]=c.useState(!1),n=c.useMemo(()=>pt(e),[e]);if(e==="tiny")return r.jsx("img",{src:t,className:"rounded-md",style:{position:"relative",objectFit:"cover",width:n,height:n,maxHeight:"100%"}},"tiny_image_preview_"+t);const i={maxWidth:"100%",maxHeight:"100%"};return r.jsxs("div",{className:"relative flex items-center justify-center max-w-full max-h-full",style:{width:n,height:n},onMouseEnter:()=>a(!0),onMouseMove:()=>a(!0),onMouseLeave:()=>a(!1),children:[r.jsx("img",{src:t,className:"rounded-md",style:i}),o&&r.jsxs(r.Fragment,{children:[navigator&&r.jsx(p.Tooltip,{title:"Copy url to clipboard",children:r.jsx("div",{className:"rounded-full absolute bottom-[-4px] right-8",children:r.jsx(p.IconButton,{variant:"filled",size:"small",onClick:s=>(s.stopPropagation(),s.preventDefault(),navigator.clipboard.writeText(t)),children:r.jsx(p.ContentCopyIcon,{className:"text-gray-500",size:"small"})})})}),r.jsx(p.Tooltip,{title:"Open image in new tab",children:r.jsx(p.IconButton,{variant:"filled",component:"a",style:{position:"absolute",bottom:-4,right:-4},href:t,rel:"noopener noreferrer",target:"_blank",size:"small",onClick:s=>s.stopPropagation(),children:r.jsx(p.OpenInNewIcon,{className:"text-gray-500",size:"small"})})})]})]},"image_preview_"+t)}function xt({url:e,previewType:t,size:o,hint:a}){return t?t==="image"?r.jsx(ma,{url:e,size:o}):t==="audio"?r.jsxs("audio",{controls:!0,src:e,children:["Your browser does not support the",r.jsx("code",{children:"audio"})," element."]}):t==="video"?r.jsx("video",{className:`max-w-${o==="small"?"sm":"md"}`,controls:!0,children:r.jsx("source",{src:e})}):r.jsxs("a",{href:e,rel:"noopener noreferrer",target:"_blank",onClick:n=>n.stopPropagation(),className:"flex flex-col items-center justify-center",style:{width:pt(o),height:pt(o)},children:[r.jsx(p.DescriptionIcon,{className:"flex-grow"}),a&&r.jsx(p.Tooltip,{title:a,children:r.jsx(p.Typography,{className:"max-w-full truncate rtl text-left",variant:"caption",children:a})})]}):!e||!e.trim()?r.jsx(Re,{}):r.jsxs("a",{className:"flex gap-4 break-words items-center font-medium text-primary visited:text-primary dark:visited:text-primary dark:text-primary",href:e,rel:"noopener noreferrer",onMouseDown:n=>{n.preventDefault()},target:"_blank",children:[r.jsx(p.OpenInNewIcon,{size:"small"}),e]})}function ut({property:e,size:t}){e||console.error("No property assigned for skeleton component",e,t);let o;if(e.dataType==="string"){const a=e;a.url?o=Mi(a,t):a.storage?o=Or(t):o=je()}else if(e.dataType==="array"){const a=e;a.of&&(Array.isArray(a.of)?o=r.jsxs(r.Fragment,{children:[a.of.map((n,i)=>Mr(n,i))," "]}):a.of.dataType==="map"&&a.of.properties?o=Ti(a.of.properties,t,a.of.previewProperties):a.of.dataType==="string"?a.of.enumValues?o=Qi():a.of.storage?o=Mr(a.of):o=Pi():o=Mr(a.of))}else e.dataType==="map"?o=Ni(e,t):e.dataType==="date"?o=je():e.dataType==="reference"?o=Di():(e.dataType,o=je());return o||null}function Ni(e,t){if(!e.properties)return r.jsx(r.Fragment,{});let o;return t==="medium"?o=Object.keys(e.properties):(o=e.previewProperties||Object.keys(e.properties),t==="small"?o=o.slice(0,3):t==="tiny"&&(o=o.slice(0,1))),t!=="medium"?r.jsx("div",{className:"w-full flex flex-col space-y-4",children:o.map((a,n)=>r.jsx("div",{children:e.properties&&e.properties[a]&&r.jsx(ut,{property:e.properties[a],size:"small"})},`map_${a}`))}):r.jsx("table",{className:"table-auto",children:r.jsx("tbody",{children:o&&o.map((a,n)=>r.jsxs("tr",{className:"border-b last:border-b-0",children:[r.jsx("th",{className:"align-top",style:{width:"30%"},children:r.jsx("p",{className:"text-xs text-secondary",children:e.properties[a].name})},`table-cell-title--${a}`),r.jsx("th",{style:{width:"70%"},children:e.properties&&e.properties[a]&&r.jsx(ut,{property:e.properties[a],size:"small"})},`table-cell-${a}`)]},`map_preview_table__${n}`))})})}function Ti(e,t,o){let a=o;return(!a||!a.length)&&(a=Object.keys(e),t&&(a=a.slice(0,3))),r.jsx("table",{className:"table-auto",children:r.jsx("tbody",{children:[0,1,2].map((n,i)=>r.jsx("tr",{children:a&&a.map(s=>r.jsx("th",{children:r.jsx(ut,{property:e[s],size:"small"})},`table-cell-${s}`))},`table_${n}_${i}`))})})}function Pi(){return r.jsx("div",{className:"flex flex-col gap-2",children:[0,1].map((e,t)=>je(t))})}function Qi(){return r.jsx("div",{className:"flex flex-col gap-2",children:[0,1].map((e,t)=>r.jsx(r.Fragment,{children:je(t)}))})}function Mr(e,t=0){return r.jsx("div",{className:"flex flex-col gap-2",children:[0,1].map((o,a)=>r.jsx(r.Fragment,{children:r.jsx(ut,{property:e,size:"small"},`i_${a}`)}))},"array_index_"+t)}function Or(e){const t=e==="tiny"?40:e==="small"?100:200;return r.jsx(p.Skeleton,{width:t,height:t})}function Di(){return r.jsx(p.Skeleton,{width:200,height:100})}function Mi(e,t="medium"){return typeof e.url=="boolean"?r.jsxs("div",{style:{display:"flex"},children:[zr(),je()]}):Oi(t)}function Oi(e){return r.jsx("div",{className:`w-${pt(e)} h-${pt(e)}`,children:zr()})}function je(e,t=120){return r.jsx(p.Skeleton,{width:t},`skeleton_${e}`)}function zi(e){return r.jsx(p.Skeleton,{height:20})}function zr(){return r.jsx(p.Skeleton,{width:24,height:24})}const fa=c.memo(ga,Vi);function Vi(e,t){return e.size===t.size&&e.storagePathOrDownloadUrl===t.storagePathOrDownloadUrl&&e.storeUrl===t.storeUrl}const ha={};function ga({storeUrl:e,storagePathOrDownloadUrl:t,size:o}){const[a,n]=c.useState(void 0),i=lt(),[s,l]=c.useState(ha[t]);if(c.useEffect(()=>{if(!t)return;let m=!1;return i.getDownloadURL(t).then(function(g){m||(l(g),ha[t]=g)}).catch(n),()=>{m=!0}},[t]),!t)return null;const d=s?.metadata?Gi(s?.metadata.contentType):void 0,u=d?.startsWith("image")?"image":d?.startsWith("video")?"video":d?.startsWith("audio")?"audio":"file";return s?.fileNotFound?r.jsx(ge,{error:"File not found"}):s?.url?r.jsx(xt,{previewType:u,url:s.url,size:o,hint:t}):Or(o)}function Gi(e){return e.startsWith("image")?"image/*":e.startsWith("video")?"video/*":e.startsWith("audio")?"audio/*":e.startsWith("application")?"application/*":e.startsWith("text")?"text/*":e.startsWith("font")?"font/*":e}function Be({enumValues:e,enumKey:t,size:o,className:a,children:n}){if(!e)return null;const i=$e(e),s=t!==void 0?Vt(i,t):void 0,l=Do(s),d=Qo(i,t);return r.jsxs(p.Chip,{className:a,colorScheme:d,error:!l,outlined:!1,size:o,children:[n,!n&&(l!==void 0?l:String(t))]})}function Vr({propertyKey:e,value:t,property:o,size:a}){if(o.enumValues){const n=t,i=vr(o);return r.jsx(Be,{enumKey:n,enumValues:i.enumValues,size:a!=="medium"?"small":"medium"})}else if(o.previewAsTag){const n=p.getColorSchemeForSeed(e??"");return r.jsx(oe,{children:r.jsx(p.Chip,{colorScheme:n,size:a!=="medium"?"small":"medium",children:t})})}else{if(o.url)return r.jsx(xt,{size:a,url:t,previewType:typeof o.url=="string"?o.url:void 0});{if(!t)return r.jsx(r.Fragment,{});const n=t.split(`
1
+ (function(w,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("react/jsx-runtime"),require("react"),require("notistack"),require("object-hash"),require("@firecms/formex"),require("@firecms/ui"),require("react-router-dom"),require("js-search"),require("react-fast-compare"),require("date-fns"),require("date-fns/locale"),require("react-use-measure"),require("react-dropzone"),require("@hello-pangea/dnd"),require("react-image-file-resizer"),require("react-window"),require("markdown-it"),require("react-markdown-editor-lite"),require("yup"),require("react-datepicker"),require("@radix-ui/react-portal")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","notistack","object-hash","@firecms/formex","@firecms/ui","react-router-dom","js-search","react-fast-compare","date-fns","date-fns/locale","react-use-measure","react-dropzone","@hello-pangea/dnd","react-image-file-resizer","react-window","markdown-it","react-markdown-editor-lite","yup","react-datepicker","@radix-ui/react-portal"],r):(w=typeof globalThis<"u"?globalThis:w||self,r(w["FireCMS Core"]={},w.jsxRuntime,w.React,w.notistack,w.hash,w.formex,w.ui,w.reactRouterDom,w.JsSearch,w.equal,w.dateFns,w.locales,w.useMeasure,w.reactDropzone,w.dnd,w.Resizer,w.reactWindow,w.MarkdownIt,w.MdEditor,w.yup,w.reactDatepicker,w.Portal))})(this,function(w,r,d,_o,xo,_e,p,ge,Oi,q,zi,Vi,Co,Eo,at,Gi,Yi,ji,Ze,Li,Bo,Ui){"use strict";function bt(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const a=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,a.get?a:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const it=bt(d),So=bt(Oi),Io=bt(Vi),Ie=bt(Li),qi=bt(Ui),$i=({children:e})=>r.jsx(_o.SnackbarProvider,{maxSnack:3,autoHideDuration:3500,children:e}),Wi={mode:"light",setMode:e=>{},toggleMode:()=>{}},Tt=d.createContext(Wi),Ji=Tt.Provider,pr=d.createContext({});function me(e){return Fo(No(e))}function Fo(e){return e.startsWith("/")?e.slice(1):e}function No(e){return e.endsWith("/")?e.slice(0,-1):e}function Hi(e){return e.startsWith("/")?e:`/${e}`}function Zi(e){const t=me(e);if(t.includes("/")){const o=t.split("/");return o[o.length-1]}return t}function ur(e,t){const o=me(e),a=o.split("/");if(a.length%2===0)throw Error(`resolveCollectionPathAliases: Collection paths must have an odd number of segments: ${e}`);const n=t.find(s=>s.id===a[0]);let i;if(n&&(i=n.path),a.length>1){const s=Qt(i??a[0],t);if(!s?.subcollections)return o;const c=o.split("/").slice(2).join("/");return(i??a[0])+"/"+a[1]+"/"+ur(c,s.subcollections)}else return i??o}function Qt(e,t){const o=me(e).split("/");if(o.length%2===0)throw Error(`getCollectionByPathOrAlias: Collection paths must have an odd number of segments: ${e}`);const a=Dt(o);let n;for(let i=0;i<a.length;i++){const s=a[i],c=t&&t.sort((l,u)=>(l.id??"").localeCompare(u.id??"")).find(l=>l.id===s||l.path===s);if(c){if(s===e)n=c;else if(c.subcollections){const l=e.replace(s,"").split("/").slice(2).join("/");l.length>0&&(n=Qt(l,c.subcollections))}}if(n)break}return n}function Dt(e){const t=e.length>0&&e.length%2===0?e.splice(0,e.length-1):e,o=t.length,a=[];for(let n=o;n>0;n=n-2)a.push(t.slice(0,n).join("/"));return a}class mr{id;path;constructor(t,o){this.id=t,this.path=o}get pathWithId(){return`${this.path}/${this.id}`}isEntityReference(){return!0}}class Mt{latitude;longitude;constructor(t,o){this.latitude=t,this.longitude=o}}const Po=(e,...t)=>({...t.reduce((o,a)=>({...o,[a]:e[a]}),{})});function Ot(e){return e&&typeof e=="object"&&!Array.isArray(e)}function Qe(e,t){const o=Ot(e),a=o?{...e}:e;return o&&Ot(t)&&Object.keys(t).forEach(n=>{Ot(t[n])?n in e?a[n]=Qe(e[n],t[n]):Object.assign(a,{[n]:t[n]}):Object.assign(a,{[n]:t[n]})}),a}function Oe(e,t){if(e&&typeof e=="object"){if(t in e)return e[t];if(t.includes(".")||t.includes("[")){let o=t.split(/[.[]/);t.includes("[")&&(o=o.map(c=>c.replace("]","")));const a=o[0],n=Array.isArray(e[a])&&!isNaN(parseInt(o[1])),i=n?e[a][parseInt(o[1])]:e[a],s=o.slice(n?2:1).join(".");return s===""?i:Oe(i,s)}}}function Xi(e,t){let o={...e};const a=t.split("."),n=a.pop();for(const i of a)o=o[i];return n&&delete o[n],o}function fr(e){if(e!==void 0)return e===null?null:typeof e=="object"?Object.entries(e).filter(([t,o])=>typeof o!="function").map(([t,o])=>Array.isArray(o)?{[t]:o.map(a=>fr(a))}:typeof o=="object"?{[t]:fr(o)}:{[t]:o}).reduce((t,o)=>({...t,...o}),{}):e}function hr(e){if(!e)return null;if(typeof e=="object"){if("id"in e)return e.id;if(e instanceof Date)return e.toLocaleString();if(e instanceof Mt)return xo(e)}return xo(e,{ignoreUnknown:!0})}function gr(e,t){if(typeof e=="function")return e;if(Array.isArray(e))return e.map(o=>gr(o,t));if(typeof e=="object"){const o={};return e===null?e:(Object.keys(e).forEach(a=>{if(!Ar(e)){const n=gr(e[a],t),i=typeof n=="string",s=!t||t&&!i||t&&i&&n!=="";n!==void 0&&!Ar(n)&&s&&(o[a]=n)}}),o)}return e}function Ar(e){return e&&Object.getPrototypeOf(e)===Object.prototype&&Object.keys(e).length===0}function To(e,t){const o=i=>typeof i=="object"&&i!==null,a=i=>Array.isArray(i);if(!o(e)||!o(t))return e;const n=a(e)?[...e]:{...e};return Object.keys(t).forEach(i=>{i in n&&(o(n[i])&&o(t[i])?n[i]=To(n[i],t[i]):n[i]===t[i]&&(a(n)?n.splice(i,1):delete n[i]))}),n}const yt="type",zt="value";function nt(e){return e.readOnly||e.dataType==="date"&&e.autoValue?!0:e.dataType==="reference"?!e.path:!1}function wt(e){return typeof e.disabled=="object"&&!!e.disabled.hidden}function we(e){return typeof e=="function"}function vt(e){return e?Object.entries(e).map(([t,o])=>{const a=Vt(o);return a===void 0?{}:{[t]:a}}).reduce((t,o)=>({...t,...o}),{}):{}}function Vt(e){if(!we(e))if(e.dataType==="map"&&e.properties){const t=vt(e.properties);return Object.keys(t).length===0?void 0:t}else return e.defaultValue?e.defaultValue:br(e.dataType)}function br(e){return e==="string"||e==="number"?null:e==="boolean"?!1:e==="date"?null:e==="array"?[]:e==="map"?{}:null}function Qo({inputValues:e,properties:t,status:o,timestampNowValue:a,setDateToMidnight:n}){return yr(e,t,(i,s)=>{if(s.dataType==="date"){let c;return o==="existing"&&s.autoValue==="on_update"||(o==="new"||o==="copy")&&(s.autoValue==="on_update"||s.autoValue==="on_create")?c=a:c=i,s.mode==="date"&&(c=n(c)),c}else return i})??{}}function Ki(e,t){const o=e;return Object.entries(t).forEach(([a,n])=>{e&&e[a]!==void 0?o[a]=e[a]:n.validation?.required&&(o[a]=null)}),o}function Ye(e){return new mr(e.id,e.path)}function yr(e,t,o){const a=Object.entries(t).map(([i,s])=>{const c=e&&e[i],l=Gt(c,s,o);if(l!==void 0)return{[i]:l}}).reduce((i,s)=>({...i,...s}),{}),n={...e,...a};if(Object.keys(n).length!==0)return n}function Gt(e,t,o){let a;if(t.dataType==="map"&&t.properties)a=yr(e,t.properties,o);else if(t.dataType==="array")if(t.of&&Array.isArray(e))a=e.map(n=>Gt(n,t.of,o));else if(t.oneOf&&Array.isArray(e)){const n=t.oneOf?.typeField??yt,i=t.oneOf?.valueField??zt;a=e.map(s=>{if(s===null)return null;if(typeof s!="object")return s;const c=s[n],l=t.oneOf?.properties[c];return!c||!l?s:{[n]:c,[i]:Gt(s[i],l,o)}})}else a=e;else a=o(e,t);return a}function Ue(e){return Array.isArray(e)?e:Object.entries(e).map(([t,o])=>typeof o=="string"?{id:t,label:o}:{...o,id:t})}function Yt(e,t){if(t)return e.find(o=>String(o.id)===String(t))}function Do(e,t){const o=Yt(e,t);if(!o?.color)return p.getColorSchemeForSeed(t.toString());if(typeof o=="object"&&"color"in o){if(typeof o.color=="string")return p.CHIP_COLORS[o.color];if(typeof o.color=="object")return o.color}}function Ri(e){return typeof e=="object"&&e.disabled}function Mo(e){if(e!==void 0)return typeof e=="object"?e.label:e}const Pe=({collection:e,path:t,entityId:o,values:a,previousValues:n,userConfigPersistence:i,fields:s})=>{const c=i?.getCollectionConfig(t),l=Oe(c,"properties"),u=vt(e.properties),m=a??u,h=n??a??u,f=Object.entries(e.properties).map(([b,y])=>{const k=m?_e.getIn(m,b):void 0,v=Fe({propertyKey:b,propertyOrBuilder:y,values:m,previousValues:h,path:t,propertyValue:k,entityId:o,fields:s});return v?{[b]:v}:{}}).filter(b=>b!==null).reduce((b,y)=>({...b,...y}),{}),A=Qe(f,l),g=Object.entries(A).filter(([b,y])=>!!y?.dataType).map(([b,y])=>({[b]:y})).reduce((b,y)=>({...b,...y}),{});return{...e,properties:g,originalCollection:e}};function Fe({propertyOrBuilder:e,propertyValue:t,fromBuilder:o=!1,...a}){if(typeof e=="object"&&"resolved"in e)return e;let n=null;if(e)if(we(e)){const i=a.path;if(!i)throw Error("Trying to resolve a property builder without specifying the entity path");const s=e({...a,path:i,propertyValue:t,values:a.values??{},previousValues:a.previousValues??a.values??{}});if(!s)return null;n=Fe({...a,propertyValue:t,propertyOrBuilder:s,fromBuilder:!0})}else{const i=e;if(i.dataType==="map"&&i.properties){const s=wr({...a,properties:i.properties,propertyValue:t});n={...i,resolved:!0,fromBuilder:o,properties:s}}else i.dataType==="array"?n=qe({property:i,propertyValue:t,fromBuilder:o,...a}):(i.dataType==="string"||i.dataType==="number")&&i.enumValues&&(n=vr(i,o))}else return null;if(n||(n={...e,resolved:!0,fromBuilder:o}),n.propertyConfig&&!Qi(n.propertyConfig)){const i=a.fields;if(!i)throw Error(`Trying to resolve a property with key ${n.propertyConfig} that inherits from a custom property config but no custom property configs were provided. Use the property \`propertyConfigs\` in your app config to provide them`);const s=i[n.propertyConfig];if(!s)return console.warn(`Trying to resolve a property with key ${n.propertyConfig} that inherits from a custom property config but no custom property config with that key was found. Check the \`propertyConfigs\` in your app config`),console.warn("Available property configs",i),null;if(s.property){const c=s.property;"propertyConfig"in c&&delete c.propertyConfig;const l=Fe({propertyOrBuilder:c,propertyValue:t,...a});l&&(n=Qe(l,n))}}return n?{...n,resolved:!0}:null}function qe({propertyKey:e,property:t,propertyValue:o,...a}){if(t.of){if(Array.isArray(t.of))return{...t,resolved:!0,fromBuilder:a.fromBuilder,resolvedProperties:t.of.map((n,i)=>Fe({propertyKey:`${e}.${i}`,propertyOrBuilder:n,propertyValue:Array.isArray(o)?o[i]:void 0,...a,index:i}))};{const n=t.of,i=Array.isArray(o)?o.map((c,l)=>Fe({propertyKey:`${e}.${l}`,propertyOrBuilder:n,propertyValue:c,...a,index:l})).filter(c=>!!c):[],s=Fe({propertyKey:`${e}`,propertyOrBuilder:n,propertyValue:void 0,...a});if(!s)throw Error("When using a property builder as the 'of' prop of an ArrayProperty, you must return a valid child property");return{...t,resolved:!0,fromBuilder:a.fromBuilder,of:s,resolvedProperties:i}}}else if(t.oneOf){const n=t.oneOf?.typeField??yt,i=Array.isArray(o)?o.map((c,l)=>{const u=c&&c[n],m=t.oneOf?.properties[u];return!u||!m?null:Fe({propertyKey:`${e}.${l}`,propertyOrBuilder:m,propertyValue:o,...a})}).filter(c=>!!c):[],s=wr({properties:t.oneOf.properties,propertyValue:void 0,...a});return{...t,resolved:!0,oneOf:{...t.oneOf,properties:s},fromBuilder:a.fromBuilder,resolvedProperties:i}}else{if(t.Field)return{...t,resolved:!0,fromBuilder:a.fromBuilder};throw Error("The array property needs to declare an 'of' or a 'oneOf' property, or provide a custom `Field`")}}function wr({properties:e,propertyValue:t,...o}){return Object.entries(e).map(([a,n])=>{const i=t&&typeof t=="object"?Oe(t,a):void 0,s=Fe({propertyKey:a,propertyOrBuilder:n,propertyValue:i,...o});return s?{[a]:s}:{}}).filter(a=>a!==null).reduce((a,n)=>({...a,...n}),{})}function vr(e,t){return typeof e.enumValues=="object"?{...e,resolved:!0,enumValues:Ue(e.enumValues)?.filter(o=>o&&o.id&&o.label)??[],fromBuilder:t??!1}:e}function en(e){return typeof e=="object"?Object.entries(e).map(([t,o])=>typeof o=="string"?{id:t,label:o}:o):Array.isArray(e)?e:void 0}function kr(e,t){return typeof e=="string"?t?.find(o=>o.key===e):e}function _r(e){const{path:t,collections:o=[],currentFullPath:a}=e,n=me(t).split("/"),i=Dt(n),s=[];for(let c=0;c<i.length;c++){const l=i[c],u=o&&o.find(m=>m.id===l||m.path===l);if(u){const m=u.id??u.path,h=a&&a.length>0?a+"/"+m:m;s.push({type:"collection",path:h,collection:u});const f=me(me(t).replace(l,"")),A=f.length>0?f.split("/"):[];if(A.length>0){const g=A[0],b=h+"/"+g;if(s.push({type:"entity",entityId:g,path:h,parentCollection:u}),A.length>1){const y=A.slice(1).join("/");if(!u)throw Error("collection not found resolving path: "+u);const k=u.entityViews,v=k&&k.map(_=>kr(_,e.contextEntityViews)).filter(Boolean).find(_=>_.key===y);if(v){const _=a&&a.length>0?a+"/"+v.key:v.key;s.push({type:"custom_view",path:_,view:v})}else u.subcollections&&s.push(..._r({path:y,collections:u.subcollections,currentFullPath:b,contextEntityViews:e.contextEntityViews}))}}break}}return s}function xr(e,t){try{const o=Object.keys(e);return(t??o).map(n=>{if(e[n]){const i=e[n];return!we(i)&&i?.dataType==="map"&&i.properties?{[n]:{...i,properties:xr(i.properties,i.propertiesOrder)}}:{[n]:i}}else return}).filter(n=>n!==void 0).reduce((n,i)=>({...n,...i}),{})}catch(o){return console.error("Error sorting properties",o),e}}function Cr(e,t){if(e)return typeof e=="string"?e:e(t)}const Oo=(e,t)=>e.map(o=>o.permissions?o:{...o,permissions:t}),tn=/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g,rn=e=>{const t=e.match(tn);return t?t.map(o=>o.toLowerCase()).join("-"):""},on=/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g,an=e=>{const t=e.match(on);return t?t.map(o=>o.toLowerCase()).join("_"):""};function st(e=5){return Math.random().toString(36).slice(2,2+e)}function nn(){return Math.floor(Math.random()*16777215).toString(16)}function jt(e,t="_",o=!0){if(!e)return"";const a="ãàáäâẽèéëêìíïîõòóöôùúüûñç·/_,:;-",n=`aaaaaeeeeeiiiiooooouuuunc${t}${t}${t}${t}${t}${t}${t}`;for(let i=0,s=a.length;i<s;i++)e=e.replace(new RegExp(a.charAt(i),"g"),n.charAt(i));return e=e.toString().replace(/\s+/g,t).replace(/&/g,t).replace(/[^\w\\-]+/g,"").replace(new RegExp("\\"+t+"\\"+t+"+","g"),t).trim().replace(/^\s+|\s+$/g,""),o?e.toLowerCase():e}function sn(e){return e?e.includes("-")||e.includes("_")||!e.includes(" ")?e.replace(/[-_]/g," ").replace(/\w\S*/g,function(o){return o.charAt(0).toUpperCase()+o.substr(1)}):e:""}const zo="MMMM dd, yyyy, HH:mm:ss",Vo="::";function Er(e){return Go(Br(e))}function Go(e){return e.length===1?e[0]:e.reduce((t,o)=>`${t}${Vo}${o}`)}function Br(e){return e.split("/").filter((t,o)=>o%2===0)}function ln(e){return e?e.toString():""}function Yo(e){if(!e)return;const t=e.match(/\/(.*?)\/([a-z]*)?$/i);return t?new RegExp(t[1],t[2]||""):new RegExp(e,"")}function cn(e){return e.match(/\/((?![*+?])(?:[^\r\n[/\\]|\\.|\[(?:[^\r\n\]\\]|\\.)*])+)\/((?:g(?:im?|mi?)?|i(?:gm?|mg?)?|m(?:gi?|ig?)?)?)/)?!0:!!e.match(/((?![*+?])(?:[^\r\n[/\\]|\\.|\[(?:[^\r\n\]\\]|\\.)*])+)/)}function Lt(e,t,o,a=300){const n=d.useRef(!1),i=()=>{t(),n.current=!1},s=d.useRef(void 0);d.useEffect(()=>(n.current=!0,clearTimeout(s.current),s.current=setTimeout(i,a),()=>{o&&i()}),[o,e])}function jo(e,t){const o=Fe({propertyKey:"ignore",propertyOrBuilder:e,fields:t});return o?o.dataType==="reference"?!0:o.dataType==="array"?Array.isArray(o.of)?!1:o.of?.dataType==="reference":!1:null}function dn(e){return r.jsx(p.CircleIcon,{size:e})}function Ut(e,t){const o=e?.Icon??p.CircleIcon;return r.jsx(o,{size:t})}function ve(e,t="small",o={}){if(we(e))return r.jsx(p.FunctionsIcon,{size:t});{const a=St(e,o);return Ut(a,t)}}function pn(e,t){return we(e)?"#888":St(e,t)?.color??"#666"}function Xe(e,t){if(typeof e=="object"){if(t in e)return e[t];if(t.includes(".")){const o=t.split("."),a=e[o[0]];if(typeof a=="object"&&a.dataType==="map"&&a.properties)return Xe(a.properties,o.slice(1).join("."))}}}function Sr(e,t){if(typeof e=="object"){if(t in e)return e[t];if(t.includes(".")){const o=t.split("."),a=e[o[0]];if(a.dataType==="map"&&a.properties)return Sr(a.properties,o.slice(1).join("."))}}}function un(e){return e.replace(/\.([^.]*)/g,"[$1]")}function Lo(e,t){if(!t)return e;const o={};return t.filter(Boolean).forEach(a=>{const n=Xe(e,a);typeof n=="object"&&n.dataType==="map"&&n.properties&&(o[a]={...n,properties:Lo(n.properties,n.propertiesOrder??[])}),n&&(o[a]=n)}),o}function mn(e){return e.propertiesOrder?e.propertiesOrder:[...Object.keys(e.properties),...(e.additionalFields??[]).map(t=>t.key)]}const qt={read:!0,edit:!0,create:!0,delete:!0};function kt(e,t,o,a){const n=e.permissions;if(n===void 0)return qt;if(typeof n=="object")return n;if(typeof n=="function"){const i=Br(o);return n({entity:a,path:o,user:t.user,authController:t,collection:e,pathSegments:i})}throw console.error("Permissions:",n),Error("New type of permission added and not mapped")}function Ir(e,t,o,a){return kt(e,t,o,a)?.edit??qt.edit}function lt(e,t,o,a){return kt(e,t,o,a)?.create??qt.create}function $t(e,t,o,a){return kt(e,t,o,a)?.delete??qt.delete}const Fr={abc:"alphabet character font letter symbol text type",access_alarm:"clock time",access_alarms:"clock time",accessibility:"accessible body handicap help human people person user",accessibility_new:"accessible arms body handicap help human people person user",accessible:"accessibility body handicap help human people person user wheelchair",accessible_forward:"accessibility body handicap help human people person wheelchair",access_time:"clock time",account_balance:"bank bill building card cash coin commerce court credit currency dollars finance money online payment structure temple transaction",account_balance_wallet:"bank bill card cash coin commerce credit currency dollars finance money online payment transaction",account_box:"avatar face human people person profile square thumbnail user",account_circle:"avatar face human people person profile thumbnail user",account_tree:"analytics chart connect data diagram flow infographic measure metrics process project sitemap square statistics structure tracking",ac_unit:"air cold conditioner freeze snowflake temperature weather winter",adb:"android bridge debug",add:"+ create item new plus symbol",add_alarm:"clock plus time",add_alert:"+ active alarm announcement bell callout chime information new notifications notify plus reminder ring sound symbol",add_a_photo:"+ camera lens new photography picture plus symbol",add_box:"create new plus square symbol",add_business:"+ bill building card cash coin commerce company credit currency dollars market money new online payment plus retail shopping storefront symbol",add_card:"+ bill cash coin commerce cost credit currency dollars finance money new online payment plus price shopping symbol",add_chart:"+ analytics bars data diagram infographic measure metrics new plus statistics symbol tracking",add_circle:"+ create new plus",add_circle_outline:"+ create new plus",add_comment:"+ bubble chat communicate feedback message new plus speech symbol",add_ic_call:"+ cell contact device hardware mobile new plus symbol telephone",add_link:"attach clip new plus symbol",add_location:"+ destination direction gps maps new pin place plus stop symbol",add_location_alt:"+ destination direction maps new pin place plus stop symbol",add_moderator:"+ certified new plus privacy private protection security shield symbol verified",add_photo_alternate:"+ image landscape mountains new photography picture plus symbol",add_road:"+ destination direction highway maps new plus stop street symbol traffic",add_shopping_cart:"card cash checkout coin commerce credit currency dollars money online payment plus",add_task:"+ approve check circle completed increase mark ok plus select tick yes",add_to_drive:"+ app backup cloud data files folders gdrive google plus recovery storage",add_to_home_screen:"Android add arrow cell device hardware iOS mobile phone tablet to up",add_to_photos:"collection image landscape mountains photography picture plus",add_to_queue:"+ Android backlog chrome desktop device display hardware iOS lineup mac monitor new plus screen symbol television watch web window",adf_scanner:"document feeder machine office",adjust:"alter center circles control dot edit filter fix image mix move setting slider sort switch target tune",admin_panel_settings:"account avatar certified face human people person privacy private profile protection security shield user verified",ad_units:"Android banner cell device hardware iOS mobile notifications phone tablet top",agriculture:"automobile cars cultivation farm harvest maps tractor transport travel truck vehicle",air:"blowing breeze flow wave weather wind",airlines:"airplane airport flight transportation travel trip",airline_seat_flat:"bed body business class first human people person rest sleep travel",airline_seat_flat_angled:"bed body business class first human people person rest sleep travel",airline_seat_individual_suite:"bed body business class first human people person rest sleep travel",airline_seat_legroom_extra:"body feet human people person sitting space travel",airline_seat_legroom_normal:"body feet human people person sitting space travel",airline_seat_legroom_reduced:"body feet human people person sitting space travel",airline_seat_recline_extra:"body feet human legroom people person sitting space travel",airline_seat_recline_normal:"body extra feet human legroom people person sitting space travel",airline_stops:"arrow destination direction layover location maps place transportation travel trip",airplanemode_active:"flight flying on signal",airplanemode_inactive:"airport disabled enabled flight flying maps offline slash transportation travel",airplane_ticket:"airport boarding flight fly maps pass transportation travel",airplay:"apple arrow cast connect control desktop device display monitor screen signal television tv",airport_shuttle:"automobile bus cars commercial delivery direction maps mini public transportation travel truck van vehicle",alarm:"alart bell clock countdown date notification schedule time",alarm_add:"+ alart bell clock countdown date new notification plus schedule symbol time",alarm_off:"alart bell clock disabled duration enabled notification slash stop timer watch",alarm_on:"alart bell checkmark clock disabled duration enabled notification off ready slash start timer watch",album:"artist audio bvb cd computer data disk file music play record sound storage track vinyl",align_horizontal_center:"alignment format layout lines paragraph rules style text",align_horizontal_left:"alignment format layout lines paragraph rules style text",align_horizontal_right:"alignment format layout lines paragraph rules style text",align_vertical_bottom:"alignment format layout lines paragraph rules style text",align_vertical_center:"alignment format layout lines paragraph rules style text",align_vertical_top:"alignment format layout lines paragraph rules style text",all_inbox:"Inbox delivered delivery email letter message post send",all_inclusive:"endless forever infinite infinity loop mobius neverending strip sustainability sustainable",all_out:"arrows circle directional expand shape",alternate_email:"@ address contact tag",alt_route:"alternate alternative arrows direction maps navigation options other routes split symbol",analytics:"assessment bar chart data diagram infographic measure metrics statistics tracking",anchor:"google logo",android:"brand character logo mascot operating system toy",animation:"circles film motion movement movie moving sequence video",announcement:"! alert attention balloon bubble caution chat comment communicate danger error exclamation feedback important mark message news notification speech symbol warning",aod:"Android always device display hardware homescreen iOS mobile phone tablet",apartment:"accommodation architecture building city company estate flat home house office places real residence residential shelter units workplace",api:"developer development enterprise software",app_blocking:"Android applications cancel cell device hardware iOS mobile phone stopped tablet",apple:"brand logo",app_registration:"apps edit pencil register",approval:"apply approvals approve certificate certification disapproval drive file impression ink mark postage stamp",apps:"all applications circles collection components dots grid homescreen icons interface squares ui ux",app_settings_alt:"Android applications cell device gear hardware iOS mobile phone tablet",app_shortcut:"bookmarked favorite highlight important mobile saved software special star",apps_outage:"all applications circles collection components dots grid interface squares ui ux",architecture:"art compass design drawing engineering geometric tool",archive:"inbox mail store",arrow_back:"application components direction interface left navigation previous screen ui ux website",arrow_back_ios:"application chevron components direction interface left navigation previous screen ui ux website",arrow_back_ios_new:"application chevron components direction interface left navigation previous screen ui ux website",arrow_circle_down:"direction navigation",arrow_circle_up:"direction navigation",arrow_downward:"application components direction interface navigation screen ui ux website",arrow_drop_down:"application components direction interface navigation screen ui ux website",arrow_drop_down_circle:"application components direction interface navigation screen ui ux website",arrow_drop_up:"application components direction interface navigation screen ui ux website",arrow_forward:"application arrows components direction interface navigation right screen ui ux website",arrow_forward_ios:"application chevron components direction interface navigation next right screen ui ux website",arrow_left:"application backstack backward components direction interface navigation previous screen ui ux website",arrow_right:"application components continue direction forward interface navigation screen ui ux website",arrow_right_alt:"arrows direction east navigation pointing shape",arrow_upward:"application components direction interface navigation screen submit ui ux website",article:"clarify document file news page paper text writing",art_track:"album artist audio display format image insert music photography picture sound tracks",aspect_ratio:"expand image monitor resize resolution scale screen square",assessment:"analytics bars chart data diagram infographic measure metrics report statistics tracking",assignment:"article clipboard document task text writing",assignment_ind:"account clipboard document face people person profile task user",assignment_late:"! alert announcement attention caution clipboard danger document error exclamation important mark notification symbol task warning",assignment_return:"arrow back clipboard document left point retun task",assignment_returned:"arrow clipboard document down point task",assignment_turned_in:"approve checkmark clipboard complete document done finished ok select task tick validate verified yes",assistant:"bubble chat comment communicate feedback message recommendation speech star suggestion twinkle",assistant_direction:"destination location maps navigate navigation pin place right stop",assistant_photo:"flag recommendation smart star suggestion",assured_workload:"compliance confidential federal government regulatory secure sensitive",atm:"alphabet automated bill card cart cash character coin commerce credit currency dollars font letter machine money online payment shopping symbol teller text type",attach_email:"attachment clip compose envelop letter link message send",attach_file:"add item link mail media paperclip",attachment:"compose file image item link paperclip",attach_money:"bill card cash coin commerce cost credit currency dollars finance online payment price profit sale symbol",attractions:"amusement entertainment ferris fun maps park places wheel",attribution:"attribute body copyright copywriter human people person",audio_file:"document key music note sound track",audiotrack:"key music note sound",auto_awesome:"adjust editing enhance filter image photography photos setting stars",auto_awesome_mosaic:"adjust collage editing enhance filter grid image layout photographs photography photos pictures setting",auto_awesome_motion:"adjust animation collage editing enhance filter image live photographs photography photos pictures setting video",auto_delete:"bin can clock date garbage remove schedule time trash",auto_fix_high:"adjust editing enhance erase magic modify pen stars tool wand",auto_fix_normal:"edit erase magic modify stars wand",auto_fix_off:"disabled edit enabled erase magic modify on slash stars wand",autofps_select:"A alphabet character font frame frequency letter per rate seconds symbol text type",auto_graph:"analytics chart data diagram infographic line measure metrics stars statistics tracking",auto_mode:"around arrows direction inprogress loading navigation nest refresh renew rotate turn",autorenew:"around arrows cached direction inprogress loader loading navigation pending refresh rotate status turn",auto_stories:"audiobook flipping pages reading story",av_timer:"clock countdown duration minutes seconds stopwatch",baby_changing_station:"babies bathroom body children father human infant kids mother newborn people person toddler wc young",backpack:"bookbag knapsack storage travel",backspace:"arrow cancel clear correct delete erase remove",backup:"arrow cloud data drive files folders point storage submit upload",backup_table:"drive files folders format layout stack storage",badge:"account avatar card certified employee face human identification name people person profile security user work",bakery_dining:"bread breakfast brunch croissant food",balance:"equal equilibrium equity impartiality justice parity stability. steadiness symmetry",balcony:"architecture doors estate home house maps outside place real residence residential stay terrace window",ballot:"bullet bulllet election list point poll vote",bar_chart:"analytics anlytics data diagram infographic measure metrics statistics tracking",batch_prediction:"bulb idea light",bathroom:"closet home house place plumbing shower sprinkler wash water wc",bathtub:"bathing bathroom clean home hotel human person shower travel",battery_alert:"! attention caution cell charge danger error exclamation important mark mobile notification power symbol warning",battery_charging_full:"cell charge lightening lightning mobile power thunderbolt",battery_full:"cell charge mobile power",battery_saver:"+ add charge charging new plus power symbol",battery_std:"cell charge mobile plus power standard",battery_unknown:"? assistance cell charge help information mark mobile power punctuation question support symbol",beach_access:"parasol places summer sunny umbrella",bed:"bedroom double full furniture home hotel house king night pillows queen rest size sleep",bedroom_baby:"babies children home horse house infant kid newborn rocking toddler young",bedroom_child:"children furniture home hotel house kid night pillows rest size sleep twin young",bedroom_parent:"double full furniture home hotel house king master night pillows queen rest sizem sleep",bedtime:"nightime sleep",bedtime_off:"nightime sleep",beenhere:"approve archive bookmark checkmark complete done favorite label library reading remember ribbon save select tag tick validate verified yes",bento:"box dinner food lunch meal restaurant takeout",bike_scooter:"automobile cars maps transportation vehicle vespa",biotech:"chemistry laboratory microscope research science technology test",blender:"appliance cooking electric juicer kitchen machine vitamix",blinds_closed:"cover curtains nest shutter sunshade",block:"allowed avoid banned cancel close disable entry exit not prohibited quit remove stop",bloodtype:"donate droplet emergency hospital medicine negative positive water",bluetooth:"cast connection device network paring streaming symbol wireless",bluetooth_audio:"connection device music signal sound symbol",bluetooth_connected:"cast connection device network paring streaming symbol wireless",bluetooth_disabled:"cast connection device enabled network offline paring slash streaming symbol wireless",bluetooth_drive:"automobile cars cast connection device maps paring streaming symbol transportation travel vehicle wireless",bluetooth_searching:"connection device network paring symbol wireless",blur_circular:"circle dots editing effect enhance filter",blur_linear:"dots editing effect enhance filter",blur_off:"disabled dots editing effect enabled enhance on slash",blur_on:"disabled dots editing effect enabled enhance filter off slash",bolt:"electric energy fast flash lightning power thunderbolt",book:"blog bookmark favorite label library reading remember ribbon save tag",bookmark:"archive favorite follow label library reading remember ribbon save tag",bookmark_add:"+ favorite plus remember ribbon save symbol",bookmark_added:"approve check complete done favorite remember save select tick validate verified yes",bookmark_border:"archive favorite label library outline reading remember ribbon save tag",bookmark_remove:"delete favorite minus remember ribbon save subtract",bookmarks:"favorite label layers library multiple reading remember ribbon save stack tag",book_online:"Android admission appointment cell device event hardware iOS mobile pass phone reservation tablet ticket",border_all:"doc editing editor spreadsheet stroke text type writing",border_bottom:"doc editing editor spreadsheet stroke text type writing",border_clear:"doc editing editor spreadsheet stroke text type writing",border_color:"all create doc editing editor marker pencil spreadsheet stroke text type writing",border_horizontal:"doc editing editor spreadsheet stroke text type writing",border_inner:"doc editing editor spreadsheet stroke text type writing",border_left:"doc editing editor spreadsheet stroke text type writing",border_outer:"doc editing editor spreadsheet stroke text type writing",border_right:"doc editing editor spreadsheet stroke text type writing",border_style:"color doc editing editor spreadsheet stroke text type writing",border_top:"doc editing editor spreadsheet stroke text type writing",border_vertical:"doc editing editor spreadsheet stroke text type writing",boy:"body gender human male people person social symbol",branding_watermark:"components copyright design emblem format identity interface layout logo screen stamp ui ux website window",breakfast_dining:"bakery bread butter food toast",brightness_1:"circle control crescent cresent level moon screen",brightness_2:"circle control crescent cresent level moon night screen",brightness_3:"circle control crescent cresent level moon night screen",brightness_4:"circle control crescent cresent dark level moon night screen sun",brightness_5:"circle control crescent cresent level moon screen sun",brightness_6:"circle control crescent cresent level moon screen sun",brightness_7:"circle control crescent cresent level light moon screen sun",brightness_auto:"A control display level mobile monitor phone screen",brightness_high:"auto control mobile monitor phone",brightness_low:"auto control mobile monitor phone",brightness_medium:"auto control mobile monitor phone",broken_image:"corrupt error landscape mountains photography picture torn",browser_not_supported:"disabled enabled internet off on page screen slash website www",browser_updated:"Android arrow chrome desktop device display download hardware iOS mac monitor screen web window",brunch_dining:"breakfast champagne champaign drink food lunch meal",brush:"art design draw editing painting tool",bubble_chart:"analytics bars data diagram infographic measure metrics statistics tracking",bug_report:"animal file fix insect issue problem testing ticket virus warning",build:"adjust fix repair spanner tool wrench",build_circle:"adjust fix repair tool wrench",bungalow:"architecture cottage estate home house maps place real residence residential stay traveling",burst_mode:"image landscape mountains multiple photography picture",bus_alert:"! attention automobile cars caution danger error exclamation important maps mark notification symbol transportation vehicle warning",business:"address apartment architecture building company estate flat home office place real residence residential shelter structure",business_center:"baggage briefcase places purse suitcase work",cabin:"architecture camping cottage estate home house log maps place real residence residential stay traveling wood",cable:"connection device electronics usb wire",cached:"around arrows inprogress loader loading refresh reload renew rotate",cake:"baked birthday candles celebration dessert food frosting party pastries pastry pie social sweet",calculate:"+ - = calculator count finance math",calendar_today:"date event month remember reminder schedule week",calendar_view_day:"date event format grid layout month remember reminder schedule today week",calendar_view_month:"date event format grid layout schedule today",calendar_view_week:"date event format grid layout month schedule today",call:"cell contact device hardware mobile talk telephone",call_end:"cell contact device hardware mobile talk telephone",call_made:"arrow device mobile",call_merge:"arrow device mobile",call_missed:"arrow device mobile",call_missed_outgoing:"arrow device mobile",call_received:"arrow device mobile",call_split:"arrow device mobile",call_to_action:"alert bar components cta design information interface layout message notification screen ui ux website window",camera:"album aperture lens photography picture record screenshot shutter",camera_alt:"image photography picture",camera_enhance:"important lens photography picture quality special star",camera_front:"body human lens mobile person phone photography portrait selfie",camera_indoor:"architecture building estate filming home house image inside motion nest picture place real residence residential shelter videography",camera_outdoor:"architecture building estate filming home house image motion nest outside picture place real residence residential shelter videography",camera_rear:"front lens mobile phone photography picture portrait selfie",camera_roll:"film image library photography",cameraswitch:"arrows flip rotate swap view",campaign:"alert announcement loud megaphone microphone notification speaker",cancel:"circle close cross disable exit status stop",cancel_presentation:"close device exit no quit remove screen share slide stop website window",cancel_schedule_send:"email no quit remove share stop x",candlestick_chart:"analytics data diagram finance infographic measure metrics statistics tracking",card_giftcard:"account balance bill cart cash certificate coin commerce creditcard currency dollars money online payment present shopping",card_membership:"bill bookmark cash certificate coin commerce cost creditcard currency dollars finance loyalty money online payment shopping subscription",card_travel:"bill cash coin commerce cost creditcard currency dollars finance membership miles money online payment trip",carpenter:"building construction cutting handyman repair saw tool",car_rental:"automobile cars key maps transportation vehicle",car_repair:"automobile cars maps transportation vehicle",cases:"baggage briefcase business purse suitcase",casino:"dice dots entertainment gamble gambling games luck places",cast:"Android airplay chromecast connect desktop device display hardware iOS mac monitor screencast streaming television tv web window wireless",cast_connected:"Android airplay chromecast desktop device display hardware iOS mac monitor screencast streaming television tv web window wireless",cast_for_education:"Android airplay chrome connect desktop device display hardware iOS learning lessons mac monitor screencast streaming teaching television tv web window wireless",catching_pokemon:"go pokestop travel",category:"categories circle collection items product sort square triangle",celebration:"activity birthday event fun party",cell_tower:"broadcast casting network signal transmitting wireless",cell_wifi:"connection data internet mobile network phone service signal wireless",center_focus_strong:"camera image lens photography zoom",center_focus_weak:"camera image lens photography zoom",chair:"comfort couch decoration furniture home house living lounging loveseat room seating sofa",chair_alt:"cahir furniture home house kitchen lounging seating table",chalet:"architecture cottage estate home house maps place real residence residential stay traveling",change_circle:"around arrows direction navigation rotate",change_history:"shape triangle",charging_station:"Android battery cell device electric hardware iOS lightning mobile phone tablet thunderbolt",chat:"bubble comment communicate feedback message speech talk text",chat_bubble:"comment communicate feedback message speech talk text",chat_bubble_outline:"comment communicate feedback message speech talk text",check:"checkmark complete confirm correct done enter okay purchased select success tick yes",check_box:"approved button checkmark component control form ok selected selection square success tick toggle ui yes",check_box_outline_blank:"button checkmark component control deselected empty form selection square tick toggle ui",check_circle:"approve checkmark complete done download finished ok select success tick upload validate verified yes",check_circle_outline:"approve checkmark complete done finished ok select success tick validate verified yes",checkroom:"check closet clothes coat hanger",chevron_left:"arrows back direction triangle",chevron_right:"arrows direction forward triangle",child_care:"babies baby children face infant kids newborn toddler young",child_friendly:"baby care carriage children infant kid newborn stroller toddler young",chrome_reader_mode:"text",circle:"bullet button dot full geometry moon period radio",circle_notifications:"active alarm alert bell chime notify reminder ring sound",class:"archive bookmark category favorite item label library reading remember ribbon save tag",clean_hands:"bacteria disinfect germs gesture sanitizer",cleaning_services:"dust sweep",clear:"allowed back cancel correct cross delete disable erase exit not times",clear_all:"delete document erase format lines list notifications wipe",close:"allowed cancel cross disable exit not status stop times",closed_caption:"accessible alphabet character decoder font language letter media movies subtitles symbol text tv type",closed_caption_disabled:"accessible alphabet character decoder enabled font language letter media movies off slash subtitles symbol text tv type",closed_caption_off:"accessible alphabet character decoder font language letter media movies outline subtitles symbol text tv type",close_fullscreen:"action arrows collapse direction minimize",cloud:"connection internet network sky upload weather",cloud_circle:"application backup connection drive files folders internet network sky storage upload",cloud_done:"application approve backup checkmark complete connection drive files folders internet network ok select sky storage tick upload validate verified yes",cloud_download:"application arrow backup connection drive files folders internet network sky storage upload",cloud_off:"application backup connection disabled drive enabled files folders internet network offline sky slash storage upload",cloud_queue:"connection internet network sky upload",cloud_sync:"application around backup connection drive files folders inprogress internet loading network refresh renew rotate sky storage turn upload",cloud_upload:"application arrow backup connection download drive files folders internet network sky storage",co2:"carbon dioxide gas",code:"brackets css developer engineering html parenthesis platform",code_off:"brackets css developer disabled enabled engineering html on platform slash",coffee:"beverage cup drink mug plate set tea",coffee_maker:"appliances beverage cup drink machine mug",collections:"album gallery image landscape library mountains photography picture stack",collections_bookmark:"album archive favorite gallery label library reading remember ribbon save stack tag",colorize:"color dropper extract eye picker pipette tool",color_lens:"art paint pallet",comment:"bubble chat communicate document feedback message note outline speech",comment_bank:"archive bookmark bubble cchat communicate favorite label library message remember ribbon save speech tag",comments_disabled:"bubble chat communicate enabled feedback message offline on slash speech",commit:"accomplish bind circle dedicate execute line perform pledge",commute:"automobile car direction maps public train transportation trip vehicle",compare:"adjustment editing edits enhance fix images photography photos scan settings",compare_arrows:"collide directional facing left pointing pressure push right together",compass_calibration:"connection internet location maps network refresh service signal wifi wireless",compress:"arrows collide pressure push together",computer:"Android chrome desktop device hardware iOS laptop mac monitor pc web window",confirmation_number:"admission entertainment event ticket",connected_tv:"Android airplay chrome desktop device display hardware iOS mac monitor screencast streaming television web window wireless",connecting_airports:"airplanes flight transportation travel trip",connect_without_contact:"communicating distance people signal socialize",construction:"build carpenter equipment fix hammer improvement industrial industry repair tools wrench",contactless:"applepay bluetooth cash connection connectivity credit device finance payment signal tap transaction wifi wireless",contact_mail:"account address avatar communicate email face human information message people person profile user",contact_page:"account avatar data document drive face folders human people person profile sheet slide storage user writing",contact_phone:"account avatar call communicate face human information message mobile number people person profile user",contacts:"account address avatar call cell face human information mobile number people person phone profile user",contact_support:"? alert announcement bubble chat comment communicate help information mark message punctuation speech symbol vquestion",content_copy:"cut document duplicate file multiple past",content_cut:"copy document file past scissors trim",content_paste:"clipboard copy cut document file multiple",content_paste_go:"clipboard disabled document enabled file slash",content_paste_off:"clipboard disabled document enabled file slash",content_paste_search:"clipboard document file find trace track",contrast:"black editing effect filter grayscale images photography pictures settings white",control_camera:"adjust arrows center direction left move right",control_point:"+ add circle plus",control_point_duplicate:"+ add circle multiple new plus symbol",co_present:"arrow co-present presentation screen share slides togather website",copy_all:"content cut document file multiple page paper past",copyright:"alphabet character circle emblem font legal letter owner symbol text",coronavirus:"19 bacteria covid disease germs illness sick social",corporate_fare:"architecture building business estate organization place real residence residential shelter",cottage:"architecture beach estate home house lake lodge maps place real residence residential stay traveling",countertops:"home house kitchen sink table",create:"compose editing input item new pencil write writing",create_new_folder:"+ add data directory document drive file plus sheet slide storage symbol",credit_card:"bill cash charge coin commerce cost creditcard currency dollars finance information money online payment price shopping symbol",credit_card_off:"charge commerce cost disabled enabled finance money online payment slash",credit_score:"approve bill card cash check coin commerce complete cost currency dollars done finance loan mark money ok online payment select symbol tick validate verified yes",crib:"babies baby bassinet bed children cradle infant kid newborn sleeping toddler",crop:"adjustments area editing frame images photos rectangle settings size square",crop_169:"adjustments area by editing frame images photos picture rectangle settings size square",crop_32:"adjustments area by editing frame images photos picture rectangle settings size square",crop_54:"adjustments area by editing frame images photos picture rectangle settings size square",crop_75:"adjustments area by editing frame images photos picture rectangle settings size square",crop_din:"adjustments area editing frame images photos picture rectangle settings size square",crop_free:"adjustments barcode editing focus frame image photos qrcode settings size square zoom",crop_landscape:"adjustments area editing frame images photos picture settings size square",crop_original:"adjustments area editing frame images photos picture settings size square",crop_portrait:"adjustments area editing frame images photos picture rectangle settings size square",crop_rotate:"adjustments area arrows editing frame images photos settings size turn",crop_square:"adjustments area editing frame images photos rectangle settings size",css:"alphabet brackets character code developer engineering font html letter platform symbol text type",currency_exchange:"360 around arrows cash coin commerce direction dollars inprogress money pay renew rotate sync turn universal",currency_franc:"bill card cash coin commerce cost credit dollars finance money online payment price shopping symbol",currency_lira:"bill card cash coin commerce cost credit dollars finance money online payment price shopping symbol",currency_pound:"bill card cash coin commerce cost credit dollars finance money online payment price shopping symbol",currency_ruble:"bill card cash coin commerce cost credit dollars finance money online payment price shopping symbol",currency_rupee:"bill card cash coin commerce cost credit dollars finance money online payment price shopping symbol",currency_yen:"bill card cash coin commerce cost credit dollars finance money online payment price shopping symbol",currency_yuan:"bill card cash coin commerce cost credit dollars finance money online payment price shopping symbol",curtains:"blinds cover nest open shutter sunshade",curtains_closed:"blinds cover nest shutter sunshade",dangerous:"broken fix no sign stop update warning wrong",dark_mode:"application device interface moon night silent theme ui ux website",dashboard:"cards format layout rectangle shapes square website",dashboard_customize:"cards format layout rectangle shapes square website",data_saver_off:"analytics bars chart diagram donut infographic measure metrics ring statistics tracking",data_saver_on:"+ add analytics chart diagram infographic measure metrics new plus ring statistics symbol tracking",data_thresholding:"hidden privacy thresold",data_usage:"analytics chart circle diagram infographic measure metrics statistics tracking",date_range:"agenda calendar event month remember reminder schedule time today week",deblur:"adjust editing enhance face image lines photography sharpen",deck:"chairs furniture garden home house outdoors outside patio social terrace umbrella yard",dehaze:"adjust editing enhance image lines photography remove",delete:"bin garbage junk recycle remove trashcan",delete_forever:"bin cancel exit garbage junk recycle remove trashcan",delete_outline:"bin can garbage remove trash",delete_sweep:"bin garbage junk recycle remove trashcan",delivery_dining:"food meal restaurant scooter takeout transportation vehicle vespa",density_large:"horizontal lines rules",density_medium:"horizontal lines rules",density_small:"horizontal lines rules",departure_board:"automobile bus cars clock maps public schedule time transportation travel vehicle",description:"article bill data document drive file folders invoice item notes page paper sheet slide text writing",desktop_access_disabled:"Android apple chrome device display enabled hardware iOS mac monitor offline pc screen slash web window",desktop_mac:"Android apple chrome device display hardware iOS monitor pc screen web window",desktop_windows:"Android chrome device display hardware iOS mac monitor pc screen television tv web",details:"editing enhance image photography sharpen triangle",developer_board:"computer development devkit hardware microchip processor",developer_board_off:"computer development disabled enabled hardware microchip on processor slash",developer_mode:"Android bracket cell code development device engineer hardware iOS mobile phone tablet",device_hub:"Android circle computer desktop hardware iOS laptop mobile monitor phone square tablet triangle watch wearable web",devices:"Android computer desktop hardware iOS laptop mobile monitor phone tablet watch wearable web",devices_other:"Android cell chrome desktop gadget hardware iOS ipad mac mobile monitor phone smartwatch tablet vr wearables window",device_thermostat:"celsius fahrenheit temperature thermometer",device_unknown:"? Android assistance cell hardware help iOS information mark mobile phone punctuation question support symbol tablet",dialer_sip:"alphabet call cell character contact device font hardware initiation internet letter mobile over protocol routing session symbol telephone text type voice",dialpad:"buttons call contact device dots mobile numbers phone",diamond:"fashion gems jewelry logo retail valuables",difference:"compare content copy cut document duplicate file multiple past",dining:"cafeteria cutlery diner eating fork room spoon",dinner_dining:"breakfast food fork lunch meal restaurant spaghetti utensils",directions:"arrow maps naviate right route sign traffic",directions_bike:"bicycle human maps person public route transportation",directions_boat:"automobile cars ferry maps public transportation vehicle",directions_boat_filled:"automobile cars ferry maps public transportation vehicle",directions_bus:"automobile cars maps public transportation vehicle",directions_bus_filled:"automobile cars maps public transportation vehicle",directions_car:"automobile cars maps public transportation vehicle",directions_car_filled:"automobile cars maps public transportation vehicle",directions_off:"arrow disabled enabled maps right route sign slash traffic",directions_railway:"automobile cars maps public train transportation vehicle",directions_railway_filled:"automobile cars maps public train transportation vehicle",directions_run:"body health human jogging maps people person route running walk",directions_subway:"automobile cars maps public rail train transportation vehicle",directions_subway_filled:"automobile cars maps public rail train transportation vehicle",directions_transit:"automobile cars maps metro public rail subway train transportation vehicle",directions_transit_filled:"automobile cars maps public rail subway train transportation vehicle",directions_walk:"body human jogging maps people person route run",dirty_lens:"camera photography picture splat",disabled_by_default:"box cancel close exit no quit remove square stop",disc_full:"! alert attention caution cd danger error exclamation important mark music notification storage symbol vinyl warning",display_settings:"Android application change chrome desktop details device gear hardware iOS information mac monitor options personal screen service web window",dns:"address bars domain information ip list lookup name network server system",dock:"Android cell charger charging connector device hardware iOS mobile phone power station tablet",document_scanner:"article data drive file folders notes page paper sheet slide text writing",do_disturb:"cancel close denied deny remove silence stop",do_disturb_alt:"cancel close denied deny remove silence stop",do_disturb_off:"cancel close denied deny disabled enabled on remove silence slash stop",do_disturb_on:"cancel close denied deny disabled enabled off remove silence slash stop",domain:"apartment architecture building business estate home place real residence residential shelter web www",domain_add:"+ apartment architecture building business estate home new place plus real residence residential shelter symbol web www",domain_disabled:"apartment architecture building business company enabled estate home internet maps office offline on place real residence residential slash website",domain_verification:"application approve check complete design desktop done interface internet layout mark ok screen select tick ui ux validate verified website window www yes",done:"approve checkmark complete finished ok select success tick validate verified yes",done_all:"approve checkmark complete finished layers multiple ok select stack success tick validate verified yes",done_outline:"all approve checkmark complete finished ok select success tick validate verified yes",do_not_disturb:"cancel close denied deny remove silence stop",do_not_disturb_alt:"cancel close denied deny remove silence stop",do_not_disturb_off:"cancel close denied deny disabled enabled on remove silence slash stop",do_not_disturb_on:"cancel close denied deny disabled enabled off remove silence slash stop",do_not_disturb_on_total_silence:"busy mute on quiet total",do_not_step:"boot disabled enabled feet foot off on shoe slash sneaker",do_not_touch:"disabled enabled fingers gesture hand off on slash",donut_large:"analytics chart circle complete data diagram infographic inprogress, measure metrics pie statistics tracking",donut_small:"analytics chart circle data diagram infographic inprogress measure metrics pie statistics tracking",door_back:"closed doorway entrance exit home house",doorbell:"alarm home house ringing",door_front:"closed doorway entrance exit home house",door_sliding:"automatic doorway double entrance exit glass home house two",double_arrow:"arrows chevron direction multiple navigation right",downhill_skiing:"athlete athletic body entertainment exercise hobby human people person ski snow social sports travel winter",download:"arrow downloads drive install upload",download_done:"arrows check downloads drive installed ok tick upload",download_for_offline:"arrow circle for install offline upload",downloading:"arrow circle downloads install pending progress upload",drafts:"document email envelope file letter message read",drag_handle:"application components design interface layout lines menu move screen ui ux website window",drag_indicator:"application circles components design dots drop interface layout mobile monitor move phone screen shape shift tablet ui ux website window",drive_eta:"automobile cars destination direction estimate maps public transportation travel trip vehicle",drive_file_move:"arrows data direction document folders right sheet side slide storage",drive_file_rename_outline:"compose create draft editing input pencil write writing",drive_folder_upload:"arrow data document file sheet slide storage",dry:"air bathroom dryer fingers gesture hand wc",dry_cleaning:"hanger hotel laundry places service towel",duo:"call chat conference device video",dvr:"Android audio chrome computer desktop device display electronic hardware iOS laptop list mac monitor recorder screen tv video web window",dynamic_feed:"layer live multiple post refresh update",dynamic_form:"code electric fast lightning lists questionnaire thunderbolt",earbuds:"accessory audio earphone headphone listen music sound",earbuds_battery:"accessory audio charging earphone headphone listen music sound",east:"arrow directional maps navigation right",edgesensor_high:"Android cell device hardware iOS mobile move phone sensitivity tablet vibrate",edgesensor_low:"Android cell device hardware iOS mobile move phone sensitivity tablet vibrate",edit:"compose create editing input new pencil write writing",edit_attributes:"approve attribution check complete done mark ok select tick validate verified yes",edit_location:"destination direction gps maps pencil pin place stop write",edit_location_alt:"pencil pin",edit_notifications:"active alarm alert bell chime compose create draft editing input new notify pencil reminder ring sound write writing",edit_off:"compose create disabled draft editing enabled input new offline on pencil slash write writing",edit_road:"destination direction highway maps pencil street traffic",egg:"breakfast brunch food",egg_alt:"breakfast brunch food",eighteen_mp:"camera digits font image letters megapixels numbers quality resolution symbol text type",eight_k:"8000 8K alphabet character digit display font letter number pixels resolution symbol text type video",eight_k_plus:"+ 7000 8K alphabet character digit display font letter number pixels resolution symbol text type video",eight_mp:"camera digit font image letters megapixels number quality resolution symbol text type",eightteen_mp:"camera digits font image letters megapixels numbers quality resolution symbol text type",eject:"arrow disc drive dvd player remove triangle up usb",elderly:"body cane human old people person senior",elderly_woman:"body cane female gender girl human lady old people person senior social symbol women",electrical_services:"charge cord plug power wire",electric_bike:"automobile cars electricity maps scooter transportation travel vehicle vespa",electric_bolt:"energy fast lightning nest thunderbolt",electric_car:"automobile cars electricity maps transportation travel vehicle",electric_meter:"energy fast lightning measure nest thunderbolt usage voltage volts",electric_moped:"automobile bike cars maps scooter transportation travel vehicle vespa",electric_rickshaw:"automobile cars india maps transportation truck vehicle",electric_scooter:"automobile bike cars maps transportation vehicle vespa",elevator:"body down human people person up",eleven_mp:"camera digits font image letters megapixels numbers quality resolution symbol text type",email:"envelope letter message note post receive send write",e_mobiledata:"alphabet font letter text type",emoji_emotions:"emoticon expressions face feelings glad happiness happy like mood person pleased smiley smiling social survey",emoji_events:"achievement award chalice champion cup first prize reward sport trophy winner",emoji_food_beverage:"coffee cup dring drink mug plate set tea",emoji_nature:"animal bee daisy flower honey insect ladybug petals spring summer",emoji_objects:"creative idea lamp lightbulb solution thinking",emoji_people:"arm body greeting human person social wave waving",emoji_symbols:"ampersand character hieroglyph music note percent sign",emoji_transportation:"architecture automobile building cars commute company direction estate maps office place public real residence residential shelter travel vehicle",energy_savings_leaf:"eco leaves nest usage",engineering:"body cogs cogwheel construction fixing gears hat helmet human maintenance people person setting worker",enhanced_encryption:"+ add locked new password plus privacy private protection safety secure security symbol",equalizer:"adjustment analytics chart data graph measure metrics music noise sound static statistics tracking volume",error:"! alert announcement attention caution circle danger exclamation feedback important mark notification problem symbol warning",error_outline:"! alert announcement attention caution circle danger exclamation feedback important mark notification problem symbol warning",escalator:"down staircase up",escalator_warning:"body child human kid parent people person",euro:"bill card cash coin commerce cost credit currency dollars euros finance money online payment price profit shopping symbol",euro_symbol:"bill card cash coin commerce cost credit currency dollars finance money online payment price profit",event:"agenda calendar date item mark month range remember reminder today week",event_available:"agenda approve calendar check complete done item mark ok schedule select tick time validate verified yes",event_busy:"agenda calendar cancel close date exit item no remove schedule stop time unavailable",event_note:"agenda calendar date item schedule text time writing",event_repeat:"around calendar date day inprogress loading month refresh renew rotate schedule turn",event_seat:"assigned bench chair furniture reservation row section sit",ev_station:"automobile cars charge charging electricity filling fuel gasoline maps places power station transportation vehicle",exit_to_app:"application arrow back components design export interface layout leave login logout mobile monitor move output phone pointing quit register right screen signin signout signup tablet ux website window",expand:"arrows compress enlarge grow move push together",expand_circle_down:"arrows chevron collapse direction expandable list more",expand_less:"arrows chevron collapse direction expandable list up",expand_more:"arrows chevron collapse direction down expandable list",explicit:"adult alphabet character content font language letter media movies music parent rating supervision symbol text type",explore:"compass destination direction east location maps needle north south travel west",explore_off:"compass destination direction disabled east enabled location maps needle north slash south travel west",exposure:"add brightness contrast editing effect image minus photography picture plus settings subtract",extension:"add-ons app extended game item jigsaw piece plugin puzzle shape",extension_off:"disabled enabled extended jigsaw piece puzzle shape slash",face:"account avatar emoji eyes human login logout people person profile recognition security social thumbnail unlock user",facebook:"brand logo social",face_retouching_natural:"editing effect emoji emotion faces image photography settings star tag",face_retouching_off:"disabled editing effect emoji emotion enabled faces image natural photography settings slash tag",fact_check:"approve complete done list mark ok select tick validate verified yes",factory:"industry manufacturing warehouse",family_restroom:"bathroom children father kids mother parents wc",fastfood:"drink hamburger maps meal places",fast_forward:"control ff media music play speed time tv video",fast_rewind:"back control media music play speed time tv video",favorite:"appreciate health heart like love remember save shape success",favorite_border:"health heart like love outline remember save shape success",fax:"machine office phone send",featured_play_list:"audio collection highlighted item music playlist recommended",featured_video:"advertisement advertisment highlighted item play recommended watch,advertised",feed:"article headline information newspaper public social timeline",feedback:"! alert announcement attention bubble caution chat comment communicate danger error exclamation important mark message notification speech symbol warning",female:"gender girl lady social symbol woman women",fence:"backyard barrier boundaries boundary home house protection",festival:"circus event local maps places tent tour travel",fiber_dvr:"alphabet character digital electronics font letter network recorder symbol text tv type video",fiber_manual_record:"circle dot play watch",fiber_new:"alphabet character font letter network symbol text type",fiber_pin:"alphabet character font letter network symbol text type",fiber_smart_record:"circle dot play watch",fifteen_mp:"camera digits font image letters megapixels numbers quality resolution symbol text type",file_copy:"bill clone content cut document duplicate invoice item multiple page past",file_download:"arrows downloads drive export install upload",file_download_done:"arrows check downloads drive installed tick upload",file_download_off:"arrow disabled drive enabled export install on save slash upload",file_open:"arrow document drive left page paper",file_present:"clip data document drive folders note paper reminder sheet slide storage writing",file_upload:"arrows download drive export",filter:"editing effect image landscape mountains photography picture settings",filter_1:"digit editing effect images multiple number photography pictures settings stack symbol",filter_2:"digit editing effect images multiple number photography pictures settings stack symbol",filter_3:"digit editing effect images multiple number photography pictures settings stack symbol",filter_4:"digit editing effect images multiple number photography pictures settings stack symbol",filter_5:"digit editing effect images multiple number photography pictures settings stack symbol",filter_6:"digit editing effect images multiple number photography pictures settings stack symbol",filter_7:"digit editing effect images multiple number photography pictures settings stack symbol",filter_8:"digit editing effect images multiple number photography pictures settings stack symbol",filter_9:"digit editing effect images multiple number photography pictures settings stack symbol",filter_9_plus:"+ digit editing effect images multiple number photography pictures settings stack symbol",filter_alt:"edit funnel options refine sift",filter_alt_off:"[offline] disabled edit funnel options refine sift slash",filter_b_and_w:"black contrast editing effect grayscale images photography pictures settings white",filter_center_focus:"camera dot edit image photography picture",filter_drama:"camera cloud editing effect image photography picture sky",filter_frames:"boarders border camera center editing effect filters focus image options photography picture",filter_hdr:"camera editing effect image mountains photography picture",filter_list:"lines organize sort",filter_list_off:"[offline] alt disabled edit options refine sift slash",filter_none:"multiple stack",filter_tilt_shift:"blur center editing effect focus images photography pictures",filter_vintage:"editing effect flower images photography pictures",find_in_page:"data document drive file folders glass look magnifying paper search see sheet slide writing",find_replace:"around arrows glass inprogress loading look magnifying refresh renew rotate search see",fingerprint:"biometrics identification identity reader thumbprint touchid verification",fire_extinguisher:"emergency water",fireplace:"chimney flame home house living pit room warm winter",first_page:"arrow back chevron left rewind",fitbit:"athlete athletic exercise fitness hobby",fitness_center:"athlete dumbbell exercise gym health hobby places sport weights workout",fit_screen:"enlarge format layout reduce scale size",five_g:"5g alphabet cellular character data digit font letter mobile network number phone signal speed symbol text type wifi",five_k:"5000 5K alphabet character digit display font letter number pixels resolution symbol text type video",five_k_plus:"+ 5000 5K alphabet character digit display font letter number pixels resolution symbol text type video",five_mp:"camera digit font image letters megapixels number quality resolution symbol text type",fivteen_mp:"camera digits font image letters megapixels numbers quality resolution symbol text type",flag:"country goal mark nation report start",flag_circle:"country goal mark nation report round start",flaky:"approve check close complete contrast done exit mark no ok options select stop tick verified yes",flare:"bright editing effect images lensflare light photography pictures shine sparkle star sun",flash_auto:"camera electric fast lightning thunderbolt",flashlight_off:"disabled enabled on slash",flashlight_on:"disabled enabled off slash",flash_off:"camera disabled electric enabled fast lightning on slash thunderbolt",flash_on:"camera disabled electric enabled fast lightning off slash thunderbolt",flatware:"cafeteria cutlery diner dining eating fork room spoon",flight:"airplane airport flying transportation travel trip",flight_class:"airplane business first seat transportation travel trip window",flight_land:"airplane airport arrival arriving flying landing transportation travel",flight_takeoff:"airplane airport departed departing flying landing transportation travel",flip:"editing image orientation scanning",flip_camera_android:"center editing front image mobile orientation rear reverse rotate turn",flip_camera_ios:"android editing front image mobile orientation rear reverse rotate turn",flip_to_back:"arrangement format front layout move order sort",flip_to_front:"arrangement back format layout move order sort",flutter_dash:"bird mascot",fmd_bad:"! alert attention caution danger destination direction error exclamation important location maps mark notification pin place symbol warning",fmd_good:"destination direction location maps pin place stop",folder:"data directory document drive file folders sheet slide storage",folder_delete:"bin can data document drive file folders garbage remove sheet slide storage trash",folder_off:"[online] data disabled document drive enabled file folders sheet slash slide storage",folder_open:"data directory document drive file folders sheet slide storage",folder_shared:"account collaboration data directory document drive face human people person profile sheet slide storage team user",folder_special:"bookmark data directory document drive favorite file highlight important marked saved shape sheet slide star storage",folder_zip:"compress data document drive file folders open sheet slide storage",follow_the_signs:"arrow body directional human people person right social",font_download:"A alphabet character letter square symbol text type",font_download_off:"alphabet character disabled enabled letter slash square symbol text type",food_bank:"architecture building charity eat estate fork house knife meal place real residence residential shelter utensils",forest:"jungle nature plantation plants trees woodland",fork_left:"arrows directions maps navigation path route sign traffic",fork_right:"arrows directions maps navigation path route sign traffic",format_align_center:"alignment doc editing editor lines spreadsheet text type writing",format_align_justify:"alignment density doc editing editor extra lines small spreadsheet text type writing",format_align_left:"alignment doc editing editor lines spreadsheet text type writing",format_align_right:"alignment doc editing editor lines spreadsheet text type writing",format_bold:"B alphabet character doc editing editor font letter spreadsheet styles symbol text type writing",format_clear:"T alphabet character disabled doc editing editor enabled font letter off slash spreadsheet style symbol text type writing",format_color_fill:"bucket doc editing editor paint spreadsheet style text type writing",format_color_reset:"clear disabled doc droplet editing editor enabled fill liquid off on paint slash spreadsheet style text type water writing",format_color_text:"doc editing editor fill paint spreadsheet style type writing",format_indent_decrease:"alignment doc editing editor indentation paragraph spreadsheet text type writing",format_indent_increase:"alignment doc editing editor indentation paragraph spreadsheet text type writing",format_italic:"alphabet character doc editing editor font letter spreadsheet style symbol text type writing",format_line_spacing:"alignment doc editing editor spreadsheet text type writing",format_list_bulleted:"alignment doc editing editor notes spreadsheet task text todo type writing",format_list_numbered:"alignment digit doc editing editor notes spreadsheet symbol task text todo type writing",format_list_numbered_rtl:"alignment digit doc editing editor notes spreadsheet symbol task text todo type writing",format_overline:"alphabet character doc editing editor font letter spreadsheet style symbol text type under writing",format_paint:"brush color doc editing editor fill paintroller spreadsheet style text type writing",format_quote:"doc editing editor quotation spreadsheet text type writing",format_shapes:"alphabet character color doc editing editor fill font letter paint spreadsheet style symbol text type writing",format_size:"alphabet character color doc editing editor fill font letter paint spreadsheet style symbol text type writing",format_strikethrough:"alphabet character doc editing editor font letter spreadsheet style symbol text type writing",format_textdirection_l_to_r:"alignment doc editing editor ltr paragraph spreadsheet type writing",format_textdirection_r_to_l:"alignment doc editing editor paragraph rtl spreadsheet type writing",format_underlined:"alphabet character doc editing editor font letter spreadsheet style symbol text type writing",forum:"bubble chat comment communicate community conversation feedback hub messages speech talk",forward:"arrow mail message playback right sent",forward_10:"arrow circle controls digit fast music number play rotate seconds speed symbol time video",forward_30:"arrow circle controls digit fast music number rotate seconds speed symbol time video",forward_5:"10 arrow circle controls digit fast music number rotate seconds speed symbol time video",forward_to_inbox:"arrow email envelop letter message send",foundation:"architecture base basis building construction estate home house real residential",four_g_mobiledata:"alphabet cellular character digit font letter network number phone signal speed symbol text type wifi",four_g_plus_mobiledata:"alphabet cellular character digit font letter network number phone signal speed symbol text type wifi",four_k:"4000 4K alphabet character digit display font letter number pixels resolution symbol text type video",four_k_plus:"+ 4000 4K alphabet character digit display font letter number pixels resolution symbol text type video",four_mp:"camera digit font image letters megapixels number quality resolution symbol text type",fourteen_mp:"camera digits font image letters megapixels numbers quality resolution symbol text type",free_breakfast:"beverage cafe coffee cup drink mug tea",fullscreen:"adjust application components interface size ui ux view website",fullscreen_exit:"adjust application components interface size ui ux view website",functions:"average calculate count doc editing editor math sigma spreadsheet style sum text type writing",gamepad:"buttons console controller device gaming playstation video",games:"adjust arrows controller direction dpad gaming left move nintendo playstation right xbox",garage:"automobile automotive cars direction maps transportation travel vehicle",gas_meter:"droplet energy measure nest usage water",gavel:"agreement contract court document government hammer judge law mallet official police rules terms",gesture:"drawing finger gestures hand line motion",get_app:"arrows downloads export install play pointing retrieve upload",gif:"alphabet animated animation bitmap character font format graphics interchange letter symbol text type",gif_box:"alphabet animated animation bitmap character font format graphics interchange letter symbol text type",girl:"body female gender human lady people person social symbol woman women",gite:"architecture estate home hostel house maps place real residence residential stay traveling",git_hub:"brand code",g_mobiledata:"alphabet character font letter network service symbol text type",golf_course:"athlete athletic ball club entertainment flag golfer golfing hobby hole places putt sports",google:"brand logo",gpp_bad:"cancel certified close error exit no privacy private protection remove security shield sim stop verified",gpp_good:"certified check ok pass security shield sim tick",gpp_maybe:"! alert attention caution certified danger error exclamation important mark notification privacy private protection security shield sim symbol verified warning",gps_fixed:"destination direction location maps pin place pointer stop tracking",gps_not_fixed:"destination direction disabled enabled fixed location maps not off online place pointer slash tracking",gps_off:"destination direction disabled enabled fixed location maps not offline place pointer slash tracking",grade:"achievement important likes marked rated rating reward saved shape special star",gradient:"color editing effect filter images photography pictures",grading:"approve check complete document done feedback grade mark ok reviewed select tick validate verified writing yes",grain:"dots editing effect filter images photography pictures",graphic_eq:"audio equalizer music recording sound voice",grass:"backyard fodder ground home lawn plant turf",grid3x3:"layout line space",grid4x4:"by layout lines space",grid_goldenratio:"layout lines space",grid_off:"collage disabled enabled image layout on slash view",grid_on:"collage disabled enabled image layout off sheet slash view",grid_view:"application blocks components dashboard design interface layout screen square tiles ui ux website window",group:"accounts committee face family friends humans network people persons profiles social team users",group_add:"accounts committee face family friends humans increase more network people persons plus profiles social team users",group_remove:"accounts committee face family friends humans network people persons profiles social team users",groups:"body club collaboration crowd gathering human meeting people person social teams",group_work:"alliance circle collaboration film partnership reel teamwork together",g_translate:"emblem google language logo mark speaking speech translator words",hail:"body human people person pick public stop taxi transportation",handyman:"build construction fix hammer repair screwdriver tools",hardware:"break construction hammer nail repair tool",hd:"alphabet character definition display font high letter movies quality resolution screen symbol text tv type video",hdr_auto:"A alphabet camera character circle dynamic font high letter photo range symbol text type",hdr_auto_select:"+ A alphabet camera character circle dynamic font high letter photo range symbol text type",hdr_enhanced_select:"add alphabet character dynamic font high letter plus range symbol text type",hdr_off:"alphabet character disabled dynamic enabled enhance font high letter range select slash symbol text type",hdr_off_select:"alphabet camera character circle disabled dynamic enabled font high letter photo range slash symbol text type",hdr_on:"add alphabet character dynamic enhance font high letter plus range select symbol text type",hdr_on_select:"+ alphabet camera character circle dynamic font high letter photo range symbol text type",hdr_plus:"+ add alphabet character circle dynamic enhance font high letter range select symbol text type",hdr_strong:"circles dots dynamic enhance high range",hdr_weak:"circles dots dynamic enhance high range",headphones:"accessory audio device earphone headset listen music sound",headphones_battery:"accessory audio charging device earphone headset listen music sound",headset:"accessory audio device earbuds earmuffs earphone headphones listen music sound",headset_mic:"accessory audio chat device earphone headphones listen music sound talk",headset_off:"accessory audio chat device disabled earphone enabled headphones listen mic music slash sound talk",healing:"bandage bandaid editing emergency fix health hospital image medicine",health_and_safety:"+ add certified plus privacy private protection security shield symbol verified",hearing:"accessibility accessible aid handicap help impaired listen sound volume",hearing_disabled:"accessibility accessible aid enabled handicap help impaired listen off on slash sound volume",heart_broken:"break core crush health nucleus split",heat_pump:"air conditioner cool energy furnance nest usage",height:"arrows color doc down editing editor fill format paint resize spreadsheet stretch style text type up writing",help:"? alert announcement assistance circle information mark punctuation question shape support symbol",help_center:"? assistance information mark punctuation question support symbol",help_outline:"? alert announcement assistance circle information mark punctuation question shape support symbol",hevc:"alphabet character coding efficiency font high letter symbol text type video",hexagon:"shape sides six",hide_image:"disabled enabled landscape mountains off on photography picture slash",hide_source:"circle disabled enabled offline on shape slash",highlight:"color doc editing editor emphasize fill flashlight format marker paint spreadsheet style text type writing",highlight_alt:"arrow box click cursor draw focus pointer selection target",highlight_off:"cancel circle clear click close delete disable exit focus no quit remove stop target times",high_quality:"alphabet character definition display font hq letter movies resolution screen symbol text tv type",hiking:"backpacking bag climbing duffle mountain social sports stick trail travel walking",history:"arrow backwards clock date refresh renew reverse revert rotate schedule time turn undo",history_edu:"document education feather letter paper pen quill school tools write writing",history_toggle_off:"clock date schedule time",hls:"alphabet character developer engineering font letter platform symbol text type",hls_off:"[offline] alphabet character developer disabled enabled engineering font letter platform slash symbol text type",h_mobiledata:"alphabet character font letter network service symbol text type",holiday_village:"architecture beach camping cottage estate home house lake lodge maps place real residence residential stay traveling vacation",home:"address application--house architecture building components design estate homepage interface layout place real residence residential screen shelter structure unit ux website window",home_max:"device gadget hardware internet iot nest smart things",home_mini:"Internet device gadget hardware iot nest smart things",home_repair_service:"equipment fix kit mechanic repairing toolbox tools workshop",home_work:"architecture building estate house office place real residence residential shelter",horizontal_rule:"gmail line novitas",horizontal_split:"bars format layout lines stacked",hotel:"bed body human people person sleep stay travel trip",hot_tub:"bathing bathroom bathtub hotel human jacuzzi person shower spa steam travel water",hourglass_bottom:"countdown half loading minutes time waiting",hourglass_disabled:"clock countdown empty enabled loading minutes off on slash time waiting",hourglass_empty:"countdown loading minutes start time waiting",hourglass_full:"countdown loading minutes time waiting",hourglass_top:"countdown half loading minutes time waiting",house:"architecture building estate family homepage places real residence residential shelter",houseboat:"architecture beach estate floating home maps place real residence residential sea stay traveling vacation",house_siding:"architecture building construction estate exterior facade home real residential",how_to_reg:"approve ballot check complete done election mark ok poll register registration select tick to validate verified vote yes",how_to_vote:"ballot election poll",h_plus_mobiledata:"+ alphabet character font letter network service symbol text type",html:"alphabet brackets character code css developer engineering font letter platform symbol text type",http:"alphabet character font internet letter network symbol text transfer type url website",https:"connection encrypt internet key locked network password privacy private protection safety secure security ssl web",hub:"center connection core focal network nucleus point topology",hvac:"air conditioning heating ventilation",icecream:"dessert food snack",ice_skating:"athlete athletic entertainment exercise hobby shoe skates social sports travel",image:"disabled enabled frame hide landscape mountains off on photography picture slash",image_aspect_ratio:"photography picture rectangle square",image_not_supported:"disabled enabled landscape mountains off on photography picture slash",image_search:"find glass landscape look magnifying mountains photography picture see",imagesearch_roller:"art paint",important_devices:"Android cell computer desktop hardware iOS mobile monitor phone star tablet web",import_contacts:"address book friends information magazine open",import_export:"arrows direction down explort up",inbox:"archive email incoming message",indeterminate_check_box:"application button components control design form interface minus screen selected selection square toggle ui undetermined ux website",info:"about alert announcement announcment assistance bubble circle details help information service support",input:"arrow box download login move right",insert_chart:"analytics barchart bars data diagram infographic measure metrics statistics tracking",insert_chart_outlined:"analytics bars data diagram infographic measure metrics statistics tracking",insert_comment:"add bubble chat feedback message",insert_drive_file:"bill document format invoice item sheet slide",insert_emoticon:"account emoji face happy human like people person profile sentiment smiley user",insert_invitation:"agenda calendar date event mark month range remember reminder today week",insert_link:"add anchor attach clip file mail media",insert_page_break:"document file paper",insert_photo:"image landscape mountains photography picture wallpaper",insights:"analytics bars chart data diagram infographic measure metrics stars statistics tracking",instagram:"brand logo social",install_desktop:"Android chrome device display fix hardware iOS mac monitor place pwa screen web window",install_mobile:"Android cell device hardware iOS phone pwa tablet",integration_instructions:"brackets clipboard code css developer document engineering html platform",interests:"circle heart shapes social square triangle",interpreter_mode:"language microphone person speaking symbol",inventory:"archive box buy check clipboard document e-commerce file list organize packages product purchase shop stock store supply",inventory2:"archive box file organize packages product stock storage supply",invert_colors:"droplet editing hue inverted liquid palette tone water",invert_colors_off:"disabled droplet enabled hue inverted liquid offline opacity palette slash tone water",ios_share:"arrows button direction export internet link send sharing social up website",iron:"appliance clothes electric ironing machine object",iso:"add editing effect image minus photography picture plus sensor shutter speed subtract",javascript:"alphabet brackets character code css developer engineering font html letter platform symbol text type",join_full:"circle combine command left outter right sql",join_inner:"circle command matching sql values",join_left:"circle command matching sql values",join_right:"circle command matching sql values",kayaking:"athlete athletic body canoe entertainment exercise hobby human lake paddle paddling people person rafting river row social sports summer travel water",key:"blackout password restricted secret unlock",keyboard:"computer device hardware input keypad letter office text type",keyboard_alt:"computer device hardware input keypad letter office text type",keyboard_arrow_down:"arrows chevron open",keyboard_arrow_left:"arrows chevron",keyboard_arrow_right:"arrows chevron open start",keyboard_arrow_up:"arrows chevron submit",keyboard_backspace:"arrow left",keyboard_capslock:"arrow up",keyboard_command_key:"button command control key",keyboard_control_key:"control key",keyboard_double_arrow_down:"arrows direction multiple navigation",keyboard_double_arrow_left:"arrows direction multiple navigation",keyboard_double_arrow_right:"arrows direction multiple navigation",keyboard_double_arrow_up:"arrows direction multiple navigation",keyboard_hide:"arrow computer device down hardware input keypad text",keyboard_option_key:"alt key modifier",keyboard_return:"arrow back left",keyboard_tab:"arrow next right",keyboard_voice:"microphone noise recorder speaker",key_off:"[offline] disabled enabled on password slash unlock",king_bed:"bedroom double furniture home hotel house night pillows queen rest sleep",kitchen:"appliance cabinet cold food freezer fridge home house ice places refrigerator storage",kitesurfing:"athlete athletic beach body entertainment exercise hobby human people person social sports travel water",label:"badge favorite indent item library mail remember save stamp sticker tag",label_important:"badge favorite important. indent item library mail remember save stamp sticker tag wing",label_off:"disabled enabled favorite indent library mail on remember save slash stamp sticker tag wing",lan:"computer connection data internet network service",landscape:"image mountains nature photography picture",language:"country earth globe i18n internet l10n planet website world www",laptop:"Android chrome computer connect desktop device display hardware iOS link mac monitor smart tv web windows",laptop_chromebook:"Android chromebook device display hardware iOS mac monitor screen web window",laptop_mac:"Android apple chrome device display hardware iOS monitor screen web window",laptop_windows:"Android chrome device display hardware iOS mac monitor screen web",last_page:"application arrow chevron components end forward interface right screen ui ux website",launch:"application arrow box components core interface internal new open screen ui ux website window",layers:"arrange disabled enabled interaction maps off overlay pages slash stack",layers_clear:"arrange delete disabled enabled interaction maps off overlay pages slash",leaderboard:"analytics bars chart data diagram infographic measure metrics statistics tracking",leak_add:"connection data link network service signals synce wireless",leak_remove:"connection data disabled enabled link network offline service signals slash synce wireless",legend_toggle:"analytics chart data diagram infographic measure metrics monitoring stackdriver statistics tracking",lens:"circle full geometry moon",lens_blur:"camera dim dot effect foggy fuzzy image photo soften",library_add:"+ collection layers multiple music new plus save stacked symbol video",library_add_check:"approve collection complete done layers mark multiple music ok select stacked tick validate verified video yes",library_books:"add album audio collection reading",library_music:"add album audio collection song sounds",light:"bulb ceiling hanging inside interior lamp lighting pendent room",lightbulb:"alert announcement idea information learning mode",lightbulb_circle:"alert announcement idea information",light_mode:"brightness day device lighting morning mornng sky sunny",linear_scale:"application components design interface layout measure menu screen slider ui ux website window",line_axis:"dash horizontal stroke vertical",line_style:"dash dotted editor rule spacing",line_weight:"editor height size spacing style thickness",link:"anchor chain clip connection external hyperlink linked links multimedia unlisted url",linked_camera:"connection lens network photography picture signals sync wireless",linked_in:"brand logo social",link_off:"anchor attached chain clip connection disabled enabled linked links multimedia slash unlink url",liquor:"alcohol bar bottle club cocktail drink food party store wine",list:"editor file format index menu options playlist task todo",list_alt:"box contained editor format lines reorder sheet stacked task title todo",live_help:"? alert announcement assistance bubble chat comment communicate faq information mark message punctuation question speech support symbol",live_tv:"Android antennas chrome desktop device hardware iOS mac monitor movie play stream television web window",living:"chair comfort couch decoration furniture home house lounging loveseat room seating sofa",local_activity:"event star things ticket",local_airport:"airplane flight flying transportation travel trip",local_atm:"bill card cart cash coin commerce credit currency dollars financial money online payment price profit shopping symbol",local_bar:"alcohol bottle club cocktail drink food liquor martini wine",local_cafe:"bottle coffee cup drink food mug restaurant tea",local_car_wash:"automobile cars maps transportation travel vehicle",local_convenience_store:"-- 24 bill building business card cash coin commerce company credit currency dollars maps market money new online payment plus shopping storefront symbol",local_dining:"cutlery eat food fork knife meal restaurant spoon",local_drink:"cup droplet glass liquid park water",local_fire_department:"911 firefighter flame hot",local_florist:"flower shop",local_gas_station:"auto car filling fuel gasoline oil station vehicle",local_grocery_store:"market shop",local_hospital:"911 aid cross doctor emergency first health medical medicine plus",local_hotel:"bed body human people person sleep stay travel trip",local_laundry_service:"cleaning clothing dryer hotel washer",local_library:"book community learning person read",local_mall:"bill building business buy card cart cash coin commerce credit currency dollars handbag money online payment shopping storefront",local_offer:"deal discount price shopping store tag",local_parking:"alphabet auto car character font garage letter symbol text type vehicle",local_pharmacy:"911 aid cross emergency first food hospital medicine places",local_phone:"booth call telecommunication",local_pizza:"drink fastfood meal",local_police:"911 badge law officer protection security shield",local_post_office:"delivery email envelop letter message package parcel postal send stamp",local_printshop:"draft fax ink machine office paper printer send",local_see:"camera lens photography picture",local_shipping:"automobile cars delivery letter mail maps office package parcel postal semi send shopping stamp transportation truck vehicle",local_taxi:"automobile cab call cars direction lyft maps public transportation uber vehicle yellow",location_city:"apartments architecture buildings business company estate home landscape place real residence residential shelter town urban",location_disabled:"destination direction enabled maps off pin place pointer slash stop tracking",location_off:"destination direction disabled enabled gps maps pin place room slash stop",location_on:"destination direction disabled enabled gps maps off pin place room slash stop",location_searching:"destination direction maps pin place pointer stop tracking",lock:"connection key locked logout padlock password privacy private protection safety secure security signout",lock_clock:"date locked password privacy private protection safety schedule secure security time",lock_open:"connection key login padlock password privacy private protection register safety secure security signin signup unlocked",lock_reset:"around inprogress loading locked password privacy private protection refresh renew rotate safety secure security turn",login:"access application arrow components design enter interface left screen ui ux website",logo_dev:"dev.to",logout:"application arrow components design exit interface leave login right screen ui ux website",looks:"circle half rainbow",looks_3:"digit numbers square symbol",looks_4:"digit numbers square symbol",looks_5:"digit numbers square symbol",looks_6:"digit numbers square symbol",looks_one:"1 digit numbers square symbol",looks_two:"2 digit numbers square symbol",loop:"around arrows direction inprogress loader loading music navigation refresh renew repeat rotate turn",loupe:"+ add details focus glass magnifying new plus symbol",low_priority:"arrange arrow backward bottom list move order task todo",loyalty:"badge card credit heart love membership miles points program sale subscription tag travel trip",lte_mobiledata:"alphabet character font internet letter network speed symbol text type wifi wireless",lte_plus_mobiledata:"+ alphabet character font internet letter network speed symbol text type wifi wireless",luggage:"airport baggage carry flight hotel on suitcase travel trip",lunch_dining:"breakfast dinner drink fastfood hamburger meal",lyrics:"audio bubble chat comment communicate feedback key message music note song sound speech track",mail:"email envelope inbox letter message send",mail_lock:"email envelop letter locked message password privacy private protection safety secure security send",mail_outline:"email envelope letter message note post receive send write",male:"boy gender man social symbol",man:"boy gender male social symbol",manage_accounts:"change details face gear options people person profile service-human settings user",manage_search:"glass history magnifying text",map:"destination direction location maps pin place route stop travel",maps_home_work:"building house office",maps_ugc:"+ add bubble comment communicate feedback message new plus speech symbol",margin:"design layout padding size square",mark_as_unread:"envelop letter mail postal receive send",mark_chat_read:"approve bubble check comment communicate complete done message ok select sent speech tick verified yes",mark_chat_unread:"bubble circle comment communicate message notification speech",mark_email_read:"approve check complete done envelop letter message note ok select send sent tick yes",mark_email_unread:"check circle envelop letter message note notification send",markunread:"email envelope letter message send",markunread_mailbox:"deliver envelop letter postal postbox receive send",masks:"air cover covid face hospital medical pollution protection respirator sick social",maximize:"application components design interface line screen shape ui ux website",media_bluetooth_off:"connection connectivity device disabled enabled music note offline paring signal slash symbol wireless",media_bluetooth_on:"connection connectivity device disabled enabled music note off online paring signal slash symbol wireless",mediation:"alternative arrows compromise direction dots negotiation party right structure",medical_services:"aid bag briefcase emergency first kit medicine",medication:"doctor drug emergency hospital medicine pharmacy pills prescription",meeting_room:"building doorway entrance home house interior logout office open places signout",memory:"card chip digital micro processor sd storage",menu:"application components hamburger interface lines playlist screen ui ux website",menu_book:"dining food meal page restaurant",menu_open:"application arrow chevron components hamburger interface left lines screen ui ux website",merge:"arrows directions maps navigation path route sign traffic",merge_type:"arrow combine direction format text",message:"bubble chat comment communicate feedback speech talk text",mic:"hearing microphone noise record search sound speech voice",mic_external_off:"audio disabled enabled microphone slash sound voice",mic_external_on:"audio disabled enabled microphone off slash sound voice",mic_none:"hearing microphone noise record sound voice",mic_off:"audio disabled enabled hearing microphone noise recording slash sound voice",microwave:"appliance cooking electric heat home house kitchen machine",military_tech:"army award badge honor medal merit order privilege prize rank reward ribbon soldier star status trophy winner",minimize:"application components design interface line screen shape ui ux website",missed_video_call:"arrow camera filming hardware image motion picture record videography",mms:"bubble chat comment communicate feedback image landscape message mountains multimedia photography picture speech",mobiledata_off:"arrow disabled down enabled internet network on slash speed up wifi wireless",mobile_friendly:"Android approve cell check complete device done hardware iOS mark ok phone select tablet tick validate verified yes",mobile_off:"Android cell device disabled enabled hardware iOS phone silence slash tablet",mobile_screen_share:"Android arrow cell device hardware iOS mirror monitor phone screencast streaming tablet tv wireless",mode:"compose create draft draw edit pencil write",mode_comment:"bubble chat comment communicate feedback message mode speech",mode_edit:"compose create draft draw pencil write",mode_edit_outline:"compose create draft draw pencil write",model_training:"arrow bulb idea inprogress light loading refresh renew restore reverse rotate",mode_night:"dark disturb moon sleep weather",mode_of_travel:"arrow destination direction location maps pin place stop transportation trip",mode_standby:"disturb power sleep target",monetization_on:"bill card cash circle coin commerce cost credit currency dollars finance money online payment price profit sale shopping symbol",money:"100 bill card cash coin commerce cost credit currency digit dollars finance number online payment price profit shopping symbol",money_off:"bill card cart cash coin commerce credit currency disabled dollars enabled finance money online payment price profit shopping slash symbol",money_off_csred:"bill card cart cash coin commerce credit currency disabled dollars enabled online payment shopping slash symbol",monitor:"Android chrome device display hardware iOS mac screen web window",monitor_weight:"body device diet health scale smart",monochrome_photos:"black camera image photography picture white",mood:"emoji emoticon emotions expressions face feelings glad happiness happy like person pleased smiley smiling social survey",mood_bad:"disappointment dislike emoji emoticon emotions expressions face feelings person rating smiley social survey unhappiness unhappy unpleased unsmile unsmiling",moped:"automobile bike cars direction maps motorized public scooter transportation vehicle vespa",more:"3 archive badge bookmark dots etc favorite indent label remember save stamp sticker tab tag three",more_horiz:"3 application components dots etc horizontal interface ios pending screen status three ui ux website",more_time:"+ add clock date new plus schedule symbol",more_vert:"3 android application components dots etc interface screen three ui ux vertical website",motion_photos_auto:"A alphabet animation automatic character circle font gif letter live symbol text type video",motion_photos_off:"animation circle disabled enabled slash video",mouse:"click computer cursor device hardware wireless",move_down:"arrow direction jump navigation transfer",move_to_inbox:"archive arrow down email envelop incoming letter message move send to",move_up:"arrow direction jump navigation transfer",movie:"cinema film media screen show slate tv video watch",movie_creation:"clapperboard film movies slate video",movie_filter:"clapperboard creation film movies slate stars video",moving:"arrow direction navigation travel up",mp:"alphabet character font image letter megapixel photography pixels quality resolution symbol text type",multiline_chart:"analytics bars data diagram infographic line measure metrics multiple statistics tracking",multiple_stop:"arrows directions dots left maps navigation right",museum:"architecture attraction building estate event exhibition explore local palces places real see shop store tour",music_note:"audiotrack key sound",music_off:"audiotrack disabled enabled key note on slash sound",music_video:"band mv recording screen tv watch",my_location:"destination direction maps navigation pin place point stop",nat:"communication",nature:"forest outdoor outside park tree wilderness",nature_people:"activity body forest human outdoor outside park person tree wilderness",navigate_before:"arrows direction left",navigate_next:"arrows direction right",navigation:"arrow destination direction location maps pin place point stop",nearby_error:"! alert attention caution danger exclamation important mark notification symbol warning",nearby_off:"disabled enabled on slash",near_me:"arrow destination direction location maps navigation pin place point stop",near_me_disabled:"destination direction enabled location maps navigation off pin place point slash",nest_cam_wired_stand:"camera filming hardware image motion picture videography",network_cell:"cellular data internet mobile phone speed wifi wireless",network_check:"connection internet meter signal speed tick wifi wireless",network_locked:"alert available cellular connection data error internet mobile not privacy private protection restricted safety secure security service signal warning wifi wireless",network_wifi:"cellular data internet mobile phone speed wireless",new_releases:"! alert announcement attention burst caution danger error exclamation important mark notification star symbol warning",newspaper:"article data document drive file folders magazine media notes page sheet slide text writing",next_plan:"arrow circle right",next_week:"arrow baggage briefcase business suitcase",nfc:"communication data field mobile near wireless",nightlife:"alcohol bar bottle club cocktail dance drink food glass liquor music note wine",nightlight:"dark disturb mode moon sleep weather",nightlight_round:"dark half mode moon",night_shelter:"architecture bed building estate homeless house place real sleep",nights_stay:"cloud crescent dark mode moon phases silence silent sky time weather",nine_k:"9000 9K alphabet character digit display font letter number pixels resolution symbol text type video",nine_k_plus:"+ 9000 9K alphabet character digit display font letter number pixels resolution symbol text type video",nine_mp:"camera digit font image letters megapixels number quality resolution symbol text type",nineteen_mp:"camera digits font image letters megapixels numbers quality resolution symbol text type",no_accounts:"avatar disabled enabled face human offline people person profile slash thumbnail unavailable unidentifiable unknown user",no_backpack:"accessory bookbag knapsack travel",no_cell:"Android device disabled enabled hardware iOS mobile off phone slash tablet",no_drinks:"alcohol beverage bottle cocktail food liquor wine",no_encryption:"disabled enabled lock off password safety security slash",no_encryption_gmailerrorred:"disabled enabled locked off slash",no_flash:"camera disabled enabled image lightning off on photography picture slash thunderbolt",no_food:"disabled drink enabled fastfood hamburger meal off on slash",no_luggage:"baggage carry disabled enabled off on slash suitcase travel",no_meals:"dining disabled eat enabled food fork knife off restaurant slash spoon utensils",no_meeting_room:"building disabled doorway enabled entrance home house interior office on open places slash",no_photography:"camera disabled enabled image off on picture slash",nordic_walking:"athlete athletic body entertainment exercise hiking hobby human people person social sports travel walker",north:"arrow directional maps navigation up",north_east:"arrow maps navigation noth right up",north_west:"arrow directional left maps navigation up",no_sim:"camera card device eject insert memory phone storage",no_stroller:"baby care carriage children disabled enabled infant kid newborn off on parents slash toddler young",not_accessible:"accessibility body handicap help human person wheelchair",note:"bookmark message paper",note_add:"+ -doc create data document drive file folders new page paper plus sheet slide symbol writing",note_alt:"clipboard document file memo page paper writing",notes:"comment document text write writing",notification_add:"+ active alarm alert bell chime notifications notify plus reminder ring sound symbol",notification_important:"! active alarm alert announcement attention bell caution chime danger error exclamation feedback mark notifications notify problem reminder ring sound symbol warning",notifications:"active alarm alert bell chime notify reminder ring sound",notifications_active:"alarm alert bell chime notify reminder ringing sound",notifications_none:"alarm alert bell notify reminder ring sound",notifications_off:"active alarm alert bell chime disabled enabled notify offline reminder ring slash sound",notifications_paused:"--- active alarm aleet alert bell chime ignore notify pause quiet reminder ring sleep snooze sound zzz",not_interested:"allowed banned cancel circle close disabled dislike exit interested not off prohibited quit remove stop",not_listed_location:"? assistance destination direction help information maps pin place punctuation questionmark stop support symbol",no_transfer:"automobile bus cars direction disabled enabled maps off public slash transportation vehicle",not_started:"circle media pause play video",offline_bolt:"circle electric fast flash lightning spark thunderbolt",offline_pin:"approve checkmark circle complete done ok select tick validate verified yes",offline_share:"Android arrow cell connect device direction hardware iOS link mobile multiple phone right tablet",oil_barrel:"droplet gasoline nest water",ondemand_video:"Android chrome desktop device hardware iOS mac monitor play television tv web window",on_device_training:"arrow bulb call cell contact hardware idea inprogress light loading mobile model refresh renew restore reverse rotate telephone",one_k:"1000 1K alphabet character digit display font letter number pixels resolution symbol text type video",one_kk:"10000 10K alphabet character digit display font letter number pixels resolution symbol text type video",one_k_plus:"+ 1000 1K alphabet character digit display font letter number pixels resolution symbol text type video",online_prediction:"bulb connection idea light network signal wireless",opacity:"color droplet hue inverted liquid palette tone water",open_in_browser:"arrow box new up website window",open_in_full:"action arrows expand grow move",open_in_new:"application arrow box components interface screen ui ux website window",open_in_new_off:"arrow box disabled enabled export on slash window",open_with:"arrows directional expand move",other_houses:"architecture cottage estate home maps place real residence residential stay traveling",outbound:"arrow circle directional right up",outbox:"mail send sent",outdoor_grill:"barbecue barbeque bbq charcoal cooking home house outside",outlet:"connecter electricity plug power",outlined_flag:"country goal mark nation report start",padding:"design layout margin size square",pages:"article gplus paper post star",pageview:"document find glass magnifying paper search",paid:"circle currency money payment transaction",palette:"art colors filters paint",panorama:"angle image mountains photography picture view wide",panorama_fish_eye:"angle circle image photography picture wide",panorama_horizontal:"angle image photography picture wide",panorama_horizontal_select:"angle image photography picture wide",panorama_photosphere:"angle horizontal image photography picture wide",panorama_photosphere_select:"angle horizontal image photography picture wide",panorama_vertical:"angle image photography picture wide",panorama_vertical_select:"angle image photography picture wide",panorama_wide_angle:"image photography picture",panorama_wide_angle_select:"image photography picture",pan_tool:"drag fingers gesture hands human move scan stop touch wait",paragliding:"athlete athletic body entertainment exercise fly hobby human parachute people person skydiving social sports travel",park:"attraction fresh local nature outside plant tree",party_mode:"camera lens photography picture",password:"key login pin security star unlock",pattern:"key login password pin security star unlock",pause:"controls media music pending player status video wait",pause_circle:"controls media music video",pause_circle_filled:"controls media music pending status video wait",pause_circle_outline:"controls media music pending status video wait",pause_presentation:"application desktop device pending screen share slides status wait website window www",payment:"bill cash charge coin commerce cost creditcard currency dollars finance financial information money online price shopping symbol",payments:"bill card cash coin commerce cost credit currency dollars finance layer money multiple online price shopping symbol",pedal_bike:"automobile bicycle cars direction human maps public route scooter transportation vehicle vespa",pending:"circle dots loading progress waiting",pending_actions:"clipboard clock date document remember schedule time",pentagon:"five shape sides",people:"accounts committee community face family friends group humans network persons profiles social team users",people_alt:"accounts committee face family friends group humans network persons profiles social team users",people_outline:"accounts committee face family friends group humans network persons profiles social team users",percent:"math number symbol",perm_camera_mic:"image microphone min photography picture speaker",perm_contact_calendar:"account agenda date face human information people person profile schedule time user",perm_data_setting:"cellular configure gear information network settings wifi wireless",perm_device_information:"Android alert announcement cell hardware iOS important mobile phone tablet",perm_identity:"account avatar face human information people person profile save, thumbnail user",perm_media:"collection data directories document file folders images landscape mountains photography picture save storage",perm_phone_msg:"bubble call cell chat comment communicate contact device message mobile recording save speech telephone voice",perm_scan_wifi:"alert announcement connection information internet network service signal wireless",person:"account avatar face human people profile user",person_add:"+ account avatar face friend human new people plus profile symbol user",person_add_alt:"+ account face human people plus profile user",person_add_disabled:"+ account enabled face human new offline people plus profile slash symbol user",personal_video:"Android cam chrome desktop device hardware iOS mac monitor television tv web window",person_off:"account avatar disabled enabled face human people profile slash user",person_outline:"account avatar face human people profile user",person_pin:"account avatar destination direction face gps human location maps people place profile stop user",person_pin_circle:"account destination direction face gps human location maps people place profile stop user",person_remove:"account avatar delete face human minus people profile unfriend user",person_search:"account avatar face find glass human look magnifying people profile user",pest_control:"bug exterminator insects",pest_control_rodent:"exterminator mice",pets:"animal cat claw dog hand paw",phishing:"fishing fraud hook scam",phone:"call cell chat contact device hardware mobile telephone text",phone_android:"cell device hardware iOS mobile tablet",phone_bluetooth_speaker:"call cell connection connectivity contact device hardware mobile signal symbol telephone wireless",phone_callback:"arrow cell contact device down hardware mobile telephone",phone_disabled:"call cell contact device enabled hardware mobile offline slash telephone",phone_enabled:"call cell contact device hardware mobile telephone",phone_forwarded:"arrow call cell contact device direction hardware mobile right telephone",phone_iphone:"Android apple cell device hardware iOS mobile tablet",phonelink:"Android chrome computer connect desktop device hardware iOS mac mobile sync tablet web windows",phonelink_erase:"Android cancel cell close connection device exit hardware iOS mobile no remove stop tablet",phonelink_lock:"Android cell connection device erase hardware iOS locked mobile password privacy private protection safety secure security tablet",phonelink_off:"Android chrome computer connect desktop device disabled enabled hardware iOS mac mobile slash sync tablet web windows",phonelink_ring:"Android cell connection data device hardware iOS mobile network service signal tablet wireless",phonelink_setup:"Android call chat device hardware iOS information mobile settings tablet text",phone_locked:"call cell contact device hardware mobile password privacy private protection safety secure security telephone",phone_missed:"arrow call cell contact device hardware mobile telephone",phone_paused:"call cell contact device hardware mobile telephone wait",photo:"image mountains photography picture",photo_album:"archive bookmark image label library mountains photography picture ribbon save tag",photo_camera:"image photography picture",photo_camera_back:"image landscape mountains photography picture rear",photo_camera_front:"account face human image people person photography picture portrait profile user",photo_filter:"filters image photography picture stars",photo_library:"album image mountains photography picture",photo_size_select_actual:"image mountains photography picture",photo_size_select_large:"adjust album editing image library mountains photography picture",photo_size_select_small:"adjust album editing image large library mountains photography picture",php:"alphabet brackets character code css developer engineering font html letter platform symbol text type",piano:"instrument keyboard keys musical social",piano_off:"disabled enabled instrument keyboard keys musical on slash social",picture_as_pdf:"alphabet character document file font image letter multiple photography symbol text type",picture_in_picture:"cropped overlap photo position shape",picture_in_picture_alt:"cropped overlap photo position shape",pie_chart:"analytics bars data diagram infographic measure metrics statistics tracking",pie_chart_outline:"analytics bars data diagram infographic measure metrics statistics tracking",pie_chart_outlined:"graph",pin:"1 2 3 digit key login logout number password pattern security star symbol unlock",pinch:"arrows compress direction finger grasp hand navigation nip squeeze tweak",pin_drop:"destination direction gps location maps navigation place stop",pinterest:"brand logo social",pivot_table_chart:"analytics arrows bars data diagram direction drive editing grid infographic measure metrics rotate sheet statistics tracking",pix:"bill brazil card cash commerce credit currency finance money payment",place:"destination direction location maps navigation pin point stop",plagiarism:"document find glass look magnifying page paper search see",play_arrow:"controls media music player start video",play_circle:"arrow controls media music video",play_circle_filled:"arrow controls media music start video",play_circle_filled_white:"start",play_circle_outline:"arrow controls media music start video",play_disabled:"controls enabled media music off slash video",play_for_work:"arrow circle down google half",play_lesson:"audio bookmark digital ebook lesson multimedia play reading ribbon",playlist_add:"+ collection music new plus symbol task todo",playlist_add_check:"approve checkmark collection complete done music ok select task tick todo validate verified yes",playlist_add_check_circle:"album artist audio cd collection mark music record sound track",playlist_add_circle:"album artist audio cd check collection mark music record sound track",playlist_play:"arow arrow collection music",playlist_remove:"- collection minus music",plumbing:"build construction fix handyman repair tools wrench",plus_one:"1 add digit increase number symbol",podcasts:"broadcast casting network signal transmitting wireless",point_of_sale:"checkout cost machine merchant money payment pos retail system transaction",policy:"certified find glass legal look magnifying privacy private protection search security see shield verified",poll:"analytics barchart bars data diagram infographic measure metrics statistics survey tracking vote",pool:"athlete athletic beach body entertainment exercise hobby human ocean people person places sea sports swimming water",portable_wifi_off:"connected connection data device disabled enabled internet network offline service signal slash usage wireless",portrait:"account face human people person photo picture profile user",post_add:"+ data document drive file folders item page paper plus sheet slide text writing",power:"charge cord electrical online outlet plug socket",power_input:"dc lines supply",power_off:"charge cord disabled electrical enabled on outlet plug slash",power_settings_new:"information off save shutdown",precision_manufacturing:"arm automatic chain conveyor crane factory industry machinery mechanical production repairing robot supply warehouse",pregnant_woman:"baby birth body female human lady maternity mom mother people person user women",present_to_all:"arrow presentation screen share slides website",preview:"design eye layout reveal screen see show website window www",price_change:"arrows bill card cash coin commerce cost credit currency dollars down finance money online payment shopping symbol up",price_check:"approve bill card cash coin commerce complete cost credit currency dollars done finance mark money ok online payment select shopping symbol tick validate verified yes",print:"draft fax ink machine office paper printer send",print_disabled:"enabled off on paper printer slash",priority_high:"! alert attention caution danger error exclamation important mark notification symbol warning",privacy_tip:"alert announcement announcment assistance certified details help information private protection security service shield support verified",production_quantity_limits:"! alert attention bill card cart cash caution coin commerce credit currency danger dollars error exclamation important mark money notification online payment shopping symbol warning",propane:"gas nest",propane_tank:"bbq gas grill nest",psychology:"behavior body brain cognitive function gear head human intellectual mental mind people person preferences psychiatric science settings social therapy thinking thoughts",public:"country earth global globe language map network planet social space web world",public_off:"disabled earth enabled global globe map network on planet slash social space web world",publish:"arrow cloud file import submit upload",published_with_changes:"approve arrows check complete done inprogress loading mark ok refresh renew replace rotate select tick validate verified yes",push_pin:"location marker place remember save",qr_code:"barcode camera media product quick response smartphone urls",qr_code_2:"barcode camera media product quick response smartphone urls",qr_code_scanner:"barcode camera media product quick response smartphone urls",query_builder:"clock date hour minute save schedule time",query_stats:"analytics chart data diagram find glass infographic line look magnifying measure metrics search see statistics tracking",question_answer:"bubble chat comment communicate conversation converse feedback message speech talk",question_mark:"? assistance help information mark punctuation question support symbol",queue:"add collection layers multiple music playlist stack stream video",queue_music:"add collection playlist stream",queue_play_next:"+ add arrow collection desktop device display hardware monitor music new playlist plus screen steam symbol tv video",quickreply:"bubble chat comment communicate fast lightning message speech thunderbolt",quiz:"? assistance faq help information mark punctuation question support symbol test",radar:"detect military near network position scan",radio:"antenna audio device frequency hardware listen media music player signal tune",radio_button_checked:"application bullet circle components design form interface off point record screen selected toggle ui ux website",radio_button_unchecked:"bullet circle deselected form off point record toggle",railway_alert:"! attention automobile bike cars caution danger direction error exclamation important maps mark notification public scooter subway symbol train transportation vehicle vespa warning",ramen_dining:"breakfast dinner drink fastfood lunch meal noodles restaurant",ramp_left:"arrows directions maps navigation path route sign traffic",ramp_right:"arrows directions maps navigation path route sign traffic",rate_review:"chat comment feedback message pencil stars write",raw_off:"alphabet character disabled enabled font image letter original photography slash symbol text type",raw_on:"alphabet character disabled enabled font image letter off original photography slash symbol text type",read_more:"arrow text",receipt:"bill credit invoice paper payment sale transaction",receipt_long:"bill check document list paperwork record store transaction",recent_actors:"account avatar cards carousel contacts face human layers list people person profile thumbnail user",recommend:"approved circle confirm favorite gesture hand like reaction social support thumbs well",record_voice_over:"account face human people person profile recording sound speaking speech transcript user",rectangle:"four parallelograms polygons quadrilaterals recangle shape sides",reddit:"brand logo social",redeem:"bill cart cash certificate coin commerce credit currency dollars giftcard money online payment present shopping",redo:"arrow backward forward next repeat rotate undo",reduce_capacity:"arrow body covid decrease down human people person social",refresh:"around arrows direction inprogress loading navigation refresh renew right rotate turn",remember_me:"Android avatar device hardware human iOS identity mobile people person phone profile tablet user",remove:"can delete line minus negative substract subtract trash",remove_circle:"allowed banned block can delete disable minus negative not substract trash",remove_circle_outline:"allowed banned block can delete disable minus negative not substract trash",remove_done:"approve check complete disabled enabled finished mark multiple off ok select slash tick yes",remove_from_queue:"collection desktop device display hardware list monitor screen steam television",remove_moderator:"certified disabled enabled off privacy private protection security shield slash verified",remove_red_eye:"iris looking preview see sight vision",remove_road:"- cancel close destination direction exit highway maps minus new no stop street symbol traffic",remove_shopping_cart:"card cash checkout coin commerce credit currency disabled dollars enabled off online payment slash tick",reorder:"format lines list stacked",repeat:"arrows controls media music video",repeat_on:"arrows controls media music video",repeat_one:"1 arrows controls digit media music number symbol video",repeat_one_on:"arrows controls digit media music number symbol video",replay:"arrows controls music refresh reload renew repeat retry rewind undo video",replay_10:"arrows controls digit music number refresh renew repeat rewind symbol ten video",replay_30:"arrows controls digit music number refresh renew repeat rewind symbol thirty video",replay_5:"arrows controls digit five music number refresh renew repeat rewind symbol video",replay_circle_filled:"arrows controls music refresh renew repeat video",reply:"arrow backward left mail message send share",reply_all:"arrows backward group left mail message multiple send share",report:"! alert attention caution danger error exclamation important mark notification octagon symbol warning",report_gmailerrorred:"! alert attention caution danger exclamation important mark notification octagon symbol warning",report_off:"! alert attention caution danger disabled enabled error exclamation important mark notification octagon offline slash symbol warning",report_problem:"! alert announcement attention caution danger error exclamation feedback important mark notification symbol triangle warning",request_quote:"bill card cash coin commerce cost credit currency dollars finance money online payment price shopping symbol",reset_tv:"arrow device hardware monitor television",restart_alt:"around arrow inprogress loading reboot refresh renew repeat reset",restaurant:"breakfast cutlery dining dinner eat food fork knife local lunch meal places spoon utensils",restaurant_menu:"book dining eat food fork knife local meal spoon",restore:"arrow backwards clock date history refresh renew reverse rotate schedule time turn undo",restore_from_trash:"arrow backwards can clock date delete garbage history refresh remove renew reverse rotate schedule time turn up",restore_page:"arrow data doc file history paper refresh rotate sheet storage undo web",reviews:"bubble chat comment communicate feedback message rate rating recommendation speech",rice_bowl:"dinner food lunch meal restaurant",ring_volume:"calling cell contact device hardware incoming mobile ringer sound telephone",r_mobiledata:"alphabet character font letter symbol text type",rocket:"spaceship",rocket_launch:"spaceship takeoff",roller_shades:"blinds cover curtains nest open shutter sunshade",roller_shades_closed:"blinds cover curtains nest shutter sunshade",roofing:"architecture building chimney construction estate home house real residence residential service shelter",room:"destination direction gps location maps marker pin place spot stop",room_preferences:"building doorway entrance gear home house interior office open settings",room_service:"alert bell concierge delivery hotel notify",rotate_90_degrees_ccw:"arrows direction editing image photo turn",rotate_90_degrees_cw:"arrows ccw direction editing image photo turn",rotate_left:"around arrow circle direction inprogress loading refresh reload renew reset turn",rotate_right:"around arrow circle direction inprogress loading refresh renew turn",roundabout_left:"arrows directions maps navigation path route sign traffic",roundabout_right:"arrows directions maps navigation path route sign traffic",rounded_corner:"adjust edit shape square transform",route:"directions maps path sign traffic",router:"box cable connection device hardware internet network signal wifi",rowing:"activity boat body canoe human people person sports water",rss_feed:"application blog connection data internet network service signal website wifi wireless",rsvp:"alphabet character font invitation invite letter plaît respond répondez sil symbol text type vous",rtt:"call real rrt text time",rule:"approve check done incomplete line mark missing no ok select tick validate verified wrong x yes",rule_folder:"approve cancel check close complete data document done drive exit file mark no ok remove select sheet slide storage tick validate verified yes",run_circle:"body exercise human people person running",running_with_errors:"! alert attention caution danger duration exclamation important mark notification processing symbol time warning",rv_hookup:"arrow attach automobile automotive back cars connect direction left maps public right trailer transportation travel truck van vehicle",safety_divider:"apart distance separate social space",sailing:"entertainment fishing hobby ocean sailboat sea social sports travel water",sanitizer:"bacteria bottle clean covid disinfect germs pump",satellite:"bluetooth connection connectivity data device image internet landscape location maps mountains network photography picture scan service signal symbol wifi wireless--",satellite_alt:"alternative artificial communication space station television",save:"data diskette document drive file floppy multimedia storage write",save_alt:"arrow diskette document down file floppy multimedia write",save_as:"compose create data disk document draft drive editing file floppy input multimedia pencil storage write writing",saved_search:"find glass important look magnifying marked see star",savings:"bank bill card cash coin commerce cost credit currency dollars finance money online payment piggy symbol",scale:"measure monitor weight",scanner:"copy device hardware machine",scatter_plot:"analytics bars chart circles data diagram dot infographic measure metrics statistics tracking",schedule:"calendar clock date mark save time",schedule_send:"calendar clock date email letter remember share time",schema:"analytics chart data diagram flow infographic measure metrics statistics tracking",school:"academy achievement cap class college education graduation hat knowledge learning university",science:"beaker chemical chemistry experiment flask glass laboratory research tube",score:"2k alphabet analytics bars character chart data diagram digit font infographic letter measure metrics number statistics symbol text tracking type",screen_lock_landscape:"Android device hardware iOS mobile phone rotate security tablet",screen_lock_portrait:"Android device hardware iOS mobile phone rotate security tablet",screen_lock_rotation:"Android arrow device hardware iOS mobile phone rotate tablet turn",screen_rotation:"Android arrow device hardware iOS mobile phone rotate tablet turn",screen_search_desktop:"Android arrow device hardware iOS lock monitor rotate web",screen_share:"Android arrow cast chrome device display hardware iOS laptop mac mirror monitor steam streaming web window",screenshot:"Android cell crop device hardware iOS mobile phone tablet",screenshot_monitor:"Android chrome desktop device display hardware iOS mac screengrab web window",sd:"alphabet camera card character data device digital drive flash font image letter memory photo secure symbol text type",sd_card:"camera digital memory photos secure storage",sd_card_alert:"! attention camera caution danger digital error exclamation important mark memory notification photos secure storage symbol warning",sd_storage:"camera card data digital memory microsd secure",search:"filter find glass look magnifying see up",search_off:"cancel close disabled enabled find glass look magnifying on see slash stop x",security:"certified privacy private protection shield verified",security_update:"Android arrow device download hardware iOS mobile phone tablet",security_update_good:"Android checkmark device hardware iOS mobile ok phone tablet tick",security_update_warning:"! Android alert attention caution danger device download error exclamation hardware iOS important mark mobile notification phone symbol tablet",segment:"alignment fonts format lines list paragraph part piece rules style text",select_all:"selection square tool",self_improvement:"body calm care chi human meditate meditation people person relax sitting wellbeing yoga zen",sell:"bill card cart cash coin commerce credit currency dollars money online payment price shopping tag",send:"chat email message paper plane reply right share telegram",send_and_archive:"arrow download email letter save share",send_time_extension:"deliver dispatch envelop mail message schedule",send_to_mobile:"Android arrow device export forward hardware iOS phone right share tablet",sensors:"connection network scan signal wireless",sensors_off:"connection disabled enabled network scan signal slash wireless",sentiment_dissatisfied:"angry disappointed dislike emoji emoticon emotions expressions face feelings frown mood person sad smiley survey unhappy unsatisfied upset",sentiment_neutral:"emotionless emotions expressions face feelings indifference mood okay person survey",sentiment_satisfied:"emoji emoticon emotions expressions face feelings glad happiness happy like mood person pleased smiley smiling survey",sentiment_satisfied_alt:"account emoji face happy human people person profile smile user",sentiment_very_dissatisfied:"angry disappointed dislike emoji emoticon emotions expressions face feelings mood person sad smiley sorrow survey unhappy unsatisfied upset",sentiment_very_satisfied:"emoji emoticon emotions expressions face feelings glad happiness happy like mood person pleased smiley smiling survey",set_meal:"chopsticks dinner fish food lunch restaurant teishoku",settings:"application change details gear information options personal service",settings_accessibility:"body details human information people personal preferences profile user",settings_applications:"change details gear information options personal save service",settings_backup_restore:"arrow backwards history refresh reverse rotate time undo",settings_bluetooth:"connection connectivity device network signal symbol wifi",settings_brightness:"dark filter light mode sun",settings_cell:"Android cellphone device hardware iOS mobile tablet",settings_ethernet:"arrows brackets computer connection connectivity dots internet network parenthesis wifi",settings_input_antenna:"airplay arrows computer connection connectivity dots internet network screencast stream wifi wireless",settings_input_component:"audio av cables connection connectivity internet plugs points video wifi",settings_input_composite:"cable component connection connectivity plugs points",settings_input_hdmi:"cable connection connectivity definition high plugin points video wire",settings_input_svideo:"cable connection connectivity definition plugin plugs points standard svideo,",settings_overscan:"arrows expand image photo picture",settings_phone:"call cell contact device hardware mobile telephone",settings_power:"information off save shutdown",settings_remote:"bluetooth connection connectivity control device signal wifi wireless",settings_suggest:"change details gear options recommendation service suggestion system",settings_system_daydream:"backup cloud drive storage",settings_voice:"microphone recorder speaker",seven_k:"7000 7K alphabet character digit display font letter number pixels resolution symbol text type video",seven_k_plus:"+ 7000 7K alphabet character digit display font letter number pixels resolution symbol text type video",seven_mp:"camera digit font image letters megapixels number quality resolution symbol text type",seventeen_mp:"camera digits font image letters megapixels numbers quality resolution symbol text type",share:"android connect contect link multimedia multiple network options send shared sharing social",share_location:"destination direction gps maps pin place stop tracking",shield:"certified privacy private protection secure security verified",shop:"arrow bag bill briefcase buy card cart cash coin commerce credit currency dollars google money online payment play purchase shopping store",shop_2:"add arrow buy cart google play purchase shopping",shopping_bag:"bill business buy card cart cash coin commerce credit currency dollars money online payment storefront",shopping_basket:"add bill buy card cart cash checkout coin commerce credit currency dollars money online payment purchase",shopping_cart:"add bill buy card cash checkout coin commerce credit currency dollars money online payment purchase",shopping_cart_checkout:"arrow cash coin commerce currency dollars money online payment right",shop_two:"add arrow briefcase buy cart google play purchase shopping",shortcut:"arrow direction forward right",short_text:"brief comment document lines note write writing",show_chart:"analytics bars chart data diagram infographic line measure metrics presentation show statistics stock tracking",shower:"bathroom closet home house place plumbing sprinkler wash water wc",shuffle:"arrows controls music random video",shuffle_on:"arrows controls music random video",shutter_speed:"aperture camera duration image lens photography photos picture setting stop timer watch",sick:"covid discomfort emotions expressions face feelings fever flu ill mood pain person survey upset",signal_cellular_0_bar:"data internet mobile network phone speed wifi wireless",signal_cellular_4_bar:"data internet mobile network phone speed wifi wireless",signal_cellular_alt:"analytics bar chart data diagram infographic internet measure metrics mobile network phone statistics tracking wifi wireless",signal_cellular_connected_no_internet_0_bar:"! alert attention caution danger data error exclamation important mark mobile network notification phone symbol warning wifi wireless",signal_cellular_connected_no_internet_1_bar:"network",signal_cellular_connected_no_internet_2_bar:"network",signal_cellular_connected_no_internet_3_bar:"network",signal_cellular_connected_no_internet_4_bar:"! alert attention caution danger data error exclamation important mark mobile network notification phone symbol warning wifi wireless",signal_cellular_nodata:"internet mobile network offline phone quit wifi wireless x",signal_cellular_no_sim:"camera card chip device disabled enabled memory network offline phone slash storage",signal_cellular_null:"data internet mobile network phone wifi wireless",signal_cellular_off:"data disabled enabled internet mobile network offline phone slash wifi wireless",signal_wifi_bad:"bar cancel cellular close data exit internet mobile network no phone quit remove stop wireless",signal_wifi_connected_no_internet4:"cellular data mobile network offline phone wireless x",signal_wifi_off:"cellular data disabled enabled internet mobile network phone slash speed wireless",signal_wifi_statusbar4_bar:"cellular data internet mobile network phone speed wireless",signal_wifi_statusbar_connected_no_internet4:"! alert attention caution cellular danger data error exclamation important mark mobile network notification phone speed symbol warning wireless",signal_wifi_statusbar_null:"cellular data internet mobile network phone speed wireless",signpost:"arrow direction left maps right signal signs street traffic",sim_card:"camera chip device memory network phone storage",sim_card_alert:"! attention camera caution danger digital error exclamation important mark memory notification photos sd secure storage symbol warning",sim_card_download:"arrow camera chip device memory phone storage",single_bed:"bedroom double furniture home hotel house king night pillows queen rest sleep twin",sip:"alphabet call character dialer font initiation internet letter over phone protocol routing session symbol text type voice",six_k:"6000 6K alphabet character digit display font letter number pixels resolution symbol text type video",six_k_plus:"+ 6000 6K alphabet character digit display font letter number pixels resolution symbol text type video",six_mp:"camera digit font image letters megapixels number quality resolution symbol text type",sixteen_mp:"camera digits font image letters megapixels numbers quality resolution symbol text type",sixty_fps:"camera digit frames number symbol video",sixty_fps_select:"camera digits frame frequency numbers per rate seconds video",skateboarding:"athlete athletic body entertainment exercise hobby human people person skateboarder social sports",skip_next:"arrow back controls forward music play previous transport video",skip_previous:"arrow backward controls forward music next play transport video",sledding:"athlete athletic body entertainment exercise hobby human people person sledge snow social sports travel winter",slideshow:"movie photos play presentation square video view",slow_motion_video:"arrow circle controls music play speed time",smart_button:"action auto components composer function interface special stars ui ux website",smart_display:"airplay chrome connect device screencast stream television tv video wireless",smartphone:"Android call cell chat device hardware iOS mobile tablet text",smart_screen:"Android airplay cell connect device hardware iOS mobile phone screencast stream tablet video",smart_toy:"games robot",smoke_free:"cigarette disabled enabled never no off places prohibited slash smoking tobacco warning zone",smoking_rooms:"allowed cigarette places smoke tobacco zone",sms:"3 bubble chat comment communication conversation dots message more service speech three",sms_failed:"! alert attention bubbles caution chat comment communication conversation danger error exclamation important mark message notification service speech symbol warning",snippet_folder:"data document drive file sheet slide storage",snooze:"alarm bell clock duration notification set timer watch",snowboarding:"athlete athletic body entertainment exercise hobby human people person social sports travel winter",snowmobile:"automobile car direction skimobile social sports transportation travel vehicle winter",snowshoeing:"body human people person sports travel walking winter",soap:"bathroom clean fingers gesture hand wash wc",social_distance:"6 apart body ft human people person space",solar_power:"eco energy heat nest sunny",sort:"filter find lines list organize",sort_by_alpha:"alphabetize az by character font letters list order organize symbol text type",soup_kitchen:"breakfast brunch dining food lunch meal",source:"code composer content creation data document file folder mode storage view",south:"arrow directional down maps navigation",south_america:"america continent landscape place region south",south_east:"arrow directional down maps navigation right",south_west:"arrow directional down left maps navigation",spa:"aromatherapy flower healthcare leaf massage meditation nature petals places relax wellbeing wellness",space_bar:"keyboard line",speaker:"audio box electronic loud music sound stereo system video",speaker_group:"audio box electronic loud multiple music sound stereo system video",speaker_notes:"bubble cards chat comment communicate format list message speech text",speaker_notes_off:"bubble cards chat comment communicate disabled enabled format list message on slash speech text",speaker_phone:"Android cell device hardware iOS mobile sound tablet volume",speed:"arrow clock controls dial fast gauge measure motion music slow speedometer test velocity video",spellcheck:"alphabet approve character checkmark edit font letter ok processor select symbol text tick type word write yes",splitscreen:"grid layout multitasking two",spoke:"connection network radius",sports:"athlete athletic basketball blowing coach entertainment exercise game hobby instrument live referee soccer social sound trophy warning whistle",sports_bar:"alcohol beer drink liquor pint places pub",sports_baseball:"athlete athletic entertainment exercise game hobby social",sports_basketball:"athlete athletic entertainment exercise game hobby social",sports_cricket:"athlete athletic ball bat entertainment exercise game hobby social",sports_esports:"controller entertainment gamepad gaming hobby online playstation social video xbox",sports_football:"american athlete athletic entertainment exercise game hobby social",sports_golf:"athlete athletic ball club entertainment exercise game golfer golfing hobby social",sports_handball:"athlete athletic body entertainment exercise game hobby human people person social",sports_hockey:"athlete athletic entertainment exercise game hobby ice social sticks",sports_kabaddi:"athlete athletic body combat entertainment exercise fighting game hobby human judo martial people person social wrestle wrestling",sports_martial_arts:"athlete athletic entertainment exercise hobby human karate people person social",sports_mma:"arts athlete athletic boxing combat entertainment exercise fighting game glove hobby martial mixed social",sports_motorsports:"athlete athletic automobile bike drive driving entertainment helmet hobby motorcycle protect social vehicle",sports_rugby:"athlete athletic ball entertainment exercise game hobby social",sports_score:"destination flag goal",sports_soccer:"athlete athletic entertainment exercise football game hobby social",sports_tennis:"athlete athletic ball bat entertainment exercise game hobby racket social",sports_volleyball:"athlete athletic entertainment exercise game hobby social",square:"draw four quadrangle shape sides",square_foot:"construction feet inches length measurement ruler school set tools",ssid_chart:"graph lines network wifi",stacked_bar_chart:"analytics chart-chart data diagram infographic measure metrics statistics tracking",stacked_line_chart:"analytics data diagram infographic measure metrics statistics tracking",stadium:"activity amphitheater arena coliseum event local star things ticket",stairs:"down staircase up",star:"best bookmark favorite highlight ranking rate rating save toggle",star_border:"best bookmark favorite highlight outline ranking rate rating save toggle",star_border_purple_500:"best bookmark favorite highlight outline ranking rate rating save toggle",star_half:"0.5 1/2 achievement bookmark favorite highlight important marked ranking rate rating reward saved shape special toggle",star_outline:"bookmark favorite half highlight ranking rate rating save toggle",star_purple_500:"best bookmark favorite highlight ranking rate rating save toggle",star_rate:"achievement bookmark favorite highlight important marked ranking rating reward saved shape special",stars:"achievement bookmark circle favorite highlight important like love marked ranking rate rating reward saved shape special",start:"arrow keyboard next right",stay_current_landscape:"Android device hardware iOS mobile phone tablet",stay_current_portrait:"Android device hardware iOS mobile phone tablet",stay_primary_landscape:"Android current device hardware iOS mobile phone tablet",stay_primary_portrait:"Android current device hardware iOS mobile phone tablet",sticky_note_2:"bookmark message paper text writing",stop:"arrow controls music pause player square video",stop_circle:"controls music pause play square video",stop_screen_share:"Android arrow cast chrome device disabled display enabled hardware iOS laptop mac mirror monitor offline slash steam streaming web window",storage:"computer database drive memory network server",store:"bill building business buy card cash coin company credit currency dollars e-commerce market money online payment purchase shopping storefront",storefront:"business buy cafe commerce market merchant places restaurant retail sell shopping stall",store_mall_directory:"building",storm:"forecast hurricane temperature twister weather wind",straight:"arrows directions maps navigation path route sign traffic up",straighten:"length measurement piano ruler size",stream:"cast connected feed live network signal wireless",streetview:"gps location maps",strikethrough_s:"alphabet character cross doc editing editor font letter out spreadsheet styles symbol text type writing",stroller:"baby care carriage children infant kid newborn toddler young",style:"booklet cards filters options tags",subdirectory_arrow_left:"arrow down navigation",subdirectory_arrow_right:"arrow down navigation",subject:"alignment document email full justify lines list note text writing",subscript:"2 doc editing editor gmail novitas spreadsheet style symbol text writing",subscriptions:"enroll media order playlist queue signup subscribe youtube",subtitles:"accessibility accessible captions character closed decoder language media movies translate tv",subtitles_off:"accessibility accessible caption closed disabled enabled language slash translate video",subway:"automobile bike cars maps metro rail scooter train transportation travel tunnel underground vehicle vespa",summarize:"document list menu note report summary",superscript:"2 doc editing editor gmail novitas spreadsheet style symbol text writing",supervised_user_circle:"account avatar control face human parental parents people person profile supervisor",supervisor_account:"administrator avatar control face human parental parents people person profile supervised user",support:"assist help lifebuoy rescue safety",support_agent:"care customer face headphone person representative service",surfing:"athlete athletic beach body entertainment exercise hobby human people person sea social sports summer water",surround_sound:"audio circle signal speaker system volume volumn wireless",swap_calls:"arrows device direction mobile share",swap_horiz:"arrows back direction forward horizontal",swap_horizontal_circle:"arrows back direction forward",swap_vert:"arrows back direction down navigation up vertical",swap_vertical_circle:"arrows back direction down horizontal up",swipe:"arrows fingers gesture hands touch",swipe_down:"arrows direction disable enable finger hands hit navigation strike swing swpie take",swipe_down_alt:"arrows direction disable enable finger hands hit navigation strike swing swpie take",swipe_left:"arrows finger hand hit navigation reject strike swing take",swipe_left_alt:"arrows finger hand hit navigation reject strike swing take",swipe_right:"accept arrows direction finger hands hit navigation strike swing swpie take",swipe_right_alt:"accept arrows direction finger hands hit navigation strike swing swpie take",swipe_up:"arrows direction disable enable finger hands hit navigation strike swing swpie take",swipe_up_alt:"arrows direction disable enable finger hands hit navigation strike swing swpie take",swipe_vertical:"arrows direction finger hands hit navigation strike swing swpie take verticle",switch_access_shortcut:"arrows direction navigation new north star symbol up",switch_access_shortcut_add:"+ arrows direction navigation new north plus star symbol up",switch_account:"choices face human multiple options people person profile social user",switch_camera:"arrows photography picture",switch_left:"arrows directional navigation toggle",switch_right:"arrows directional navigation toggle",switch_video:"arrows camera photography videos",sync:"360 around arrows direction inprogress loading refresh renew rotate turn",sync_alt:"arrows horizontal internet technology update wifi",sync_disabled:"360 around arrows direction enabled inprogress loading off refresh renew rotate slash turn",sync_lock:"around arrows locked password privacy private protection renew rotate safety secure security turn",sync_problem:"! 360 alert around arrows attention caution danger direction error exclamation important inprogress loading mark notification refresh renew rotate symbol turn warning",system_security_update:"Android arrow cell device down hardware iOS mobile phone tablet",system_security_update_good:"Android approve cell check complete device done hardware iOS mark mobile ok phone select tablet tick validate verified yes",system_security_update_warning:"! Android alert attention caution cell danger device error exclamation hardware iOS important mark mobile notification phone symbol tablet",system_update:"Android arrows cell device direction download hardware iOS install mobile phone tablet",system_update_alt:"arrow download export",tab:"browser computer documents folder internet tabs website windows",table_chart:"analytics bars data diagram grid infographic measure metrics statistics tracking",table_rows:"grid layout lines stacked",tablet:"Android device hardware iOS ipad mobile web",tablet_android:"device hardware iOS ipad mobile web",tablet_mac:"Android apple device hardware iOS ipad mac mobile tablet web",table_view:"format grid group layout multiple",tab_unselected:"browser computer documents folder internet tabs website windows",tag:"hashtag key media number pound social trend",tag_faces:"emoji emotion happy satisfied smile",takeout_dining:"box container delivery food meal restaurant",tap_and_play:"Android cell connection device hardware iOS internet mobile network nfc phone signal tablet to wifi wireless",tapas:"appetizer brunch dinner food lunch restaurant snack",task:"approve check complete data document done drive file folders mark ok page paper select sheet slide tick validate verified writing yes",task_alt:"approve check circle complete done mark ok select tick validate verified yes",taxi_alert:"! attention automobile cab cars caution danger direction error exclamation important lyft maps mark notification public symbol transportation uber vehicle warning yellow",telegram:"brand call chat logo messaging voice",ten_mp:"camera digits font image letters megapixels numbers quality resolution symbol text type",terminal:"application code emulator program software",terrain:"geography landscape mountain",text_decrease:"- alphabet character font letter minus remove resize subtract symbol type",text_fields:"T add alphabet character font input letter symbol type",text_format:"A alphabet character font letter square style symbol type",text_increase:"+ add alphabet character font letter new plus resize symbol type",text_rotate_up:"A alphabet arrow character field font letter move symbol type",text_rotate_vertical:"A alphabet arrow character down field font letter move symbol type verticle",text_rotation_angledown:"A alphabet arrow character field font letter move rotate symbol type",text_rotation_angleup:"A alphabet arrow character field font letter move rotate symbol type",text_rotation_down:"A alphabet arrow character field font letter move rotate symbol type",text_rotation_none:"A alphabet arrow character field font letter move rotate symbol type",textsms:"bubble chat comment communicate dots feedback message speech",text_snippet:"data document file notes storage writing",texture:"diagonal lines pattern stripes",theater_comedy:"broadway event movie musical places show standup tour watch",theaters:"film media movies photography showtimes video watch",thermostat:"forecast temperature weather",thermostat_auto:"A celsius fahrenheit temperature thermometer",thirteen_mp:"camera digits font image letters megapixels numbers quality resolution symbol text type",thirty_fps:"alphabet camera character digit font frames letter number symbol text type video",thirty_fps_select:"camera digits frame frequency image numbers per rate seconds video",three_d_rotation:"3d D alphabet arrows av camera character digit font letter number symbol text type vr",three_g_mobiledata:"alphabet cellular character digit font letter network number phone signal speed symbol text type wifi",three_k:"3000 3K alphabet character digit display font letter number pixels resolution symbol text type video",three_k_plus:"+ 3000 3K alphabet character digit display font letter number pixels resolution symbol text type video",three_mp:"camera digit font image letters megapixels number quality resolution symbol text type",three_p:"account avatar bubble chat comment communicate face human message party people person profile speech user",three_sixty:"arrow av camera direction rotate rotation vr",thumb_down:"dislike downvote favorite fingers gesture hands ranking rate rating reject up",thumb_down_alt:"bad decline disapprove dislike feedback hand hate negative no reject social veto vote",thumb_down_off_alt:"bad decline disapprove dislike favorite feedback filled fingers gesture hands hate negative no ranking rate rating reject sad social veto vote",thumbs_up_down:"dislike favorite fingers gesture hands rate rating vote",thumb_up:"approve dislike down favorite fingers gesture hands ranking rate rating success upvote",thumb_up_alt:"agreed approved confirm correct favorite feedback good hand happy like okay positive satisfaction social success vote yes",thumb_up_off_alt:"agreed approved confirm correct favorite feedback fingers gesture good hands happy like okay positive ranking rate rating satisfaction social vote yes",timelapse:"duration motion photo timer video",timeline:"analytics chart data graph history line movement points tracking trending zigzag zigzap",timer:"alarm alart bell clock disabled duration enabled notification off slash stopwatch wait",timer_10:"digits duration numbers seconds",timer_10_select:"alphabet camera character digit font letter number seconds symbol text type",timer_3:"digits duration numbers seconds",timer_3_select:"alphabet camera character digit font letter number seconds symbol text type",timer_off:"alarm alart bell clock disabled duration enabled notification slash stopwatch",times_one_mobiledata:"alphabet cellular character digit font letter network number phone signal speed symbol text type wifi",time_to_leave:"automobile cars destination direction drive estimate eta maps public transportation travel trip vehicle",tips_and_updates:"alert announcement electricity idea information lamp lightbulb stars",title:"T alphabet character font header letter subject symbol text type",toc:"content format lines list reorder stacked table text titles",today:"agenda calendar date event mark month range remember reminder schedule time week",toggle_off:"application components configuration control design disable inable inactive interface selection settings slider switch ui ux website",toggle_on:"application components configuration control design disable inable inactive interface off selection settings slider switch ui ux website",token:"badge hexagon mark shield sign symbol",toll:"bill booth card cash circles coin commerce credit currency dollars highway money online payment ticket",tonality:"circle editing filter image photography picture",topic:"data document drive file folder sheet slide storage",tornado:"crisis disaster natural rain storm weather wind",touch_app:"arrow command fingers gesture hand press swipe tap",tour:"destination flag places travel visit",toys:"car fan games kids windmill",track_changes:"bullseye circle evolve lines movement radar rotate shift target",traffic:"direction light maps signal street",train:"automobile cars direction maps public rail subway transportation vehicle",tram:"automobile cars direction maps public rail subway train transportation vehicle",transfer_within_a_station:"arrows body direction human left maps people person public right route stop transit transportation vehicle walk",transform:"adjust crop editing image photo picture",transgender:"female lgbt neutral neutrual social symbol",transit_enterexit:"arrow direction maps navigation route transportation",translate:"alphabet language letter speaking speech text translator words",travel_explore:"earth find glass global globe look magnifying map network planet search see social space web world",trending_down:"analytics arrow change chart data diagram infographic measure metrics movement rate rating sale statistics tracking",trending_flat:"arrow change chart data graph metric movement rate right tracking",trending_up:"analytics arrow change chart data diagram infographic measure metrics movement rate rating statistics tracking",trip_origin:"circle departure",try:"bookmark bubble chat comment communicate favorite feedback highlight important marked message saved shape special speech star",tty:"call cell contact deaf device hardware impaired mobile speech talk telephone text",tune:"adjust editing options settings sliders",tungsten:"electricity indoor lamp lightbulb setting",turned_in:"archive bookmark favorite item label library reading remember ribbon save submit tag",turned_in_not:"archive bookmark favorite item label library outline reading remember ribbon save submit tag",turn_left:"arrows directions maps navigation path route sign traffic",turn_right:"arrows directions maps navigation path route sign traffic",turn_sharp_left:"arrows directions maps navigation path route sign traffic",turn_sharp_right:"arrows directions maps navigation path route sign traffic",turn_slight_left:"arrows directions maps navigation path right route sign traffic",turn_slight_right:"arrows directions maps navigation path route sharp sign traffic",tv:"device display linear living monitor room screencast stream television video wireless",tv_off:"Android chrome desktop device disabled enabled hardware iOS mac monitor slash television web window",twelve_mp:"camera digits font image letters megapixels numbers quality resolution symbol text type",twenty_four_mp:"camera digits font image letters megapixels numbers quality resolution symbol text type",twenty_one_mp:"camera digits font image letters megapixels numbers quality resolution symbol text type",twenty_three_mp:"camera digits font image letters megapixels numbers quality resolution symbol text type",twenty_two_mp:"camera digits font image letters megapixels numbers quality resolution symbol text type",twenty_zero_mp:"camera digits font image letters megapixels numbers quality resolution symbol text type",twitter:"brand logo social",two_k:"2000 2K alphabet character digit display font letter number pixels resolution symbol text type video",two_k_plus:"+ alphabet character digit font letter number symbol text type",two_mp:"camera digit font image letters megapixels number quality resolution symbol text type",two_wheeler:"automobile bicycle cars direction maps moped motorbike motorcycle public ride riding scooter transportation travel twom vehicle wheeler wheels",umbrella:"beach protection rain sunny",unarchive:"arrow inbox mail store undo up",undo:"arrow backward mail previous redo repeat rotate",unfold_less:"arrows chevron collapse direction expandable inward list navigation up",unfold_more:"arrows chevron collapse direction down expandable list navigation",unpublished:"approve check circle complete disabled done enabled mark off ok select slash tick validate verified yes",unsubscribe:"cancel close email envelop esubscribe message newsletter off remove send",upcoming:"alarm calendar mail message notification",update:"arrow backwards clock forward future history load refresh reverse rotate schedule time",update_disabled:"arrow backwards clock enabled forward history load off on refresh reverse rotate schedule slash time",upgrade:"arrow export instal line replace update",upload:"arrows download drive",upload_file:"arrow data document download drive folders page paper sheet slide writing",usb:"cable connection device wire",usb_off:"cable connection device wire",u_turn_left:"arrows directions maps navigation path route sign traffic u-turn",u_turn_right:"arrows directions maps navigation path route sign traffic u-turn",vaccines:"aid covid doctor drug emergency hospital immunity injection medical medication medicine needle pharmacy sick syringe vaccination vial",verified:"approve badge burst check complete done mark ok select star tick validate yes",verified_user:"approve audit certified checkmark complete done ok privacy private protection security select shield tick validate yes",vertical_align_bottom:"alignment arrow doc down editing editor spreadsheet text type writing",vertical_align_center:"alignment arrow doc down editing editor spreadsheet text type up writing",vertical_align_top:"alignment arrow doc editing editor spreadsheet text type up writing",vertical_shades:"blinds cover curtains nest open shutter sunshade",vertical_shades_closed:"blinds cover curtains nest roller shutter sunshade",vertical_split:"design format grid layout paragraph text website writing",vibration:"Android alert cell device hardware iOS mobile mode motion notification phone silence silent tablet vibrate",video_call:"+ add camera chat conference filming hardware image motion new picture plus screen symbol videography",videocam:"camera chat conference filming hardware image motion picture screen videography",video_camera_back:"image landscape mountains photography picture rear",video_camera_front:"account face human image people person photography picture profile user",videocam_off:"camera chat conference disabled enabled filming hardware image motion offline picture screen slash videography",video_file:"camera document filming hardware image motion picture videography",videogame_asset:"console controller device gamepad gaming nintendo playstation xbox",videogame_asset_off:"console controller device disabled enabled gamepad gaming playstation slash",video_label:"device item screen window",video_library:"arrow collection play",video_settings:"change details gear information options play screen service window",video_stable:"filming recording setting stability taping",view_agenda:"blocks cards design format grid layout website,stacked",view_array:"blocks design format grid layout website",view_carousel:"banner blocks cards design format grid images layout website",view_column:"blocks design format grid layout vertical website",view_comfy:"grid layout pattern squares",view_comfy_alt:"cozy design format layout web",view_compact:"grid layout pattern squares",view_compact_alt:"dense design format layout web",view_cozy:"comfy design format layout web",view_day:"blocks calendar cards carousel design format grid layout website week",view_headline:"blocks design format grid layout paragraph text website",view_in_ar:"3d augmented cube daydream headset reality square vr",view_kanban:"grid layout pattern squares",view_list:"blocks design format grid layout lines reorder stacked title website",view_module:"blocks design format grid layout reorder squares stacked title website",view_quilt:"blocks design format grid layout reorder squares stacked title website",view_sidebar:"design format grid layout web",view_stream:"blocks design format grid layout lines list reorder stacked title website",view_timeline:"grid layout pattern squares",view_week:"bars blocks columns day design format grid layout website",vignette:"border editing effect filter gradient image photography setting",villa:"architecture beach estate home house maps place real residence residential stay traveling vacation",visibility:"eye on password preview reveal see shown visability",visibility_off:"disabled enabled eye hidden invisible on password reveal see show slash view visability",voice_chat:"bubble camera comment communicate facetime feedback message speech video",voicemail:"call device message missed mobile phone recording",voice_over_off:"account disabled enabled face human people person profile recording slash speaking speech transcript user",volume_down:"audio av control music quieter shh soft sound speaker tv",volume_mute:"audio control music sound speaker tv",volume_off:"audio av control disabled enabled low music mute slash sound speaker tv",volume_up:"audio control music sound speaker tv",volunteer_activism:"donation fingers gesture giving hands heart love sharing",vpn_key:"login network passcode password register security signin signup unlock",vpn_key_off:"[offline] disabled enabled network on passcode password slash unlock",vpn_lock:"earth globe locked network password privacy private protection safety secure security virtual world",vrpano:"angle image landscape mountains panorama photography picture view wide",wallpaper:"background image landscape photography picture",warehouse:"garage industry manufacturing storage",warning:"! alert announcement attention caution danger error exclamation feedback important mark notification problem symbol triangle",warning_amber:"! alert attention caution danger error exclamation important mark notification symbol triangle",wash:"bathroom clean fingers gesture hand wc",watch:"Android clock gadget iOS smartwatch time vr wearables web wristwatch",watch_later:"clock date hour minute schedule time",watch_off:"Android clock close gadget iOS shut time vr wearables web wristwatch",water:"aqua beach lake ocean river waves weather",water_damage:"architecture building droplet estate house leak plumbing real residence residential shelter",waterfall_chart:"analytics bar data diagram infographic measure metrics statistics tracking",waves:"beach lake ocean pool river sea swim water",wb_auto:"A W alphabet automatic balance character editing font image letter photography symbol text type white wp",wb_cloudy:"balance editing white wp",wb_incandescent:"balance bright editing lamp lightbulb lighting settings white wp",wb_iridescent:"balance bright editing lighting settings white wp",wb_shade:"balance house lighting white",wb_sunny:"balance bright lighting weather white",wc:"bathroom closet female gender man person restroom toilet unisex wash water women",web:"blocks browser internet page screen website www",web_asset:"-website application browser design desktop download image interface internet layout screen ui ux video window www",web_asset_off:"browser disabled enabled internet on screen slash webpage website windows www",webhook:"api developer development enterprise software",weekend:"chair couch furniture home living lounge relax room seat",west:"arrow directional left maps navigation",whatshot:"arrow circle direction fire frames round trending",wheelchair_pickup:"accessibility accessible body handicap help human person",where_to_vote:"approve ballot check complete destination direction done election location maps mark ok pin place poll select stop tick validate verified yes",widgets:"app blocks box menu setting squares ui",wifi:"connection data internet network scan service signal wireless",wifi_calling:"cell connection connectivity contact device hardware mobile signal telephone wireless",wifi_calling_3:"cellular data internet mobile network phone speed wireless",wifi_channel:"(scan) [cellular connection data internet mobile] network service signal wireless",wifi_find:"(scan) [cellular connection data detect discover glass internet look magnifying mobile] network notice search service signal wireless",wifi_lock:"cellular connection data internet locked mobile network password privacy private protection safety secure security service signal wireless",wifi_off:"connection data disabled enabled internet network offline scan service signal slash wireless",wifi_password:"(scan) [cellular connection data internet lock mobile] network secure service signal wireless",wifi_protected_setup:"around arrows rotate",wifi_tethering:"cellular connection data internet mobile network phone scan service signal speed wireless",wifi_tethering_off:"cellular connection data disabled enabled internet mobile network offline phone scan service signal slash speed wireless",window:"close glass grid home house interior layout outside",wind_power:"eco energy nest windy",wine_bar:"alcohol cocktail cup drink glass liquor",work:"-briefcase baggage business job suitcase",work_history:"arrow backwards baggage briefcase business clock date job refresh renew reverse rotate schedule suitcase time turn",work_off:"baggage briefcase business disabled enabled job on slash suitcase",work_outline:"baggage briefcase business job suitcase",workspace_premium:"certification degree ecommerce guarantee medal permit ribbon verification",workspaces:"circles collaboration dot filled group team",wrap_text:"arrow doc editing editor spreadsheet type write writing",wrong_location:"cancel close destination direction exit maps no pin place quit remove stop",wysiwyg:"composer mode screen software system text view visibility website window",yard:"backyard flower garden home house nature pettle plants",you_tube:"brand logo social video",youtube_searched_for:"arrow backwards find glass history inprogress loading look magnifying refresh renew restore reverse rotate see yt",zoom_in:"bigger find glass grow look magnifier magnifying plus scale search see size",zoom_in_map:"arrows destination location maps move place stop",zoom_out:"find glass look magnifier magnifying minus negative scale search see size smaller",zoom_out_map:"arrows destination location maps move place stop"},Wt=new So.Search("key");Wt.addIndex("synonyms"),Wt.addDocuments(p.iconKeys.map(e=>({key:e,synonyms:Fr[e]??[]})));function fn(e){let t=0,o,a;for(o=0;o<e.length;o++)a=e.charCodeAt(o),t=(t<<5)-t+a,t|=0;return Math.abs(t)}function Uo(e,t){if(e&&(e=jt(e),e in Ht))return e in Ht?r.jsx(p.Icon,{iconKey:e,size:"medium",className:t}):void 0}const Jt=d.memo(function({collectionOrView:t,className:o}){if(!t)return r.jsx(r.Fragment,{});const a=Uo(t.icon,o);if(t?.icon&&a)return a;let n=jt(("singularName"in t?t.singularName:void 0)??t.name),i;n in Ht&&(i=n),i||(n=jt(t.path),n in Ht&&(i=n));const s=p.coolIconKeys.length;return i||(i=p.coolIconKeys[fn(t.path)%s]),r.jsx(p.Icon,{iconKey:i,size:"medium",className:o})},(e,t)=>q(e.collectionOrView?.icon,t.collectionOrView?.icon)),Ht=p.iconKeys.reduce((e,t)=>(e[t]=t,e),{});function hn(e,t){if(t!==void 0&&t===1)return e;const o={"(quiz)$":"$1zes","^(ox)$":"$1en","([m|l])ouse$":"$1ice","(matr|vert|ind)ix|ex$":"$1ices","(x|ch|ss|sh)$":"$1es","([^aeiouy]|qu)y$":"$1ies","(hive)$":"$1s","(?:([^f])fe|([lr])f)$":"$1$2ves","(shea|lea|loa|thie)f$":"$1ves",sis$:"ses","([ti])um$":"$1a","(tomat|potat|ech|her|vet)o$":"$1oes","(bu)s$":"$1ses","(alias)$":"$1es","(octop)us$":"$1i","(ax|test)is$":"$1es","(us)$":"$1es","([^s]+)$":"$1s"},a={move:"moves",foot:"feet",goose:"geese",sex:"sexes",child:"children",man:"men",tooth:"teeth",person:"people"};if(["sheep","fish","deer","moose","series","species","money","rice","information","equipment","bison","cod","offspring","pike","salmon","shrimp","swine","trout","aircraft","hovercraft","spacecraft","sugar","tuna","you","wood"].indexOf(e.toLowerCase())>=0)return e;for(const i in a){const s=new RegExp(`${i}$`,"i"),c=a[i];if(s.test(e))return e.replace(s,c)}for(const i in o){const s=new RegExp(i,"i");if(s.test(e))return e.replace(s,o[i])}return e}function gn(e,t){if(t!==void 0&&t!==1)return e;const o={"(quiz)zes$":"$1","(matr)ices$":"$1ix","(vert|ind)ices$":"$1ex","^(ox)en$":"$1","(alias)es$":"$1","(octop|vir)i$":"$1us","(cris|ax|test)es$":"$1is","(shoe)s$":"$1","(o)es$":"$1","(bus)es$":"$1","([m|l])ice$":"$1ouse","(x|ch|ss|sh)es$":"$1","(m)ovies$":"$1ovie","(s)eries$":"$1eries","([^aeiouy]|qu)ies$":"$1y","([lr])ves$":"$1f","(tive)s$":"$1","(hive)s$":"$1","(li|wi|kni)ves$":"$1fe","(shea|loa|lea|thie)ves$":"$1f","(^analy)ses$":"$1sis","((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$":"$1$2sis","([ti])a$":"$1um","(n)ews$":"$1ews","(h|bl)ouses$":"$1ouse","(corpse)s$":"$1","(us)es$":"$1",s$:""},a={move:"moves",foot:"feet",goose:"geese",sex:"sexes",child:"children",man:"men",tooth:"teeth",person:"people"};if(["sheep","fish","deer","moose","series","species","money","rice","information","equipment","bison","cod","offspring","pike","salmon","shrimp","swine","trout","aircraft","hovercraft","spacecraft","sugar","tuna","you","wood"].indexOf(e.toLowerCase())>=0)return e;for(const i in a){const s=new RegExp(`${a[i]}$`,"i");if(s.test(e))return e.replace(s,i)}for(const i in o){const s=new RegExp(i,"i");if(s.test(e))return e.replace(s,o[i])}return e}function qo(e,t,o,a=3){const n=Object.keys(e.properties);let i=o?.filter(s=>n.includes(s));return i&&i.length>0?i:(i=n,i.filter(s=>{const c=e.properties[s];return c&&!we(c)&&!jo(c,t)}).slice(0,a))}function Nr(e,t){if(e.titleProperty)return e.titleProperty;for(const o in e.properties){const a=e.properties[o];if(!we(a)&&St(a,t)?.key==="text_field")return o}}function $o(e){for(const t in e.properties){const o=e.properties[t];if(o.dataType==="string"&&o.storage?.acceptedFiles?.includes("image/*"))return t}}function Pr(e,t=""){return e&&Object.keys(e).reduce((o,a)=>{const n=t?`${t}.${a}`:a;return typeof e[a]=="object"&&e[a]!==null?Array.isArray(e[a])?e[a].forEach((i,s)=>{Object.assign(o,Pr(i,`${n}[${s}]`))}):Object.assign(o,Pr(e[a],n)):o[n]=e[a],o},{})}function Wo(e){return e.reduce((t,o)=>(Object.entries(o).forEach(([a,n])=>{if(Array.isArray(n)&&(t[a]=Math.max(t[a]||0,n.length)),typeof n=="object"&&n!==null){const i=Wo([n]);Object.entries(i).forEach(([s,c])=>{const l=`${a}.${s}`;t[l]=Math.max(t[l]||0,c)})}}),t),{})}function Jo(e){return Object.keys(e).forEach(t=>{const o=e[t];o.editable=!0,o.dataType==="map"&&o.properties&&Jo(o.properties)}),e}function Ho(e){return Object.entries(e).reduce((t,[o,a])=>{if(!we(a)&&a.dataType==="map"&&a.properties){const n={...a,properties:Ho(a.properties)};t[o]=n}return we(a)?t[o]=a:t[o]={...a,editable:!1},t},{})}function Tr(e,t,o){if(e){const n=e({collection:t,parentPaths:o})??t;return n.subcollections&&(n.subcollections=n.subcollections.map(i=>Tr(e,i,[...o,t.path]))),n}else return t}function Zo(e,t,o=[],a){const n=(t??[]).map(c=>{const l=e?.find(u=>u.id===c.id);return l?Xo(l,c,o,a):Tr(a,c,o)}),i=n.map(c=>c.id),s=e.filter(c=>!i.includes(c.id)).map(c=>a?Tr(a,c,o):c);return[...n,...s]}function Xo(e,t,o=[],a){const n=Zo(e?.subcollections??[],t?.subcollections??[],[...o,e.path],a),i={...e.properties};Object.keys(t.properties).forEach(f=>{const A=e.properties[f];A?i[f]=Ko(A,t.properties[f]):i[f]=t.properties[f]});const s=Qe(e,t),c=Ro(e),l=Ro(t),u=[...new Set([...l,...c])],m=[...new Set([...e.entityViews??[],...t.entityViews??[]])];let h={...s,subcollections:n,properties:xr(i,u),propertiesOrder:u,entityViews:m};if(a){const f=a({collection:h,parentPaths:o});f&&(h=f)}return h}function Ko(e,t){if(we(t))return t;if(we(e))return e;{const o=Qe(e,t),a=!!e.editable,n=!!t.editable;if(t.dataType==="map"&&t.properties){const i="properties"in e?e.properties:{},s="properties"in t?t.properties:{},c="propertiesOrder"in e&&e.propertiesOrder?e.propertiesOrder:Object.keys(i),l="propertiesOrder"in t&&t.propertiesOrder?t.propertiesOrder:"properties"in t?Object.keys(t.properties):[],u=[...new Set([...c,...l])],m={...i};return Object.keys(t.properties).forEach(h=>{const f=i[h];f&&(m[h]=Ko(f,s[h]))}),{...o,editable:a&&n,properties:m,propertiesOrder:u}}return{...o,editable:a&&n}}}function Ro(e){if(e.propertiesOrder&&e.propertiesOrder.length>0){const t=e.propertiesOrder;return e.additionalFields&&e.additionalFields.forEach(o=>{t.includes(o.key)||t.push(o.key)}),t}return[...Object.keys(e.properties),...(e.additionalFields??[])?.map(t=>t.key)]}function An(e){return e}function bn(e){return e}function yn(e){return e}function wn(e){return e}function vn(e){return e}function kn(e){return e}function _n(e){return e}function xn(e){return e}function Cn(e){return e}function ea(e,t,o="",a=0,n){a>n||(e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(e).forEach(i=>{ea(e[i],t[i],o+"."+i,a+1,n)}):e!==t&&console.log("Changed props:",o))}function En(e,t=3){const o=d.useRef(e);d.useEffect(()=>{ea(e,o.current,"",0,t),o.current=e})}const Bn="100vw",Sn="55vw",ta="768px",ra=d.createContext({}),ze=e=>{const t=d.useContext(ra);return e?.overrides?.dataSource?e?.overrides.dataSource:t},oa=d.createContext({}),ue=()=>d.useContext(oa),$e=()=>d.useContext(pr),aa=d.createContext({}),_t=()=>d.useContext(aa),ia=d.createContext({}),We=()=>d.useContext(ia),na=d.createContext({}),ct=e=>{const t=d.useContext(na);return e?.overrides?.storageSource?e.overrides.storageSource:t},Je=()=>{const{enqueueSnackbar:e,closeSnackbar:t}=_o.useSnackbar(),o=d.useCallback(n=>{const{type:i,message:s,autoHideDuration:c}=n;e({message:s,variant:i,autoHideDuration:c})},[]),a=d.useCallback(()=>{t()},[]);return d.useMemo(()=>({open:o,close:a}),[o,a])},sa=d.createContext(void 0),dt=()=>d.useContext(sa),la=d.createContext({}),In=({children:e})=>{const[t,o]=d.useState([]),a=d.useRef(t),n=c=>{a.current=c,o(c)},i=d.useCallback(()=>{if(t.length===0)return;const c=[...t.slice(0,-1)];n(c)},[t]),s=d.useCallback(c=>{const l=[...t,c];return n(l),{closeDialog:()=>{const u=a.current.filter(m=>m.key!==c.key);n(u)}}},[t]);return r.jsxs(la.Provider,{value:{open:s,close:i},children:[e,t.map((c,l)=>r.jsx(c.Component,{open:!0,closeDialog:i},`dialog_${l}`))]})},Fn=()=>d.useContext(la),ca=d.createContext({}),te=()=>d.useContext(ca),da=d.createContext({}),pt=()=>d.useContext(da),Ae=()=>{const e=$e(),t=_t(),o=We(),a=ue(),n=ze(),i=ct(),s=Je(),c=dt(),l=Fn(),u=te(),m=pt(),h=d.useRef({authController:e,sideDialogsController:t,sideEntityController:o,navigation:a,dataSource:n,storageSource:i,snackbarController:s,userConfigPersistence:c,dialogsController:l,customizationController:u,analyticsController:m});return d.useEffect(()=>{h.current={authController:e,sideDialogsController:t,sideEntityController:o,navigation:a,dataSource:n,storageSource:i,snackbarController:s,userConfigPersistence:c,dialogsController:l,customizationController:u,analyticsController:m}},[e,l,a,t]),h.current};function Nn({path:e,collection:t,filterValues:o,sortBy:a,itemCount:n,searchString:i}){const s=ze(t),l=ue().resolveAliasesFrom(e),u=a?a[0]:void 0,m=a?a[1]:void 0,h=Ae(),[f,A]=d.useState([]),[g,b]=d.useState(!1),[y,k]=d.useState(),[v,_]=d.useState(!1);return d.useEffect(()=>{b(!0);const E=async B=>{if(t.callbacks?.onFetch)try{B=await Promise.all(B.map(x=>t.callbacks.onFetch({collection:t,path:l,entity:x,context:h})))}catch(x){console.error(x)}b(!1),k(void 0),A(B.map(x=>({...x}))),_(!n||B.length<n)},C=B=>{console.error("ERROR",B),b(!1),A([]),k(B)};return s.listenCollection?s.listenCollection({path:l,collection:t,onUpdate:E,onError:C,searchString:i,filter:o,limit:n,startAfter:void 0,orderBy:u,order:m}):(s.fetchCollection({path:l,collection:t,searchString:i,filter:o,limit:n,startAfter:void 0,orderBy:u,order:m}).then(E).catch(C),()=>{})},[l,n,m,u,o,i]),{data:f,dataLoading:g,dataLoadingError:y,noMoreToLoad:v}}const Qr={};function Dr({path:e,entityId:t,collection:o,useCache:a=!1}){const n=ze(o),s=ue().resolveAliasesFrom(e),c=Ae(),[l,u]=d.useState(),[m,h]=d.useState(!0),[f,A]=d.useState();return d.useEffect(()=>{h(!0);const g=async y=>{if(o.callbacks?.onFetch&&y)try{y=await o.callbacks.onFetch({collection:o,path:s,entity:y,context:c})}catch(k){console.error(k)}Qr[`${s}/${t}`]=y,u(y),h(!1),A(void 0)},b=y=>{console.error("ERROR fetching entity",y),h(!1),u(void 0),A(y)};return t&&a&&Qr[`${s}/${t}`]?(u(Qr[`${s}/${t}`]),h(!1),A(void 0),()=>{}):t&&s&&o?n.listenEntity?n.listenEntity({path:s,entityId:t,collection:o,onUpdate:g,onError:b}):(n.fetchEntity({path:s,entityId:t,collection:o}).then(g).catch(b),()=>{}):(g(void 0),()=>{})},[t,s]),{entity:l,dataLoading:m,dataLoadingError:f}}async function Mr({collection:e,path:t,entityId:o,values:a,previousValues:n,status:i,dataSource:s,context:c,onSaveSuccess:l,onSaveFailure:u,onPreSaveHookError:m,onSaveSuccessHookError:h}){if(i!=="new"&&!o)throw new Error("Entity id must be specified when updating an existing entity");let f;const A=c.customizationController,g=c.navigation.resolveAliasesFrom(t),b=e.callbacks;if(b?.onPreSave)try{const y=Pe({collection:e,path:t,values:n,entityId:o,fields:A.propertyConfigs});f=await b.onPreSave({collection:y,path:t,resolvedPath:g,entityId:o,values:a,previousValues:n,status:i,context:c})}catch(y){console.error(y),m&&m(y);return}else f=a;return s.saveEntity({collection:e,path:g,entityId:o,values:f,previousValues:n,status:i}).then(y=>{try{if(b?.onSaveSuccess){const k=Pe({collection:e,path:t,values:f,entityId:o,fields:A.propertyConfigs});b.onSaveSuccess({collection:k,path:t,resolvedPath:g,entityId:y.id,values:f,previousValues:n,status:i,context:c})}}catch(k){h&&h(k)}l&&l(y)}).catch(y=>{if(b?.onSaveFailure){const k=Pe({collection:e,path:t,values:f,entityId:o,fields:A.propertyConfigs});b.onSaveFailure({collection:k,path:t,resolvedPath:g,entityId:o,values:f,previousValues:n,status:i,context:c})}u&&u(y)})}async function pa({dataSource:e,entity:t,collection:o,callbacks:a,onDeleteSuccess:n,onDeleteFailure:i,onPreDeleteHookError:s,onDeleteSuccessHookError:c,context:l}){console.debug("Deleting entity",t.path,t.id);const u={entity:t,collection:o,entityId:t.id,path:t.path,context:l};if(a?.onPreDelete)try{await a.onPreDelete(u)}catch(m){return console.error(m),s&&s(t,m),!1}return e.deleteEntity({entity:t}).then(()=>{n&&n(t);try{return a?.onDelete&&a.onDelete(u),!0}catch(m){return c&&c(t,m),!1}}).catch(m=>(i&&i(t,m),!1))}function ua({path:e,context:t}){const o=t.dataSource,a=t.navigation;if(!a)throw Error("Calling getNavigationFrom, but main navigation has not yet been initialised");const i=_r({path:e,collections:a.collections??[]}).map(s=>{if(s.type==="collection")return Promise.resolve(s);if(s.type==="entity"){const c=a.getCollection(s.path,s.entityId);if(!c)throw Error(`No collection defined in the navigation for the entity with path ${s.path}`);return o.fetchEntity({path:s.path,entityId:s.entityId,collection:c}).then(l=>{if(l)return{...s,entity:l}})}else{if(s.type==="custom_view")return Promise.resolve(s);throw Error("Unmapped element in useEntitiesFromPath")}}).filter(s=>!!s);return Promise.all(i)}function Pn({path:e}){const t=Ae(),[o,a]=d.useState(),[n,i]=d.useState(!1),[s,c]=d.useState();return d.useEffect(()=>{t.navigation&&(i(!0),c(void 0),ua({path:e,context:t}).then(u=>{a(u)}).catch(u=>c(u)).finally(()=>i(!1)))},[e,t]),t.navigation?{data:o,dataLoading:n,dataLoadingError:s}:{dataLoading:!0}}const Or=()=>d.useContext(Tt),ma=e=>{const{onSuccess:t,onError:o,disableClipboardAPI:a=!1,copiedDuration:n}=e||{},i=d.useRef(null),[s,c]=d.useState(!1),[l,u]=d.useState("");d.useEffect(()=>{n&&setTimeout(()=>c(!1),n)},[s]);const m=()=>navigator.clipboard!==void 0,h=d.useCallback(v=>{if(o)o(v);else throw new Error(v)},[o]),f=d.useCallback(v=>{t&&t(v),c(!0),u(v)},[t]),A=d.useCallback(v=>{navigator.clipboard.writeText(v).then(()=>f(v)).catch(_=>{h(_),c(!1)})},[h,f]),g=()=>{m()&&navigator.clipboard.writeText("")},b=v=>k("copy",typeof v=="object"?void 0:v),y=()=>k("cut"),k=d.useCallback((v="copy",_)=>{const E=i.current,C=E&&(E.tagName==="INPUT"||E.tagName==="TEXTAREA"),B=i.current;m()&&!a&&(_?A(_):E?C?(A(B.value),v==="cut"&&(B.value="")):A(E.innerText):h("Both the ref & text were undefined"))},[a,A,h]);return{ref:i,isCoppied:s,clipboard:l,clearClipboard:g,isSupported:m,copy:b,cut:y}},Tn={xs:0,sm:640,md:768,lg:1024,xl:1280,"2xl":1536,"3xl":1920};let xt=fa("lg");const Zt=[],Qn=()=>{Zt.forEach(e=>e(xt))};typeof window<"u"&&window.addEventListener("resize",()=>{const e=fa("lg");e!==xt&&(xt=e,Qn())});const De=()=>{const[e,t]=d.useState(xt);return d.useEffect(()=>{const o=a=>{t(a)};return Zt.push(o),t(xt),()=>{const a=Zt.indexOf(o);a>-1&&Zt.splice(a,1)}},[]),e};function fa(e="lg"){return typeof window>"u"?!1:window.matchMedia(`(min-width: ${Tn[e]+1}px)`).matches}function ha(e){return r.jsx(p.Tooltip,{...e,tooltipClassName:"!text-red-500 bg-red-50",children:e.children})}function be({title:e,error:t,tooltip:o}){const a=t instanceof Error?t.message:t;console.error("ErrorView",t);const n=r.jsxs("div",{className:"flex items-center m-2",children:[r.jsx(p.ErrorIcon,{size:"small",color:"error"}),r.jsxs("div",{className:"pl-2",children:[e&&r.jsx(p.Typography,{variant:"body2",className:"font-medium",children:e}),r.jsx(p.Typography,{variant:"body2",children:a})]})]});return o?r.jsx(ha,{title:o,children:n}):n}function Ke(){return r.jsx("div",{className:"rounded-full bg-gray-200 bg-opacity-30 dark:bg-opacity-20 w-5 h-2 inline-block"})}const Dn=40,Mn=100,On=200;function ut(e){if(e==="tiny")return Dn;if(e==="small")return Mn;if(e==="medium")return On;throw Error("Thumbnail size not mapped")}function He(e){switch(e){case"xs":case"s":return"tiny";case"m":return"small";case"l":case"xl":return"medium";default:throw Error("Missing mapping value in getPreviewSizeFrom: "+e)}}function ga({size:e,url:t}){const[o,a]=d.useState(!1),n=d.useMemo(()=>ut(e),[e]);if(e==="tiny")return r.jsx("img",{src:t,className:"rounded-md",style:{position:"relative",objectFit:"cover",width:n,height:n,maxHeight:"100%"}},"tiny_image_preview_"+t);const i={maxWidth:"100%",maxHeight:"100%"};return r.jsxs("div",{className:"relative flex items-center justify-center max-w-full max-h-full",style:{width:n,height:n},onMouseEnter:()=>a(!0),onMouseMove:()=>a(!0),onMouseLeave:()=>a(!1),children:[r.jsx("img",{src:t,className:"rounded-md",style:i}),o&&r.jsxs(r.Fragment,{children:[navigator&&r.jsx(p.Tooltip,{title:"Copy url to clipboard",children:r.jsx("div",{className:"rounded-full absolute bottom-[-4px] right-8",children:r.jsx(p.IconButton,{variant:"filled",size:"small",onClick:s=>(s.stopPropagation(),s.preventDefault(),navigator.clipboard.writeText(t)),children:r.jsx(p.ContentCopyIcon,{className:"text-gray-500",size:"small"})})})}),r.jsx(p.Tooltip,{title:"Open image in new tab",children:r.jsx(p.IconButton,{variant:"filled",component:"a",style:{position:"absolute",bottom:-4,right:-4},href:t,rel:"noopener noreferrer",target:"_blank",size:"small",onClick:s=>s.stopPropagation(),children:r.jsx(p.OpenInNewIcon,{className:"text-gray-500",size:"small"})})})]})]},"image_preview_"+t)}function Ct({url:e,previewType:t,size:o,hint:a}){return t?t==="image"?r.jsx(ga,{url:e,size:o}):t==="audio"?r.jsxs("audio",{controls:!0,src:e,children:["Your browser does not support the",r.jsx("code",{children:"audio"})," element."]}):t==="video"?r.jsx("video",{className:`max-w-${o==="small"?"sm":"md"}`,controls:!0,children:r.jsx("source",{src:e})}):r.jsxs("a",{href:e,rel:"noopener noreferrer",target:"_blank",onClick:n=>n.stopPropagation(),className:"flex flex-col items-center justify-center",style:{width:ut(o),height:ut(o)},children:[r.jsx(p.DescriptionIcon,{className:"flex-grow"}),a&&r.jsx(p.Tooltip,{title:a,children:r.jsx(p.Typography,{className:"max-w-full truncate rtl text-left",variant:"caption",children:a})})]}):!e||!e.trim()?r.jsx(Ke,{}):r.jsxs("a",{className:"flex gap-4 break-words items-center font-medium text-primary visited:text-primary dark:visited:text-primary dark:text-primary",href:e,rel:"noopener noreferrer",onMouseDown:n=>{n.preventDefault()},target:"_blank",children:[r.jsx(p.OpenInNewIcon,{size:"small"}),e]})}function Re({property:e,size:t}){e||console.error("No property assigned for skeleton component",e,t);let o;if(e.dataType==="string"){const a=e;a.url?o=Ln(a,t):a.storage?o=Vr(t):o=je()}else if(e.dataType==="array"){const a=e;a.of&&(Array.isArray(a.of)?o=r.jsxs(r.Fragment,{children:[a.of.map((n,i)=>zr(n,i))," "]}):a.of.dataType==="map"&&a.of.properties?o=Vn(a.of.properties,t,a.of.previewProperties):a.of.dataType==="string"?a.of.enumValues?o=Yn():a.of.storage?o=zr(a.of):o=Gn():o=zr(a.of))}else e.dataType==="map"?o=zn(e,t):e.dataType==="date"?o=je():e.dataType==="reference"?o=jn():(e.dataType,o=je());return o||null}function zn(e,t){if(!e.properties)return r.jsx(r.Fragment,{});let o;return t==="medium"?o=Object.keys(e.properties):(o=e.previewProperties||Object.keys(e.properties),t==="small"?o=o.slice(0,3):t==="tiny"&&(o=o.slice(0,1))),t!=="medium"?r.jsx("div",{className:"w-full flex flex-col space-y-4",children:o.map((a,n)=>r.jsx("div",{children:e.properties&&e.properties[a]&&r.jsx(Re,{property:e.properties[a],size:"small"})},`map_${a}`))}):r.jsx("table",{className:"table-auto",children:r.jsx("tbody",{children:o&&o.map((a,n)=>r.jsxs("tr",{className:"border-b last:border-b-0",children:[r.jsx("th",{className:"align-top",style:{width:"30%"},children:r.jsx("p",{className:"text-xs text-secondary",children:e.properties[a].name})},`table-cell-title--${a}`),r.jsx("th",{style:{width:"70%"},children:e.properties&&e.properties[a]&&r.jsx(Re,{property:e.properties[a],size:"small"})},`table-cell-${a}`)]},`map_preview_table__${n}`))})})}function Vn(e,t,o){let a=o;return(!a||!a.length)&&(a=Object.keys(e),t&&(a=a.slice(0,3))),r.jsx("table",{className:"table-auto",children:r.jsx("tbody",{children:[0,1,2].map((n,i)=>r.jsx("tr",{children:a&&a.map(s=>r.jsx("th",{children:r.jsx(Re,{property:e[s],size:"small"})},`table-cell-${s}`))},`table_${n}_${i}`))})})}function Gn(){return r.jsx("div",{className:"flex flex-col gap-2",children:[0,1].map((e,t)=>je(t))})}function Yn(){return r.jsx("div",{className:"flex flex-col gap-2",children:[0,1].map((e,t)=>r.jsx(r.Fragment,{children:je(t)}))})}function zr(e,t=0){return r.jsx("div",{className:"flex flex-col gap-2",children:[0,1].map((o,a)=>r.jsx(r.Fragment,{children:r.jsx(Re,{property:e,size:"small"},`i_${a}`)}))},"array_index_"+t)}function Vr(e){const t=e==="tiny"?40:e==="small"?100:200;return r.jsx(p.Skeleton,{width:t,height:t})}function jn(){return r.jsx(p.Skeleton,{width:200,height:100})}function Ln(e,t="medium"){return typeof e.url=="boolean"?r.jsxs("div",{style:{display:"flex"},children:[Gr(),je()]}):Un(t)}function Un(e){return r.jsx("div",{className:`w-${ut(e)} h-${ut(e)}`,children:Gr()})}function je(e,t=120){return r.jsx(p.Skeleton,{width:t},`skeleton_${e}`)}function qn(e){return r.jsx(p.Skeleton,{height:20})}function Gr(){return r.jsx(p.Skeleton,{width:24,height:24})}const Aa=d.memo(ya,$n);function $n(e,t){return e.size===t.size&&e.storagePathOrDownloadUrl===t.storagePathOrDownloadUrl&&e.storeUrl===t.storeUrl}const ba={};function ya({storeUrl:e,storagePathOrDownloadUrl:t,size:o}){const[a,n]=d.useState(void 0),i=ct(),[s,c]=d.useState(ba[t]);if(d.useEffect(()=>{if(!t)return;let m=!1;return i.getDownloadURL(t).then(function(h){m||(c(h),ba[t]=h)}).catch(n),()=>{m=!0}},[t]),!t)return null;const l=s?.metadata?Wn(s?.metadata.contentType):void 0,u=l?.startsWith("image")?"image":l?.startsWith("video")?"video":l?.startsWith("audio")?"audio":"file";return s?.fileNotFound?r.jsx(be,{error:"File not found"}):s?.url?r.jsx(Ct,{previewType:u,url:s.url,size:o,hint:t}):Vr(o)}function Wn(e){return e.startsWith("image")?"image/*":e.startsWith("video")?"video/*":e.startsWith("audio")?"audio/*":e.startsWith("application")?"application/*":e.startsWith("text")?"text/*":e.startsWith("font")?"font/*":e}function Se({enumValues:e,enumKey:t,size:o,className:a,children:n}){if(!e)return null;const i=Ue(e),s=t!==void 0?Yt(i,t):void 0,c=Mo(s),l=Do(i,t);return r.jsxs(p.Chip,{className:a,colorScheme:l,error:!c,outlined:!1,size:o,children:[n,!n&&(c!==void 0?c:String(t))]})}function Yr({propertyKey:e,value:t,property:o,size:a}){if(o.enumValues){const n=t,i=vr(o);return r.jsx(Se,{enumKey:n,enumValues:i.enumValues,size:a})}else if(o.previewAsTag){const n=p.getColorSchemeForSeed(e??"");return r.jsx(re,{children:r.jsx(p.Chip,{colorScheme:n,size:a,children:t})})}else{if(o.url)return r.jsx(Ct,{size:a,url:t,previewType:typeof o.url=="string"?o.url:void 0});{if(!t)return r.jsx(r.Fragment,{});const n=t.split(`
2
2
  `);return t&&t.includes(`
3
- `)?r.jsx("div",{className:"overflow-x-scroll",children:n.map((i,s)=>r.jsxs(c.Fragment,{children:[r.jsx("span",{children:i}),s!==n.length-1&&r.jsx("br",{})]},`string_preview_${s}`))}):r.jsx(r.Fragment,{children:t})}}}function Gr({propertyKey:e,value:t,property:o,size:a}){const n=re(),i=qe({propertyKey:e,property:o,propertyValue:t,fields:n.propertyConfigs});if(!i.of)throw Error(`You need to specify an 'of' prop (or specify a custom field) in your array property ${e}`);if(i.dataType!=="array")throw Error("Picked wrong preview component ArrayPreview");const s=t;if(!s)return null;const l=a==="medium"?"small":"tiny";return r.jsx("div",{className:"flex flex-col gap-2",children:s&&s.map((d,u)=>{const m=i.resolvedProperties[u]??i.resolvedProperties[u]??(Array.isArray(i.of)?i.of[u]:i.of);return m?r.jsx(c.Fragment,{children:r.jsx("div",{className:p.cn(p.defaultBorderMixin,"m-1 border-b last:border-b-0"),children:r.jsx(oe,{children:r.jsx(ve,{propertyKey:e,value:d,property:m,size:l})})})},"preview_array_"+u):null})})}const Ve=dr.memo(function(t){const o=t.reference;return typeof o=="object"&&"isEntityReference"in o&&o.isEntityReference()?r.jsx(ji,{...t}):(console.warn("Reference preview received value of type",typeof o),r.jsx(Jt,{onClick:t.onClick,size:t.size,children:r.jsx(ge,{error:"Unexpected value. Click to edit",tooltip:JSON.stringify(o)})}))},Yi);function Yi(e,t){return e.disabled===t.disabled&&e.size===t.size&&e.onHover===t.onHover&&e.reference?.id===t.reference?.id&&e.reference?.path===t.reference?.path&&e.allowEntityNavigation===t.allowEntityNavigation}function ji({disabled:e,reference:t,previewProperties:o,size:a,onHover:n,onClick:i,allowEntityNavigation:s=!0}){const l=re(),u=ue().getCollection(t.path);if(!u){if(l.components?.missingReference)return r.jsx(l.components.missingReference,{path:t.path});throw Error(`Couldn't find the corresponding collection view for the path: ${t.path}`)}return r.jsx(Li,{reference:t,collection:u,previewProperties:o,size:a,disabled:e,allowEntityNavigation:s,onClick:i,onHover:n})}function Li({reference:e,collection:t,previewProperties:o,size:a,disabled:n,allowEntityNavigation:i,onClick:s,onHover:l}){const d=re(),u=dt(),m=He(),{entity:g,dataLoading:f,dataLoadingError:b}=Pr({path:e.path,entityId:e.id,collection:t,useCache:!0});g&&Aa.set(e.pathWithId,g);const h=g??Aa.get(e.pathWithId),A=c.useMemo(()=>Te({collection:t,path:e.path,values:h?.values,fields:d.propertyConfigs}),[t]),y=c.useMemo(()=>Lo(A,d.propertyConfigs,o,a==="small"||a==="medium"?3:1),[o,A,a]);let k;return A?(e?h&&!h.values?k=r.jsx(ge,{error:"Reference does not exist",tooltip:e.path}):k=r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"flex flex-col flex-grow w-full max-w-[calc(100%-52px)] m-1",children:[a!=="tiny"&&(e?r.jsx("div",{className:`${a!=="medium"?"block whitespace-nowrap overflow-hidden truncate":""}`,children:r.jsx(p.Typography,{variant:"caption",className:"font-mono",children:e.id})}):r.jsx(p.Skeleton,{})),y&&y.map(v=>{const _=A.properties[v];return _?r.jsx("div",{className:y.length>1?"my-0.5":"my-0",children:h?r.jsx(ve,{propertyKey:v,value:Ue(h.values,v),property:_,size:"tiny"}):r.jsx(ut,{property:_,size:"tiny"})},"ref_prev_"+v):null})]}),r.jsx("div",{className:`my-${a==="tiny"?2:4}`,children:!n&&h&&i&&r.jsx(p.Tooltip,{title:`See details for ${h.id}`,children:r.jsx(p.IconButton,{color:"inherit",size:"small",onClick:v=>{v.stopPropagation(),u.onAnalyticsEvent?.("entity_click_from_reference",{path:h.path,entityId:h.id}),m.open({entityId:h.id,path:h.path,collection:A,updateUrl:!0})},children:r.jsx(p.KeyboardTabIcon,{size:"small"})})})})]}):k=r.jsx(ge,{error:"Reference not set"}),r.jsx(Jt,{onClick:n?void 0:s,onHover:n?void 0:l,size:a,children:k})):r.jsx(ge,{error:"Could not find collection with id "+A})}function Jt({children:e,onHover:t,size:o,onClick:a}){return r.jsx(p.Typography,{variant:"label",className:p.cn("bg-opacity-70 bg-gray-100 dark:bg-gray-800 dark:bg-opacity-60","w-full","flex","rounded-md","overflow-hidden",t?"hover:bg-opacity-90 dark:hover:bg-opacity-90":"",o==="medium"?"p-2":"p-1",o==="tiny"?"items-center":"","transition-colors duration-300 ease-in-out ",a?"cursor-pointer":""),style:{tabindex:0},onClick:n=>{a&&(n.preventDefault(),a(n))},children:e})}const Aa=new Map;function ba({propertyKey:e,value:t,property:o,size:a}){const n=re(),i=qe({propertyKey:e,property:o,propertyValue:t,fields:n.propertyConfigs});if(Array.isArray(i?.of))throw Error("Using array properties instead of single one in `of` in ArrayProperty");if(i?.dataType!=="array"||!i.of||i.of.dataType!=="reference")throw Error("Picked wrong preview component ArrayOfReferencesPreview");const s=a==="medium"?"small":"tiny";return r.jsx("div",{className:"flex flex-col w-full",children:t&&t.map((l,d)=>{const u=i.of;return r.jsx("div",{className:"mt-1 mb-1 w-full",children:r.jsx(Ve,{disabled:!u.path,previewProperties:u.previewProperties,size:s,reference:l})},`preview_array_ref_${e}_${d}`)})})}function ya({propertyKey:e,value:t,property:o,size:a}){const n=re(),i=qe({propertyKey:e,property:o,propertyValue:t,fields:n.propertyConfigs});if(Array.isArray(i.of))throw Error("Using array properties instead of single one in `of` in ArrayProperty");if(i.dataType!=="array"||!i.of||i.of.dataType!=="string")throw Error("Picked wrong preview component ArrayOfStorageComponentsPreview");const s=a==="medium"?"small":"tiny";return r.jsx("div",{className:"flex flex-wrap gap-2",children:t&&t.map((l,d)=>r.jsx(oe,{children:r.jsx(ve,{propertyKey:e,value:l,property:i.of,size:s})},`preview_array_storage_${e}_${d}`))})}function Yr({name:e,value:t,enumValues:o,size:a}){return r.jsx("div",{className:"flex flex-wrap gap-1.5",children:t&&t.map((n,i)=>r.jsx(oe,{children:r.jsx(Be,{enumKey:n,enumValues:o,size:a!=="medium"?"small":"medium"})},`preview_array_ref_${e}_${i}`))})}function jr({propertyKey:e,value:t,property:o,size:a}){if(o.dataType!=="array")throw Error("Picked wrong preview component ArrayEnumPreview");const n=o.of;if(!n.enumValues)throw Error("Picked wrong preview component ArrayEnumPreview");return t?r.jsx(Yr,{name:e,value:t,enumValues:n.enumValues,size:a}):null}function wa({propertyKey:e,value:t,property:o,size:a}){const n=re(),i=qe({propertyKey:e,property:o,propertyValue:t,fields:n.propertyConfigs});if(Array.isArray(i.of))throw Error("Using array properties instead of single one in `of` in ArrayProperty");if(!i.of||i.dataType!=="array"||i.of.dataType!=="string")throw Error("Picked wrong preview component ArrayOfStringsPreview");if(t&&!Array.isArray(t))return r.jsx("div",{children:`Unexpected value: ${t}`});const s=i.of;return r.jsx("div",{className:"flex flex-col gap-2",children:t&&t.map((l,d)=>r.jsx("div",{children:r.jsx(oe,{children:r.jsx(Vr,{propertyKey:e,property:s,value:l,size:a})})},`preview_array_strings_${e}_${d}`))})}function va({propertyKey:e,value:t,property:o,size:a}){const n=re(),i=qe({propertyKey:e,property:o,propertyValue:t,fields:n.propertyConfigs});if(i?.dataType!=="array")throw Error("Picked wrong preview component ArrayPreview");if(!i?.oneOf)throw Error(`You need to specify an 'of' or 'oneOf' prop (or specify a custom field) in your array property ${e}`);const s=t;if(!s)return null;const l=a==="medium"?"small":"tiny",d=i.oneOf.typeField??bt,u=i.oneOf.valueField??Mt,m=i.oneOf.properties;return r.jsx("div",{className:"flex flex-col",children:s&&s.map((g,f)=>r.jsx(c.Fragment,{children:r.jsx("div",{className:p.cn(p.defaultBorderMixin,"m-1 border-b last:border-b-0"),children:r.jsx(oe,{children:g&&r.jsx(ve,{propertyKey:e,value:g[u],property:i.resolvedProperties[f]??m[g[d]],size:l})})})},"preview_array_"+g+"_"+f))})}function ka({propertyKey:e,value:t,property:o,size:a}){if(o.dataType!=="map")throw Error("Picked wrong preview component MapPropertyPreview");const n=o;if(!n.properties||Object.keys(n.properties??{}).length===0)return r.jsx(Lr,{value:t});if(!t)return null;const i=Object.keys(n.properties);return a==="tiny"?r.jsx("div",{className:"w-full flex flex-col space-y-1 md:space-y-2",children:i.map((s,l)=>r.jsx("div",{children:r.jsx(oe,{children:r.jsx(ve,{propertyKey:s,value:t[s],property:n.properties[s],size:a})},"map_preview_"+n.name+s+l)},`map_${s}`))}):r.jsx("div",{className:"flex flex-col gap-1 w-full",children:i&&i.map((s,l)=>{const d=n.properties[s];return r.jsxs("div",{className:p.cn(p.defaultBorderMixin,"last:border-b-0 border-b"),children:[r.jsxs("div",{className:"flex flex-row pt-0.5 pb-0.5 gap-2",children:[r.jsx("div",{className:"min-w-[140px] w-[25%] py-1",children:r.jsx(p.Typography,{variant:"caption",className:"font-mono break-words",color:"secondary",children:d.name})}),r.jsx("div",{className:"flex-grow max-w-[75%]",children:r.jsx(oe,{children:!(d.dataType==="map"||d==="array")&&r.jsx(ve,{propertyKey:s,value:t[s],property:d,size:a})})})]}),(d.dataType==="map"||d==="array")&&r.jsx("div",{className:p.cn(p.defaultBorderMixin,"border-l pl-4 ml-2 my-2"),children:r.jsx(ve,{propertyKey:s,value:t[s],property:d,size:a})})]},`map_preview_table_${s}}`)})})}function Lr({value:e}){return typeof e!="object"?null:e?r.jsx("div",{className:"flex flex-col gap-1 w-full",children:Object.entries(e).map(([t,o])=>r.jsxs("div",{className:p.cn(p.defaultBorderMixin,"last:border-b-0 border-b"),children:[r.jsxs("div",{className:"flex flex-row pt-0.5 pb-0.5 gap-2",children:[r.jsx("div",{className:"min-w-[140px] w-[25%] py-1",children:r.jsx(p.Typography,{variant:"caption",className:"font-mono break-words",color:"secondary",children:t})},`table-cell-title-${t}-${t}`),r.jsx("div",{className:"flex-grow max-w-[75%]",children:typeof o!="object"&&r.jsx(p.Typography,{children:r.jsx(oe,{children:o&&o.toString()})})})]}),typeof o=="object"&&r.jsx("div",{className:p.cn(p.defaultBorderMixin,"border-l pl-4"),children:r.jsx(Lr,{value:o})})]},`map_preview_table_${t}}`))}):r.jsx(Re,{})}function _a({date:e}){const t=re(),o=t?.locale?So[t?.locale]:void 0,a=t?.dateTimeFormat??Mo,n=e?Tn.format(e,a,{locale:o}):"";return r.jsx(r.Fragment,{children:n})}function xa({value:e}){return r.jsx(p.Checkbox,{checked:e,color:"secondary"})}function Ca({value:e,property:t,size:o}){if(t.enumValues){const a=e,n=$e(t.enumValues);return n?r.jsx(Be,{enumKey:a,enumValues:n,size:o!=="medium"?"small":"medium"}):r.jsx(r.Fragment,{children:e})}else return r.jsx(r.Fragment,{children:e})}const ve=c.memo(function(t){const o=re();let a;const{property:n,propertyKey:i,value:s,size:l,height:d,width:u}=t,m=Fe({propertyKey:i,propertyOrBuilder:n,propertyValue:s,fields:o.propertyConfigs});if(s===void 0||m===null)a=r.jsx(Re,{});else if(m.Preview)a=c.createElement(m.Preview,{propertyKey:i,value:s,property:m,size:l,height:d,width:u,customProps:m.customProps});else if(s===null)a=r.jsx(Re,{});else if(m.dataType==="string"){const g=m;typeof s=="string"?g.url?typeof g.url=="boolean"?a=r.jsx(xt,{size:t.size,url:s}):typeof g.url=="string"&&(a=r.jsx(xt,{size:t.size,url:s,previewType:g.url})):g.storage?a=r.jsx(fa,{storeUrl:m.storage?.storeUrl??!1,size:t.size,storagePathOrDownloadUrl:s}):g.markdown?a=r.jsx(p.Markdown,{source:s}):a=r.jsx(Vr,{...t,property:g,value:s}):a=et(i,m.dataType,s)}else if(m.dataType==="array")if(s instanceof Array){const g=m;if(!g.of&&!g.oneOf)throw Error(`You need to specify an 'of' or 'oneOf' prop (or specify a custom field) in your array property ${i}`);g.of?Array.isArray(g.of)?a=r.jsx(Gr,{...t,value:s,property:m}):g.of.dataType==="reference"?a=r.jsx(ba,{...t,value:s,property:m}):g.of.dataType==="string"?g.of.enumValues?a=r.jsx(jr,{...t,value:s,property:m}):g.of.storage?a=r.jsx(ya,{...t,value:s,property:m}):a=r.jsx(wa,{...t,value:s,property:m}):g.of.dataType==="number"&&g.of.enumValues?a=r.jsx(jr,{...t,value:s,property:m}):a=r.jsx(Gr,{...t,value:s,property:m}):g.oneOf&&(a=r.jsx(va,{...t,value:s,property:m}))}else a=et(i,m.dataType,s);else m.dataType==="map"?typeof s=="object"?a=r.jsx(ka,{...t,property:m}):a=et(i,m.dataType,s):m.dataType==="date"?s instanceof Date?a=r.jsx(_a,{date:s}):a=et(i,m.dataType,s):m.dataType==="reference"?typeof m.path=="string"?typeof s=="object"&&"isEntityReference"in s&&s.isEntityReference()?a=r.jsx(Ve,{disabled:!m.path,previewProperties:m.previewProperties,size:t.size,reference:s}):a=et(i,m.dataType,s):a=r.jsx(Re,{}):m.dataType==="boolean"?typeof s=="boolean"?a=r.jsx(xa,{value:s}):a=et(i,m.dataType,s):m.dataType==="number"?typeof s=="number"?a=r.jsx(Ca,{...t,value:s,property:m}):a=et(i,m.dataType,s):a=JSON.stringify(s);return a==null||Array.isArray(a)&&a.length===0?r.jsx(Re,{}):a},$);function et(e,t,o){return console.warn(`Unexpected value for property ${e}, of type ${t}`,o),r.jsx(ge,{title:"Unexpected value",error:`${JSON.stringify(o)}`})}function Ui({propertyKey:e,value:t,property:o,size:a}){const n=re(),i=qe({propertyKey:e,property:o,propertyValue:t,fields:n.propertyConfigs});if(Array.isArray(i?.of))throw Error("Using array properties instead of single one in `of` in ArrayProperty");if(i?.dataType!=="array"||!i.of||i.of.dataType!=="map")throw Error("Picked wrong preview component ArrayOfMapsPreview");const s=i.of,l=s.properties;if(!l)throw Error(`You need to specify a 'properties' prop (or specify a custom field) in your map property ${e}`);const d=t,u=s.previewProperties;if(!d)return null;let m=u;return(!m||!m.length)&&(m=Object.keys(l),a&&(m=m.slice(0,3))),r.jsx("div",{className:"table-auto text-xs",children:r.jsx("div",{children:d&&d.map((g,f)=>r.jsx("div",{className:"border-b last:border-b-0",children:m&&m.map(b=>r.jsx("div",{className:"table-cell",children:r.jsx(oe,{children:r.jsx(ve,{propertyKey:b,value:g[b],property:l[b],size:"small"})})},`table-cell-${b}`))},`table_${g}_${f}`))})})}const $i=dr.memo(function({builder:t}){const[o,a]=c.useState(!0),[n,i]=c.useState(null);return c.useEffect(()=>{let s=!1;return t.then(l=>{s||(a(!1),i(l))}).catch(l=>{a(!1),console.error(l)}),()=>{s=!0}},[t]),o?r.jsx(p.Skeleton,{}):r.jsx(dr.Fragment,{children:n})});function Ur({entity:e,collection:t,path:o,className:a}){const n=re(),s=c.useMemo(()=>Te({collection:t,path:o,entityId:e.id,values:e.values,fields:n.propertyConfigs}),[t,o,e]).properties;return r.jsx("div",{className:"w-full "+a,children:r.jsxs("div",{className:"w-full mb-4",children:[r.jsxs("div",{className:p.cn(p.defaultBorderMixin,"flex justify-between py-2 border-b last:border-b-0"),children:[r.jsx("div",{className:"flex items-center w-1/4",children:r.jsx("span",{className:"pl-2 text-sm text-gray-600",children:"Id"})}),r.jsxs("div",{className:"flex-grow p-2 ml-2 w-3/4 text-gray-900 dark:text-white min-h-[56px] flex items-center",children:[r.jsx("span",{className:"flex-grow mr-2",children:e.id}),n?.entityLinkBuilder&&r.jsx("a",{href:n.entityLinkBuilder({entity:e}),rel:"noopener noreferrer",target:"_blank",children:r.jsx(p.IconButton,{children:r.jsx(p.OpenInNewIcon,{size:"small"})})})]})]}),Object.entries(s).map(([l,d])=>{const u=e.values[l];return r.jsxs("div",{className:p.cn(p.defaultBorderMixin,"flex justify-between py-2 border-b last:border-b-0"),children:[r.jsx("div",{className:"flex items-center w-1/4",children:r.jsx("span",{className:"pl-2 text-sm text-gray-600",children:d.name})}),r.jsx("div",{className:"flex-grow p-2 ml-2 w-3/4 text-gray-900 dark:text-white min-h-[56px] flex items-center",children:r.jsx(ve,{propertyKey:l,value:u,property:d,size:"medium"})})]},`reference_previews_${l}`)})]})})}function qi(e){const t=c.useRef(null),{disabled:o,value:a,multiline:n,updateValue:i,focused:s}=e,l=c.useRef(a),[d,u]=c.useState(a),m=c.useRef(!1);c.useEffect(()=>{l.current!==a&&a!==d&&u(a),l.current=a},[a]);const g=c.useCallback(()=>{!a&&!d||d!==a&&(l.current=d,i(d))},[d,i,a]);return Yt(d,g,!s,2e3),c.useEffect(()=>{t.current&&s&&!m.current?(m.current=!0,t.current.focus({preventScroll:!0}),t.current.selectionStart=t.current.value.length,t.current.selectionEnd=t.current.value.length):m.current=s},[s,t]),r.jsx(p.TextareaAutosize,{ref:t,style:{padding:0,margin:0,width:"100%",color:"unset",fontWeight:"unset",lineHeight:"unset",fontSize:"unset",fontFamily:"unset",background:"unset",border:"unset",resize:"none",outline:"none"},value:d??"",onChange:f=>{const b=f.target.value;(n||!b.endsWith(`
4
- `))&&u(b)},onFocus:()=>{m.current=!0},onBlur:()=>{m.current=!1,g()}})}function $r(e){const{name:t,enumValues:o,error:a,internalValue:n,disabled:i,small:s,focused:l,updateValue:d,multiple:u,valueType:m}=e,g=Array.isArray(n)&&u||!Array.isArray(n)&&!u,f=c.useRef(null);c.useEffect(()=>{f.current&&l&&f.current?.focus({preventScroll:!0})},[l,f]);const b=c.useCallback(A=>{if(m==="number")if(u){const y=A.map(k=>parseFloat(k));d(y)}else d(parseFloat(A));else if(m==="string")d(A||null);else throw Error("Missing mapping in TableSelect")},[u,d,m]),h=(A,y)=>u&&Array.isArray(A)?r.jsx(Yr,{value:A,name:t,enumValues:o,size:s?"small":"medium"},`${A}-${y}`):r.jsx(Be,{enumKey:A,enumValues:o,size:s?"small":"medium"},`${A}-${y}`);return u?r.jsx(p.MultiSelect,{inputRef:f,containerClassName:"w-full h-full",className:"w-full h-full p-0 bg-transparent",position:"item-aligned",disabled:i,padding:!1,includeFocusOutline:!1,value:g?n.map(A=>A.toString()):[],onMultiValueChange:b,renderValue:h,children:o?.map(A=>r.jsx(p.MultiSelectItem,{value:String(A.id),children:r.jsx(Be,{enumKey:A.id,enumValues:o,size:s?"small":"medium"})},A.id))}):r.jsx(p.Select,{inputRef:f,className:"w-full h-full p-0 bg-transparent",position:"item-aligned",disabled:i,multiple:u,padding:!1,includeFocusOutline:!1,value:g?u?n.map(A=>A.toString()):n?.toString():u?[]:"",onValueChange:b,onMultiValueChange:b,renderValue:h,children:o?.map(A=>r.jsx(p.SelectItem,{value:String(A.id),children:r.jsx(Be,{enumKey:A.id,enumValues:o,size:s?"small":"medium"})},A.id))})}function Wi(e){const{align:t,value:o,updateValue:a,focused:n}=e,i=o&&typeof o=="number"?o.toString():"",[s,l]=c.useState(i),d=c.useRef(o);c.useEffect(()=>{d.current!==o&&String(o)!==s&&l(o?o.toString():null),d.current=o},[o]);const u=c.useCallback(()=>{if(s!==i)if(s!=null){const f=parseFloat(s);if(isNaN(f))return;f!=null&&a(f)}else a(null)},[s,o]);Yt(s,u,!n,2e3),c.useEffect(()=>{!n&&i!==s&&l(o!=null?o.toString():null)},[o,n]);const m=c.useRef(null);c.useEffect(()=>{m.current&&n&&m.current.focus({preventScroll:!0})},[n,m]);const g=/^-?[0-9]+[,.]?[0-9]*$/;return r.jsx("input",{ref:m,className:"w-full text-right p-0 m-0 bg-transparent border-none resize-none outline-none font-normal leading-normal text-unset",style:{textAlign:t},value:s??"",onChange:f=>{const b=f.target.value.replace(",",".");b.length===0&&l(null),(g.test(b)||b.startsWith("-"))&&l(b)}})}function Hi(e){const{internalValue:t,updateValue:o,focused:a}=e,n=c.useRef(null);return c.useEffect(()=>{n.current&&a&&n.current.focus({preventScroll:!0})},[a,n]),r.jsx(p.BooleanSwitch,{ref:n,size:"small",value:!!t,onValueChange:o})}function Ji(e){const{locale:t}=re(),{disabled:o,error:a,mode:n,internalValue:i,updateValue:s}=e;return r.jsx(p.DateTimeField,{value:i??void 0,onChange:l=>s(l),size:"medium",invisible:!0,className:"w-full h-full",inputClassName:"w-full h-full",mode:n,locale:t})}class oe extends c.Component{constructor(t){super(t),this.state={error:null}}static getDerivedStateFromError(t){return{error:t}}componentDidCatch(t,o){console.error(t)}render(){return this.state.error?r.jsxs("div",{className:"flex flex-col m-2",children:[r.jsxs("div",{className:"flex items-center m-2",children:[r.jsx(p.ErrorIcon,{color:"error",size:"small"}),r.jsx("div",{className:"ml-4",children:"Error"})]}),r.jsx(p.Typography,{variant:"caption",children:this.state.error?.message??"See the error in the console"})]}):this.props.children}}async function Zi(e,t,o,a,n,i,s,l){let d;return typeof e=="function"?(d=await e({path:n,entityId:a,values:o,property:i,file:s,storage:t,propertyKey:l}),d||console.warn("Storage callback returned empty result. Using default name value")):d=Ea(s,e,a,l,n),d||(d=it()+"_"+s.name),d}function Xi(e,t,o,a,n,i,s,l){let d;return typeof e=="function"?(d=e({path:n,entityId:a,values:o,property:i,file:s,storage:t,propertyKey:l}),d||console.warn("Storage callback returned empty result. Using default name value")):d=Ea(s,e,a,l,n),d||(d=it()+"_"+s.name),d}function Ea(e,t,o,a,n){const i=e.name.split(".").pop();let s=t.replace("{entityId}",o).replace("{propertyKey}",a).replace("{rand}",it()).replace("{file}",e.name).replace("{file.type}",e.type).replace("{path}",n);if(i){s=s.replace("{file.ext}",i);const l=e.name.replace(`.${i}`,"");s=s.replace("{file.name}",l)}return s||(s=it()+"_"+e.name),s}function Ba({entityId:e,entityValues:t,path:o,value:a,property:n,propertyKey:i,storageSource:s,disabled:l,onChange:d}){const u=n.dataType==="string"?n.storage:n.dataType==="array"&&n.of.dataType==="string"?n.of.storage:void 0,m=n.dataType==="array";if(!u)throw Error("Storage meta must be specified");const g=u?.metadata,f=m?"small":"medium",b=u?.imageCompression,h=(m?a??[]:a?[a]:[]).map(x=>({id:qr(),storagePathOrDownloadUrl:x,metadata:g,size:f})),[A,y]=c.useState(a),[k,v]=c.useState(h);c.useEffect(()=>{$(A,a)||(y(a),v(h))},[h,a,A]);const _=c.useCallback(async x=>{if(u.fileName){const I=await Zi(u.fileName,u,t,e,o,n,x,i);if(!I||I.length===0)throw Error("You need to return a valid filename");return I}return it()+"_"+x.name},[e,t,o,n,i,u]),C=c.useCallback(x=>Xi(u.storagePath,u,t,e,o,n,x,i)??"/",[e,t,o,n,i,u]),E=c.useCallback(async(x,I,F)=>{console.debug("onFileUploadComplete",x,I);let P=x;if(u.storeUrl&&(P=(await s.getDownloadURL(x)).url),u.postProcess&&P&&(P=await u.postProcess(P)),!P){console.warn("uploadPathOrDownloadUrl is null");return}let N;I.storagePathOrDownloadUrl=P,I.metadata=F,N=[...k],N=Sa(N),v(N);const T=N.filter(G=>!!G.storagePathOrDownloadUrl).map(G=>G.storagePathOrDownloadUrl);d(m?T:T?T[0]:null)},[k,m,d,u,s]),B=c.useCallback(async x=>{if(!x.length||l)return;let I;if(m)I=[...k,...await Promise.all(x.map(async F=>(b&&Wr(F)&&(F=await Fa(F,b)),{id:qr(),file:F,fileName:await _(F),metadata:g,size:f})))];else{let F=x[0];b&&Wr(F)&&(F=await Fa(F,b)),I=[{id:qr(),file:F,fileName:await _(F),metadata:g,size:f}]}I=Sa(I),v(I)},[l,_,k,g,m,f]);return{internalValue:k,setInternalValue:v,storage:u,fileNameBuilder:_,storagePathBuilder:C,onFileUploadComplete:E,onFilesAdded:B,multipleFilesSupported:m}}function Sa(e){return e.filter((t,o)=>(e.map(a=>a.storagePathOrDownloadUrl).indexOf(t.storagePathOrDownloadUrl)===o||!t.storagePathOrDownloadUrl)&&(e.map(a=>a.file).indexOf(t.file)===o||!t.file))}function qr(){return Math.floor(Math.random()*Math.floor(Number.MAX_SAFE_INTEGER))}const Ia={"image/jpeg":"JPEG","image/png":"PNG","image/webp":"WEBP"},Wr=e=>Ia[e.type]?Ia[e.type]:null,Ki=100,Fa=(e,t)=>new Promise(o=>{const a=t.quality===void 0?Ki:t.quality,n=a>=0&&a<=100?a:100,i=Wr(e);if(!i)throw Error("resizeAndCompressImage: Unsupported image format");Dn.imageFileResizer(e,t.maxWidth||Number.MAX_VALUE,t.maxHeight||Number.MAX_VALUE,i,n,0,s=>o(s),"file")});function Na({storagePath:e,entry:t,metadata:o,onFileUploadComplete:a,imageSize:n,simple:i}){const s=lt(),l=Je(),[d,u]=c.useState(),[m,g]=c.useState(!1),f=c.useRef(!1),b=c.useRef(!1),h=c.useCallback((A,y)=>{b.current||(b.current=!0,u(void 0),g(!0),s.uploadFile({file:A,fileName:y,path:e,metadata:o}).then(async({path:k})=>{console.debug("Upload successful"),await a(k,t,o),f.current&&g(!1)}).catch(k=>{console.warn("Upload error",k),f.current&&(u(k),g(!1),l.open({type:"error",message:"Error uploading file: "+k.message}))}).finally(()=>{b.current=!1}))},[t,o,a,s,e]);return c.useEffect(()=>(f.current=!0,t.file&&h(t.file,t.fileName),()=>{f.current=!1}),[t.file,t.fileName,h]),i?r.jsx("div",{className:`m-4 w-${n} h-${n}`,children:m&&r.jsx(p.Skeleton,{className:`w-${n} h-${n}`})}):r.jsxs("div",{className:p.cn(p.paperMixin,"relative m-4 border-box flex items-center justify-center",`min-w-[${n}px] min-h-[${n}px]`),children:[m&&r.jsx(p.Skeleton,{className:"w-full h-full"}),d&&r.jsx(ge,{title:"Error uploading file",error:d})]})}function Ta({showError:e,disabled:t,showExpandIcon:o,selected:a,openPopup:n,children:i}){const s=c.useRef(null),l=c.useCallback(()=>{if(n){const u=s&&s?.current?.getBoundingClientRect();n(u)}},[]),d=c.useRef();return c.useEffect(()=>{d.current&&a&&d.current.focus({preventScroll:!0})},[a]),r.jsx(r.Fragment,{children:(e||!t&&o)&&r.jsxs("div",{ref:s,className:"absolute top-0.5 right-0.5 flex items-center",children:[a&&i,a&&!t&&o&&r.jsx(p.IconButton,{ref:d,color:"inherit",size:"small",onClick:l,children:r.jsxs("svg",{fill:"#888",width:"20",height:"20",viewBox:"0 0 24 24",children:[r.jsx("path",{className:"cls-2",d:"M20,5a1,1,0,0,0-1-1L14,4h0a1,1,0,0,0,0,2h2.57L13.29,9.29a1,1,0,0,0,0,1.42,1,1,0,0,0,1.42,0L18,7.42V10a1,1,0,0,0,1,1h0a1,1,0,0,0,1-1Z"}),r.jsx("path",{className:"cls-2",d:"M10.71,13.29a1,1,0,0,0-1.42,0L6,16.57V14a1,1,0,0,0-1-1H5a1,1,0,0,0-1,1l0,5a1,1,0,0,0,1,1h5a1,1,0,0,0,0-2H7.42l3.29-3.29A1,1,0,0,0,10.71,13.29Z"})]})}),e&&r.jsx(ua,{side:"left",className:"flex items-center justify-center",style:{width:32,height:32},title:e.message,children:r.jsx(p.ErrorOutlineIcon,{size:"small",color:"error"})})]})})}const Ri="max-w-full box-border relative pt-[2px] items-center border border-transparent outline-none rounded-md duration-200 ease-[cubic-bezier(0.4,0,0.2,1)] focus:border-primary-solid",es="pt-0 border-2 border-solid",ts="transition-colors duration-200 ease-[cubic-bezier(0,0,0.2,1)] border-2 border-solid border-green-500 bg-green-50 dark:bg-green-900",rs="transition-colors duration-200 ease-[cubic-bezier(0,0,0.2,1)] border-2 border-solid border-red-500 bg-red-50 dark:bg-red-900";function os(e){const{propertyKey:t,error:o,selected:a,openPopup:n,value:i,disabled:s,property:l,entity:d,path:u,previewSize:m,updateValue:g}=e,f=lt(),{internalValue:b,setInternalValue:h,onFilesAdded:A,storage:y,onFileUploadComplete:k,storagePathBuilder:v,multipleFilesSupported:_}=Ba({entityValues:d.values,entityId:d.id,path:u,property:l,propertyKey:t,storageSource:f,onChange:g,value:i,disabled:s});return r.jsx(as,{internalValue:b,setInternalValue:h,name:t,disabled:s,autoFocus:!1,openPopup:n,error:o,selected:a,property:l,onChange:g,entity:d,storagePathBuilder:v,storage:y,multipleFilesSupported:_,onFilesAdded:A,onFileUploadComplete:k,previewSize:m})}function as({property:e,name:t,internalValue:o,setInternalValue:a,openPopup:n,entity:i,selected:s,error:l,onChange:d,multipleFilesSupported:u,previewSize:m,disabled:g,autoFocus:f,storage:b,onFilesAdded:h,onFileUploadComplete:A,storagePathBuilder:y}){const[k,v]=c.useState(!1),_=u&&m==="medium"?"small":m;if(u){const Q=e;if(Array.isArray(Q.of))throw Error("Using array properties instead of single one in `of` in ArrayProperty");if(Q.of){if(Q.of.dataType!=="string")throw Error("Storage field using array must be of data type string")}else throw Error("Storage field using array must be of data type string")}const C=b?.metadata,E=!!o,B=Je(),{open:x,getRootProps:I,getInputProps:F,isDragActive:P,isDragAccept:N,isDragReject:T}=Co.useDropzone({accept:b.acceptedFiles?b.acceptedFiles.map(Q=>({[Q]:[]})).reduce((Q,J)=>({...Q,...J}),{}):void 0,disabled:g,maxSize:b.maxSize,noClick:!0,noKeyboard:!0,onDrop:h,onDropRejected:(Q,J)=>{for(const Z of Q)for(const z of Z.errors)B.open({type:"error",message:`Error uploading file: File is larger than ${b.maxSize} bytes`})}}),{...G}=I(),ee=u?"Drag 'n' drop some files here, or click here to edit":"Drag 'n' drop a file here, or click here edit",M=u?e.of:e,Y=c.useMemo(()=>pt(_),[_]),H=!g&&l;return r.jsxs("div",{...G,onMouseEnter:()=>v(!0),onMouseMove:()=>v(!0),onMouseLeave:()=>v(!1),className:p.cn(Ri,"relative w-full h-full flex",`justify-${E?"start":"center"}`,P?es:"",N?ts:"",T?rs:""),children:[r.jsx("input",{autoFocus:f,...F()}),o.map((Q,J)=>{let Z;return Q.storagePathOrDownloadUrl?Z=r.jsx(ns,{property:M,value:Q.storagePathOrDownloadUrl,entity:i,size:_},`storage_preview_${J}`):Q.file&&(Z=r.jsx(Na,{entry:Q,metadata:C,storagePath:y(Q.file),onFileUploadComplete:A,imageSize:Y,simple:!0},`storage_progress_${J}`)),Z}),!o&&r.jsx("div",{className:"flex-grow m-2 max-w-[200px]",onClick:x,children:r.jsx(p.Typography,{className:"text-gray-400 dark:text-gray-600",variant:"body2",align:"center",children:ee})}),r.jsx(Ta,{showError:H,disabled:g,showExpandIcon:!0,selected:s,openPopup:g?void 0:n,children:r.jsx(p.IconButton,{color:"inherit",size:"small",onClick:x,children:r.jsx(p.EditIcon,{size:"small",className:"text-gray-500"})})})]})}function ns({property:e,value:t,size:o,entity:a}){return r.jsx("div",{className:"relative m-2",children:t&&r.jsx(oe,{children:r.jsx(ve,{propertyKey:"ignore",value:t,property:e,size:o})})})}function Pa(e){const t=re(),o=ue(),{path:a}=e,n=o.getCollection(a);if(!n){if(t.components?.missingReference)return r.jsx(t.components.missingReference,{path:a});throw Error(`Couldn't find the corresponding collection view for the path: ${a}`)}return r.jsx(is,{...e,collection:n})}const is=c.memo(function(t){const{name:o,internalValue:a,updateValue:n,multiselect:i,path:s,size:l,previewProperties:d,title:u,disabled:m,forceFilter:g,collection:f}=t,[b,h]=c.useState(!1),A=c.useCallback(()=>h(!0),[]),y=c.useCallback(()=>h(!1),[]),k=c.useCallback(F=>{n(F?Ye(F):null)},[n]),v=c.useCallback(F=>{n(F.map(P=>Ye(P)))},[n]),_=a?Array.isArray(a)?a.map(F=>F.id):a.id?[a.id]:[]:[],C=gt({multiselect:i,path:s,collection:f,onMultipleEntitiesSelected:v,onSingleEntitySelected:k,selectedEntityIds:_,forceFilter:g}),E=c.useCallback(()=>{m||C.open()},[m,C]),B=!a||Array.isArray(a)&&a.length===0,x=()=>a&&!Array.isArray(a)&&a.isEntityReference&&a.isEntityReference()?r.jsx(Ve,{onClick:m?void 0:E,size:Ze(l),reference:a,onHover:b,disabled:!s,previewProperties:d}):r.jsx(Jt,{onClick:m?void 0:E,size:Ze(l),children:r.jsx(ge,{title:"Value is not a reference.",error:"Click to edit"})}),I=()=>Array.isArray(a)?r.jsx(r.Fragment,{children:a.map((F,P)=>r.jsx("div",{className:"m-1 w-full",children:r.jsx(Ve,{onClick:m?void 0:E,size:"tiny",reference:F,onHover:b,disabled:!s,previewProperties:d})},`preview_array_ref_${o}_${P}`))}):r.jsx(ge,{error:"Data is not an array of references"});return f?r.jsxs("div",{className:"w-full",onMouseEnter:A,onMouseMove:A,onMouseLeave:y,children:[a&&!i&&x(),a&&i&&I(),B&&r.jsxs(p.Button,{onClick:E,size:"small",variant:"outlined",color:"primary",children:["Edit ",u]})]}):r.jsx(ge,{error:"The specified collection does not exist"})},$);Ie.addMethod(Ie.array,"uniqueInArray",function(e=o=>o,t){return this.test("uniqueInArray",t,o=>!o||o.length===new Set(o.map(e)).size)});function Qa(e,t,o){const a={};return Object.entries(t).forEach(([n,i])=>{a[n]=Ct({property:i,customFieldValidator:o,name:n,entityId:e})}),Ie.object().shape(a)}function Ct(e){const t=e.property;if(we(t))throw console.error("Error in property",e),Error("Trying to create a yup mapping from a property builder. Please use resolved properties only");if(t.dataType==="string")return ls(e);if(t.dataType==="number")return cs(e);if(t.dataType==="boolean")return ms(e);if(t.dataType==="map")return ss(e);if(t.dataType==="array")return hs(e);if(t.dataType==="date")return ps(e);if(t.dataType==="geopoint")return ds(e);if(t.dataType==="reference")return us(e);throw console.error("Unsupported data type in yup mapping",t),Error("Unsupported data type in yup mapping")}function ss({property:e,entityId:t,customFieldValidator:o,name:a}){const n={},i=e.validation;e.properties&&Object.entries(e.properties).forEach(([l,d])=>{n[l]=Ct({property:d,parentProperty:e,customFieldValidator:o,name:`${a}[${l}]`,entityId:t})});const s=Ie.object().shape(n);return i?.required?s.required(i?.requiredMessage?i.requiredMessage:"Required").nullable(!0):s.nullable(!0)}function ls({property:e,parentProperty:t,customFieldValidator:o,name:a,entityId:n}){let i=Ie.string();const s=e.validation;if(e.enumValues){s?.required&&(i=i.required(s?.requiredMessage?s.requiredMessage:"Required"));const l=$e(e.enumValues);i=i.oneOf((s?.required?l:[...l,null]).map(d=>d?.id??null)).nullable(!0)}if(s){if(i=s.required?i.required(s?.requiredMessage?s.requiredMessage:"Required").nullable(!0):i.notRequired().nullable(!0),s.unique&&o&&a&&(i=i.test("unique","This value already exists and should be unique",(l,d)=>o({name:a,property:e,parentProperty:t,value:l,entityId:n}))),(s.min||s.min===0)&&(i=i.min(s.min,`${e.name} must be min ${s.min} characters long`)),(s.max||s.max===0)&&(i=i.max(s.max,`${e.name} must be max ${s.max} characters long`)),s.matches){const l=typeof s.matches=="string"?Vo(s.matches):s.matches;l&&(i=i.matches(l,s.matchesMessage?{message:s.matchesMessage}:void 0))}s.trim&&(i=i.trim()),s.lowercase&&(i=i.lowercase()),s.uppercase&&(i=i.uppercase()),e.email&&(i=i.email(`${e.name} must be an email`)),e.url&&(i=i.url(`${e.name} must be a url`))}else i=i.notRequired().nullable(!0);return i}function cs({property:e,parentProperty:t,customFieldValidator:o,name:a,entityId:n}){const i=e.validation;let s=Ie.number().typeError("Must be a number");return i?(s=i.required?s.required(i.requiredMessage?i.requiredMessage:"Required").nullable(!0):s.notRequired().nullable(!0),i.unique&&o&&a&&(s=s.test("unique","This value already exists and should be unique",l=>o({name:a,property:e,parentProperty:t,value:l,entityId:n}))),(i.min||i.min===0)&&(s=s.min(i.min,`${e.name} must be higher or equal to ${i.min}`)),(i.max||i.max===0)&&(s=s.max(i.max,`${e.name} must be lower or equal to ${i.max}`)),(i.lessThan||i.lessThan===0)&&(s=s.lessThan(i.lessThan,`${e.name} must be higher than ${i.lessThan}`)),(i.moreThan||i.moreThan===0)&&(s=s.moreThan(i.moreThan,`${e.name} must be lower than ${i.moreThan}`)),i.positive&&(s=s.positive(`${e.name} must be positive`)),i.negative&&(s=s.negative(`${e.name} must be negative`)),i.integer&&(s=s.integer(`${e.name} must be an integer`))):s=s.notRequired().nullable(!0),s}function ds({property:e,parentProperty:t,customFieldValidator:o,name:a,entityId:n}){let i=Ie.object();const s=e.validation;return s?.unique&&o&&a&&(i=i.test("unique","This value already exists and should be unique",l=>o({name:a,property:e,parentProperty:t,value:l,entityId:n}))),s?.required?i=i.required(s.requiredMessage).nullable(!0):i=i.notRequired().nullable(!0),i}function ps({property:e,parentProperty:t,customFieldValidator:o,name:a,entityId:n}){if(e.autoValue)return Ie.object().nullable();let i=Ie.date();const s=e.validation;return s?(i=s.required?i.required(s?.requiredMessage?s.requiredMessage:"Required"):i.notRequired(),s.unique&&o&&a&&(i=i.test("unique","This value already exists and should be unique",l=>o({name:a,property:e,parentProperty:t,value:l,entityId:n}))),s.min&&(i=i.min(s.min,`${e.name} must be after ${s.min}`)),s.max&&(i=i.max(s.max,`${e.name} must be before ${s.min}`))):i=i.notRequired(),i.transform(l=>l instanceof Date?l:null).nullable()}function us({property:e,parentProperty:t,customFieldValidator:o,name:a,entityId:n}){let i=Ie.object();const s=e.validation;return s?(i=s.required?i.required(s?.requiredMessage?s.requiredMessage:"Required").nullable(!0):i.notRequired().nullable(!0),s.unique&&o&&a&&(i=i.test("unique","This value already exists and should be unique",l=>o({name:a,property:e,parentProperty:t,value:l,entityId:n})))):i=i.notRequired().nullable(!0),i}function ms({property:e,parentProperty:t,customFieldValidator:o,name:a,entityId:n}){let i=Ie.boolean();const s=e.validation;return s?(i=s.required?i.required(s?.requiredMessage?s.requiredMessage:"Required").nullable(!0):i.notRequired().nullable(!0),s.unique&&o&&a&&(i=i.test("unique","This value already exists and should be unique",l=>o({name:a,property:e,parentProperty:t,value:l,entityId:n})))):i=i.notRequired().nullable(!0),i}function fs(e){return e.validation?.uniqueInArray?!0:e.dataType==="map"&&e.properties?Object.entries(e.properties).filter(([t,o])=>o.validation?.uniqueInArray):!1}function hs({property:e,parentProperty:t,customFieldValidator:o,name:a,entityId:n}){let i=Ie.array();if(e.of)if(Array.isArray(e.of)){const l=e.of.map((d,u)=>({[`${a}[${u}]`]:Ct({property:d,parentProperty:e,entityId:n})})).reduce((d,u)=>({...d,...u}),{});return Ie.array().of(Ie.mixed().test("Dynamic object validation","Dynamic object validation error",(d,u)=>Ue(l,u.path).validate(d)))}else{i=i.of(Ct({property:e.of,parentProperty:e,entityId:n}));const l=fs(e.of);l&&(typeof l=="boolean"?i=i.uniqueInArray(d=>d,`${e.name} should have unique values within the array`):Array.isArray(l)&&l.forEach(([d,u])=>{i=i.uniqueInArray(m=>m&&m[d],`${e.name} → ${u.name??d}: should have unique values within the array`)}))}const s=e.validation;return s?(i=s.required?i.required(s?.requiredMessage?s.requiredMessage:"Required").nullable(!0):i.notRequired().nullable(!0),(s.min||s.min===0)&&(i=i.min(s.min,`${e.name} should be min ${s.min} entries long`)),s.max&&(i=i.max(s.max,`${e.name} should be max ${s.max} entries long`))):i=i.notRequired().nullable(!0),i}function mt(e){switch(e){case"xl":return 400;case"l":return 280;case"m":return 140;case"s":return 80;case"xs":return 54;default:throw Error("Missing mapping for collection size -> height")}}const gs=({justifyContent:e,scrollable:t,faded:o,fullHeight:a,children:n})=>r.jsx("div",{className:p.cn("flex flex-col max-h-full w-full",{"items-start":o||t}),style:{justifyContent:e,height:a?"100%":void 0,overflow:t?"auto":void 0,WebkitMaskImage:o?"linear-gradient(to bottom, black 60%, transparent 100%)":void 0,maskImage:o?"linear-gradient(to bottom, black 60%, transparent 100%)":void 0},children:n}),Zt=c.memo(function({children:t,actions:o,size:a,selected:n,disabled:i,disabledTooltip:s,saved:l,error:d,align:u,allowScroll:m,removePadding:g,fullHeight:f,onSelect:b,width:h,hideOverflow:A=!0,showExpandIcon:y=!0}){const[k,v]=xo(),_=c.useRef(null),C=c.useMemo(()=>mt(a),[a]),[E,B]=c.useState(!1),[x,I]=c.useState(l),F=!i&&d;c.useEffect(()=>{l&&I(!0);const Z=setTimeout(()=>{I(!1)},800);return()=>{clearTimeout(Z)}},[l]);let P=0;if(!g)switch(a){case"l":case"xl":P=4;break;case"m":P=2;break;case"s":default:P=1;break}let N;switch(u){case"right":N="flex-end";break;case"center":N="center";break;case"left":default:N="flex-start"}const T=c.useCallback(()=>{if(!b)return;const Z=_&&_?.current?.getBoundingClientRect();i?b(void 0):!n&&Z&&b(Z)},[_,b,n,i]),G=c.useCallback(Z=>{T(),Z.stopPropagation()},[T]),ee=c.useMemo(()=>v?v.height>C:!1,[v,C]),M=!F&&n,Y=!i&&m&&ee,H=!i&&!m&&ee,Q=c.useCallback(()=>B(!0),[]),J=c.useCallback(()=>B(!1),[]);return r.jsxs("div",{ref:_,className:p.cn("transition-colors duration-100 ease-in-out",`flex relative h-full rounded-md p-${P} border border-4 border-opacity-75`,E&&!i?"bg-gray-50 dark:bg-gray-900":"",l?"bg-gray-100 bg-opacity-75 dark:bg-gray-800 dark:bg-opacity-75":"",!M&&!x&&!F?"border-transparent":"",A?"overflow-hidden":"",M?"bg-gray-50 dark:bg-gray-900":"",M&&!x?"border-primary":"",x?"border-green-500 ":"",F?"border-red-500":""),style:{justifyContent:N,alignItems:i||!ee?"center":void 0,width:h??"100%",textAlign:u},tabIndex:n||i?void 0:0,onFocus:G,onMouseEnter:Q,onMouseMove:Q,onMouseLeave:J,children:[r.jsxs(oe,{children:[f&&!H&&t,(!f||H)&&r.jsx(gs,{fullHeight:f??!1,justifyContent:N,scrollable:Y??!1,faded:H,children:!f&&r.jsx("div",{ref:k,style:{display:"flex",width:"100%",justifyContent:N,height:f?"100%":void 0},children:t})})]}),o,i&&E&&s&&r.jsx("div",{className:"absolute top-1 right-1 text-xs",children:r.jsx(p.Tooltip,{title:s,children:r.jsx(p.RemoveCircleIcon,{size:"smallest",color:"disabled",className:"text-gray-500"})})})]})},(e,t)=>e.error===t.error&&e.value===t.value&&e.disabled===t.disabled&&e.saved===t.saved&&e.allowScroll===t.allowScroll&&e.align===t.align&&e.size===t.size&&e.disabledTooltip===t.disabledTooltip&&e.width===t.width&&e.showExpandIcon===t.showExpandIcon&&e.removePadding===t.removePadding&&e.fullHeight===t.fullHeight&&e.selected===t.selected),Da=c.createContext({}),As=()=>c.useContext(Da);function Pe({property:e,value:t,setValue:o}){const a=c.useRef(null);c.useEffect(()=>{typeof e.disabled=="object"&&!!e.disabled.clearOnDisabled?t!=null&&(a.current=t,o(null)):a.current&&(o(a.current),a.current=null)},[e])}function bs(e){return e.dataType==="string"&&e.storage?!0:e.dataType==="array"?Array.isArray(e.of)?!1:e.of?.dataType==="string"&&e.of?.storage:!1}const Ma=c.memo(function({propertyKey:t,customFieldValidator:o,value:a,property:n,align:i,width:s,height:l,path:d,entity:u,readonly:m,disabled:g}){const f=he(),{onValueChange:b,size:h,selectedCell:A,select:y,setPopupCell:k}=As(),v=A?.propertyKey===t&&A?.entity.path===u.path&&A?.entity.id===u.id,[_,C]=c.useState(a),E=c.useRef(a),[B,x]=c.useState(),[I,F]=c.useState(!1),P=c.useCallback(()=>{F(!0),setTimeout(()=>{F(!1)},100)},[]),N=!!n.Field,T=!!n.Preview,G=nt(n),ee=typeof n.disabled=="object"?n.disabled.disabledMessage:void 0,M=m||g||!!n.disabled,Y=c.useMemo(()=>Ct({property:n,entityId:u.id,customFieldValidator:o,name:t}),[u.id,n,t]);c.useEffect(()=>{$(a,E.current)||(x(void 0),C(a),E.current=a,P())},[P,a]);const H=X=>{$(X,E.current)||(F(!1),Y.validate(X).then(()=>{x(void 0),E.current=X,b&&b({value:X,propertyKey:t,setError:x,onValueUpdated:P,entity:u,fullPath:d,context:f})}).catch(S=>{x(S)}))};c.useEffect(()=>{Y.validate(_).then(()=>x(void 0)).catch(X=>{x(X)})},[_,Y,t,n,u]);const Q=X=>{let S;X===void 0?S=null:S=X,C(S),H(S)};Pe({property:n,value:_,setValue:Q});const J=c.useCallback(X=>{y(X?{width:s,height:l,entity:u,cellRect:X,propertyKey:t}:void 0)},[u,l,t,y,s]),Z=X=>{k&&k(X?{width:s,height:l,entity:u,cellRect:X,propertyKey:t}:void 0)};let z,ie=!1,W=!1,te=!0,ne=!1,D=!1,K=!0;const R=!M&&B;if(m||G)return r.jsx(Zt,{size:h,width:s,saved:I,value:_,align:i??"left",fullHeight:!1,disabledTooltip:ee??(G?"Read only":void 0),disabled:!0,children:r.jsx(ve,{width:s,height:mt(h),propertyKey:t,property:n,value:_,size:Ze(h)})},`${t}_${u.path}_${u.id}`);if(!N&&(!T||v)){if(bs(n))z=r.jsx(os,{error:B,disabled:M,focused:v,selected:v,openPopup:k?Z:void 0,property:n,entity:u,path:d,value:_,previewSize:Ze(h),updateValue:Q,propertyKey:t}),K=!1,W=!0,D=!0,ne=!0;else if(v&&n.dataType==="number"){const S=n;S.enumValues?(z=r.jsx($r,{name:t,multiple:!1,disabled:M,focused:v,valueType:"number",small:Ze(h)!=="medium",enumValues:S.enumValues,error:B,internalValue:_,updateValue:Q}),D=!0):(z=r.jsx(Wi,{align:i,error:B,focused:v,disabled:M,value:_,updateValue:Q}),ie=!0)}else if(v&&n.dataType==="string"){const S=n;if(S.enumValues)z=r.jsx($r,{name:t,multiple:!1,focused:v,disabled:M,valueType:"string",small:Ze(h)!=="medium",enumValues:S.enumValues,error:B,internalValue:_,updateValue:Q}),D=!0;else if(!S.storage){const O=!!S.multiline||!!S.markdown;z=r.jsx(qi,{error:B,disabled:M,multiline:O,focused:v,value:_,updateValue:Q}),ie=!0}}else if(n.dataType==="boolean")z=r.jsx(Hi,{error:B,disabled:M,focused:v,internalValue:_,updateValue:Q});else if(n.dataType==="date")z=r.jsx(Ji,{name:t,error:B,disabled:M,mode:n.mode,focused:v,internalValue:_,updateValue:Q}),D=!0,te=!1,ie=!1;else if(n.dataType==="reference")typeof n.path=="string"&&(z=r.jsx(Pa,{name:t,internalValue:_,updateValue:Q,disabled:M,size:h,path:n.path,multiselect:!1,previewProperties:n.previewProperties,title:n.name,forceFilter:n.forceFilter})),ie=!1;else if(n.dataType==="array"){const S=n;if(!S.of&&!S.oneOf)throw Error(`You need to specify an 'of' or 'oneOf' prop (or specify a custom field) in your array property ${t}`);S.of&&!Array.isArray(S.of)&&(S.of.dataType==="string"||S.of.dataType==="number"?v&&S.of.enumValues&&(z=r.jsx($r,{name:t,multiple:!0,disabled:M,focused:v,small:Ze(h)!=="medium",valueType:S.of.dataType,enumValues:S.of.enumValues,error:B,internalValue:_,updateValue:Q}),ie=!0,D=!0,te=!1):S.of.dataType==="reference"&&(typeof S.of.path=="string"&&(z=r.jsx(Pa,{name:t,disabled:M,internalValue:_,updateValue:Q,size:h,multiselect:!0,path:S.of.path,previewProperties:S.of.previewProperties,title:S.name,forceFilter:S.of.forceFilter})),ie=!1))}}return z||(ie=!1,W=v&&!z&&!M&&!G,z=r.jsx(ve,{width:s,height:l,propertyKey:t,value:_,property:n,size:Ze(h)})),r.jsx(Zt,{size:h,width:s,onSelect:J,selected:v,disabled:M||G,disabledTooltip:ee??"Disabled",removePadding:ne,fullHeight:D,saved:I,error:B,align:i,allowScroll:ie,showExpandIcon:W,value:_,hideOverflow:te,actions:K&&r.jsx(Ta,{showError:R,disabled:M,showExpandIcon:W,selected:v,openPopup:M?void 0:Z}),children:z},`cell_${t}_${u.path}_${u.id}`)},ys);function ys(e,t){return e.height===t.height&&e.propertyKey===t.propertyKey&&e.align===t.align&&e.width===t.width&&$(e.property,t.property)&&$(e.value,t.value)&&$(e.entity.id,t.entity.id)&&$(e.entity.values,t.entity.values)}const Xt=function({entity:t,collection:o,fullPath:a,width:n,frozen:i,isSelected:s,selectionEnabled:l,size:d,highlightEntity:u,onCollectionChange:m,unhighlightEntity:g,actions:f=[],hideId:b,selectionController:h}){const A=Me(),y=he(),k=c.useCallback(x=>{h?.toggleEntitySelection(t)},[t,h?.toggleEntitySelection]),v=c.useCallback(x=>{x.stopPropagation(),h?.toggleEntitySelection(t)},[t,h?.toggleEntitySelection]),_=f.length>0,C=f.some(x=>x.collapsed||x.collapsed===void 0),E=f.filter(x=>x.collapsed||x.collapsed===void 0),B=f.filter(x=>x.collapsed===!1);return r.jsxs("div",{onClick:v,className:p.cn("h-full flex items-center justify-center flex-col bg-gray-50 dark:bg-gray-900 bg-opacity-90 dark:bg-opacity-90 z-10",i?"sticky left-0":""),style:{width:n,position:i?"sticky":"initial",left:i?0:"initial",contain:"strict"},children:[(_||l)&&r.jsxs("div",{className:"w-34 flex justify-center",children:[B.map((x,I)=>r.jsx(p.Tooltip,{title:x.name,children:r.jsx(p.IconButton,{onClick:F=>{F.stopPropagation(),x.onClick({entity:t,fullPath:a,collection:o,context:y,selectionController:h,highlightEntity:u,unhighlightEntity:g,onCollectionChange:m})},size:A?"medium":"small",children:x.icon})},I)),C&&r.jsx(p.Menu,{trigger:r.jsx(p.IconButton,{size:A?"medium":"small",children:r.jsx(p.MoreVertIcon,{})}),children:E.map((x,I)=>r.jsxs(p.MenuItem,{onClick:F=>{F.stopPropagation(),x.onClick({entity:t,fullPath:a,collection:o,context:y,selectionController:h,highlightEntity:u,unhighlightEntity:g,onCollectionChange:m})},children:[x.icon,x.name]},I))}),l&&r.jsx(p.Tooltip,{title:`Select ${t.id}`,children:r.jsx(p.Checkbox,{size:A?"medium":"small",checked:!!s,onCheckedChange:k})})]}),!b&&d!=="xs"&&r.jsx("div",{className:"w-[138px] text-center overflow-hidden truncate",children:t?r.jsxs(p.Typography,{onClick:x=>{x.stopPropagation()},className:"font-mono select-all",variant:"caption",color:"secondary",children:[" ",t.id," "]}):r.jsx(p.Skeleton,{})})]})};function ws(e){const t=c.useRef(null),o=Me(),a=c.useRef(!1);c.useEffect(()=>{t.current&&a.current&&!e.textSearchLoading&&t.current.focus(),a.current=e.textSearchLoading??!1},[e.textSearchLoading]);const n=!e.forceFilter&&e.filterIsSet&&e.clearFilter&&r.jsxs(p.Button,{variant:"outlined",className:"h-fit-content","aria-label":"filter clear",onClick:e.clearFilter,size:"small",children:[r.jsx(p.FilterListOffIcon,{}),"Clear filter"]}),i=r.jsx(p.Tooltip,{title:"Table row size",side:"right",sideOffset:4,children:r.jsx(p.Select,{value:e.size,className:"w-16 h-10",size:"small",onValueChange:s=>e.onSizeChanged(s),renderValue:s=>r.jsx("div",{className:"font-medium",children:s.toUpperCase()}),children:["xs","s","m","l","xl"].map(s=>r.jsx(p.SelectItem,{value:s,className:"w-12 font-medium text-center",children:s.toUpperCase()},s))})});return r.jsxs("div",{className:p.cn(p.defaultBorderMixin,"no-scrollbar min-h-[56px] overflow-x-auto px-2 md:px-4 bg-gray-50 dark:bg-gray-900 border-b flex flex-row justify-between items-center w-full"),children:[r.jsxs("div",{className:"flex items-center gap-2 md:mr-4 mr-2",children:[e.title&&r.jsx("div",{className:"hidden lg:block",children:e.title}),i,e.actionsStart,n]}),r.jsxs("div",{className:"flex items-center gap-2",children:[o&&r.jsx("div",{className:"w-[22px]",children:e.loading&&r.jsx(p.CircularProgress,{size:"small"})}),(e.onTextSearch||e.onTextSearchClick)&&r.jsx(p.SearchBar,{inputRef:t,loading:e.textSearchLoading,disabled:!!e.onTextSearchClick,onClick:e.onTextSearchClick,onTextSearch:e.onTextSearchClick?void 0:e.onTextSearch,expandable:!0},"search-bar"),e.actions]})]})}function vs(e){return e.dataType==="boolean"?"center":e.dataType==="number"?e.enumValues?"left":"right":e.dataType==="date"?"right":"left"}function Oa(e){if(e.columnWidth)return e.columnWidth;if(e.dataType==="string")return e.url?280:e.storage?160:e.enumValues?200:e.multiline||e.markdown?300:(e.email,200);if(e.dataType==="array"){const t=e;return t.of?Array.isArray(e.of)?300:Oa(t.of):300}else return e.dataType==="number"?e.enumValues?200:140:e.dataType==="map"?360:e.dataType==="date"?200:e.dataType==="reference"?220:e.dataType==="boolean"?140:200}function Hr(e){return`subcollection:${e.id??e.path}`}const za="collectionGroupParent";function Jr(e,t){return c.useMemo(()=>e.propertiesOrder?Va(e,e.propertiesOrder):ks(e,t),[e,t])}function Va(e,t){return t.flatMap(o=>{const a=e.properties[o];return a?a.hideFromCollection?[null]:a.disabled&&typeof a.disabled=="object"&&a.disabled.hidden?[null]:a.dataType==="map"&&a.spreadChildren&&a.properties?Kt(a,o):[{key:o,disabled:!!a.disabled||!!a.readOnly}]:e.additionalFields?.find(i=>i.key===o)?[{key:o,disabled:!0}]:e.subcollections&&e.subcollections.find(s=>Hr(s)===o)?[{key:o,disabled:!0}]:e.collectionGroup&&o===za?[{key:o,disabled:!0}]:[null]}).filter(Boolean)}function ks(e,t){const o=Object.keys(e.properties),a=e.additionalFields??[],n=e.subcollections??[],i=[...o,...a.map(s=>s.key)];if(t){const s=n.map(l=>Hr(l));i.push(...s.filter(l=>!i.includes(l)))}return e.collectionGroup&&i.push(za),Va(e,i)}function Kt(e,t,o){return e.dataType==="map"&&e.spreadChildren&&e.properties?Object.entries(e.properties).flatMap(([a,n])=>Kt(n,`${t}.${a}`,o||!!e.disabled||!!e.readOnly)):[{key:t,disabled:o||!!e.disabled||!!e.readOnly}]}function _s(e){return{key:"id_ewcfedcswdf3",width:e?160:130,title:"ID",resizable:!1,frozen:e??!1,headerAlign:"center",align:"center"}}function Ga({properties:e,sortable:t,forceFilter:o,disabledFilter:a,AdditionalHeaderWidget:n}){return Object.entries(e).flatMap(([i,s])=>Kt(s,i)).map(({key:i,disabled:s})=>{const l=Br(e,i);if(!l)throw Error("Internal error: no property found in path "+i);const d=Ya(l);return{key:i,align:vs(l),icon:Ae(l,"small"),title:l.name??i,sortable:t&&(o?Object.keys(o).includes(i):!0),filter:!a&&d,width:Oa(l),resizable:!0,custom:{resolvedProperty:l,disabled:s},AdditionalHeaderWidget:n?({onHover:u})=>r.jsx(n,{property:l,propertyKey:i,onHover:u}):void 0}})}function Ya(e,t=!1){return t?["string","number","date","reference"].includes(e.dataType):e.dataType==="array"?e.of?Ya(e.of,!0):!1:["string","number","boolean","date","reference","array"].includes(e.dataType)}function Rt({text:e,...t}){return r.jsx("div",{className:"flex w-full h-screen max-h-full max-w-full bg-gray-50 dark:bg-gray-900 gap-4",children:r.jsxs("div",{className:"m-auto flex flex-col gap-2 items-center",children:[r.jsx(p.CircularProgress,{...t}),e&&r.jsx(p.Typography,{color:"secondary",variant:"caption",className:"text-center",children:e})]})})}const xs=c.memo(function({resizeHandleRef:t,columnIndex:o,isResizingIndex:a,sort:n,onColumnSort:i,onFilterUpdate:s,filter:l,column:d,onClickResizeColumn:u,createFilterField:m,AdditionalHeaderWidget:g}){const[f,b]=c.useState(!1),[h,A]=c.useState(!1),[y,k]=c.useState(!1),v=c.useCallback(x=>{A(!0)},[]),_=c.useCallback((x,I)=>{s(d,x),I!==void 0&&A(I)},[d,s]),C=a===o,B=!(a!==o&&a>0)&&(f||C);return r.jsx(oe,{children:r.jsxs("div",{className:p.cn("flex py-0 px-3 h-full text-xs uppercase font-semibold relative select-none items-center bg-gray-50 dark:bg-gray-900","text-gray-600 hover:text-gray-800 dark:text-gray-400 dark:hover:text-gray-200 ","hover:bg-gray-100 dark:hover:bg-gray-800 hover:bg-opacity-50 dark:hover:bg-opacity-50",d.frozen?"sticky left-0 z-10":"relative z-0"),style:{left:d.frozen?0:void 0,minWidth:d.width,maxWidth:d.width},onMouseEnter:()=>b(!0),onMouseMove:()=>b(!0),onMouseLeave:()=>b(!1),children:[r.jsx("div",{className:"overflow-hidden flex-grow",children:r.jsxs("div",{className:`flex items-center justify-${d.headerAlign} flex-row`,children:[d.icon,r.jsx("div",{className:"truncate -webkit-box w-full mx-1 overflow-hidden",style:{WebkitBoxOrient:"vertical",WebkitLineClamp:2,justifyContent:d.align},children:d.title})]})}),r.jsxs(r.Fragment,{children:[g&&r.jsx(g,{onHover:f||h}),d.sortable&&(n||B||h)&&r.jsx(p.Badge,{color:"secondary",invisible:!n,children:r.jsxs(p.IconButton,{size:"small",className:f||h?"bg-white dark:bg-gray-950":void 0,onClick:()=>{i(d.key)},children:[!n&&r.jsx(p.ArrowUpwardIcon,{}),n==="asc"&&r.jsx(p.ArrowUpwardIcon,{}),n==="desc"&&r.jsx(p.ArrowUpwardIcon,{className:"rotate-180"})]})})]}),d.filter&&m&&r.jsx("div",{children:r.jsx(p.Badge,{color:"secondary",invisible:!l,children:r.jsx(p.Popover,{open:h,onOpenChange:A,className:y?"hidden":void 0,modal:!0,trigger:r.jsx(p.IconButton,{className:f||h?"bg-white dark:bg-gray-950":void 0,size:"small",onClick:v,children:r.jsx(p.FilterListIcon,{size:"small"})}),children:r.jsx(Cs,{column:d,filter:l,onHover:f,onFilterUpdate:_,createFilterField:m,hidden:y,setHidden:k})})})}),d.resizable&&r.jsx("div",{ref:t,className:p.cn("absolute h-full w-[6px] top-0 right-0 cursor-col-resize",B&&"bg-gray-300 dark:bg-gray-700"),onMouseDown:u?()=>u(o,d):void 0})]})})},$);function Cs({column:e,onFilterUpdate:t,filter:o,onHover:a,createFilterField:n,hidden:i,setHidden:s}){const l=e.key,[d,u]=c.useState(o);if(c.useEffect(()=>{u(o)},[o]),!e.filter)return null;const m=()=>{t(d,!1)},g=h=>{t(void 0,!1)},f=!!o,b=n({id:l,filterValue:d,setFilterValue:u,column:e,hidden:i,setHidden:s});return b?r.jsxs("form",{noValidate:!0,onSubmit:h=>{h.stopPropagation(),h.preventDefault(),m()},className:"text-gray-900 dark:text-white",children:[r.jsx("div",{className:p.cn(p.defaultBorderMixin,"py-4 px-6 text-xs font-semibold uppercase border-b"),children:e.title??l}),b&&r.jsx("div",{className:"m-4",children:b}),r.jsxs("div",{className:"flex justify-end m-4",children:[r.jsx(p.Button,{className:"mr-4",disabled:!f,variant:"text",color:"primary",type:"reset","aria-label":"filter clear",onClick:g,children:"Clear"}),r.jsx(p.Button,{variant:"outlined",color:"primary",type:"submit",children:"Filter"})]})]}):null}const Es=({columns:e,currentSort:t,onColumnSort:o,onFilterUpdate:a,sortByProperty:n,filter:i,onColumnResize:s,onColumnResizeEnd:l,createFilterField:d,AddColumnComponent:u})=>{const m=e.map(()=>c.createRef()),[g,f]=c.useState(-1),b=c.useCallback((E,B,x)=>{const I=e[E],F=100,P=800,N=B>P?P:B<F?F:B,T={width:N,key:I.key,column:{...I,width:N}};x?l(T):s(T)},[e,s,l]),h=c.useCallback(E=>{if(g>=0){const B=m[g].current?.parentElement?.getBoundingClientRect().left;return B?E.clientX-B:void 0}},[m,g]),A=c.useCallback(E=>{document.body.style.cursor=E?"col-resize":"auto"},[]),y=c.useCallback(E=>{E.stopPropagation(),E.preventDefault();const B=h(E);B&&b(g,B,!1)},[b,h,g]),k=c.useCallback(E=>{E.stopPropagation(),E.preventDefault();const B=h(E);B&&b(g,B,!0),f(-1),A(!1)},[b,h,g,A]),v=c.useCallback(()=>{document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",k)},[y,k]),_=c.useCallback(()=>{document.addEventListener("mousemove",y),document.addEventListener("mouseup",k)},[y,k]);c.useEffect(()=>(g>=0?_():v(),()=>{v()}),[_,g,v]);const C=c.useCallback(E=>{f(E),A(!0)},[A]);return r.jsxs("div",{className:p.cn(p.defaultBorderMixin,"z-20 sticky min-w-full flex w-fit flex-row top-0 left-0 h-12 border-b bg-gray-50 dark:bg-gray-900"),children:[e.map((E,B)=>{const x=e[B],I=x&&i&&i[x.key]?i[x.key]:void 0;return r.jsx(oe,{children:r.jsx(xs,{resizeHandleRef:m[B],columnIndex:B,isResizingIndex:g,onFilterUpdate:a,filter:I,sort:n===x.key?t:void 0,onColumnSort:o,onClickResizeColumn:C,column:x,createFilterField:d,AdditionalHeaderWidget:x.AdditionalHeaderWidget})},"header_"+x.key)}),u&&r.jsx(u,{})]})},Bs=c.memo(function({rowData:t,rowIndex:o,children:a,onRowClick:n,size:i,style:s,hoverRow:l,rowClassName:d}){const u=c.useCallback(m=>{n&&n({rowData:t,rowIndex:o,event:m})},[n,t,o]);return r.jsx("div",{className:p.cn("flex min-w-full text-sm border-b border-gray-200 dark:border-gray-800 border-opacity-40 dark:border-opacity-40",d?d(t):"",{"hover:bg-opacity-95":l,"cursor-pointer":n}),onClick:u,style:{...s,height:mt(i),width:"fit-content"},children:a})},$),Ss=c.memo(function(t){return t.rowData&&t.cellRenderer({cellData:t.cellData,rowData:t.rowData,rowIndex:t.rowIndex,isScrolling:!1,column:t.column,columns:t.columns,columnIndex:t.columnIndex,width:t.column.width})},(e,t)=>$(e.rowData,t.rowData)&&$(e.column,t.column)&&$(e.cellData,t.cellData)&&$(e.rowIndex,t.rowIndex)&&$(e.cellRenderer,t.cellRenderer)&&$(e.columnIndex,t.columnIndex)),er=c.createContext({});er.displayName="VirtualListContext";const Is=c.forwardRef(({children:e,...t},o)=>r.jsx(er.Consumer,{children:a=>{const n=a.customView;return r.jsxs(r.Fragment,{children:[r.jsx("div",{id:"virtual-table",style:{position:"relative",height:"100%"},children:r.jsxs("div",{ref:o,...t,style:{...t?.style,minHeight:"100%",position:"relative"},children:[r.jsx(Es,{...a}),!n&&e]})}),n&&r.jsx("div",{style:{position:"sticky",top:"56px",flexGrow:1,height:"calc(100% - 56px)",marginTop:"calc(56px - 100vh)",left:0},children:n})]})}})),ja=c.memo(function({data:t,onResetPagination:o,onEndReached:a,size:n="m",columns:i,onRowClick:s,onColumnResize:l,filter:d,checkFilterCombination:u,onFilterUpdate:m,sortBy:g,error:f,emptyComponent:b,onSortByUpdate:h,loading:A,cellRenderer:y,hoverRow:k,createFilterField:v,rowClassName:_,className:C,endAdornment:E,AddColumnComponent:B}){const x=g?g[0]:void 0,I=g?g[1]:void 0,[F,P]=c.useState(i),N=c.useRef(null),T=c.useRef(0);c.useEffect(()=>{P(i)},[i]);const[G,ee]=xo(),M=c.useCallback(S=>{P(F.map(O=>O.key===S.column.key?S.column:O))},[F]),Y=c.useCallback(S=>{P(F.map(O=>O.key===S.column.key?S.column:O)),l&&l(S)},[F,l]),H=c.useRef();c.useEffect(()=>{H.current=d},[d]);const Q=c.useCallback(()=>{T.current=0,N.current&&N.current.scrollTo(N.current?.scrollLeft,0)},[]),J=c.useCallback(S=>{const O=x===S&&I==="desc",q=x===S&&I==="asc"?"desc":O?void 0:"asc",de=O?void 0:S,L=H.current,ae=q&&de?[de,q]:void 0;L&&u&&!u(L,ae)&&m&&m(void 0),o&&o(),h&&h(ae),Q()},[u,I,m,o,h,Q,x]),Z=c.useCallback(()=>{T.current=0,h&&h(void 0)},[h]),z=Math.max((t?.length??0)*mt(n)-ee.height,0),ie=c.useCallback(S=>{a&&(t?.length??0)>0&&S>T.current+600&&(T.current=S,a())},[t?.length,a]),W=c.useCallback(({scrollOffset:S,scrollUpdateWasRequested:O})=>{!O&&S>=z-600&&ie(S)},[z,ie]),te=c.useCallback((S,O)=>{T.current=0;const V=H.current;let q=V?{...V}:{};O?q[S.key]=O:delete q[S.key],!u||u(q,x&&I?[x,I]:void 0)||(q=O?{[S.key]:O}:{}),m&&m(q),S.key!==x&&Z()},[u,I,m,Z,x]),ne=c.useCallback(()=>r.jsxs("div",{className:"h-full flex flex-col items-center justify-center sticky left-0",children:[r.jsx(p.Typography,{variant:"h6",children:"Error fetching data from the data source"}),f?.message&&r.jsx(p.Markdown,{className:"px-4 break-all",source:f.message})]}),[f?.message]),D=c.useCallback(()=>A?r.jsx(Rt,{}):r.jsxs("div",{className:"flex flex-col overflow-auto items-center justify-center p-2 gap-2 h-full",children:[r.jsx(p.AssignmentIcon,{}),b]}),[b,A]),K=!A&&(t?.length??0)===0,R=f?ne():K?D():void 0,X={data:t,size:n,cellRenderer:y,columns:F,currentSort:I,onRowClick:s,customView:R,onColumnResize:M,onColumnResizeEnd:Y,filter:H.current,onColumnSort:J,onFilterUpdate:te,sortByProperty:x,hoverRow:k??!1,createFilterField:v,rowClassName:_,endAdornment:E,AddColumnComponent:B};return r.jsx("div",{ref:G,className:p.cn("h-full w-full",C),children:r.jsx(er.Provider,{value:X,children:r.jsx(Fs,{outerRef:N,width:ee.width,height:ee.height,itemCount:(t?.length??0)+(E?1:0),onScroll:W,includeAddColumn:!!B,itemSize:mt(n)},n)})})},$);function Fs({outerRef:e,width:t,height:o,itemCount:a,onScroll:n,itemSize:i,includeAddColumn:s}){const l=c.useCallback(({index:d,style:u})=>r.jsx(er.Consumer,{children:({onRowClick:m,data:g,columns:f,size:b="m",cellRenderer:h,hoverRow:A,rowClassName:y,endAdornment:k})=>{if(k&&d===(g??[]).length)return r.jsx("div",{style:{...u,height:"auto",position:"sticky",bottom:0,zIndex:1},children:k});const v=g&&g[d];return r.jsxs(Bs,{rowData:v,rowIndex:d,onRowClick:m,columns:f,hoverRow:A,rowClassName:y,style:{...u,top:`calc(${u.top}px + 48px)`},size:b,children:[f.map((_,C)=>{const E=v&&v[_.key];return r.jsx(Ss,{dataKey:_.key,cellRenderer:h,column:_,columns:f,rowData:v,cellData:E,rowIndex:d,columnIndex:C},`cell_${_.key}`)}),s&&r.jsx("div",{className:"w-20"})]},`row_${d}`)}}),[]);return r.jsx(Qn.FixedSizeList,{outerRef:e,innerElementType:Is,width:t,height:o,overscanCount:4,itemCount:a,onScroll:n,itemSize:i,children:l})}const La={"==":"==","!=":"!=",">":">","<":"<",">=":">=","<=":"<=",in:"In","not-in":"Not in","array-contains":"Contains","array-contains-any":"Contains Any"},Zr=["array-contains-any","in","not-in"];function Ns({name:e,value:t,setValue:o,isArray:a,path:n,title:i,previewProperties:s,setHidden:l}){const d=a?["array-contains"]:["==","!=",">","<",">=","<="],[u,m]=c.useState(!1);a?d.push("array-contains-any"):d.push("in","not-in");const[g,f]=t||[d[0],void 0],[b,h]=c.useState(g),[A,y]=c.useState(f),k=A?Array.isArray(A)?A.map(N=>N.isEntityReference&&N.isEntityReference()?N.id:null).filter(Boolean):[A.id]:[];function v(N,T){const G=Zr.includes(b),ee=Zr.includes(N);let M=T;G!==ee&&(M=ee?M.isEntityReference&&M.isEntityReference()?[M]:[]:void 0),h(N),y(M);const Y=M!==null&&Array.isArray(M)?M.length>0:M!==void 0;o(N&&Y?[N,M]:void 0)}const _=ue(),C=c.useMemo(()=>n?_.getCollection(n):void 0,[n]),E=N=>{v(b,Ye(N))},B=N=>{v(b,N.map(T=>Ye(T)))},x=Zr.includes(b),I=gt({multiselect:x,path:n,collection:C,onSingleEntitySelected:E,onMultipleEntitiesSelected:B,selectedEntityIds:k,onClose:()=>{l(!1)}}),F=()=>{l(!0),I.open()},P=N=>r.jsx("div",{className:"mb-0.5",onMouseEnter:()=>m(!0),onMouseMove:()=>m(!0),onMouseLeave:()=>m(!1),children:r.jsx(Ve,{disabled:!n,previewProperties:s,size:"medium",onClick:F,reference:N,onHover:u,allowEntityNavigation:!1})});return r.jsxs("div",{className:"flex w-[440px] flex-row",children:[r.jsx("div",{className:"w-[120px]",children:r.jsx(p.Select,{value:b,onValueChange:N=>{v(N,A)},renderValue:N=>La[N],children:d.map(N=>r.jsx(p.SelectItem,{value:N,children:La[N]},N))})}),r.jsxs("div",{className:"flex-grow ml-2 h-full",children:[A&&Array.isArray(A)&&r.jsx("div",{children:A.map((N,T)=>P(N))}),A&&!Array.isArray(A)&&r.jsx("div",{children:P(A)}),(!A||Array.isArray(A)&&A.length===0)&&r.jsx(p.Button,{onClick:F,variant:"outlined",className:"h-full w-full",children:x?"Select references":"Select reference"})]})]})}const Ua={"==":"==","!=":"!=",">":">","<":"<",">=":">=","<=":"<=",in:"In","not-in":"Not in","array-contains":"Contains","array-contains-any":"Any"},Xr=["array-contains-any","in","not-in"];function Ts({name:e,value:t,setValue:o,dataType:a,isArray:n,enumValues:i,title:s}){const l=n?["array-contains"]:["==","!=",">","<",">=","<="];i&&(n?l.push("array-contains-any"):l.push("in","not-in"));const[d,u]=t||[l[0],void 0],[m,g]=c.useState(d),[f,b]=c.useState(u);function h(y,k){let v=k;const _=Xr.includes(m),C=Xr.includes(y);_!==C&&(v=C?typeof k=="string"||typeof k=="number"?[k]:[]:""),typeof v=="number"&&isNaN(v)&&(v=void 0),g(y),b(v);const E=v!==null&&Array.isArray(v)?v.length>0:v!==void 0;o(y&&E?[y,v]:void 0)}const A=Xr.includes(m);return r.jsxs("div",{className:"flex w-[440px] items-center",children:[r.jsx("div",{className:"w-[80px]",children:r.jsx(p.Select,{value:m,position:"item-aligned",onValueChange:y=>{h(y,f)},renderValue:y=>Ua[y],children:l.map(y=>r.jsx(p.SelectItem,{value:y,children:Ua[y]},y))})}),r.jsxs("div",{className:"flex-grow ml-2",children:[!i&&r.jsx(p.TextField,{type:a==="number"?"number":void 0,value:f!==void 0?String(f):"",onChange:y=>{const k=a==="number"?parseFloat(y.target.value):y.target.value;h(m,k)},endAdornment:f&&r.jsx(p.IconButton,{onClick:y=>h(m,void 0),children:r.jsx(p.ClearIcon,{})})}),i&&r.jsx(p.Select,{position:"item-aligned",value:f!==void 0?Array.isArray(f)?f.map(y=>String(y)):String(f):n?[]:"",onValueChange:y=>{h(m,a==="number"?parseInt(y):y)},multiple:A,endAdornment:f&&r.jsx(p.IconButton,{className:"absolute right-3 top-2",onClick:y=>h(m,void 0),children:r.jsx(p.ClearIcon,{})}),renderValue:y=>r.jsx(Be,{enumKey:y,enumValues:i,size:"small"},`select_value_${e}_${y}`),children:i.map(y=>r.jsx(p.SelectItem,{value:String(y.id),children:r.jsx(Be,{enumKey:String(y.id),enumValues:i,size:"small"})},`select_value_${e}_${y.id}`))})]})]})}function Ps({name:e,title:t,value:o,setValue:a}){function n(l){a(l!==void 0?["==",l]:void 0)}const i=o&&o[1],s=!!o;return r.jsx("div",{className:"w-[200px]",children:r.jsx(p.BooleanSwitchWithLabel,{value:i,allowIndeterminate:!0,onValueChange:l=>n(l===null?void 0:l),label:s?i?`${t} is true`:`${t} is false`:"No filter"})})}const $a={"==":"==","!=":"!=",">":">","<":"<",">=":">=","<=":"<=","not-in":"not in",in:"in","array-contains":"Contains","array-contains-any":"Any"},qa=["array-contains-any","in"];function Qs({name:e,isArray:t,mode:o,value:a,setValue:n,title:i}){const{locale:s}=re(),l=t?["array-contains"]:["==","!=",">","<",">=","<="],[d,u]=a||[l[0],void 0],[m,g]=c.useState(d),[f,b]=c.useState(u);function h(A,y){let k=y;const v=qa.includes(m),_=qa.includes(A);v!==_&&(k=_?y?[y]:[]:""),g(A),b(k===null?void 0:k);const C=k!==null&&Array.isArray(k)?k.length>0:k!==void 0;n(A&&C?[A,k]:void 0)}return r.jsxs("div",{className:"flex w-[440px] items-center",children:[r.jsx("div",{className:"w-[80px]",children:r.jsx(p.Select,{value:m,onValueChange:A=>{h(A,f)},renderValue:A=>$a[A],children:l.map(A=>r.jsx(p.SelectItem,{value:A,children:$a[A]},A))})}),r.jsx("div",{className:"flex-grow ml-2",children:r.jsx(p.DateTimeField,{mode:o,size:"medium",locale:s,value:f,onChange:A=>{h(m,A===null?void 0:A)},clearable:!0})})]})}const Wa=c.memo(function({onValueChange:t,cellRenderer:o,onEntityClick:a,onColumnResize:n,hoverRow:i=!0,size:s,inlineEditing:l=!1,tableController:{data:d,dataLoading:u,noMoreToLoad:m,dataLoadingError:g,filterValues:f,setFilterValues:b,sortBy:h,setSortBy:A,setSearchString:y,clearFilter:k,itemCount:v,setItemCount:_,pageSize:C=50,paginationEnabled:E,checkFilterCombination:B,setPopupCell:x},filterable:I=!0,emptyComponent:F,columns:P,forceFilter:N,highlightedRow:T,endAdornment:G,AddColumnComponent:ee}){const M=c.useRef(null),[Y,H]=c.useState(void 0),Q=()=>{!E||u||m||v!==void 0&&_?.(v+C)},J=c.useCallback(()=>{_?.(C)},[C]),Z=c.useCallback(({rowData:te})=>{if(!l)return a&&a(te)},[a,l]);p.useOutsideAlerter(M,()=>{Y&&ie()},!!Y),c.useEffect(()=>{const te=ne=>{ne.keyCode===27&&ie()};return document.addEventListener("keydown",te,!1),()=>{document.removeEventListener("keydown",te,!1)}});const z=c.useCallback(te=>{H(te)},[]),ie=c.useCallback(()=>{H(void 0)},[]),W=c.useCallback(te=>{b?.({...te,...N})},[N]);return r.jsx(Da.Provider,{value:{setPopupCell:x,select:z,onValueChange:t,size:s??"m",selectedCell:Y},children:r.jsx("div",{className:"h-full w-full flex flex-col bg-white dark:bg-gray-950",ref:M,children:r.jsx(ja,{data:d,columns:P,cellRenderer:o,onRowClick:l?void 0:a?Z:void 0,onEndReached:Q,onResetPagination:J,error:g,paginationEnabled:E,onColumnResize:n,size:s,loading:u,filter:f,onFilterUpdate:b?W:void 0,sortBy:h,onSortByUpdate:A,hoverRow:i,checkFilterCombination:B,createFilterField:I?Ds:void 0,rowClassName:c.useCallback(te=>T?.(te)?"bg-gray-100 bg-opacity-75 dark:bg-gray-800 dark:bg-opacity-75":"",[T]),className:"flex-grow",emptyComponent:F,endAdornment:G,AddColumnComponent:ee})})})},$);function Ds({id:e,filterValue:t,setFilterValue:o,column:a,hidden:n,setHidden:i}){if(!a.custom)return null;const{resolvedProperty:s}=a.custom,l=s?.dataType==="array",d=l?s.of:s;if(!d)return null;if(d.dataType==="reference")return r.jsx(Ns,{value:t,setValue:o,name:e,isArray:l,path:d.path,title:s?.name,previewProperties:d?.previewProperties,hidden:n,setHidden:i});if(d.dataType==="number"||d.dataType==="string"){const u=d.name,m=d.enumValues?$e(d.enumValues):void 0;return r.jsx(Ts,{value:t,setValue:o,name:e,dataType:d.dataType,isArray:l,enumValues:m,title:u})}else if(d.dataType==="boolean"){const u=d.name;return r.jsx(Ps,{value:t,setValue:o,name:e,title:u})}else if(d.dataType==="date"){const u=d.name;return r.jsx(Qs,{value:t,setValue:o,name:e,mode:d.mode,isArray:l,title:u})}return r.jsx("div",{children:`Currently the filter field ${s.dataType} is not supported`})}const Kr=c.memo(function({forceFilter:t,actionsStart:o,actions:a,title:n,tableRowActionsBuilder:i,uniqueFieldValidator:s,getPropertyFor:l,onValueChange:d,selectionController:u,highlightedEntities:m,onEntityClick:g,onColumnResize:f,onSizeChanged:b,textSearchEnabled:h=!1,hoverRow:A=!0,inlineEditing:y=!1,additionalFields:k,displayedColumnIds:v,defaultSize:_,properties:C,tableController:E,filterable:B=!0,sortable:x=!0,endAdornment:I,AddColumnComponent:F,AdditionalHeaderWidget:P,additionalIDHeaderWidget:N,emptyComponent:T,getIdColumnWidth:G,onTextSearchClick:ee,textSearchLoading:M}){const Y=c.useRef(null),H=Me(),Q=!!t,J=(u?.selectedEntities?.length>0?u?.selectedEntities:m)?.filter(Boolean),Z=he(),[z,ie]=c.useState(_??"m"),W=J?.map(L=>L.id),te=!!E.filterValues&&Object.keys(E.filterValues).length>0,ne=c.useCallback(L=>{b&&b(L),ie(L)},[]),D=c.useCallback(L=>E.setSearchString?.(L),[]),K=c.useMemo(()=>k?k.map(L=>({[L.key]:L})).reduce((L,ae)=>({...L,...ae}),{}):{},[k]),R=s,X=({column:L,columnIndex:ae,rowData:Ne,rowIndex:xe})=>{const me=Ne,Oe=L.key;let Ge=L.custom?.disabled;const rt=me.values?Ue(me.values,Oe):void 0,Se=l?.({propertyKey:Oe,propertyValue:rt,entity:me})??L.custom.resolvedProperty;return Se?.disabled||(Ge=!1),Se?r.jsx(oe,{children:me?r.jsx(Ma,{readonly:!y,align:L.align??"left",propertyKey:Oe,property:Se,value:me?.values?Ue(me.values,Oe):void 0,customFieldValidator:R,columnIndex:ae,width:L.width,height:mt(z),entity:me,disabled:Ge,path:me.path},`property_table_cell_${me.id}_${Oe}`):je()}):null},S=c.useCallback(({column:L,rowData:ae,width:Ne})=>{const xe=ae,me=K[L.key],Oe=me.dependencies?Object.entries(xe.values).filter(([Se,ot])=>me.dependencies.includes(Se)).reduce((Se,ot)=>({...Se,...ot}),{}):xe,Ge=me.Builder;if(!Ge&&!me.value)throw new Error("When using additional fields you need to provide a Builder or a value");const rt=Ge?r.jsx(Ge,{entity:xe,context:Z}):r.jsx(r.Fragment,{children:me.value?.({entity:xe,context:Z})});return r.jsx(Zt,{width:Ne,size:z,value:Oe,selected:!1,disabled:!0,align:"left",allowScroll:!1,showExpandIcon:!1,disabledTooltip:"This column can't be edited directly",children:r.jsx(oe,{children:rt})},`additional_table_cell_${xe.id}_${L.key}`)},[z,W]),O=(()=>{const L=Ga({properties:C,sortable:x,forceFilter:t,disabledFilter:Q,AdditionalHeaderWidget:P}),ae=k?k.map(Ne=>({key:Ne.key,align:"left",sortable:!1,title:Ne.name,width:Ne.width??200})):[];return[...L,...ae]})(),q=[{key:"id_ewcfedcswdf3",width:G?.()??(H?160:130),title:"ID",resizable:!1,frozen:H,headerAlign:"center",align:"center",AdditionalHeaderWidget:()=>N},...v.map(L=>O.find(ae=>ae.key===L.key)).filter(Boolean)],de=L=>{const ae=L.column,Ne=L.columns,xe=ae.key;try{if(L.columnIndex===0)return i?i({entity:L.rowData,size:z,width:ae.width,frozen:ae.frozen}):r.jsx(Xt,{entity:L.rowData,width:ae.width,frozen:ae.frozen,isSelected:!1,size:z});if(K[xe])return S(L);if(L.columnIndex<Ne.length+1)return X(L);throw Error("Internal: columns not mapped properly")}catch(me){return console.error("Error rendering cell",me),r.jsx(Zt,{size:z,width:ae.width,saved:!1,value:null,align:"left",fullHeight:!1,disabled:!0,children:r.jsx(ge,{error:me})})}};return r.jsxs("div",{ref:Y,className:"h-full w-full flex flex-col bg-white dark:bg-gray-950",children:[r.jsx(ws,{forceFilter:Q,filterIsSet:te,onTextSearch:h?D:void 0,textSearchLoading:M,onTextSearchClick:h?ee:void 0,clearFilter:E.clearFilter,size:z,onSizeChanged:ne,title:n,actionsStart:o,actions:a,loading:E.dataLoading}),r.jsx(Wa,{columns:q,size:z,inlineEditing:y,cellRenderer:de,onEntityClick:g,highlightedRow:c.useCallback(L=>W?.includes(L.id)??!1,[W]),tableController:E,onValueChange:d,onColumnResize:f,hoverRow:A,filterable:B,emptyComponent:T,endAdornment:I,AddColumnComponent:F})]})},$);function Ms({data:e,entitiesDisplayedFirst:t}){if(!t)return e;const o=new Set(t.map(a=>a.id));return[...t,...e.filter(a=>!o.has(a.id))]}function Ha(e,t,o=5e3){const[a,n]=c.useState(e),i=c.useRef(a.length??0),s=c.useRef(!1),l=c.useRef(t),d=!$(l.current,t),u=e.length>=i.current||d;return c.useEffect(()=>{const m=()=>{$(a,e)||(l.current=t,i.current=e.length,n(e)),s.current=!1};s.current=!0;let g;return u?m():g=setTimeout(m,o),()=>{clearTimeout(g),s.current&&u&&m()}},[e,o,t,u]),u?e:a}const Os=50;function Rr({fullPath:e,collection:t,entitiesDisplayedFirst:o,lastDeleteTimestamp:a,forceFilter:n}){const{initialFilter:i,initialSort:s,forceFilter:l}=t,[d,u]=c.useState(void 0),m=ue(),g=ze(),f=c.useMemo(()=>m.resolveAliasesFrom(e),[e,m.resolveAliasesFrom]),b=n??l,h=t.pagination===void 0||!!t.pagination,A=typeof t.pagination=="number"?t.pagination:Os,[y,k]=c.useState(),[v,_]=c.useState(h?A:void 0),C=c.useMemo(()=>{if(s&&b&&!Z(b,s)){console.warn("Initial sort is not compatible with the force filter. Ignoring initial sort");return}return s},[s,b]),[E,B]=c.useState(b??i??void 0),[x,I]=c.useState(C),F=x?x[0]:void 0,P=x?x[1]:void 0,N=he(),[T,G]=c.useState([]),[ee,M]=c.useState(!1),[Y,H]=c.useState(),[Q,J]=c.useState(!1),Z=c.useCallback((ne,D)=>g.isFilterCombinationValid?g.isFilterCombinationValid({path:f,collection:t,filterValues:ne,sortBy:D}):!0,[]),z=c.useCallback(()=>B(b??void 0),[b]),ie=c.useCallback(ne=>{if(b){console.warn("Filter is not compatible with the force filter. Ignoring filter");return}ne&&Object.keys(ne).length===0?B(void 0):B(ne)},[b]);c.useEffect(()=>{M(!0);const ne=async K=>{if(t.callbacks?.onFetch)try{K=await Promise.all(K.map(R=>t.callbacks.onFetch({collection:t,path:f,entity:R,context:N})))}catch(R){console.error(R)}M(!1),H(void 0),G(K.map(R=>({...R}))),J(!v||K.length<v)},D=K=>{console.error("ERROR",K),M(!1),G([]),H(K)};return g.listenCollection?g.listenCollection({path:f,collection:t,onUpdate:ne,onError:D,searchString:y,filter:E,limit:v,startAfter:void 0,orderBy:F,order:P}):(g.fetchCollection({path:f,collection:t,searchString:y,filter:E,limit:v,startAfter:void 0,orderBy:F,order:P}).then(ne).catch(D),()=>{})},[f,v,P,F,E,y]);const W=Ms({data:T,entitiesDisplayedFirst:o});return{data:Ha(W,{filterValues:E,sortBy:x,searchString:y,lastDeleteTimestamp:a}),dataLoading:ee,noMoreToLoad:Q,dataLoadingError:Y,filterValues:E,setFilterValues:ie,sortBy:x,setSortBy:I,searchString:y,setSearchString:k,clearFilter:z,itemCount:v,setItemCount:_,paginationEnabled:h,pageSize:A,checkFilterCombination:Z,popupCell:d,setPopupCell:u}}function tr(e){return Array.isArray(e)?e:e?[e]:[]}function Ja({collection:e,relativePath:t,parentCollectionIds:o,onNewClick:a,onMultipleDeleteClick:n,selectionEnabled:i,path:s,selectionController:l,tableController:d,collectionEntitiesCount:u}){const m=he(),f=re().plugins??[],b=We(),h=Me(),A=l.selectedEntities,y=st(e,b,De(s),null)&&a&&(h?r.jsxs(p.Button,{id:`add_entity_${s}`,onClick:a,startIcon:r.jsx(p.AddIcon,{}),variant:"filled",color:"primary",children:["Add ",e.singularName??e.name]}):r.jsx(p.Button,{id:`add_entity_${s}`,onClick:a,size:"medium",variant:"filled",color:"primary",children:r.jsx(p.AddIcon,{})})),k=Ut(e,b,De(s),null);let v;if(i){const E=h?r.jsxs(p.Button,{variant:"text",disabled:!A?.length||!k,startIcon:r.jsx(p.DeleteIcon,{}),onClick:n,color:"primary",className:"lg:w-20",children:["(",A?.length,")"]}):r.jsx(p.IconButton,{color:"primary",disabled:!A?.length||!k,onClick:n,children:r.jsx(p.DeleteIcon,{})});v=r.jsx(p.Tooltip,{title:k?"Delete":"You have selected at least one entity you cannot delete",children:E})}const _={path:s,relativePath:t,parentCollectionIds:o,collection:e,selectionController:l,context:m,tableController:d,collectionEntitiesCount:u},C=tr(e.Actions).map((E,B)=>r.jsx(oe,{children:r.jsx(E,{..._})},`actions_${B}`));return f&&f.forEach((E,B)=>{E.collections?.CollectionActions&&C.push(...tr(E.collections?.CollectionActions).map((x,I)=>r.jsx(oe,{children:r.jsx(x,{..._,...E.collections?.collectionActionsProps})},`plugin_actions_${B}_${I}`)))}),r.jsxs(r.Fragment,{children:[C,v,y]})}function eo({collection:e,fullPath:t,parentCollectionIds:o}){const a=he(),n=re(),[i,s]=c.useState(!1),[l,d]=c.useState(!1);let u,m=!!e.textSearchEnabled;return n?.plugins&&(u=n.plugins?.find(f=>!!f.collectionView?.onTextSearchClick)?()=>{s(!0),Promise.all(n.plugins?.map(f=>f.collectionView?.onTextSearchClick?f.collectionView.onTextSearchClick({context:a,path:t,collection:e,parentCollectionIds:o}):Promise.resolve(!0))).then(f=>{f.every(Boolean)&&d(!0)}).finally(()=>s(!1))}:void 0,n.plugins?.forEach(f=>{m||f.collectionView?.showTextSearchBar&&(m=f.collectionView.showTextSearchBar({context:a,path:t,collection:e,parentCollectionIds:o}))})),{textSearchLoading:i,textSearchInitialised:l,onTextSearchClick:u,textSearchEnabled:m}}function zs({containerRef:e,innerRef:t,x:o,y:a,onMove:n}){let i=0,s=0;const l=c.useRef(!1),d=h=>{if(h.button!==0||!e.current||h.defaultPrevented||h.innerClicked)return;const{x:A,y}=e.current.getBoundingClientRect();i=h.screenX-A,s=h.screenY-y,document.addEventListener("mousemove",f),document.addEventListener("mouseup",g),document.addEventListener("selectstart",m),l.current=!0},u=h=>{h.innerClicked=!0},m=h=>{h.preventDefault(),h.stopPropagation()},g=h=>{document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",g),document.removeEventListener("selectstart",m),h.stopPropagation(),l.current=!1},f=h=>{h.target.localName==="input"||!l.current||(n({x:h.screenX-i,y:h.screenY-s}),h.stopPropagation())},b=()=>{e.current&&(e.current.style.top=`${a}px`,e.current.style.left=`${o}px`)};c.useEffect(()=>{const h=e.current,A=t.current;if(!(!h||!A))return A&&A.addEventListener("mousedown",u),h&&h.addEventListener("mousedown",d),b(),()=>{h&&h.removeEventListener("mousedown",d),A&&A.removeEventListener("mousedown",u)}})}function Vs(){const[e,t]=c.useState({width:0,height:0});return c.useLayoutEffect(()=>{function o(){t({width:window.innerWidth,height:window.innerHeight})}return window.addEventListener("resize",o),o(),()=>window.removeEventListener("resize",o)},[]),e}const Gs=({onResize:e})=>{const t=c.useRef(0),o=c.useRef(null),a=c.useRef(e);a.current=e;const n=c.useCallback(s=>{t.current&&cancelAnimationFrame(t.current),t.current=requestAnimationFrame(()=>{a.current(s)})},[]),i=c.useCallback(()=>{const s=o.current;s&&s.contentDocument&&s.contentDocument.defaultView&&s.contentDocument.defaultView.addEventListener("resize",n)},[n]);return c.useEffect(()=>{const s=o.current;return()=>{s&&s.contentDocument&&s.contentDocument.defaultView&&s.contentDocument.defaultView.removeEventListener("resize",n)}},[n]),r.jsx("object",{onLoad:i,ref:o,tabIndex:-1,type:"text/html",data:"about:blank",title:"",style:{position:"absolute",top:0,left:0,height:"100%",width:"100%",pointerEvents:"none",zIndex:-1,opacity:0}})};function rr({name:e,addLabel:t,value:o,disabled:a=!1,buildEntry:n,small:i,onInternalIdAdded:s,includeAddButton:l,newDefaultEntry:d=null,setFieldValue:u}){return r.jsx(fo,{droppableId:e,addLabel:t,value:o,disabled:a,buildEntry:n,size:i?"small":"medium",onInternalIdAdded:s,includeAddButton:l,newDefaultEntry:d,onValueChange:m=>u(e,m)})}function ke({error:e,showError:t,property:o,includeDescription:a=!0,disabled:n}){const i=o.description||o.longDescription;if(!(t&&e)&&(!a||!i))return null;if(t&&e)return r.jsx(p.Typography,{variant:"caption",className:"ml-3.5 text-red-500 dark:text-red-500",children:e});const s=typeof o.disabled=="object"?o.disabled.disabledMessage:void 0;return r.jsxs("div",{className:"flex ml-3.5 mt-1",children:[r.jsx(p.Typography,{variant:"caption",color:n?"disabled":"secondary",className:"flex-grow",children:s||o.description}),o.longDescription&&r.jsx(p.Tooltip,{title:o.longDescription,side:"bottom",children:r.jsx(p.IconButton,{size:"small",className:"self-start",children:r.jsx(p.InfoIcon,{color:"disabled",size:"small"})})})]})}function _e({icon:e,title:t,small:o,className:a,required:n}){return r.jsxs("span",{className:`inline-flex items-center my-0.5 ${o?"gap-1":"gap-2"} ${a??""}`,children:[e,r.jsx("span",{className:`text-start font-medium text-${o?"base":"sm"} origin-top-left transform ${o?"translate-x-2 scale-75":""}`,children:(t??"")+(n?" *":"")})]})}function to({propertyKey:e,value:t,setValue:o,error:a,showError:n,disabled:i,autoFocus:s,touched:l,property:d,includeDescription:u}){const m=d.enumValues;Pe({property:d,value:t,setValue:o});const g=c.useCallback(f=>{f.stopPropagation(),f.preventDefault(),o(null)},[o]);return r.jsxs(r.Fragment,{children:[r.jsx(p.Select,{value:t?t.toString():"",disabled:i,position:"item-aligned",inputClassName:p.cn("w-full"),label:r.jsx(_e,{icon:Ae(d,"small"),required:d.validation?.required,title:d.name,className:"text-text-secondary dark:text-text-secondary-dark ml-3.5"}),endAdornment:d.clearable&&r.jsx(p.IconButton,{onClick:g,children:r.jsx(p.ClearIcon,{})}),onValueChange:f=>{const b=f?d.dataType==="number"?parseFloat(f):f:null;return o(b)},renderValue:f=>r.jsx(Be,{enumKey:f,enumValues:m,size:"medium"}),children:m&&m.map(f=>r.jsx(p.SelectItem,{value:String(f.id),children:r.jsx(Be,{enumKey:String(f.id),enumValues:m,size:"medium"})},f.id))}),r.jsx(ke,{includeDescription:u,showError:n,error:a,disabled:i,property:d})]})}function ro({propertyKey:e,value:t,setValue:o,error:a,showError:n,disabled:i,property:s,includeDescription:l,autoFocus:d}){const u=s.of;if(!u)throw Error("Using wrong component ArrayEnumSelect");if(Array.isArray(u))throw Error("Using array properties instead of single one in `of` in ArrayProperty");if(u.dataType!=="string"&&u.dataType!=="number")throw Error("Field misconfiguration: array field of type string or number");const m=$e(u.enumValues);if(!m)throw console.error(s),Error("Field misconfiguration: array field of type string or number needs to have enumValues");Pe({property:s,value:t,setValue:o});const g=!!t&&Array.isArray(t),f=c.useCallback((b,h)=>{const A=b!==void 0?Vt(m,b):void 0;return r.jsxs(Be,{enumKey:b,enumValues:m,size:"medium",children:[A?.label??b,!h&&r.jsx("button",{className:"ml-1 ring-offset-background rounded-full outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",onMouseDown:y=>{y.preventDefault(),y.stopPropagation()},onClick:y=>{y.preventDefault(),y.stopPropagation(),o(t.filter(k=>k!==b))},children:r.jsx(p.CloseIcon,{size:"smallest"})})]},b)},[m,o,t]);return r.jsxs("div",{className:"mt-0.5 ml-0.5 mt-2",children:[r.jsx(p.MultiSelect,{value:g?t.map(b=>b.toString()):[],disabled:i,label:r.jsx(_e,{icon:Ae(s,"small"),required:s.validation?.required,title:s.name,className:"text-text-secondary dark:text-text-secondary-dark ml-3.5"}),renderValue:c.useCallback(b=>f(b,!1),[f]),onMultiValueChange:b=>{let h;return u&&u?.dataType==="number"?h=b?b.map(A=>parseFloat(A)):[]:h=b,o(h)},children:m.map(b=>String(b.id)).map(b=>r.jsx(p.MultiSelectItem,{value:b,children:f(b,!0)},b))}),r.jsx(ke,{includeDescription:l,showError:n,error:a,disabled:i,property:s})]})}function Za({propertyKey:e,value:t,error:o,showError:a,disabled:n,isSubmitting:i,tableMode:s,property:l,includeDescription:d,setValue:u,setFieldValue:m}){const g=l.of;if(g.dataType!=="reference")throw Error("ArrayOfReferencesField expected a property containing references");const f=l.expanded===void 0?!0:l.expanded,[b,h]=c.useState(!1),A=t&&Array.isArray(t)?t.map(I=>I.id):[];Pe({property:l,value:t,setValue:u});const y=ue(),k=c.useMemo(()=>g.path?y.getCollection(g.path):void 0,[g.path]);if(!k)throw Error(`Couldn't find the corresponding collection for the path: ${g.path}`);const v=c.useCallback(I=>{console.debug("onMultipleEntitiesSelected",I),u(I.map(F=>Ye(F)))},[u]),_=gt({multiselect:!0,path:g.path,collection:k,onMultipleEntitiesSelected:v,selectedEntityIds:A,forceFilter:g.forceFilter}),C=c.useCallback(I=>{I.preventDefault(),_.open()},[_]),E=c.useCallback((I,F)=>{const P=t&&t.length>I?t[I]:void 0;return P?r.jsx("div",{onMouseEnter:()=>h(!0),onMouseMove:()=>h(!0),onMouseLeave:()=>h(!1),children:r.jsx(Ve,{disabled:!g.path,previewProperties:g.previewProperties,size:"medium",onClick:C,reference:P,onHover:b})}):r.jsx("div",{children:"Internal ERROR"})},[g.path,g.previewProperties,b,t]),B=r.jsx(_e,{icon:Ae(l,"small"),required:l.validation?.required,title:l.name,className:"text-text-secondary dark:text-text-secondary-dark"}),x=r.jsxs(r.Fragment,{children:[!k&&r.jsx(ge,{error:"The specified collection does not exist. Check console"}),k&&r.jsxs(r.Fragment,{children:[r.jsx(rr,{value:t,addLabel:l.name?"Add reference to "+l.name:"Add reference",name:e,buildEntry:E,disabled:i,setFieldValue:m,newDefaultEntry:l.of.defaultValue}),r.jsxs(p.Button,{className:"my-4 justify-center text-left",variant:"outlined",color:"primary",disabled:i,onClick:C,children:["Edit ",l.name]})]})]});return r.jsxs(r.Fragment,{children:[!s&&r.jsx(p.ExpandablePanel,{className:"px-2 md:px-4 pb-2 md:pb-4 pt-1 md:pt-2",initiallyExpanded:f,title:B,children:x}),s&&x,r.jsx(ke,{includeDescription:d,showError:a,error:o,disabled:n,property:l})]})}function Xa({name:e,property:t,value:o,entity:a,onRemove:n,disabled:i,size:s}){return r.jsxs("div",{className:p.cn(p.paperMixin,"relative m-4 border-box flex items-center justify-center",s==="medium"?"min-w-[220px] min-h-[220px] max-w-[220px]":"min-w-[118px] min-h-[118px] max-w-[118px]"),children:[!i&&r.jsx("div",{className:"absolute rounded-full -top-2 -right-2 z-10 bg-white dark:bg-gray-900",children:r.jsx(p.Tooltip,{title:"Remove",children:r.jsx(p.IconButton,{size:"small",onClick:l=>{l.stopPropagation(),n(o)},children:r.jsx(p.RemoveIcon,{size:"small"})})})}),o&&r.jsx(oe,{children:r.jsx(ve,{propertyKey:e,value:o,property:t,size:s})})]})}const Ys="box-border relative pt-[2px] items-center border border-transparent min-h-[254px] outline-none rounded-md duration-200 ease-[cubic-bezier(0.4,0,0.2,1)] focus:border-primary-solid",js="border-dotted-gray",Ls="hover:bg-field-hover dark:hover:bg-field-hover-dark",Us="pt-0 border-2 border-solid",$s="transition-colors duration-200 ease-[cubic-bezier(0,0,0.2,1)] border-2 border-solid border-green-500",qs="transition-colors duration-200 ease-[cubic-bezier(0,0,0.2,1)] border-2 border-solid border-red-500";function oo({propertyKey:e,value:t,setValue:o,error:a,showError:n,autoFocus:i,tableMode:s,property:l,includeDescription:d,context:u,isSubmitting:m}){if(!u.entityId)throw new Error("StorageUploadFieldBinding: Entity id is null");const g=lt(),f=nt(l)||!!l.disabled||m,{internalValue:b,setInternalValue:h,onFilesAdded:A,storage:y,onFileUploadComplete:k,storagePathBuilder:v,multipleFilesSupported:_}=Ba({entityValues:u.values,entityId:u.entityId,path:u.path,property:l,propertyKey:e,value:t,storageSource:g,disabled:f,onChange:o});Pe({property:l,value:t,setValue:o});const C={id:u.entityId,values:u.values,path:u.path};return r.jsxs(r.Fragment,{children:[!s&&r.jsx(_e,{icon:Ae(l,"small"),required:l.validation?.required,title:l.name,className:"text-text-secondary dark:text-text-secondary-dark ml-3.5"}),r.jsx(Hs,{value:b,name:e,disabled:f,autoFocus:i,property:l,onChange:o,setInternalValue:h,onFilesAdded:A,entity:C,onFileUploadComplete:k,storagePathBuilder:v,storage:y,multipleFilesSupported:_}),r.jsx(ke,{includeDescription:d,showError:n,error:a,disabled:f,property:l})]})}function Ws({storage:e,disabled:t,isDraggingOver:o,onFilesAdded:a,multipleFilesSupported:n,droppableProvided:i,autoFocus:s,internalValue:l,property:d,entity:u,onClear:m,metadata:g,storagePathBuilder:f,onFileUploadComplete:b,size:h,name:A,helpText:y}){const k=Je(),{getRootProps:v,getInputProps:_,isDragActive:C,isDragAccept:E,isDragReject:B}=Co.useDropzone({accept:e.acceptedFiles?e.acceptedFiles.map(x=>({[x]:[]})).reduce((x,I)=>({...x,...I}),{}):void 0,disabled:t||o,noDragEventsBubbling:!0,maxSize:e.maxSize,onDrop:a,onDropRejected:(x,I)=>{for(const F of x)for(const P of F.errors)k.open({type:"error",message:`Error uploading file: File is larger than ${e.maxSize} bytes`})}});return r.jsxs("div",{...v(),className:p.cn(p.fieldBackgroundMixin,t?p.fieldBackgroundDisabledMixin:p.fieldBackgroundHoverMixin,Ys,n&&l.length?"":"flex",p.focusedMixin,{[Ls]:!C,[Us]:C,[qs]:B,[$s]:E,[js]:t}),children:[r.jsxs("div",{...i.droppableProps,ref:i.innerRef,className:p.cn("flex items-center p-1 no-scrollbar",n&&l.length?"overflow-auto":"",n&&l.length?"min-h-[180px]":"min-h-[250px]"),children:[r.jsx("input",{autoFocus:s,..._()}),l.map((x,I)=>{let F;return x.storagePathOrDownloadUrl?F=r.jsx(Xa,{name:`storage_preview_${x.storagePathOrDownloadUrl}`,property:d,disabled:t,entity:u,value:x.storagePathOrDownloadUrl,onRemove:m,size:x.size}):x.file&&(F=r.jsx(Na,{entry:x,metadata:g,storagePath:f(x.file),onFileUploadComplete:b,imageSize:h==="medium"?220:118,simple:!1})),r.jsx(at.Draggable,{draggableId:`array_field_${A}_${x.id}`,index:I,children:(P,N)=>r.jsx("div",{tabIndex:-1,ref:P.innerRef,...P.draggableProps,...P.dragHandleProps,className:p.cn(p.focusedMixin,"rounded-md"),style:{...P.draggableProps.style},children:F})},`array_field_${A}_${x.id}`)}),i.placeholder]}),r.jsx("div",{className:"flex-grow min-h-[38px] box-border m-2 text-center",children:r.jsx(p.Typography,{align:"center",variant:"label",children:y})})]})}function Hs({property:e,name:t,value:o,setInternalValue:a,onChange:n,multipleFilesSupported:i,onFileUploadComplete:s,disabled:l,onFilesAdded:d,autoFocus:u,storage:m,entity:g,storagePathBuilder:f}){if(i){const C=e;if(C.of){if(Array.isArray(C.of)||C.of.dataType!=="string")throw Error("Storage field using array must be of data type string")}else throw Error("Storage field using array must be of data type string")}const b=m?.metadata,h=i?"small":"medium",A=c.useCallback((C,E)=>{if(!i)return;const B=[...o],x=B[C];B.splice(C,1),B.splice(E,0,x),a(B);const I=B.filter(F=>!!F.storagePathOrDownloadUrl).map(F=>F.storagePathOrDownloadUrl);n(I)},[i,n,a,o]),y=c.useCallback(C=>{C.destination&&A(C.source.index,C.destination.index)},[A]),k=c.useCallback(C=>{if(i){const E=o.filter(B=>B.storagePathOrDownloadUrl!==C);n(E.filter(B=>!!B.storagePathOrDownloadUrl).map(B=>B.storagePathOrDownloadUrl)),a(E)}else n(null),a([])},[o,i,n]),v=i?"Drag 'n' drop some files here, or click to select files":"Drag 'n' drop a file here, or click to select one",_=i?e.of:e;return r.jsx(at.DragDropContext,{onDragEnd:y,children:r.jsx(at.Droppable,{droppableId:`droppable_${t}`,direction:"horizontal",renderClone:(C,E,B)=>{const x=o[B.source.index];return r.jsx("div",{ref:C.innerRef,...C.draggableProps,...C.dragHandleProps,style:C.draggableProps.style,className:"rounded",children:r.jsx(Xa,{name:`storage_preview_${x.storagePathOrDownloadUrl}`,property:_,disabled:!0,entity:g,value:x.storagePathOrDownloadUrl,onRemove:k,size:x.size})})},children:(C,E)=>r.jsx(Ws,{storage:m,disabled:l,isDraggingOver:E.isDraggingOver,droppableProvided:C,onFilesAdded:d,multipleFilesSupported:i,autoFocus:u,internalValue:o,property:_,entity:g,onClear:k,metadata:b,storagePathBuilder:f,onFileUploadComplete:s,size:h,name:t,helpText:v})})})}function ft({propertyKey:e,value:t,setValue:o,error:a,showError:n,disabled:i,autoFocus:s,property:l,includeDescription:d}){let u,m;l.dataType==="string"&&(u=l.multiline,m=l.url),Pe({property:l,value:t,setValue:o});const g=c.useCallback(A=>{A.stopPropagation(),A.preventDefault(),o(null)},[o]),f=A=>{if(h==="number"){const y=A.target.value?parseFloat(A.target.value):void 0;y&&isNaN(y)?o(null):y!=null?o(y):o(null)}else o(A.target.value)},b=!!u,h=l.dataType==="number"?"number":void 0;return r.jsxs(r.Fragment,{children:[r.jsx(p.TextField,{value:t,onChange:f,autoFocus:s,label:r.jsx(_e,{icon:Ae(l,"small"),required:l.validation?.required,title:l.name}),type:h,multiline:b,disabled:i,endAdornment:l.clearable&&r.jsx(p.IconButton,{onClick:g,children:r.jsx(p.ClearIcon,{})}),error:n?a:void 0,inputClassName:a?"text-red-500 dark:text-red-600":""}),r.jsx(ke,{includeDescription:d,showError:n,error:a,disabled:i,property:l}),m&&r.jsx(p.Collapse,{className:"mt-1 ml-1",in:!!t,children:r.jsx(ve,{value:t,property:l,size:"medium"})})]})}const Ka=c.forwardRef(function({propertyKey:t,value:o,setValue:a,error:n,showError:i,autoFocus:s,disabled:l,touched:d,property:u,includeDescription:m},g){return Pe({property:u,value:o,setValue:a}),r.jsxs(r.Fragment,{children:[r.jsx(p.BooleanSwitchWithLabel,{value:o,onValueChange:f=>a(f),error:i,label:r.jsx(_e,{icon:Ae(u,"small"),required:u.validation?.required,title:u.name}),disabled:l,autoFocus:s,size:"medium"}),r.jsx(ke,{includeDescription:m,showError:i,error:n,disabled:l,property:u})]})});function Ra({propertyKey:e,value:t,setValue:o,autoFocus:a,error:n,showError:i,disabled:s,touched:l,property:d,includeDescription:u}){const{locale:m}=re(),g=t||null;return Pe({property:d,value:t,setValue:o}),r.jsxs(r.Fragment,{children:[r.jsx(p.DateTimeField,{value:g,onChange:f=>o(f),size:"medium",mode:d.mode,clearable:d.clearable,locale:m,error:i,label:r.jsx(_e,{icon:Ae(d,"small"),required:d.validation?.required,className:i?"text-red-500 dark:text-red-500":"text-text-secondary dark:text-text-secondary-dark",title:d.name})}),r.jsx(ke,{includeDescription:u,showError:i,error:n,disabled:s,property:d})]})}function ao({propertyKey:e,value:t,error:o,showError:a,tableMode:n,property:i,includeDescription:s,context:l}){if(!l.entityId)throw new Error("ReadOnlyFieldBinding: Entity id is null");return l.entityId,l.values,l.path,r.jsxs(r.Fragment,{children:[!n&&r.jsx(_e,{icon:Ae(i,"small"),required:i.validation?.required,title:i.name,className:"text-text-secondary dark:text-text-secondary-dark ml-3.5"}),r.jsx("div",{className:p.cn(p.paperMixin,"min-h-14 p-4 md:p-6 overflow-x-scroll no-scrollbar"),children:r.jsx(oe,{children:r.jsx(ve,{propertyKey:e,value:t,property:i,size:"medium"})})}),r.jsx(ke,{includeDescription:s,showError:a,error:o,property:i})]})}function en(e){return typeof e.property.path!="string"?r.jsx(ao,{...e}):r.jsx(Js,{...e})}function Js({value:e,setValue:t,error:o,showError:a,isSubmitting:n,disabled:i,touched:s,autoFocus:l,property:d,includeDescription:u,context:m}){if(!d.path)throw new Error("Property path is required for ReferenceFieldBinding");Pe({property:d,value:e,setValue:t});const g=e&&e.isEntityReference&&e.isEntityReference(),f=ue(),b=c.useMemo(()=>d.path?f.getCollection(d.path):void 0,[d.path]);if(!b)throw Error(`Couldn't find the corresponding collection for the path: ${d.path}`);const h=c.useCallback(k=>{t(k?Ye(k):null)},[t]),A=gt({multiselect:!1,path:d.path,collection:b,onSingleEntitySelected:h,selectedEntityIds:g?[e.id]:void 0,forceFilter:d.forceFilter}),y=c.useCallback(k=>{k.preventDefault(),A.open()},[A]);return r.jsxs(r.Fragment,{children:[r.jsx(_e,{icon:Ae(d,"small"),required:d.validation?.required,title:d.name,className:"text-text-secondary dark:text-text-secondary-dark ml-3.5"}),!b&&r.jsx(ge,{error:"The specified collection does not exist. Check console"}),b&&r.jsxs(r.Fragment,{children:[e&&r.jsx(Ve,{disabled:!d.path,previewProperties:d.previewProperties,size:"medium",onClick:i||n?void 0:y,reference:e}),!e&&r.jsx("div",{className:"justify-center text-left",children:r.jsxs(p.Button,{variant:"outlined",color:"primary",disabled:i||n,onClick:y,children:["Edit ",d.name]})})]}),r.jsx(ke,{includeDescription:u,showError:a,error:o,disabled:i,property:d})]})}const tt=c.memo(Zs,(e,t)=>{if(e.propertyKey!==t.propertyKey)return!1;const o=we(e.property)||e.property.fromBuilder,a=we(t.property)||t.property.fromBuilder;return!((o===a||$(e.property,t.property))&&e.disabled===t.disabled)||no(t.property),!1});function Zs({propertyKey:e,property:t,context:o,includeDescription:a,underlyingValueHasChanged:n,disabled:i,tableMode:s,partOfArray:l,partOfBlock:d,autoFocus:u}){const m=re();return r.jsx(ye.Field,{name:e,children:g=>{let f;const b=Fe({propertyKey:e,propertyValue:g.field.value,propertyOrBuilder:t,values:g.form.values,path:o.path,entityId:o.entityId,fields:m.propertyConfigs});if(b===null||yt(b))return r.jsx(r.Fragment,{});if(nt(b))f=ao;else if(b.Field)typeof b.Field=="function"&&(f=b.Field);else{const A=lr(b,m.propertyConfigs);if(!A)throw console.log("INTERNAL: Could not find field config for property",{propertyKey:e,resolvedProperty:b,fields:m.propertyConfigs,propertyConfig:A}),new Error(`INTERNAL: Could not find field config for property ${e}`);f=Fe({propertyOrBuilder:A.property,propertyValue:g.field.value,values:g.form.values,path:o.path,entityId:o.entityId,fields:m.propertyConfigs}).Field}if(!f)return console.warn(`No field component found for property ${e}`),console.warn("Property:",t),r.jsx("div",{children:`Currently the field ${b.dataType} is not supported`});const h={propertyKey:e,property:b,includeDescription:a,underlyingValueHasChanged:n,context:o,disabled:i,tableMode:s,partOfArray:l,partOfBlock:d,autoFocus:u};return r.jsx(Xs,{Component:f,componentProps:h,fieldProps:g})}})}function Xs({Component:e,componentProps:{propertyKey:t,property:o,includeDescription:a,underlyingValueHasChanged:n,tableMode:i,partOfArray:s,partOfBlock:l,autoFocus:d,context:u,disabled:m},fieldProps:g}){const{plugins:f}=re(),b=o.customProps,h=g.field.value,A=ye.getIn(g.form.errors,t),y=ye.getIn(g.form.touched,t),k=A&&(g.form.submitCount>0||o.validation?.unique)&&(!Array.isArray(A)||!!A.filter(I=>!!I).length),_=Ks(u.path,u.collection,t,o,e,f)??e,C=g.form.isSubmitting,E=c.useCallback((I,F)=>{g.form.setFieldTouched(t,!0,!1),g.form.setFieldValue(t,I,F)},[]),B=c.useCallback((I,F,P)=>{g.form.setFieldTouched(t,!0,!1),g.form.setFieldValue(I,F,P)},[]),x={propertyKey:t,value:h,setValue:E,setFieldValue:B,error:A,touched:y,showError:k,isSubmitting:C,includeDescription:a??!0,property:o,disabled:m??!1,underlyingValueHasChanged:n??!1,tableMode:i??!1,partOfArray:s??!1,partOfBlock:l??!1,autoFocus:d??!1,customProps:b,context:u};return r.jsxs(oe,{children:[r.jsx(_,{...x}),n&&!C&&r.jsx(p.Typography,{variant:"caption",className:"ml-3.5",children:"This value has been updated elsewhere"})]})}const no=(e,t)=>{if(t?.some(n=>n.form?.fieldBuilder)||we(e))return!0;const o=e,a=!!o.Field||"fromBuilder"in o&&o.fromBuilder;return o.dataType==="map"&&o.properties?a||Object.values(o.properties).some(n=>no(n,t)):o.dataType==="array"&&"resolvedProperties"in o?a||o.resolvedProperties?.some(n=>n&&no(n,t)):a};function Ks(e,t,o,a,n,i){return c.useRef((()=>{let l=null;return i&&i.forEach(d=>{const u=bo(a);if(u&&d.form?.fieldBuilder){const m={fieldConfigId:u,propertyKey:o,property:a,Field:n,plugin:d,path:e,collection:t},g=d.form?.fieldBuilderEnabled?.(m);(g===void 0||g)&&(l=d.form.fieldBuilder(m)||l)}u||console.warn("INTERNAL: Field id not found for property",a)}),l})()).current}function tn({propertyKey:e,value:t,showError:o,error:a,disabled:n,property:i,setValue:s,partOfBlock:l,tableMode:d,includeDescription:u,underlyingValueHasChanged:m,autoFocus:g,context:f}){const b=i.pickOnlySomeKeys||!1,h=(i.expanded===void 0?!0:i.expanded)||g;if(!i.properties)throw Error(`You need to specify a 'properties' prop (or specify a custom field) in your map property ${e}`);let A;b?t?A=No(i.properties,...Object.keys(t).filter(v=>v in i.properties)):A={}:A=i.properties;const y=r.jsx(r.Fragment,{children:r.jsx("div",{className:"py-1 flex flex-col space-y-2",children:Object.entries(A).filter(([v,_])=>!yt(_)).map(([v,_],C)=>{const E={propertyKey:`${e}.${v}`,disabled:n,property:_,includeDescription:u,underlyingValueHasChanged:m,context:f,tableMode:!1,partOfArray:!1,partOfBlock:!1,autoFocus:g&&C===0};return r.jsx("div",{children:r.jsx(oe,{children:r.jsx(tt,{...E})})},`map-${e}-${C}`)})})}),k=r.jsx(_e,{icon:Ae(i,"small"),required:i.validation?.required,title:i.name,className:"text-text-secondary dark:text-text-secondary-dark"});return r.jsxs(oe,{children:[!d&&!l&&r.jsx(p.ExpandablePanel,{initiallyExpanded:h,className:"px-2 md:px-4 pb-2 md:pb-4 pt-1 md:pt-2 bg-slate-50 bg-opacity-50 dark:bg-gray-900",title:k,children:y}),(d||l)&&y,r.jsx(ke,{includeDescription:u,showError:o,error:a?typeof a=="string"?a:"A property of this map has an error":void 0,disabled:n,property:i})]})}function rn({propertyKey:e,value:t,showError:o,error:a,disabled:n,property:i,setValue:s,tableMode:l,includeDescription:d,underlyingValueHasChanged:u,autoFocus:m,context:g}){const f=(i.expanded===void 0?!0:i.expanded)||m;if(!i.keyValue)throw Error(`Your property ${e} needs to have the 'keyValue' prop in order to use this field binding`);const b=r.jsx(io,{value:t,setValue:s,disabled:n,fieldName:i.name??e}),h=r.jsx(_e,{icon:Ae(i,"small"),required:i.validation?.required,title:i.name,className:"text-text-secondary dark:text-text-secondary-dark"});return r.jsxs(r.Fragment,{children:[!l&&r.jsx(p.ExpandablePanel,{initiallyExpanded:f,title:h,className:"px-2 md:px-4 pb-2 md:pb-4 pt-1 md:pt-2",children:b}),l&&b,r.jsx(ke,{includeDescription:d,showError:o,error:a,disabled:n,property:i})]})}function io({value:e,setValue:t,fieldName:o,disabled:a}){const[n,i]=c.useState(Object.keys(e??{}).map(d=>[so(),{key:d,dataType:lo(e?.[d])??"string"}]));c.useEffect(()=>{const d=n.map(([b,{key:h}])=>h),u=Object.entries(e??{}).filter(([b,h])=>h!==void 0).map(([b])=>b),m=u.filter(b=>!d.includes(b)),g=d.filter(b=>!u.includes(b)),f=[...n];m.forEach(b=>{f.push([so(),{key:b,dataType:lo(e?.[b])??"string"}])}),g.forEach(b=>{const h=f.findIndex(([A,{key:y}])=>y===b);f.splice(h,1)}),i(f)},[e]);const s=c.useRef(e??{}),l=(d,u)=>{if(!d){console.warn("No key selected for data type update");return}i(n.map(m=>m[0]===d?[m[0],{key:m[1].key,dataType:u}]:m)),t({...e??{},[n.find(m=>m[0]===d)?.[1].key??""]:br(u)})};return r.jsxs("div",{className:"py-1 flex flex-col gap-1",children:[n.map(([d,{key:u,dataType:m}],g)=>{const f=u?e?.[u]:"",b=h=>{if(i(n.map(y=>y[0]===d?[d,{key:h??"",dataType:y[1].dataType}]:y)),typeof e=="object"&&h in e)return;const A={...e??{}};typeof s.current=="object"&&u in s.current?A[u]=void 0:delete A[u],t({...A,[h??""]:f})};return r.jsx(Rs,{rowId:d,fieldKey:u,value:e??{},onDeleteClick:()=>{const h={...e??{}};s.current&&u in s.current?h[u]=void 0:delete h[u],i(n.filter(A=>A[0]!==d)),t({...h})},onFieldKeyChange:b,setValue:t,entryValue:f,dataType:m,disabled:a,updateDataType:l},d)}),r.jsx(p.Button,{variant:"text",size:"small",color:"primary",className:"w-full",disabled:a,startIcon:r.jsx(p.AddIcon,{}),onClick:d=>{d.preventDefault(),t({...e??{},"":null}),i([...n,[so(),{key:"",dataType:"string"}]])},children:o?`Add to ${o}`:"Add"})]})}function Rs({rowId:e,fieldKey:t,value:o,onFieldKeyChange:a,onDeleteClick:n,setValue:i,entryValue:s,dataType:l,updateDataType:d,disabled:u}){const{locale:m}=re();function g(b,h,A){return A==="string"||A==="number"?r.jsx(p.TextField,{placeholder:"value",value:b,type:A==="number"?"number":"text",size:"small",disabled:u||!h,onChange:y=>{if(A==="number"){const k=y.target.value?parseFloat(y.target.value):void 0;k&&isNaN(k)?i({...o,[h]:null}):k!=null?i({...o,[h]:k}):i({...o,[h]:null})}else i({...o,[h]:y.target.value})}},A):A==="date"?r.jsx(p.DateTimeField,{value:b,size:"small",locale:m,disabled:u||!h,onChange:y=>{i({...o,[h]:y})}}):A==="boolean"?r.jsx(p.BooleanSwitchWithLabel,{value:b,size:"small",position:"start",disabled:u||!h,onValueChange:y=>{i({...o,[h]:y})}}):A==="array"?r.jsx("div",{className:p.cn(p.defaultBorderMixin,"ml-2 pl-2 border-l border-solid"),children:r.jsx(fo,{value:b,newDefaultEntry:"",droppableId:e.toString(),addLabel:h?`Add to ${h}`:"Add",size:"small",disabled:u||!h,includeAddButton:!0,onValueChange:y=>{i({...o,[h]:y})},buildEntry:(y,k)=>r.jsx(el,{index:y,id:k,value:b[y],disabled:u||!h,setValue:v=>{const _=[...b];_[y]=v,i({...o,[h]:_})}})})}):A==="map"?r.jsx("div",{className:p.cn(p.defaultBorderMixin,"ml-2 pl-2 border-l border-solid"),children:r.jsx(io,{value:b,fieldName:h,setValue:y=>{i({...o,[h]:y})}})}):r.jsx(p.Typography,{variant:"caption",children:`Data type ${A} not supported yet`})}function f(b){d(e,b)}return r.jsxs(r.Fragment,{children:[r.jsxs(p.Typography,{component:"div",className:"font-mono flex flex-row gap-1",children:[r.jsx("div",{className:"w-[200px] max-w-[25%]",children:r.jsx(p.TextField,{value:t,placeholder:"key",disabled:u||s!=null&&s!=="",size:"small",onChange:b=>{a(b.target.value)}})}),r.jsx("div",{className:"flex-grow",children:l!=="map"&&l!=="array"&&g(s,t,l)}),r.jsxs(p.Menu,{trigger:r.jsx(p.IconButton,{size:"small",className:"h-7 w-7",children:r.jsx(p.ArrowDropDownIcon,{})}),children:[r.jsx(p.MenuItem,{dense:!0,onClick:()=>f("string"),children:"string"}),r.jsx(p.MenuItem,{dense:!0,onClick:()=>f("number"),children:"number"}),r.jsx(p.MenuItem,{dense:!0,onClick:()=>f("boolean"),children:"boolean"}),r.jsx(p.MenuItem,{dense:!0,onClick:()=>f("date"),children:"date"}),r.jsx(p.MenuItem,{dense:!0,onClick:()=>f("map"),children:"map"}),r.jsx(p.MenuItem,{dense:!0,onClick:()=>f("array"),children:"array"})]}),r.jsx(p.IconButton,{"aria-label":"delete",size:"small",onClick:n,className:"h-7 w-7",children:r.jsx(p.RemoveIcon,{size:"small"})})]},e.toString()),(l==="map"||l==="array")&&g(s,t,l)]})}function el({id:e,index:t,value:o,setValue:a}){const{locale:n}=re(),[i,s]=c.useState(lo(o)??"string");function l(u){s(u)}function d(u,m){return m==="string"||m==="number"?r.jsx(p.TextField,{value:u,type:m==="number"?"number":"text",size:"small",onChange:g=>{if(m==="number"){const f=g.target.value?parseFloat(g.target.value):void 0;f&&isNaN(f)?a(null):f!=null?a(f):a(null)}else a(g.target.value)}}):m==="date"?r.jsx(p.DateTimeField,{value:u,size:"small",locale:n,onChange:g=>{a(g)}}):m==="boolean"?r.jsx(p.BooleanSwitchWithLabel,{value:u,size:"small",position:"start",onValueChange:g=>{a(g)}}):m==="array"?r.jsx(p.Typography,{variant:"caption",children:"Arrays of arrays are not supported."}):m==="map"?r.jsx("div",{className:p.cn(p.defaultBorderMixin,"ml-2 pl-2 border-l border-solid"),children:r.jsx(io,{value:u,setValue:g=>{a(g)}})}):r.jsx(p.Typography,{variant:"caption",children:`Data type ${m} not supported yet`})}return r.jsxs(r.Fragment,{children:[r.jsxs(p.Typography,{component:"div",className:"font-mono flex min-h-12 flex-row gap-1 items-center",children:[r.jsx("div",{className:"flex-grow",children:i!=="map"&&d(o,i)}),r.jsxs(p.Menu,{trigger:r.jsx(p.IconButton,{size:"small",className:"h-7 w-7",children:r.jsx(p.ArrowDropDownIcon,{})}),children:[r.jsx(p.MenuItem,{dense:!0,onClick:()=>l("string"),children:"string"}),r.jsx(p.MenuItem,{dense:!0,onClick:()=>l("number"),children:"number"}),r.jsx(p.MenuItem,{dense:!0,onClick:()=>l("boolean"),children:"boolean"}),r.jsx(p.MenuItem,{dense:!0,onClick:()=>l("map"),children:"map"}),r.jsx(p.MenuItem,{dense:!0,onClick:()=>l("date"),children:"date"})]})]},e.toString()),i==="map"&&d(o,i)]})}function so(){return Math.floor(Math.random()*Math.floor(Number.MAX_SAFE_INTEGER))}function lo(e){if(typeof e=="string"||e===null)return"string";if(typeof e=="number")return"number";if(typeof e=="boolean")return"boolean";if(Array.isArray(e))return"array";if(e instanceof Date)return"date";if(e.isEntityReference&&e.isEntityReference())return"reference";if(e instanceof Qt)return"geopoint";if(typeof e=="object")return"map"}function on({propertyKey:e,value:t,error:o,showError:a,isSubmitting:n,setValue:i,setFieldValue:s,tableMode:l,property:d,includeDescription:u,underlyingValueHasChanged:m,context:g,disabled:f}){if(!d.of)throw Error("RepeatFieldBinding misconfiguration. Property `of` not set");if(!d.resolvedProperties||!Array.isArray(d.resolvedProperties))throw Error("RepeatFieldBinding - Internal error: Expected array in 'property.resolvedProperties'");const b=d.expanded===void 0?!0:d.expanded,h=d.of,[A,y]=c.useState();Pe({property:d,value:t,setValue:i});const k=(C,E)=>{const B=d.resolvedProperties[C]??h,x={propertyKey:`${e}.${C}`,disabled:f,property:B,includeDescription:u,underlyingValueHasChanged:m,context:g,tableMode:!1,partOfArray:!0,partOfBlock:!1,autoFocus:E===A};return r.jsx(oe,{children:r.jsx(tt,{...x})})},v=r.jsx(rr,{value:t,addLabel:d.name?"Add entry to "+d.name:"Add entry",name:e,setFieldValue:s,buildEntry:k,onInternalIdAdded:y,disabled:n||!!d.disabled,includeAddButton:!d.disabled,newDefaultEntry:d.of.defaultValue}),_=r.jsx(_e,{icon:Ae(d,"small"),required:d.validation?.required,title:d.name,className:"text-text-secondary dark:text-text-secondary-dark"});return r.jsxs(r.Fragment,{children:[!l&&r.jsx(p.ExpandablePanel,{initiallyExpanded:b,className:"px-2 md:px-4 pb-2 md:pb-4 pt-1 md:pt-2",title:_,children:v}),l&&v,r.jsx(ke,{includeDescription:u,showError:a,error:o,disabled:f,property:d})]})}function an({propertyKey:e,value:t,error:o,showError:a,isSubmitting:n,setValue:i,setFieldValue:s,tableMode:l,property:d,includeDescription:u,underlyingValueHasChanged:m,context:g,disabled:f}){if(!d.oneOf)throw Error("ArrayOneOfField misconfiguration. Property `oneOf` not set");const b=d.expanded===void 0?!0:d.expanded;Pe({property:d,value:t,setValue:i});const[h,A]=c.useState(),y=c.useCallback((C,E)=>r.jsx(tl,{name:`${e}.${C}`,index:C,value:t[C],typeField:d.oneOf.typeField??bt,valueField:d.oneOf.valueField??Mt,properties:d.oneOf.properties,autoFocus:E===h,context:g},`array_one_of_${C}`),[g,h,d.oneOf,e,t]),k=r.jsx(_e,{icon:Ae(d,"small"),required:d.validation?.required,title:d.name,className:"text-text-secondary dark:text-text-secondary-dark"}),v=Object.keys(d.oneOf.properties)[0],_=r.jsx(rr,{value:t,name:e,addLabel:d.name?"Add entry to "+d.name:"Add entry",buildEntry:y,onInternalIdAdded:A,disabled:n||!!d.disabled,includeAddButton:!d.disabled,setFieldValue:s,newDefaultEntry:{[d.oneOf.typeField??bt]:v,[d.oneOf.valueField??Mt]:Ot(d.oneOf.properties[v])}});return r.jsxs(r.Fragment,{children:[!l&&r.jsx(p.ExpandablePanel,{className:"px-2 md:px-4 pb-2 md:pb-4 pt-1 md:pt-2",initiallyExpanded:b,title:k,children:_}),l&&_,r.jsx(ke,{includeDescription:u,showError:a,error:o,disabled:f,property:d})]})}function tl({name:e,index:t,value:o,typeField:a,valueField:n,properties:i,autoFocus:s,context:l}){const d=o&&o[a],[u,m]=c.useState(d??void 0),g=ye.useFormex();c.useEffect(()=>{d||k(Object.keys(i)[0])},[]),c.useEffect(()=>{d!==u&&m(d)},[d]);const f=u?i[u]:void 0,b=Object.entries(i).map(([v,_])=>({id:v,label:_.name??v})),h=`${e}.${a}`,A=`${e}.${n}`,y=f?{propertyKey:A,property:f,context:l,autoFocus:s,partOfArray:!1,partOfBlock:!0,tableMode:!1}:void 0,k=v=>{const _=v?i[v]:void 0;m(v),g.setFieldTouched(h,!0),g.setFieldValue(h,v),g.setFieldValue(A,_?Ot(_):null)};return r.jsxs("div",{className:p.cn(p.paperMixin,"bg-transparent p-4 my-4 py-8"),children:[r.jsx(ye.Field,{name:h,children:v=>{const _=v.field.value!==void 0&&v.field.value!==null?v.field.value:"";return r.jsx(r.Fragment,{children:r.jsx(p.Select,{className:"mb-2",placeholder:r.jsx(p.Typography,{variant:"caption",className:"px-4 py-2 font-medium",children:"Type"}),size:"small",position:"item-aligned",value:_,renderValue:C=>r.jsx(Be,{enumKey:C,enumValues:b,size:"small"}),onValueChange:C=>{k(C)},children:b.map(C=>r.jsx(p.SelectItem,{value:String(C.id),children:r.jsx(Be,{enumKey:C.id,enumValues:b,size:"small"})},C.id))})})}}),y&&r.jsx(tt,{...y},`form_control_${e}_${u}`)]})}const rl=new Mn;try{Xe.use(Xe.Plugins.AutoResize,{min:100}),Xe.unuse(Xe.Plugins.FontUnderline),Xe.unuse(Xe.Plugins.Clear)}catch{}function nn({propertyKey:e,value:t,setValue:o,error:a,showError:n,disabled:i,autoFocus:s,touched:l,property:d,tableMode:u,includeDescription:m,context:g}){const[f,b]=c.useState(t),h=c.useRef(t);p.useInjectStyles("MarkdownFieldBinding",ol);const A=c.useDeferredValue({internalValue:f,value:t});return c.useEffect(()=>{h.current=t,b(t)},[t]),c.useEffect(()=>{A.internalValue!==h.current&&o(A.internalValue)},[A]),r.jsxs(r.Fragment,{children:[!u&&r.jsx(p.Typography,{variant:"caption",className:"flex-grow",children:r.jsx(_e,{icon:Ae(d,"small"),required:d.validation?.required,title:d.name,className:"text-text-secondary dark:text-text-secondary-dark ml-3.5"})}),r.jsx(Xe,{value:f??"",className:p.cn(p.fieldBackgroundMixin,i?p.fieldBackgroundDisabledMixin:p.fieldBackgroundHoverMixin,"text-base"),readOnly:i,renderHTML:y=>rl.render(y),view:{menu:!0,md:!0,html:!1},onChange:({html:y,text:k})=>{b(k??null)}}),r.jsx(ke,{includeDescription:m,showError:n,error:a,disabled:i,property:d})]})}const ol=`
3
+ `)?r.jsx("div",{className:p.cn("overflow-x-scroll",a==="tiny"?"text-sm":""),children:n.map((i,s)=>r.jsxs(d.Fragment,{children:[r.jsx("span",{children:i}),s!==n.length-1&&r.jsx("br",{})]},`string_preview_${s}`))}):a==="tiny"?r.jsx("span",{className:"text-sm",children:t}):r.jsx(r.Fragment,{children:t})}}}function jr({propertyKey:e,value:t,property:o,size:a}){const n=te(),i=qe({propertyKey:e,property:o,propertyValue:t,fields:n.propertyConfigs});if(!i.of)throw Error(`You need to specify an 'of' prop (or specify a custom field) in your array property ${e}`);if(i.dataType!=="array")throw Error("Picked wrong preview component ArrayPreview");const s=t;if(!s)return null;const c=a==="medium"?"small":"tiny";return r.jsx("div",{className:"flex flex-col gap-2",children:s&&s.map((l,u)=>{const m=i.resolvedProperties[u]??i.resolvedProperties[u]??(Array.isArray(i.of)?i.of[u]:i.of);return m?r.jsx(d.Fragment,{children:r.jsx("div",{className:p.cn(p.defaultBorderMixin,"m-1 border-b last:border-b-0"),children:r.jsx(re,{children:r.jsx(ye,{propertyKey:e,value:l,property:m,size:c})})})},"preview_array_"+u):null})})}function Jn({actions:e,disabled:t,hover:o,collection:a,previewProperties:n,onClick:i,size:s,includeEntityNavigation:c,entity:l}){const u=pt(),m=We(),h=te(),f=ue(),A=a??f.getCollection(l.path);if(!A)throw Error(`Couldn't find the corresponding collection view for the path: ${l.path}`);const g=it.useMemo(()=>Pe({collection:A,path:l.path,values:l.values,fields:h.propertyConfigs}),[A]),b=d.useMemo(()=>qo(g,h.propertyConfigs,n,s==="small"||s==="medium"?3:1),[n,g,s]),y=Nr(g,h.propertyConfigs),k=$o(g),v=k?g.properties[k]:void 0,_=b.filter(E=>E!==y&&E!==k);return r.jsxs(mt,{onClick:t?void 0:i,hover:t?void 0:o,size:s,children:[v&&r.jsx("div",{className:p.cn("w-10 h-10 mr-2 shrink-0 grow-0",s==="tiny"?"my-0.5":"m-2 self-start"),children:r.jsx(ye,{property:v,propertyKey:k,size:"tiny",value:Oe(l.values,k)})}),r.jsxs("div",{className:"flex flex-col flex-grow w-full m-1",children:[s!=="tiny"&&(l?r.jsx("div",{className:`${s!=="medium"?"block whitespace-nowrap overflow-hidden truncate":""}`,children:r.jsx(p.Typography,{variant:"caption",color:"disabled",className:"font-mono",children:l.id})}):r.jsx(p.Skeleton,{})),y&&r.jsx("div",{className:"my-0.5 text-sm font-medium",children:l?r.jsx(ye,{propertyKey:y,value:Oe(l.values,y),property:g.properties[y],size:"medium"}):r.jsx(Re,{property:g.properties[y],size:"medium"})}),_&&_.map(E=>{const C=g.properties[E];return C?r.jsx("div",{className:_.length>1?"my-0.5":"my-0",children:l?r.jsx(ye,{propertyKey:E,value:Oe(l.values,E),property:C,size:"tiny"}):r.jsx(Re,{property:C,size:"tiny"})},"ref_prev_"+E):null})]}),l&&c&&r.jsx(p.Tooltip,{title:`See details for ${l.id}`,className:s!=="tiny"?"self-start":"",children:r.jsx(p.IconButton,{color:"inherit",size:"small",onClick:E=>{E.stopPropagation(),u.onAnalyticsEvent?.("entity_click_from_reference",{path:l.path,entityId:l.id}),m.open({entityId:l.id,path:l.path,collection:A,updateUrl:!0})},children:r.jsx(p.KeyboardTabIcon,{size:"small"})})}),e]})}const wa=it.forwardRef(({children:e,hover:t,onClick:o,size:a,style:n,className:i,...s},c)=>r.jsx("div",{ref:c,style:{...n,tabindex:0},className:p.cn("bg-white dark:bg-gray-900","items-center",t?"hover:bg-slate-50 dark:hover:bg-gray-800 group-hover:bg-slate-50 dark:group-hover:bg-gray-800":"",a==="tiny"?"p-1":"p-2","flex border rounded-lg",o?"cursor-pointer":"",p.defaultBorderMixin,i),onClick:l=>{o&&(l.preventDefault(),o(l))},...s,children:e}));wa.displayName="EntityPreviewContainer";const mt=it.memo(wa),Ve=it.memo(function(t){const o=t.reference;return typeof o=="object"&&"isEntityReference"in o&&o.isEntityReference()?r.jsx(Zn,{...t}):(console.warn("Reference preview received value of type",typeof o),r.jsx(mt,{onClick:t.onClick,size:t.size,children:r.jsx(be,{error:"Unexpected value. Click to edit",tooltip:JSON.stringify(o)})}))},Hn);function Hn(e,t){return e.disabled===t.disabled&&e.size===t.size&&e.hover===t.hover&&e.reference?.id===t.reference?.id&&e.reference?.path===t.reference?.path&&e.allowEntityNavigation===t.allowEntityNavigation}function Zn({disabled:e,reference:t,previewProperties:o,size:a,hover:n,onClick:i,allowEntityNavigation:s=!0}){const c=te(),u=ue().getCollection(t.path);if(!u){if(c.components?.missingReference)return r.jsx(c.components.missingReference,{path:t.path});throw Error(`Couldn't find the corresponding collection view for the path: ${t.path}`)}return r.jsx(Xn,{reference:t,collection:u,previewProperties:o,size:a,disabled:e,allowEntityNavigation:s,onClick:i,hover:n})}function Xn({reference:e,collection:t,previewProperties:o,size:a,disabled:n,allowEntityNavigation:i,onClick:s,hover:c}){const{entity:l,dataLoading:u,dataLoadingError:m}=Dr({path:e.path,entityId:e.id,collection:t,useCache:!0});l&&va.set(e.pathWithId,l);const h=l??va.get(e.pathWithId);let f;return e?h&&!h.values&&(f=r.jsx(be,{error:"Reference does not exist",tooltip:e.path})):f=r.jsx(be,{error:"Reference not set"}),f?r.jsx(mt,{onClick:n?void 0:s,hover:n?void 0:c,size:a,children:f}):u&&!h?r.jsx(mt,{onClick:n?void 0:s,hover:n?void 0:c,size:a,children:r.jsx(p.Skeleton,{})}):h?r.jsx(Jn,{size:a,previewProperties:o,disabled:n,entity:h,collection:t,onClick:s,includeEntityNavigation:i,hover:c}):r.jsx(mt,{onClick:n?void 0:s,hover:n?void 0:c,size:a,children:r.jsx(be,{error:"Entity not found"})})}const va=new Map;function ka({propertyKey:e,value:t,property:o,size:a}){const n=te(),i=qe({propertyKey:e,property:o,propertyValue:t,fields:n.propertyConfigs});if(Array.isArray(i?.of))throw Error("Using array properties instead of single one in `of` in ArrayProperty");if(i?.dataType!=="array"||!i.of||i.of.dataType!=="reference")throw Error("Picked wrong preview component ArrayOfReferencesPreview");const s=a==="medium"?"small":"tiny";return r.jsx("div",{className:"flex flex-col w-full",children:t&&t.map((c,l)=>{const u=i.of;return r.jsx("div",{className:"mt-1 mb-1 w-full",children:r.jsx(Ve,{disabled:!u.path,previewProperties:u.previewProperties,size:s,reference:c})},`preview_array_ref_${e}_${l}`)})})}function _a({propertyKey:e,value:t,property:o,size:a}){const n=te(),i=qe({propertyKey:e,property:o,propertyValue:t,fields:n.propertyConfigs});if(Array.isArray(i.of))throw Error("Using array properties instead of single one in `of` in ArrayProperty");if(i.dataType!=="array"||!i.of||i.of.dataType!=="string")throw Error("Picked wrong preview component ArrayOfStorageComponentsPreview");const s=a==="medium"?"small":"tiny";return r.jsx("div",{className:"flex flex-wrap gap-2",children:t&&t.map((c,l)=>r.jsx(re,{children:r.jsx(ye,{propertyKey:e,value:c,property:i.of,size:s})},`preview_array_storage_${e}_${l}`))})}function Lr({name:e,value:t,enumValues:o,size:a}){return r.jsx("div",{className:"flex flex-wrap gap-1.5",children:t&&t.map((n,i)=>r.jsx(re,{children:r.jsx(Se,{enumKey:n,enumValues:o,size:a!=="medium"?"small":"medium"})},`preview_array_ref_${e}_${i}`))})}function Ur({propertyKey:e,value:t,property:o,size:a}){if(o.dataType!=="array")throw Error("Picked wrong preview component ArrayEnumPreview");const n=o.of;if(!n.enumValues)throw Error("Picked wrong preview component ArrayEnumPreview");return t?r.jsx(Lr,{name:e,value:t,enumValues:n.enumValues,size:a}):null}function xa({propertyKey:e,value:t,property:o,size:a}){const n=te(),i=qe({propertyKey:e,property:o,propertyValue:t,fields:n.propertyConfigs});if(Array.isArray(i.of))throw Error("Using array properties instead of single one in `of` in ArrayProperty");if(!i.of||i.dataType!=="array"||i.of.dataType!=="string")throw Error("Picked wrong preview component ArrayOfStringsPreview");if(t&&!Array.isArray(t))return r.jsx("div",{children:`Unexpected value: ${t}`});const s=i.of;return r.jsx("div",{className:"flex flex-col gap-2",children:t&&t.map((c,l)=>r.jsx("div",{children:r.jsx(re,{children:r.jsx(Yr,{propertyKey:e,property:s,value:c,size:a})})},`preview_array_strings_${e}_${l}`))})}function Ca({propertyKey:e,value:t,property:o,size:a}){const n=te(),i=qe({propertyKey:e,property:o,propertyValue:t,fields:n.propertyConfigs});if(i?.dataType!=="array")throw Error("Picked wrong preview component ArrayPreview");if(!i?.oneOf)throw Error(`You need to specify an 'of' or 'oneOf' prop (or specify a custom field) in your array property ${e}`);const s=t;if(!s)return null;const c=a==="medium"?"small":"tiny",l=i.oneOf.typeField??yt,u=i.oneOf.valueField??zt,m=i.oneOf.properties;return r.jsx("div",{className:"flex flex-col",children:s&&s.map((h,f)=>r.jsx(d.Fragment,{children:r.jsx("div",{className:p.cn(p.defaultBorderMixin,"m-1 border-b last:border-b-0"),children:r.jsx(re,{children:h&&r.jsx(ye,{propertyKey:e,value:h[u],property:i.resolvedProperties[f]??m[h[l]],size:c})})})},"preview_array_"+h+"_"+f))})}function Ea({propertyKey:e,value:t,property:o,size:a}){if(o.dataType!=="map")throw Error("Picked wrong preview component MapPropertyPreview");const n=o;if(!n.properties||Object.keys(n.properties??{}).length===0)return r.jsx(qr,{value:t});if(!t)return null;const i=Object.keys(n.properties);return a==="tiny"?r.jsx("div",{className:"w-full flex flex-col space-y-1 md:space-y-2",children:i.map((s,c)=>r.jsx("div",{children:r.jsx(re,{children:r.jsx(ye,{propertyKey:s,value:t[s],property:n.properties[s],size:a})},"map_preview_"+n.name+s+c)},`map_${s}`))}):r.jsx("div",{className:"flex flex-col gap-1 w-full",children:i&&i.map((s,c)=>{const l=n.properties[s];return r.jsxs("div",{className:p.cn(p.defaultBorderMixin,"last:border-b-0 border-b"),children:[r.jsxs("div",{className:"flex flex-row pt-0.5 pb-0.5 gap-2",children:[r.jsx("div",{className:"min-w-[140px] w-[25%] py-1",children:r.jsx(p.Typography,{variant:"caption",className:"font-mono break-words",color:"secondary",children:l.name})}),r.jsx("div",{className:"flex-grow max-w-[75%]",children:r.jsx(re,{children:!(l.dataType==="map"||l==="array")&&r.jsx(ye,{propertyKey:s,value:t[s],property:l,size:a})})})]}),(l.dataType==="map"||l==="array")&&r.jsx("div",{className:p.cn(p.defaultBorderMixin,"border-l pl-4 ml-2 my-2"),children:r.jsx(ye,{propertyKey:s,value:t[s],property:l,size:a})})]},`map_preview_table_${s}}`)})})}function qr({value:e}){return typeof e!="object"?null:e?r.jsx("div",{className:"flex flex-col gap-1 w-full",children:Object.entries(e).map(([t,o])=>r.jsxs("div",{className:p.cn(p.defaultBorderMixin,"last:border-b-0 border-b"),children:[r.jsxs("div",{className:"flex flex-row pt-0.5 pb-0.5 gap-2",children:[r.jsx("div",{className:"min-w-[140px] w-[25%] py-1",children:r.jsx(p.Typography,{variant:"caption",className:"font-mono break-words",color:"secondary",children:t})},`table-cell-title-${t}-${t}`),r.jsx("div",{className:"flex-grow max-w-[75%]",children:typeof o!="object"&&r.jsx(p.Typography,{children:r.jsx(re,{children:o&&o.toString()})})})]}),typeof o=="object"&&r.jsx("div",{className:p.cn(p.defaultBorderMixin,"border-l pl-4"),children:r.jsx(qr,{value:o})})]},`map_preview_table_${t}}`))}):r.jsx(Ke,{})}function Ba({date:e}){const t=te(),o=t?.locale?Io[t?.locale]:void 0,a=t?.dateTimeFormat??zo,n=e?zi.format(e,a,{locale:o}):"";return r.jsx(r.Fragment,{children:n})}function Sa({value:e,size:t,property:o}){return r.jsxs("div",{className:"flex flex-row gap-2 items-center",children:[r.jsx(p.Checkbox,{checked:e,size:t,color:"secondary"}),o.name&&r.jsx("span",{className:t==="tiny"?"text-sm":"",children:o.name})]})}function Ia({value:e,property:t,size:o}){if(t.enumValues){const a=e,n=Ue(t.enumValues);return n?r.jsx(Se,{enumKey:a,enumValues:n,size:o!=="medium"?"small":"medium"}):r.jsx(r.Fragment,{children:e})}else return r.jsx(r.Fragment,{children:e})}const ye=d.memo(function(t){const o=te();let a;const{property:n,propertyKey:i,value:s,size:c,height:l,width:u}=t,m=Fe({propertyKey:i,propertyOrBuilder:n,propertyValue:s,fields:o.propertyConfigs});if(s===void 0||m===null)a=r.jsx(Ke,{});else if(m.Preview)a=d.createElement(m.Preview,{propertyKey:i,value:s,property:m,size:c,height:l,width:u,customProps:m.customProps});else if(s===null)a=r.jsx(Ke,{});else if(m.dataType==="string"){const h=m;typeof s=="string"?h.url?typeof h.url=="boolean"?a=r.jsx(Ct,{size:t.size,url:s}):typeof h.url=="string"&&(a=r.jsx(Ct,{size:t.size,url:s,previewType:h.url})):h.storage?a=r.jsx(Aa,{storeUrl:m.storage?.storeUrl??!1,size:t.size,storagePathOrDownloadUrl:s}):h.markdown?a=r.jsx(p.Markdown,{source:s}):a=r.jsx(Yr,{...t,property:h,value:s}):a=et(i,m.dataType,s)}else if(m.dataType==="array")if(s instanceof Array){const h=m;if(!h.of&&!h.oneOf)throw Error(`You need to specify an 'of' or 'oneOf' prop (or specify a custom field) in your array property ${i}`);h.of?Array.isArray(h.of)?a=r.jsx(jr,{...t,value:s,property:m}):h.of.dataType==="reference"?a=r.jsx(ka,{...t,value:s,property:m}):h.of.dataType==="string"?h.of.enumValues?a=r.jsx(Ur,{...t,value:s,property:m}):h.of.storage?a=r.jsx(_a,{...t,value:s,property:m}):a=r.jsx(xa,{...t,value:s,property:m}):h.of.dataType==="number"&&h.of.enumValues?a=r.jsx(Ur,{...t,value:s,property:m}):a=r.jsx(jr,{...t,value:s,property:m}):h.oneOf&&(a=r.jsx(Ca,{...t,value:s,property:m}))}else a=et(i,m.dataType,s);else m.dataType==="map"?typeof s=="object"?a=r.jsx(Ea,{...t,property:m}):a=et(i,m.dataType,s):m.dataType==="date"?s instanceof Date?a=r.jsx(Ba,{date:s}):a=et(i,m.dataType,s):m.dataType==="reference"?typeof m.path=="string"?typeof s=="object"&&"isEntityReference"in s&&s.isEntityReference()?a=r.jsx(Ve,{disabled:!m.path,previewProperties:m.previewProperties,size:t.size,reference:s}):a=et(i,m.dataType,s):a=r.jsx(Ke,{}):m.dataType==="boolean"?typeof s=="boolean"?a=r.jsx(Sa,{value:s,size:c,property:m}):a=et(i,m.dataType,s):m.dataType==="number"?typeof s=="number"?a=r.jsx(Ia,{...t,value:s,property:m}):a=et(i,m.dataType,s):a=JSON.stringify(s);return a==null||Array.isArray(a)&&a.length===0?r.jsx(Ke,{}):a},q);function et(e,t,o){return console.warn(`Unexpected value for property ${e}, of type ${t}`,o),r.jsx(be,{title:"Unexpected value",error:`${JSON.stringify(o)}`})}function Kn({propertyKey:e,value:t,property:o,size:a}){const n=te(),i=qe({propertyKey:e,property:o,propertyValue:t,fields:n.propertyConfigs});if(Array.isArray(i?.of))throw Error("Using array properties instead of single one in `of` in ArrayProperty");if(i?.dataType!=="array"||!i.of||i.of.dataType!=="map")throw Error("Picked wrong preview component ArrayOfMapsPreview");const s=i.of,c=s.properties;if(!c)throw Error(`You need to specify a 'properties' prop (or specify a custom field) in your map property ${e}`);const l=t,u=s.previewProperties;if(!l)return null;let m=u;return(!m||!m.length)&&(m=Object.keys(c),a&&(m=m.slice(0,3))),r.jsx("div",{className:"table-auto text-xs",children:r.jsx("div",{children:l&&l.map((h,f)=>r.jsx("div",{className:"border-b last:border-b-0",children:m&&m.map(A=>r.jsx("div",{className:"table-cell",children:r.jsx(re,{children:r.jsx(ye,{propertyKey:A,value:h[A],property:c[A],size:"small"})})},`table-cell-${A}`))},`table_${h}_${f}`))})})}const Rn=it.memo(function({builder:t}){const[o,a]=d.useState(!0),[n,i]=d.useState(null);return d.useEffect(()=>{let s=!1;return t.then(c=>{s||(a(!1),i(c))}).catch(c=>{a(!1),console.error(c)}),()=>{s=!0}},[t]),o?r.jsx(p.Skeleton,{}):r.jsx(it.Fragment,{children:n})});function $r({entity:e,collection:t,path:o,className:a}){const n=te(),s=d.useMemo(()=>Pe({collection:t,path:o,entityId:e.id,values:e.values,fields:n.propertyConfigs}),[t,o,e]).properties;return r.jsx("div",{className:"w-full "+a,children:r.jsxs("div",{className:"w-full mb-4",children:[r.jsxs("div",{className:p.cn(p.defaultBorderMixin,"flex justify-between py-2 border-b last:border-b-0"),children:[r.jsx("div",{className:"flex items-center w-1/4",children:r.jsx("span",{className:"pl-2 text-sm text-gray-600",children:"Id"})}),r.jsxs("div",{className:"flex-grow p-2 ml-2 w-3/4 text-gray-900 dark:text-white min-h-[56px] flex items-center",children:[r.jsx("span",{className:"flex-grow mr-2",children:e.id}),n?.entityLinkBuilder&&r.jsx("a",{href:n.entityLinkBuilder({entity:e}),rel:"noopener noreferrer",target:"_blank",children:r.jsx(p.IconButton,{children:r.jsx(p.OpenInNewIcon,{size:"small"})})})]})]}),Object.entries(s).map(([c,l])=>{const u=e.values[c];return r.jsxs("div",{className:p.cn(p.defaultBorderMixin,"flex justify-between py-2 border-b last:border-b-0"),children:[r.jsx("div",{className:"flex items-center w-1/4",children:r.jsx("span",{className:"pl-2 text-sm text-gray-600",children:l.name})}),r.jsx("div",{className:"flex-grow p-2 ml-2 w-3/4 text-gray-900 dark:text-white min-h-[56px] flex items-center",children:r.jsx(ye,{propertyKey:c,value:u,property:l,size:"medium"})})]},`reference_previews_${c}`)})]})})}function es(e){const t=d.useRef(null),{disabled:o,value:a,multiline:n,updateValue:i,focused:s}=e,c=d.useRef(a),[l,u]=d.useState(a),m=d.useRef(!1);d.useEffect(()=>{c.current!==a&&a!==l&&u(a),c.current=a},[a]);const h=d.useCallback(()=>{!a&&!l||l!==a&&(c.current=l,i(l))},[l,i,a]);return Lt(l,h,!s,2e3),d.useEffect(()=>{t.current&&s&&!m.current?(m.current=!0,t.current.focus({preventScroll:!0}),t.current.selectionStart=t.current.value.length,t.current.selectionEnd=t.current.value.length):m.current=s},[s,t]),r.jsx(p.TextareaAutosize,{ref:t,style:{padding:0,margin:0,width:"100%",color:"unset",fontWeight:"unset",lineHeight:"unset",fontSize:"unset",fontFamily:"unset",background:"unset",border:"unset",resize:"none",outline:"none"},value:l??"",onChange:f=>{const A=f.target.value;(n||!A.endsWith(`
4
+ `))&&u(A)},onFocus:()=>{m.current=!0},onBlur:()=>{m.current=!1,h()}})}function Wr(e){const{name:t,enumValues:o,error:a,internalValue:n,disabled:i,small:s,focused:c,updateValue:l,multiple:u,valueType:m}=e,h=Array.isArray(n)&&u||!Array.isArray(n)&&!u,f=d.useRef(null);d.useEffect(()=>{f.current&&c&&f.current?.focus({preventScroll:!0})},[c,f]);const A=d.useCallback(b=>{if(m==="number")if(u){const y=b.map(k=>parseFloat(k));l(y)}else l(parseFloat(b));else if(m==="string")l(b||null);else throw Error("Missing mapping in TableSelect")},[u,l,m]),g=(b,y)=>u&&Array.isArray(b)?r.jsx(Lr,{value:b,name:t,enumValues:o,size:s?"small":"medium"},`${b}-${y}`):r.jsx(Se,{enumKey:b,enumValues:o,size:s?"small":"medium"},`${b}-${y}`);return u?r.jsx(p.MultiSelect,{inputRef:f,containerClassName:"w-full h-full",className:"w-full h-full p-0 bg-transparent",position:"item-aligned",disabled:i,padding:!1,includeFocusOutline:!1,value:h?n.map(b=>b.toString()):[],onMultiValueChange:A,renderValue:g,children:o?.map(b=>r.jsx(p.MultiSelectItem,{value:String(b.id),children:r.jsx(Se,{enumKey:b.id,enumValues:o,size:s?"small":"medium"})},b.id))}):r.jsx(p.Select,{inputRef:f,className:"w-full h-full p-0 bg-transparent",position:"item-aligned",disabled:i,multiple:u,padding:!1,includeFocusOutline:!1,value:h?u?n.map(b=>b.toString()):n?.toString():u?[]:"",onValueChange:A,onMultiValueChange:A,renderValue:g,children:o?.map(b=>r.jsx(p.SelectItem,{value:String(b.id),children:r.jsx(Se,{enumKey:b.id,enumValues:o,size:s?"small":"medium"})},b.id))})}function ts(e){const{align:t,value:o,updateValue:a,focused:n}=e,i=o&&typeof o=="number"?o.toString():"",[s,c]=d.useState(i),l=d.useRef(o);d.useEffect(()=>{l.current!==o&&String(o)!==s&&c(o?o.toString():null),l.current=o},[o]);const u=d.useCallback(()=>{if(s!==i)if(s!=null){const f=parseFloat(s);if(isNaN(f))return;f!=null&&a(f)}else a(null)},[s,o]);Lt(s,u,!n,2e3),d.useEffect(()=>{!n&&i!==s&&c(o!=null?o.toString():null)},[o,n]);const m=d.useRef(null);d.useEffect(()=>{m.current&&n&&m.current.focus({preventScroll:!0})},[n,m]);const h=/^-?[0-9]+[,.]?[0-9]*$/;return r.jsx("input",{ref:m,className:"w-full text-right p-0 m-0 bg-transparent border-none resize-none outline-none font-normal leading-normal text-unset",style:{textAlign:t},value:s??"",onChange:f=>{const A=f.target.value.replace(",",".");A.length===0&&c(null),(h.test(A)||A.startsWith("-"))&&c(A)}})}function rs(e){const{internalValue:t,updateValue:o,focused:a}=e,n=d.useRef(null);return d.useEffect(()=>{n.current&&a&&n.current.focus({preventScroll:!0})},[a,n]),r.jsx(p.BooleanSwitch,{ref:n,size:"small",value:!!t,onValueChange:o})}function os(e){const{locale:t}=te(),{disabled:o,error:a,mode:n,internalValue:i,updateValue:s}=e;return r.jsx(p.DateTimeField,{value:i??void 0,onChange:c=>s(c),size:"medium",invisible:!0,className:"w-full h-full",inputClassName:"w-full h-full",mode:n,locale:t})}class re extends d.Component{constructor(t){super(t),this.state={error:null}}static getDerivedStateFromError(t){return{error:t}}componentDidCatch(t,o){console.error(t)}render(){return this.state.error?r.jsxs("div",{className:"flex flex-col m-2",children:[r.jsxs("div",{className:"flex items-center m-2",children:[r.jsx(p.ErrorIcon,{color:"error",size:"small"}),r.jsx("div",{className:"ml-4",children:"Error"})]}),r.jsx(p.Typography,{variant:"caption",children:this.state.error?.message??"See the error in the console"})]}):this.props.children}}async function as(e,t,o,a,n,i,s,c){let l;return typeof e=="function"?(l=await e({path:n,entityId:a,values:o,property:i,file:s,storage:t,propertyKey:c}),l||console.warn("Storage callback returned empty result. Using default name value")):l=Fa(s,e,a,c,n),l||(l=st()+"_"+s.name),l}function is(e,t,o,a,n,i,s,c){let l;return typeof e=="function"?(l=e({path:n,entityId:a,values:o,property:i,file:s,storage:t,propertyKey:c}),l||console.warn("Storage callback returned empty result. Using default name value")):l=Fa(s,e,a,c,n),l||(l=st()+"_"+s.name),l}function Fa(e,t,o,a,n){const i=e.name.split(".").pop();let s=t.replace("{entityId}",o).replace("{propertyKey}",a).replace("{rand}",st()).replace("{file}",e.name).replace("{file.type}",e.type).replace("{path}",n);if(i){s=s.replace("{file.ext}",i);const c=e.name.replace(`.${i}`,"");s=s.replace("{file.name}",c)}return s||(s=st()+"_"+e.name),s}function Na({entityId:e,entityValues:t,path:o,value:a,property:n,propertyKey:i,storageSource:s,disabled:c,onChange:l}){const u=n.dataType==="string"?n.storage:n.dataType==="array"&&n.of.dataType==="string"?n.of.storage:void 0,m=n.dataType==="array";if(!u)throw Error("Storage meta must be specified");const h=u?.metadata,f=m?"small":"medium",A=u?.imageCompression,g=(m?a??[]:a?[a]:[]).map(x=>({id:Jr(),storagePathOrDownloadUrl:x,metadata:h,size:f})),[b,y]=d.useState(a),[k,v]=d.useState(g);d.useEffect(()=>{q(b,a)||(y(a),v(g))},[g,a,b]);const _=d.useCallback(async x=>{if(u.fileName){const S=await as(u.fileName,u,t,e,o,n,x,i);if(!S||S.length===0)throw Error("You need to return a valid filename");return S}return st()+"_"+x.name},[e,t,o,n,i,u]),E=d.useCallback(x=>is(u.storagePath,u,t,e,o,n,x,i)??"/",[e,t,o,n,i,u]),C=d.useCallback(async(x,S,F)=>{console.debug("onFileUploadComplete",x,S);let Q=x;if(u.storeUrl&&(Q=(await s.getDownloadURL(x)).url),u.postProcess&&Q&&(Q=await u.postProcess(Q)),!Q){console.warn("uploadPathOrDownloadUrl is null");return}let P;S.storagePathOrDownloadUrl=Q,S.metadata=F,P=[...k],P=Pa(P),v(P);const T=P.filter(O=>!!O.storagePathOrDownloadUrl).map(O=>O.storagePathOrDownloadUrl);l(m?T:T?T[0]:null)},[k,m,l,u,s]),B=d.useCallback(async x=>{if(!x.length||c)return;let S;if(m)S=[...k,...await Promise.all(x.map(async F=>(A&&Hr(F)&&(F=await Qa(F,A)),{id:Jr(),file:F,fileName:await _(F),metadata:h,size:f})))];else{let F=x[0];A&&Hr(F)&&(F=await Qa(F,A)),S=[{id:Jr(),file:F,fileName:await _(F),metadata:h,size:f}]}S=Pa(S),v(S)},[c,_,k,h,m,f]);return{internalValue:k,setInternalValue:v,storage:u,fileNameBuilder:_,storagePathBuilder:E,onFileUploadComplete:C,onFilesAdded:B,multipleFilesSupported:m}}function Pa(e){return e.filter((t,o)=>(e.map(a=>a.storagePathOrDownloadUrl).indexOf(t.storagePathOrDownloadUrl)===o||!t.storagePathOrDownloadUrl)&&(e.map(a=>a.file).indexOf(t.file)===o||!t.file))}function Jr(){return Math.floor(Math.random()*Math.floor(Number.MAX_SAFE_INTEGER))}const Ta={"image/jpeg":"JPEG","image/png":"PNG","image/webp":"WEBP"},Hr=e=>Ta[e.type]?Ta[e.type]:null,ns=100,Qa=(e,t)=>new Promise(o=>{const a=t.quality===void 0?ns:t.quality,n=a>=0&&a<=100?a:100,i=Hr(e);if(!i)throw Error("resizeAndCompressImage: Unsupported image format");Gi.imageFileResizer(e,t.maxWidth||Number.MAX_VALUE,t.maxHeight||Number.MAX_VALUE,i,n,0,s=>o(s),"file")});function Da({storagePath:e,entry:t,metadata:o,onFileUploadComplete:a,imageSize:n,simple:i}){const s=ct(),c=Je(),[l,u]=d.useState(),[m,h]=d.useState(!1),f=d.useRef(!1),A=d.useRef(!1),g=d.useCallback((b,y)=>{A.current||(A.current=!0,u(void 0),h(!0),s.uploadFile({file:b,fileName:y,path:e,metadata:o}).then(async({path:k})=>{console.debug("Upload successful"),await a(k,t,o),f.current&&h(!1)}).catch(k=>{console.warn("Upload error",k),f.current&&(u(k),h(!1),c.open({type:"error",message:"Error uploading file: "+k.message}))}).finally(()=>{A.current=!1}))},[t,o,a,s,e]);return d.useEffect(()=>(f.current=!0,t.file&&g(t.file,t.fileName),()=>{f.current=!1}),[t.file,t.fileName,g]),i?r.jsx("div",{className:`m-4 w-${n} h-${n}`,children:m&&r.jsx(p.Skeleton,{className:`w-${n} h-${n}`})}):r.jsxs("div",{className:p.cn(p.paperMixin,"relative m-4 border-box flex items-center justify-center",`min-w-[${n}px] min-h-[${n}px]`),children:[m&&r.jsx(p.Skeleton,{className:"w-full h-full"}),l&&r.jsx(be,{title:"Error uploading file",error:l})]})}function Ma({showError:e,disabled:t,showExpandIcon:o,selected:a,openPopup:n,children:i}){const s=d.useRef(null),c=d.useCallback(()=>{if(n){const u=s&&s?.current?.getBoundingClientRect();n(u)}},[]),l=d.useRef();return d.useEffect(()=>{l.current&&a&&l.current.focus({preventScroll:!0})},[a]),r.jsx(r.Fragment,{children:(e||!t&&o)&&r.jsxs("div",{ref:s,className:"absolute top-0.5 right-0.5 flex items-center",children:[a&&i,a&&!t&&o&&r.jsx(p.IconButton,{ref:l,color:"inherit",size:"small",onClick:c,children:r.jsxs("svg",{fill:"#888",width:"20",height:"20",viewBox:"0 0 24 24",children:[r.jsx("path",{className:"cls-2",d:"M20,5a1,1,0,0,0-1-1L14,4h0a1,1,0,0,0,0,2h2.57L13.29,9.29a1,1,0,0,0,0,1.42,1,1,0,0,0,1.42,0L18,7.42V10a1,1,0,0,0,1,1h0a1,1,0,0,0,1-1Z"}),r.jsx("path",{className:"cls-2",d:"M10.71,13.29a1,1,0,0,0-1.42,0L6,16.57V14a1,1,0,0,0-1-1H5a1,1,0,0,0-1,1l0,5a1,1,0,0,0,1,1h5a1,1,0,0,0,0-2H7.42l3.29-3.29A1,1,0,0,0,10.71,13.29Z"})]})}),e&&r.jsx(ha,{side:"left",className:"flex items-center justify-center",style:{width:32,height:32},title:e.message,children:r.jsx(p.ErrorOutlineIcon,{size:"small",color:"error"})})]})})}const ss="max-w-full box-border relative pt-[2px] items-center border border-transparent outline-none rounded-md duration-200 ease-[cubic-bezier(0.4,0,0.2,1)] focus:border-primary-solid",ls="pt-0 border-2 border-solid",cs="transition-colors duration-200 ease-[cubic-bezier(0,0,0.2,1)] border-2 border-solid border-green-500 bg-green-50 dark:bg-green-900",ds="transition-colors duration-200 ease-[cubic-bezier(0,0,0.2,1)] border-2 border-solid border-red-500 bg-red-50 dark:bg-red-900";function ps(e){const{propertyKey:t,error:o,selected:a,openPopup:n,value:i,disabled:s,property:c,entity:l,path:u,previewSize:m,updateValue:h}=e,f=ct(),{internalValue:A,setInternalValue:g,onFilesAdded:b,storage:y,onFileUploadComplete:k,storagePathBuilder:v,multipleFilesSupported:_}=Na({entityValues:l.values,entityId:l.id,path:u,property:c,propertyKey:t,storageSource:f,onChange:h,value:i,disabled:s});return r.jsx(us,{internalValue:A,setInternalValue:g,name:t,disabled:s,autoFocus:!1,openPopup:n,error:o,selected:a,property:c,onChange:h,entity:l,storagePathBuilder:v,storage:y,multipleFilesSupported:_,onFilesAdded:b,onFileUploadComplete:k,previewSize:m})}function us({property:e,name:t,internalValue:o,setInternalValue:a,openPopup:n,entity:i,selected:s,error:c,onChange:l,multipleFilesSupported:u,previewSize:m,disabled:h,autoFocus:f,storage:A,onFilesAdded:g,onFileUploadComplete:b,storagePathBuilder:y}){const[k,v]=d.useState(!1),_=u&&m==="medium"?"small":m;if(u){const D=e;if(Array.isArray(D.of))throw Error("Using array properties instead of single one in `of` in ArrayProperty");if(D.of){if(D.of.dataType!=="string")throw Error("Storage field using array must be of data type string")}else throw Error("Storage field using array must be of data type string")}const E=A?.metadata,C=!!o,B=Je(),{open:x,getRootProps:S,getInputProps:F,isDragActive:Q,isDragAccept:P,isDragReject:T}=Eo.useDropzone({accept:A.acceptedFiles?A.acceptedFiles.map(D=>({[D]:[]})).reduce((D,H)=>({...D,...H}),{}):void 0,disabled:h,maxSize:A.maxSize,noClick:!0,noKeyboard:!0,onDrop:g,onDropRejected:(D,H)=>{for(const J of D)for(const V of J.errors)B.open({type:"error",message:`Error uploading file: File is larger than ${A.maxSize} bytes`})}}),{...O}=S(),R=u?"Drag 'n' drop some files here, or click here to edit":"Drag 'n' drop a file here, or click here edit",L=u?e.of:e,j=d.useMemo(()=>ut(_),[_]),W=!h&&c;return r.jsxs("div",{...O,onMouseEnter:()=>v(!0),onMouseMove:()=>v(!0),onMouseLeave:()=>v(!1),className:p.cn(ss,"relative w-full h-full flex",`justify-${C?"start":"center"}`,Q?ls:"",P?cs:"",T?ds:""),children:[r.jsx("input",{autoFocus:f,...F()}),o.map((D,H)=>{let J;return D.storagePathOrDownloadUrl?J=r.jsx(ms,{property:L,value:D.storagePathOrDownloadUrl,entity:i,size:_},`storage_preview_${H}`):D.file&&(J=r.jsx(Da,{entry:D,metadata:E,storagePath:y(D.file),onFileUploadComplete:b,imageSize:j,simple:!0},`storage_progress_${H}`)),J}),!o&&r.jsx("div",{className:"flex-grow m-2 max-w-[200px]",onClick:x,children:r.jsx(p.Typography,{className:"text-gray-400 dark:text-gray-600",variant:"body2",align:"center",children:R})}),r.jsx(Ma,{showError:W,disabled:h,showExpandIcon:!0,selected:s,openPopup:h?void 0:n,children:r.jsx(p.IconButton,{color:"inherit",size:"small",onClick:x,children:r.jsx(p.EditIcon,{size:"small",className:"text-gray-500"})})})]})}function ms({property:e,value:t,size:o,entity:a}){return r.jsx("div",{className:"relative p-2 max-w-full",children:t&&r.jsx(re,{children:r.jsx(ye,{propertyKey:"ignore",value:t,property:e,size:o})})})}function Oa(e){const t=te(),o=ue(),{path:a}=e,n=o.getCollection(a);if(!n){if(t.components?.missingReference)return r.jsx(t.components.missingReference,{path:a});throw Error(`Couldn't find the corresponding collection view for the path: ${a}`)}return r.jsx(fs,{...e,collection:n})}const fs=d.memo(function(t){const{name:o,internalValue:a,updateValue:n,multiselect:i,path:s,size:c,previewProperties:l,title:u,disabled:m,forceFilter:h,collection:f}=t,A=d.useCallback(C=>{n(C?Ye(C):null)},[n]),g=d.useCallback(C=>{n(C.map(B=>Ye(B)))},[n]),b=a?Array.isArray(a)?a.map(C=>C.id):a.id?[a.id]:[]:[],y=At({multiselect:i,path:s,collection:f,onMultipleEntitiesSelected:g,onSingleEntitySelected:A,selectedEntityIds:b,forceFilter:h}),k=d.useCallback(()=>{m||y.open()},[m,y]),v=!a||Array.isArray(a)&&a.length===0,_=()=>a&&!Array.isArray(a)&&a.isEntityReference&&a.isEntityReference()?r.jsx(Ve,{onClick:m?void 0:k,size:He(c),reference:a,hover:!m,disabled:!s,previewProperties:l}):r.jsx(mt,{onClick:m?void 0:k,size:He(c),children:r.jsx(be,{title:"Value is not a reference.",error:"Click to edit"})}),E=()=>Array.isArray(a)?r.jsx(r.Fragment,{children:a.map((C,B)=>r.jsx("div",{className:"w-full my-0.5",children:r.jsx(Ve,{onClick:m?void 0:k,size:"tiny",reference:C,hover:!m,disabled:!s,previewProperties:l})},`preview_array_ref_${o}_${B}`))}):r.jsx(be,{error:"Data is not an array of references"});return f?r.jsxs("div",{className:"w-full group",children:[a&&!i&&_(),a&&i&&E(),v&&r.jsxs(p.Button,{onClick:k,size:"small",variant:"outlined",color:"primary",children:["Edit ",u]})]}):r.jsx(be,{error:"The specified collection does not exist"})},q);Ie.addMethod(Ie.array,"uniqueInArray",function(e=o=>o,t){return this.test("uniqueInArray",t,o=>!o||o.length===new Set(o.map(e)).size)});function za(e,t,o){const a={};return Object.entries(t).forEach(([n,i])=>{a[n]=Et({property:i,customFieldValidator:o,name:n,entityId:e})}),Ie.object().shape(a)}function Et(e){const t=e.property;if(we(t))throw console.error("Error in property",e),Error("Trying to create a yup mapping from a property builder. Please use resolved properties only");if(t.dataType==="string")return gs(e);if(t.dataType==="number")return As(e);if(t.dataType==="boolean")return vs(e);if(t.dataType==="map")return hs(e);if(t.dataType==="array")return _s(e);if(t.dataType==="date")return ys(e);if(t.dataType==="geopoint")return bs(e);if(t.dataType==="reference")return ws(e);throw console.error("Unsupported data type in yup mapping",t),Error("Unsupported data type in yup mapping")}function hs({property:e,entityId:t,customFieldValidator:o,name:a}){const n={},i=e.validation;e.properties&&Object.entries(e.properties).forEach(([c,l])=>{n[c]=Et({property:l,parentProperty:e,customFieldValidator:o,name:`${a}[${c}]`,entityId:t})});const s=Ie.object().shape(n);return i?.required?s.required(i?.requiredMessage?i.requiredMessage:"Required").nullable(!0):s.nullable(!0)}function gs({property:e,parentProperty:t,customFieldValidator:o,name:a,entityId:n}){let i=Ie.string();const s=e.validation;if(e.enumValues){s?.required&&(i=i.required(s?.requiredMessage?s.requiredMessage:"Required"));const c=Ue(e.enumValues);i=i.oneOf((s?.required?c:[...c,null]).map(l=>l?.id??null)).nullable(!0)}if(s){if(i=s.required?i.required(s?.requiredMessage?s.requiredMessage:"Required").nullable(!0):i.notRequired().nullable(!0),s.unique&&o&&a&&(i=i.test("unique","This value already exists and should be unique",(c,l)=>o({name:a,property:e,parentProperty:t,value:c,entityId:n}))),(s.min||s.min===0)&&(i=i.min(s.min,`${e.name} must be min ${s.min} characters long`)),(s.max||s.max===0)&&(i=i.max(s.max,`${e.name} must be max ${s.max} characters long`)),s.matches){const c=typeof s.matches=="string"?Yo(s.matches):s.matches;c&&(i=i.matches(c,s.matchesMessage?{message:s.matchesMessage}:void 0))}s.trim&&(i=i.trim()),s.lowercase&&(i=i.lowercase()),s.uppercase&&(i=i.uppercase()),e.email&&(i=i.email(`${e.name} must be an email`)),e.url&&(i=i.url(`${e.name} must be a url`))}else i=i.notRequired().nullable(!0);return i}function As({property:e,parentProperty:t,customFieldValidator:o,name:a,entityId:n}){const i=e.validation;let s=Ie.number().typeError("Must be a number");return i?(s=i.required?s.required(i.requiredMessage?i.requiredMessage:"Required").nullable(!0):s.notRequired().nullable(!0),i.unique&&o&&a&&(s=s.test("unique","This value already exists and should be unique",c=>o({name:a,property:e,parentProperty:t,value:c,entityId:n}))),(i.min||i.min===0)&&(s=s.min(i.min,`${e.name} must be higher or equal to ${i.min}`)),(i.max||i.max===0)&&(s=s.max(i.max,`${e.name} must be lower or equal to ${i.max}`)),(i.lessThan||i.lessThan===0)&&(s=s.lessThan(i.lessThan,`${e.name} must be higher than ${i.lessThan}`)),(i.moreThan||i.moreThan===0)&&(s=s.moreThan(i.moreThan,`${e.name} must be lower than ${i.moreThan}`)),i.positive&&(s=s.positive(`${e.name} must be positive`)),i.negative&&(s=s.negative(`${e.name} must be negative`)),i.integer&&(s=s.integer(`${e.name} must be an integer`))):s=s.notRequired().nullable(!0),s}function bs({property:e,parentProperty:t,customFieldValidator:o,name:a,entityId:n}){let i=Ie.object();const s=e.validation;return s?.unique&&o&&a&&(i=i.test("unique","This value already exists and should be unique",c=>o({name:a,property:e,parentProperty:t,value:c,entityId:n}))),s?.required?i=i.required(s.requiredMessage).nullable(!0):i=i.notRequired().nullable(!0),i}function ys({property:e,parentProperty:t,customFieldValidator:o,name:a,entityId:n}){if(e.autoValue)return Ie.object().nullable();let i=Ie.date();const s=e.validation;return s?(i=s.required?i.required(s?.requiredMessage?s.requiredMessage:"Required"):i.notRequired(),s.unique&&o&&a&&(i=i.test("unique","This value already exists and should be unique",c=>o({name:a,property:e,parentProperty:t,value:c,entityId:n}))),s.min&&(i=i.min(s.min,`${e.name} must be after ${s.min}`)),s.max&&(i=i.max(s.max,`${e.name} must be before ${s.min}`))):i=i.notRequired(),i.transform(c=>c instanceof Date?c:null).nullable()}function ws({property:e,parentProperty:t,customFieldValidator:o,name:a,entityId:n}){let i=Ie.object();const s=e.validation;return s?(i=s.required?i.required(s?.requiredMessage?s.requiredMessage:"Required").nullable(!0):i.notRequired().nullable(!0),s.unique&&o&&a&&(i=i.test("unique","This value already exists and should be unique",c=>o({name:a,property:e,parentProperty:t,value:c,entityId:n})))):i=i.notRequired().nullable(!0),i}function vs({property:e,parentProperty:t,customFieldValidator:o,name:a,entityId:n}){let i=Ie.boolean();const s=e.validation;return s?(i=s.required?i.required(s?.requiredMessage?s.requiredMessage:"Required").nullable(!0):i.notRequired().nullable(!0),s.unique&&o&&a&&(i=i.test("unique","This value already exists and should be unique",c=>o({name:a,property:e,parentProperty:t,value:c,entityId:n})))):i=i.notRequired().nullable(!0),i}function ks(e){return e.validation?.uniqueInArray?!0:e.dataType==="map"&&e.properties?Object.entries(e.properties).filter(([t,o])=>o.validation?.uniqueInArray):!1}function _s({property:e,parentProperty:t,customFieldValidator:o,name:a,entityId:n}){let i=Ie.array();if(e.of)if(Array.isArray(e.of)){const c=e.of.map((l,u)=>({[`${a}[${u}]`]:Et({property:l,parentProperty:e,entityId:n})})).reduce((l,u)=>({...l,...u}),{});return Ie.array().of(Ie.mixed().test("Dynamic object validation","Dynamic object validation error",(l,u)=>Oe(c,u.path).validate(l)))}else{i=i.of(Et({property:e.of,parentProperty:e,entityId:n}));const c=ks(e.of);c&&(typeof c=="boolean"?i=i.uniqueInArray(l=>l,`${e.name} should have unique values within the array`):Array.isArray(c)&&c.forEach(([l,u])=>{i=i.uniqueInArray(m=>m&&m[l],`${e.name} → ${u.name??l}: should have unique values within the array`)}))}const s=e.validation;return s?(i=s.required?i.required(s?.requiredMessage?s.requiredMessage:"Required").nullable(!0):i.notRequired().nullable(!0),(s.min||s.min===0)&&(i=i.min(s.min,`${e.name} should be min ${s.min} entries long`)),s.max&&(i=i.max(s.max,`${e.name} should be max ${s.max} entries long`))):i=i.notRequired().nullable(!0),i}function ft(e){switch(e){case"xl":return 400;case"l":return 280;case"m":return 140;case"s":return 80;case"xs":return 54;default:throw Error("Missing mapping for collection size -> height")}}const xs=({justifyContent:e,scrollable:t,faded:o,fullHeight:a,children:n})=>r.jsx("div",{className:p.cn("flex flex-col max-h-full w-full",{"items-start":o||t}),style:{justifyContent:e,height:a?"100%":void 0,overflow:t?"auto":void 0,WebkitMaskImage:o?"linear-gradient(to bottom, black 60%, transparent 100%)":void 0,maskImage:o?"linear-gradient(to bottom, black 60%, transparent 100%)":void 0},children:n}),Xt=d.memo(function({children:t,actions:o,size:a,selected:n,disabled:i,disabledTooltip:s,saved:c,error:l,align:u,allowScroll:m,removePadding:h,fullHeight:f,onSelect:A,width:g,hideOverflow:b=!0,showExpandIcon:y=!0}){const[k,v]=Co(),_=d.useRef(null),E=d.useMemo(()=>ft(a),[a]),[C,B]=d.useState(!1),[x,S]=d.useState(c),F=!i&&l;d.useEffect(()=>{c&&S(!0);const J=setTimeout(()=>{S(!1)},800);return()=>{clearTimeout(J)}},[c]);let Q=0;if(!h)switch(a){case"l":case"xl":Q=4;break;case"m":Q=2;break;case"s":default:Q=1;break}let P;switch(u){case"right":P="flex-end";break;case"center":P="center";break;case"left":default:P="flex-start"}const T=d.useCallback(()=>{if(!A)return;const J=_&&_?.current?.getBoundingClientRect();i?A(void 0):!n&&J&&A(J)},[_,A,n,i]),O=d.useCallback(J=>{T(),J.stopPropagation()},[T]),R=d.useMemo(()=>v?v.height>E:!1,[v,E]),L=!F&&n,j=!i&&m&&R,W=!i&&!m&&R,D=d.useCallback(()=>B(!0),[]),H=d.useCallback(()=>B(!1),[]);return r.jsxs("div",{ref:_,className:p.cn("transition-colors duration-100 ease-in-out",`flex relative h-full rounded-md p-${Q} border border-4 border-opacity-75`,C&&!i?"bg-gray-50 dark:bg-gray-900":"",c?"bg-gray-100 bg-opacity-75 dark:bg-gray-800 dark:bg-opacity-75":"",!L&&!x&&!F?"border-transparent":"",b?"overflow-hidden":"",L?"bg-gray-50 dark:bg-gray-900":"",L&&!x?"border-primary":"",x?"border-green-500 ":"",F?"border-red-500":""),style:{justifyContent:P,alignItems:i||!R?"center":void 0,width:g??"100%",textAlign:u},tabIndex:n||i?void 0:0,onFocus:O,onMouseEnter:D,onMouseMove:D,onMouseLeave:H,children:[r.jsxs(re,{children:[f&&!W&&t,(!f||W)&&r.jsx(xs,{fullHeight:f??!1,justifyContent:P,scrollable:j??!1,faded:W,children:!f&&r.jsx("div",{ref:k,style:{display:"flex",width:"100%",justifyContent:P,height:f?"100%":void 0},children:t})})]}),o,i&&C&&s&&r.jsx("div",{className:"absolute top-1 right-1 text-xs",children:r.jsx(p.Tooltip,{title:s,children:r.jsx(p.RemoveCircleIcon,{size:"smallest",color:"disabled",className:"text-gray-500"})})})]})},(e,t)=>e.error===t.error&&e.value===t.value&&e.disabled===t.disabled&&e.saved===t.saved&&e.allowScroll===t.allowScroll&&e.align===t.align&&e.size===t.size&&e.disabledTooltip===t.disabledTooltip&&e.width===t.width&&e.showExpandIcon===t.showExpandIcon&&e.removePadding===t.removePadding&&e.fullHeight===t.fullHeight&&e.selected===t.selected),Va=d.createContext({}),Cs=()=>d.useContext(Va);function Te({property:e,value:t,setValue:o}){const a=d.useRef(null);d.useEffect(()=>{typeof e.disabled=="object"&&!!e.disabled.clearOnDisabled?t!=null&&(a.current=t,o(null)):a.current&&(o(a.current),a.current=null)},[e])}function Es(e){return e.dataType==="string"&&e.storage?!0:e.dataType==="array"?Array.isArray(e.of)?!1:e.of?.dataType==="string"&&e.of?.storage:!1}const Ga=d.memo(function({propertyKey:t,customFieldValidator:o,value:a,property:n,align:i,width:s,height:c,path:l,entity:u,readonly:m,disabled:h}){const f=Ae(),{onValueChange:A,size:g,selectedCell:b,select:y,setPopupCell:k}=Cs(),v=b?.propertyKey===t&&b?.entity.path===u.path&&b?.entity.id===u.id,[_,E]=d.useState(a),C=d.useRef(a),[B,x]=d.useState(),[S,F]=d.useState(!1),Q=d.useCallback(()=>{F(!0),setTimeout(()=>{F(!1)},100)},[]),P=!!n.Field,T=!!n.Preview,O=nt(n),R=typeof n.disabled=="object"?n.disabled.disabledMessage:void 0,L=m||h||!!n.disabled,j=d.useMemo(()=>Et({property:n,entityId:u.id,customFieldValidator:o,name:t}),[u.id,n,t]);d.useEffect(()=>{q(a,C.current)||(x(void 0),E(a),C.current=a,Q())},[Q,a]);const W=M=>{q(M,C.current)||(F(!1),j.validate(M).then(()=>{x(void 0),C.current=M,A&&A({value:M,propertyKey:t,setError:x,onValueUpdated:Q,entity:u,fullPath:l,context:f})}).catch(N=>{x(N)}))};d.useEffect(()=>{j.validate(_).then(()=>x(void 0)).catch(M=>{x(M)})},[_,j,t,n,u]);const D=M=>{let N;M===void 0?N=null:N=M,E(N),W(N)};Te({property:n,value:_,setValue:D});const H=d.useCallback(M=>{y(M?{width:s,height:c,entity:u,cellRect:M,propertyKey:t}:void 0)},[u,c,t,y,s]),J=M=>{k&&k(M?{width:s,height:c,entity:u,cellRect:M,propertyKey:t}:void 0)};let V,ae=!1,Z=!1,ee=!0,oe=!1,ie=!1,de=!0;const fe=!L&&B;if(m||O)return r.jsx(Xt,{size:g,width:s,saved:S,value:_,align:i??"left",fullHeight:!1,disabledTooltip:R??(O?"Read only":void 0),disabled:!0,children:r.jsx(ye,{width:s,height:ft(g),propertyKey:t,property:n,value:_,size:He(g)})},`${t}_${u.path}_${u.id}`);if(!P&&(!T||v)){if(Es(n))V=r.jsx(ps,{error:B,disabled:L,focused:v,selected:v,openPopup:k?J:void 0,property:n,entity:u,path:l,value:_,previewSize:He(g),updateValue:D,propertyKey:t}),de=!1,Z=!0,ie=!0,oe=!0;else if(v&&n.dataType==="number"){const N=n;N.enumValues?(V=r.jsx(Wr,{name:t,multiple:!1,disabled:L,focused:v,valueType:"number",small:He(g)!=="medium",enumValues:N.enumValues,error:B,internalValue:_,updateValue:D}),ie=!0):(V=r.jsx(ts,{align:i,error:B,focused:v,disabled:L,value:_,updateValue:D}),ae=!0)}else if(v&&n.dataType==="string"){const N=n;if(N.enumValues)V=r.jsx(Wr,{name:t,multiple:!1,focused:v,disabled:L,valueType:"string",small:He(g)!=="medium",enumValues:N.enumValues,error:B,internalValue:_,updateValue:D}),ie=!0;else if(!N.storage){const z=!!N.multiline||!!N.markdown;V=r.jsx(es,{error:B,disabled:L,multiline:z,focused:v,value:_,updateValue:D}),ae=!0}}else if(n.dataType==="boolean")V=r.jsx(rs,{error:B,disabled:L,focused:v,internalValue:_,updateValue:D});else if(n.dataType==="date")V=r.jsx(os,{name:t,error:B,disabled:L,mode:n.mode,focused:v,internalValue:_,updateValue:D}),ie=!0,ee=!1,ae=!1;else if(n.dataType==="reference")typeof n.path=="string"&&(V=r.jsx(Oa,{name:t,internalValue:_,updateValue:D,disabled:L,size:g,path:n.path,multiselect:!1,previewProperties:n.previewProperties,title:n.name,forceFilter:n.forceFilter})),ae=!1;else if(n.dataType==="array"){const N=n;if(!N.of&&!N.oneOf)throw Error(`You need to specify an 'of' or 'oneOf' prop (or specify a custom field) in your array property ${t}`);N.of&&!Array.isArray(N.of)&&(N.of.dataType==="string"||N.of.dataType==="number"?v&&N.of.enumValues&&(V=r.jsx(Wr,{name:t,multiple:!0,disabled:L,focused:v,small:He(g)!=="medium",valueType:N.of.dataType,enumValues:N.of.enumValues,error:B,internalValue:_,updateValue:D}),ae=!0,ie=!0,ee=!1):N.of.dataType==="reference"&&(typeof N.of.path=="string"&&(V=r.jsx(Oa,{name:t,disabled:L,internalValue:_,updateValue:D,size:g,multiselect:!0,path:N.of.path,previewProperties:N.of.previewProperties,title:N.name,forceFilter:N.of.forceFilter})),ae=!1))}}return V||(ae=!1,Z=v&&!V&&!L&&!O,V=r.jsx(ye,{width:s,height:c,propertyKey:t,value:_,property:n,size:He(g)})),r.jsx(Xt,{size:g,width:s,onSelect:H,selected:v,disabled:L||O,disabledTooltip:R??"Disabled",removePadding:oe,fullHeight:ie,saved:S,error:B,align:i,allowScroll:ae,showExpandIcon:Z,value:_,hideOverflow:ee,actions:de&&r.jsx(Ma,{showError:fe,disabled:L,showExpandIcon:Z,selected:v,openPopup:L?void 0:J}),children:V},`cell_${t}_${u.path}_${u.id}`)},Bs);function Bs(e,t){return e.height===t.height&&e.propertyKey===t.propertyKey&&e.align===t.align&&e.width===t.width&&q(e.property,t.property)&&q(e.value,t.value)&&q(e.entity.id,t.entity.id)&&q(e.entity.values,t.entity.values)}const Kt=function({entity:t,collection:o,fullPath:a,width:n,frozen:i,isSelected:s,selectionEnabled:c,size:l,highlightEntity:u,onCollectionChange:m,unhighlightEntity:h,actions:f=[],hideId:A,selectionController:g}){const b=De(),y=Ae(),k=d.useCallback(x=>{g?.toggleEntitySelection(t)},[t,g?.toggleEntitySelection]),v=d.useCallback(x=>{x.stopPropagation(),g?.toggleEntitySelection(t)},[t,g?.toggleEntitySelection]),_=f.length>0,E=f.some(x=>x.collapsed||x.collapsed===void 0),C=f.filter(x=>x.collapsed||x.collapsed===void 0),B=f.filter(x=>x.collapsed===!1);return r.jsxs("div",{onClick:v,className:p.cn("h-full flex items-center justify-center flex-col bg-gray-50 dark:bg-gray-900 bg-opacity-90 dark:bg-opacity-90 z-10",i?"sticky left-0":""),style:{width:n,position:i?"sticky":"initial",left:i?0:"initial",contain:"strict"},children:[(_||c)&&r.jsxs("div",{className:"w-34 flex justify-center",children:[B.map((x,S)=>r.jsx(p.Tooltip,{title:x.name,children:r.jsx(p.IconButton,{onClick:F=>{F.stopPropagation(),x.onClick({entity:t,fullPath:a,collection:o,context:y,selectionController:g,highlightEntity:u,unhighlightEntity:h,onCollectionChange:m})},size:b?"medium":"small",children:x.icon})},S)),E&&r.jsx(p.Menu,{trigger:r.jsx(p.IconButton,{size:b?"medium":"small",children:r.jsx(p.MoreVertIcon,{})}),children:C.map((x,S)=>r.jsxs(p.MenuItem,{onClick:F=>{F.stopPropagation(),x.onClick({entity:t,fullPath:a,collection:o,context:y,selectionController:g,highlightEntity:u,unhighlightEntity:h,onCollectionChange:m})},children:[x.icon,x.name]},S))}),c&&r.jsx(p.Tooltip,{title:`Select ${t.id}`,children:r.jsx(p.Checkbox,{size:b?"medium":"small",checked:!!s,onCheckedChange:k})})]}),!A&&l!=="xs"&&r.jsx("div",{className:"w-[138px] text-center overflow-hidden truncate",children:t?r.jsxs(p.Typography,{onClick:x=>{x.stopPropagation()},className:"font-mono select-all",variant:"caption",color:"secondary",children:[" ",t.id," "]}):r.jsx(p.Skeleton,{})})]})};function Ss(e){const t=d.useRef(null),o=De(),a=d.useRef(!1);d.useEffect(()=>{t.current&&a.current&&!e.textSearchLoading&&t.current.focus(),a.current=e.textSearchLoading??!1},[e.textSearchLoading]);const n=!e.forceFilter&&e.filterIsSet&&e.clearFilter&&r.jsxs(p.Button,{variant:"outlined",className:"h-fit-content","aria-label":"filter clear",onClick:e.clearFilter,size:"small",children:[r.jsx(p.FilterListOffIcon,{}),"Clear filter"]}),i=r.jsx(p.Tooltip,{title:"Table row size",side:"right",sideOffset:4,children:r.jsx(p.Select,{value:e.size,className:"w-16 h-10",size:"small",onValueChange:s=>e.onSizeChanged(s),renderValue:s=>r.jsx("div",{className:"font-medium",children:s.toUpperCase()}),children:["xs","s","m","l","xl"].map(s=>r.jsx(p.SelectItem,{value:s,className:"w-12 font-medium text-center",children:s.toUpperCase()},s))})});return r.jsxs("div",{className:p.cn(p.defaultBorderMixin,"no-scrollbar min-h-[56px] overflow-x-auto px-2 md:px-4 bg-gray-50 dark:bg-gray-900 border-b flex flex-row justify-between items-center w-full"),children:[r.jsxs("div",{className:"flex items-center gap-2 md:mr-4 mr-2",children:[e.title&&r.jsx("div",{className:"hidden lg:block",children:e.title}),i,e.actionsStart,n]}),r.jsxs("div",{className:"flex items-center gap-2",children:[o&&r.jsx("div",{className:"w-[22px]",children:e.loading&&r.jsx(p.CircularProgress,{size:"small"})}),(e.onTextSearch||e.onTextSearchClick)&&r.jsx(p.SearchBar,{inputRef:t,loading:e.textSearchLoading,disabled:!!e.onTextSearchClick,onClick:e.onTextSearchClick,onTextSearch:e.onTextSearchClick?void 0:e.onTextSearch,expandable:!0},"search-bar"),e.actions]})]})}function Is(e){return e.dataType==="boolean"?"center":e.dataType==="number"?e.enumValues?"left":"right":e.dataType==="date"?"right":"left"}function Ya(e){if(e.columnWidth)return e.columnWidth;if(e.dataType==="string")return e.url?280:e.storage?160:e.enumValues?200:e.multiline||e.markdown?300:(e.email,200);if(e.dataType==="array"){const t=e;return t.of?Array.isArray(e.of)?300:Ya(t.of):300}else return e.dataType==="number"?e.enumValues?200:140:e.dataType==="map"?360:e.dataType==="date"?200:e.dataType==="reference"?220:e.dataType==="boolean"?140:200}function Zr(e){return`subcollection:${e.id??e.path}`}const ja="collectionGroupParent";function Xr(e,t){return d.useMemo(()=>e.propertiesOrder?La(e,e.propertiesOrder):Fs(e,t),[e,t])}function La(e,t){return t.flatMap(o=>{const a=e.properties[o];return a?a.hideFromCollection?[null]:a.disabled&&typeof a.disabled=="object"&&a.disabled.hidden?[null]:a.dataType==="map"&&a.spreadChildren&&a.properties?Rt(a,o):[{key:o,disabled:!!a.disabled||!!a.readOnly}]:e.additionalFields?.find(i=>i.key===o)?[{key:o,disabled:!0}]:e.subcollections&&e.subcollections.find(s=>Zr(s)===o)?[{key:o,disabled:!0}]:e.collectionGroup&&o===ja?[{key:o,disabled:!0}]:[null]}).filter(Boolean)}function Fs(e,t){const o=Object.keys(e.properties),a=e.additionalFields??[],n=e.subcollections??[],i=[...o,...a.map(s=>s.key)];if(t){const s=n.map(c=>Zr(c));i.push(...s.filter(c=>!i.includes(c)))}return e.collectionGroup&&i.push(ja),La(e,i)}function Rt(e,t,o){return e.dataType==="map"&&e.spreadChildren&&e.properties?Object.entries(e.properties).flatMap(([a,n])=>Rt(n,`${t}.${a}`,o||!!e.disabled||!!e.readOnly)):[{key:t,disabled:o||!!e.disabled||!!e.readOnly}]}function Ns(e){return{key:"id_ewcfedcswdf3",width:e?160:130,title:"ID",resizable:!1,frozen:e??!1,headerAlign:"center",align:"center"}}function Ua({properties:e,sortable:t,forceFilter:o,disabledFilter:a,AdditionalHeaderWidget:n}){return Object.entries(e).flatMap(([i,s])=>Rt(s,i)).map(({key:i,disabled:s})=>{const c=Sr(e,i);if(!c)throw Error("Internal error: no property found in path "+i);const l=qa(c);return{key:i,align:Is(c),icon:ve(c,"small"),title:c.name??i,sortable:t&&(o?Object.keys(o).includes(i):!0),filter:!a&&l,width:Ya(c),resizable:!0,custom:{resolvedProperty:c,disabled:s},AdditionalHeaderWidget:n?({onHover:u})=>r.jsx(n,{property:c,propertyKey:i,onHover:u}):void 0}})}function qa(e,t=!1){return t?["string","number","date","reference"].includes(e.dataType):e.dataType==="array"?e.of?qa(e.of,!0):!1:["string","number","boolean","date","reference","array"].includes(e.dataType)}function er({text:e,...t}){return r.jsx("div",{className:"flex w-full h-screen max-h-full max-w-full bg-gray-50 dark:bg-gray-900 gap-4",children:r.jsxs("div",{className:"m-auto flex flex-col gap-2 items-center",children:[r.jsx(p.CircularProgress,{...t}),e&&r.jsx(p.Typography,{color:"secondary",variant:"caption",className:"text-center",children:e})]})})}const Ps=d.memo(function({resizeHandleRef:t,columnIndex:o,isResizingIndex:a,sort:n,onColumnSort:i,onFilterUpdate:s,filter:c,column:l,onClickResizeColumn:u,createFilterField:m,AdditionalHeaderWidget:h}){const[f,A]=d.useState(!1),[g,b]=d.useState(!1),[y,k]=d.useState(!1),v=d.useCallback(x=>{b(!0)},[]),_=d.useCallback((x,S)=>{s(l,x),S!==void 0&&b(S)},[l,s]),E=a===o,B=!(a!==o&&a>0)&&(f||E);return r.jsx(re,{children:r.jsxs("div",{className:p.cn("flex py-0 px-3 h-full text-xs uppercase font-semibold relative select-none items-center bg-gray-50 dark:bg-gray-900","text-gray-600 hover:text-gray-800 dark:text-gray-400 dark:hover:text-gray-200 ","hover:bg-gray-100 dark:hover:bg-gray-800 hover:bg-opacity-50 dark:hover:bg-opacity-50",l.frozen?"sticky left-0 z-10":"relative z-0"),style:{left:l.frozen?0:void 0,minWidth:l.width,maxWidth:l.width},onMouseEnter:()=>A(!0),onMouseMove:()=>A(!0),onMouseLeave:()=>A(!1),children:[r.jsx("div",{className:"overflow-hidden flex-grow",children:r.jsxs("div",{className:`flex items-center justify-${l.headerAlign} flex-row`,children:[l.icon,r.jsx("div",{className:"truncate -webkit-box w-full mx-1 overflow-hidden",style:{WebkitBoxOrient:"vertical",WebkitLineClamp:2,justifyContent:l.align},children:l.title})]})}),r.jsxs(r.Fragment,{children:[h&&r.jsx(h,{onHover:f||g}),l.sortable&&(n||B||g)&&r.jsx(p.Badge,{color:"secondary",invisible:!n,children:r.jsxs(p.IconButton,{size:"small",className:f||g?"bg-white dark:bg-gray-950":void 0,onClick:()=>{i(l.key)},children:[!n&&r.jsx(p.ArrowUpwardIcon,{}),n==="asc"&&r.jsx(p.ArrowUpwardIcon,{}),n==="desc"&&r.jsx(p.ArrowUpwardIcon,{className:"rotate-180"})]})})]}),l.filter&&m&&r.jsx("div",{children:r.jsx(p.Badge,{color:"secondary",invisible:!c,children:r.jsx(p.Popover,{open:g,onOpenChange:b,className:y?"hidden":void 0,modal:!0,trigger:r.jsx(p.IconButton,{className:f||g?"bg-white dark:bg-gray-950":void 0,size:"small",onClick:v,children:r.jsx(p.FilterListIcon,{size:"small"})}),children:r.jsx(Ts,{column:l,filter:c,onHover:f,onFilterUpdate:_,createFilterField:m,hidden:y,setHidden:k})})})}),l.resizable&&r.jsx("div",{ref:t,className:p.cn("absolute h-full w-[6px] top-0 right-0 cursor-col-resize",B&&"bg-gray-300 dark:bg-gray-700"),onMouseDown:u?()=>u(o,l):void 0})]})})},q);function Ts({column:e,onFilterUpdate:t,filter:o,onHover:a,createFilterField:n,hidden:i,setHidden:s}){const c=e.key,[l,u]=d.useState(o);if(d.useEffect(()=>{u(o)},[o]),!e.filter)return null;const m=()=>{t(l,!1)},h=g=>{t(void 0,!1)},f=!!o,A=n({id:c,filterValue:l,setFilterValue:u,column:e,hidden:i,setHidden:s});return A?r.jsxs("form",{noValidate:!0,onSubmit:g=>{g.stopPropagation(),g.preventDefault(),m()},className:"text-gray-900 dark:text-white",children:[r.jsx("div",{className:p.cn(p.defaultBorderMixin,"py-4 px-6 text-xs font-semibold uppercase border-b"),children:e.title??c}),A&&r.jsx("div",{className:"m-4",children:A}),r.jsxs("div",{className:"flex justify-end m-4",children:[r.jsx(p.Button,{className:"mr-4",disabled:!f,variant:"text",color:"primary",type:"reset","aria-label":"filter clear",onClick:h,children:"Clear"}),r.jsx(p.Button,{variant:"outlined",color:"primary",type:"submit",children:"Filter"})]})]}):null}const Qs=({columns:e,currentSort:t,onColumnSort:o,onFilterUpdate:a,sortByProperty:n,filter:i,onColumnResize:s,onColumnResizeEnd:c,createFilterField:l,AddColumnComponent:u})=>{const m=e.map(()=>d.createRef()),[h,f]=d.useState(-1),A=d.useCallback((C,B,x)=>{const S=e[C],F=100,Q=800,P=B>Q?Q:B<F?F:B,T={width:P,key:S.key,column:{...S,width:P}};x?c(T):s(T)},[e,s,c]),g=d.useCallback(C=>{if(h>=0){const B=m[h].current?.parentElement?.getBoundingClientRect().left;return B?C.clientX-B:void 0}},[m,h]),b=d.useCallback(C=>{document.body.style.cursor=C?"col-resize":"auto"},[]),y=d.useCallback(C=>{C.stopPropagation(),C.preventDefault();const B=g(C);B&&A(h,B,!1)},[A,g,h]),k=d.useCallback(C=>{C.stopPropagation(),C.preventDefault();const B=g(C);B&&A(h,B,!0),f(-1),b(!1)},[A,g,h,b]),v=d.useCallback(()=>{document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",k)},[y,k]),_=d.useCallback(()=>{document.addEventListener("mousemove",y),document.addEventListener("mouseup",k)},[y,k]);d.useEffect(()=>(h>=0?_():v(),()=>{v()}),[_,h,v]);const E=d.useCallback(C=>{f(C),b(!0)},[b]);return r.jsxs("div",{className:p.cn(p.defaultBorderMixin,"z-20 sticky min-w-full flex w-fit flex-row top-0 left-0 h-12 border-b bg-gray-50 dark:bg-gray-900"),children:[e.map((C,B)=>{const x=e[B],S=x&&i&&i[x.key]?i[x.key]:void 0;return r.jsx(re,{children:r.jsx(Ps,{resizeHandleRef:m[B],columnIndex:B,isResizingIndex:h,onFilterUpdate:a,filter:S,sort:n===x.key?t:void 0,onColumnSort:o,onClickResizeColumn:E,column:x,createFilterField:l,AdditionalHeaderWidget:x.AdditionalHeaderWidget})},"header_"+x.key)}),u&&r.jsx(u,{})]})},Ds=d.memo(function({rowData:t,rowIndex:o,children:a,onRowClick:n,size:i,style:s,hoverRow:c,rowClassName:l}){const u=d.useCallback(m=>{n&&n({rowData:t,rowIndex:o,event:m})},[n,t,o]);return r.jsx("div",{className:p.cn("flex min-w-full text-sm border-b border-gray-200 dark:border-gray-800 border-opacity-40 dark:border-opacity-40",l?l(t):"",{"hover:bg-opacity-95":c,"cursor-pointer":n}),onClick:u,style:{...s,height:ft(i),width:"fit-content"},children:a})},q),Ms=d.memo(function(t){return t.rowData&&t.cellRenderer({cellData:t.cellData,rowData:t.rowData,rowIndex:t.rowIndex,isScrolling:!1,column:t.column,columns:t.columns,columnIndex:t.columnIndex,width:t.column.width})},(e,t)=>q(e.rowData,t.rowData)&&q(e.column,t.column)&&q(e.cellData,t.cellData)&&q(e.rowIndex,t.rowIndex)&&q(e.cellRenderer,t.cellRenderer)&&q(e.columnIndex,t.columnIndex)),tr=d.createContext({});tr.displayName="VirtualListContext";const Os=d.forwardRef(({children:e,...t},o)=>r.jsx(tr.Consumer,{children:a=>{const n=a.customView;return r.jsxs(r.Fragment,{children:[r.jsx("div",{id:"virtual-table",style:{position:"relative",height:"100%"},children:r.jsxs("div",{ref:o,...t,style:{...t?.style,minHeight:"100%",position:"relative"},children:[r.jsx(Qs,{...a}),!n&&e]})}),n&&r.jsx("div",{style:{position:"sticky",top:"56px",flexGrow:1,height:"calc(100% - 56px)",marginTop:"calc(56px - 100vh)",left:0},children:n})]})}})),$a=d.memo(function({data:t,onResetPagination:o,onEndReached:a,size:n="m",columns:i,onRowClick:s,onColumnResize:c,filter:l,checkFilterCombination:u,onFilterUpdate:m,sortBy:h,error:f,emptyComponent:A,onSortByUpdate:g,loading:b,cellRenderer:y,hoverRow:k,createFilterField:v,rowClassName:_,className:E,endAdornment:C,AddColumnComponent:B}){const x=h?h[0]:void 0,S=h?h[1]:void 0,[F,Q]=d.useState(i),P=d.useRef(null),T=d.useRef(0);d.useEffect(()=>{Q(i)},[i]);const[O,R]=Co(),L=d.useCallback(N=>{Q(F.map(z=>z.key===N.column.key?N.column:z))},[F]),j=d.useCallback(N=>{Q(F.map(z=>z.key===N.column.key?N.column:z)),c&&c(N)},[F,c]),W=d.useRef();d.useEffect(()=>{W.current=l},[l]);const D=d.useCallback(()=>{T.current=0,P.current&&P.current.scrollTo(P.current?.scrollLeft,0)},[]),H=d.useCallback(N=>{const z=x===N&&S==="desc",$=x===N&&S==="asc"?"desc":z?void 0:"asc",G=z?void 0:N,I=W.current,K=$&&G?[G,$]:void 0;I&&u&&!u(I,K)&&m&&m(void 0),o&&o(),g&&g(K),D()},[u,S,m,o,g,D,x]),J=d.useCallback(()=>{T.current=0,g&&g(void 0)},[g]),V=Math.max((t?.length??0)*ft(n)-R.height,0),ae=d.useCallback(N=>{a&&(t?.length??0)>0&&N>T.current+600&&(T.current=N,a())},[t?.length,a]),Z=d.useCallback(({scrollOffset:N,scrollUpdateWasRequested:z})=>{!z&&N>=V-600&&ae(N)},[V,ae]),ee=d.useCallback((N,z)=>{T.current=0;const X=W.current;let $=X?{...X}:{};z?$[N.key]=z:delete $[N.key],!u||u($,x&&S?[x,S]:void 0)||($=z?{[N.key]:z}:{}),m&&m($),N.key!==x&&J()},[u,S,m,J,x]),oe=d.useCallback(()=>r.jsxs("div",{className:"h-full flex flex-col items-center justify-center sticky left-0",children:[r.jsx(p.Typography,{variant:"h6",children:"Error fetching data from the data source"}),f?.message&&r.jsx(p.Markdown,{className:"px-4 break-all",source:f.message})]}),[f?.message]),ie=d.useCallback(()=>b?r.jsx(er,{}):r.jsxs("div",{className:"flex flex-col overflow-auto items-center justify-center p-2 gap-2 h-full",children:[r.jsx(p.AssignmentIcon,{}),A]}),[A,b]),de=!b&&(t?.length??0)===0,fe=f?oe():de?ie():void 0,M={data:t,size:n,cellRenderer:y,columns:F,currentSort:S,onRowClick:s,customView:fe,onColumnResize:L,onColumnResizeEnd:j,filter:W.current,onColumnSort:H,onFilterUpdate:ee,sortByProperty:x,hoverRow:k??!1,createFilterField:v,rowClassName:_,endAdornment:C,AddColumnComponent:B};return r.jsx("div",{ref:O,className:p.cn("h-full w-full",E),children:r.jsx(tr.Provider,{value:M,children:r.jsx(zs,{outerRef:P,width:R.width,height:R.height,itemCount:(t?.length??0)+(C?1:0),onScroll:Z,includeAddColumn:!!B,itemSize:ft(n)},n)})})},q);function zs({outerRef:e,width:t,height:o,itemCount:a,onScroll:n,itemSize:i,includeAddColumn:s}){const c=d.useCallback(({index:l,style:u})=>r.jsx(tr.Consumer,{children:({onRowClick:m,data:h,columns:f,size:A="m",cellRenderer:g,hoverRow:b,rowClassName:y,endAdornment:k})=>{if(k&&l===(h??[]).length)return r.jsx("div",{style:{...u,height:"auto",position:"sticky",bottom:0,zIndex:1},children:k});const v=h&&h[l];return r.jsxs(Ds,{rowData:v,rowIndex:l,onRowClick:m,columns:f,hoverRow:b,rowClassName:y,style:{...u,top:`calc(${u.top}px + 48px)`},size:A,children:[f.map((_,E)=>{const C=v&&v[_.key];return r.jsx(Ms,{dataKey:_.key,cellRenderer:g,column:_,columns:f,rowData:v,cellData:C,rowIndex:l,columnIndex:E},`cell_${_.key}`)}),s&&r.jsx("div",{className:"w-20"})]},`row_${l}`)}}),[]);return r.jsx(Yi.FixedSizeList,{outerRef:e,innerElementType:Os,width:t,height:o,overscanCount:4,itemCount:a,onScroll:n,itemSize:i,children:c})}const Wa={"==":"==","!=":"!=",">":">","<":"<",">=":">=","<=":"<=",in:"In","not-in":"Not in","array-contains":"Contains","array-contains-any":"Contains Any"},Kr=["array-contains-any","in","not-in"];function Vs({name:e,value:t,setValue:o,isArray:a,path:n,title:i,previewProperties:s,setHidden:c}){const l=a?["array-contains"]:["==","!=",">","<",">=","<="];a?l.push("array-contains-any"):l.push("in","not-in");const[u,m]=t||[l[0],void 0],[h,f]=d.useState(u),[A,g]=d.useState(m),b=A?Array.isArray(A)?A.map(F=>F?.isEntityReference&&F?.isEntityReference()?F.id:null).filter(Boolean):[A.id]:[];function y(F,Q){const P=Kr.includes(h),T=Kr.includes(F);let O=Q;P!==T&&(O=T?O?.isEntityReference&&O?.isEntityReference()?[O]:[]:void 0),f(F),g(O);const R=O!==null&&Array.isArray(O)?O.length>0:O!==void 0;o(F&&R?[F,O]:void 0)}const k=ue(),v=d.useMemo(()=>n?k.getCollection(n):void 0,[n]),_=F=>{y(h,Ye(F))},E=F=>{y(h,F.map(Q=>Ye(Q)))},C=Kr.includes(h),B=At({multiselect:C,path:n,collection:v,onSingleEntitySelected:_,onMultipleEntitiesSelected:E,selectedEntityIds:b,onClose:()=>{c(!1)}}),x=()=>{c(!0),B.open()},S=F=>r.jsx(Ve,{disabled:!n,previewProperties:s,size:"medium",onClick:x,reference:F,hover:!0,allowEntityNavigation:!1});return r.jsxs("div",{className:"flex w-[440px] flex-row",children:[r.jsx("div",{className:"w-[120px]",children:r.jsx(p.Select,{value:h,onValueChange:F=>{y(F,A)},renderValue:F=>Wa[F],children:l.map(F=>r.jsx(p.SelectItem,{value:F,children:Wa[F]},F))})}),r.jsxs("div",{className:"flex-grow ml-2 h-full",children:[A&&Array.isArray(A)&&r.jsx("div",{children:A.map((F,Q)=>S(F))}),A&&!Array.isArray(A)&&r.jsx("div",{children:S(A)}),(!A||Array.isArray(A)&&A.length===0)&&r.jsx(p.Button,{onClick:x,variant:"outlined",className:"h-full w-full",children:C?"Select references":"Select reference"})]})]})}const Ja={"==":"==","!=":"!=",">":">","<":"<",">=":">=","<=":"<=",in:"In","not-in":"Not in","array-contains":"Contains","array-contains-any":"Any"},Rr=["array-contains-any","in","not-in"];function Gs({name:e,value:t,setValue:o,dataType:a,isArray:n,enumValues:i,title:s}){const c=n?["array-contains"]:["==","!=",">","<",">=","<="];i&&(n?c.push("array-contains-any"):c.push("in","not-in"));const[l,u]=t||[c[0],void 0],[m,h]=d.useState(l),[f,A]=d.useState(u);function g(y,k){let v=k;const _=Rr.includes(m),E=Rr.includes(y);_!==E&&(v=E?typeof k=="string"||typeof k=="number"?[k]:[]:""),typeof v=="number"&&isNaN(v)&&(v=void 0),h(y),A(v);const C=v!==null&&Array.isArray(v)?v.length>0:v!==void 0;o(y&&C?[y,v]:void 0)}const b=Rr.includes(m);return r.jsxs("div",{className:"flex w-[440px] items-center",children:[r.jsx("div",{className:"w-[80px]",children:r.jsx(p.Select,{value:m,position:"item-aligned",onValueChange:y=>{g(y,f)},renderValue:y=>Ja[y],children:c.map(y=>r.jsx(p.SelectItem,{value:y,children:Ja[y]},y))})}),r.jsxs("div",{className:"flex-grow ml-2",children:[!i&&r.jsx(p.TextField,{type:a==="number"?"number":void 0,value:f!==void 0?String(f):"",onChange:y=>{const k=a==="number"?parseFloat(y.target.value):y.target.value;g(m,k)},endAdornment:f&&r.jsx(p.IconButton,{onClick:y=>g(m,void 0),children:r.jsx(p.ClearIcon,{})})}),i&&r.jsx(p.Select,{position:"item-aligned",value:f!==void 0?Array.isArray(f)?f.map(y=>String(y)):String(f):n?[]:"",onValueChange:y=>{g(m,a==="number"?parseInt(y):y)},multiple:b,endAdornment:f&&r.jsx(p.IconButton,{className:"absolute right-3 top-2",onClick:y=>g(m,void 0),children:r.jsx(p.ClearIcon,{})}),renderValue:y=>r.jsx(Se,{enumKey:y,enumValues:i,size:"small"},`select_value_${e}_${y}`),children:i.map(y=>r.jsx(p.SelectItem,{value:String(y.id),children:r.jsx(Se,{enumKey:String(y.id),enumValues:i,size:"small"})},`select_value_${e}_${y.id}`))})]})]})}function Ys({name:e,title:t,value:o,setValue:a}){function n(c){a(c!==void 0?["==",c]:void 0)}const i=o&&o[1],s=!!o;return r.jsx("div",{className:"w-[200px]",children:r.jsx(p.BooleanSwitchWithLabel,{value:i,allowIndeterminate:!0,onValueChange:c=>n(c===null?void 0:c),label:s?i?`${t} is true`:`${t} is false`:"No filter"})})}const Ha={"==":"==","!=":"!=",">":">","<":"<",">=":">=","<=":"<=","not-in":"not in",in:"in","array-contains":"Contains","array-contains-any":"Any"},Za=["array-contains-any","in"];function js({name:e,isArray:t,mode:o,value:a,setValue:n,title:i}){const{locale:s}=te(),c=t?["array-contains"]:["==","!=",">","<",">=","<="],[l,u]=a||[c[0],void 0],[m,h]=d.useState(l),[f,A]=d.useState(u);function g(b,y){let k=y;const v=Za.includes(m),_=Za.includes(b);v!==_&&(k=_?y?[y]:[]:""),h(b),A(k===null?void 0:k);const E=k!==null&&Array.isArray(k)?k.length>0:k!==void 0;n(b&&E?[b,k]:void 0)}return r.jsxs("div",{className:"flex w-[440px] items-center",children:[r.jsx("div",{className:"w-[80px]",children:r.jsx(p.Select,{value:m,onValueChange:b=>{g(b,f)},renderValue:b=>Ha[b],children:c.map(b=>r.jsx(p.SelectItem,{value:b,children:Ha[b]},b))})}),r.jsx("div",{className:"flex-grow ml-2",children:r.jsx(p.DateTimeField,{mode:o,size:"medium",locale:s,value:f,onChange:b=>{g(m,b===null?void 0:b)},clearable:!0})})]})}const Xa=d.memo(function({onValueChange:t,cellRenderer:o,onEntityClick:a,onColumnResize:n,hoverRow:i=!0,size:s,inlineEditing:c=!1,tableController:{data:l,dataLoading:u,noMoreToLoad:m,dataLoadingError:h,filterValues:f,setFilterValues:A,sortBy:g,setSortBy:b,setSearchString:y,clearFilter:k,itemCount:v,setItemCount:_,pageSize:E=50,paginationEnabled:C,checkFilterCombination:B,setPopupCell:x},filterable:S=!0,emptyComponent:F,columns:Q,forceFilter:P,highlightedRow:T,endAdornment:O,AddColumnComponent:R}){const L=d.useRef(null),[j,W]=d.useState(void 0),D=()=>{!C||u||m||v!==void 0&&_?.(v+E)},H=d.useCallback(()=>{_?.(E)},[E]),J=d.useCallback(({rowData:ee})=>{if(!c)return a&&a(ee)},[a,c]);p.useOutsideAlerter(L,()=>{j&&ae()},!!j),d.useEffect(()=>{const ee=oe=>{oe.keyCode===27&&ae()};return document.addEventListener("keydown",ee,!1),()=>{document.removeEventListener("keydown",ee,!1)}});const V=d.useCallback(ee=>{W(ee)},[]),ae=d.useCallback(()=>{W(void 0)},[]),Z=d.useCallback(ee=>{A?.({...ee,...P})},[P]);return r.jsx(Va.Provider,{value:{setPopupCell:x,select:V,onValueChange:t,size:s??"m",selectedCell:j},children:r.jsx("div",{className:"h-full w-full flex flex-col bg-white dark:bg-gray-950",ref:L,children:r.jsx($a,{data:l,columns:Q,cellRenderer:o,onRowClick:c?void 0:a?J:void 0,onEndReached:D,onResetPagination:H,error:h,paginationEnabled:C,onColumnResize:n,size:s,loading:u,filter:f,onFilterUpdate:A?Z:void 0,sortBy:g,onSortByUpdate:b,hoverRow:i,checkFilterCombination:B,createFilterField:S?Ls:void 0,rowClassName:d.useCallback(ee=>T?.(ee)?"bg-gray-100 bg-opacity-75 dark:bg-gray-800 dark:bg-opacity-75":"",[T]),className:"flex-grow",emptyComponent:F,endAdornment:O,AddColumnComponent:R})})})},q);function Ls({id:e,filterValue:t,setFilterValue:o,column:a,hidden:n,setHidden:i}){if(!a.custom)return null;const{resolvedProperty:s}=a.custom,c=s?.dataType==="array",l=c?s.of:s;if(!l)return null;if(l.dataType==="reference")return r.jsx(Vs,{value:t,setValue:o,name:e,isArray:c,path:l.path,title:s?.name,previewProperties:l?.previewProperties,hidden:n,setHidden:i});if(l.dataType==="number"||l.dataType==="string"){const u=l.name,m=l.enumValues?Ue(l.enumValues):void 0;return r.jsx(Gs,{value:t,setValue:o,name:e,dataType:l.dataType,isArray:c,enumValues:m,title:u})}else if(l.dataType==="boolean"){const u=l.name;return r.jsx(Ys,{value:t,setValue:o,name:e,title:u})}else if(l.dataType==="date"){const u=l.name;return r.jsx(js,{value:t,setValue:o,name:e,mode:l.mode,isArray:c,title:u})}return r.jsx("div",{children:`Currently the filter field ${s.dataType} is not supported`})}const eo=function({forceFilter:t,actionsStart:o,actions:a,title:n,tableRowActionsBuilder:i,uniqueFieldValidator:s,getPropertyFor:c,onValueChange:l,selectionController:u,highlightedEntities:m,onEntityClick:h,onColumnResize:f,onSizeChanged:A,textSearchEnabled:g=!1,hoverRow:b=!0,inlineEditing:y=!1,additionalFields:k,displayedColumnIds:v,defaultSize:_,properties:E,tableController:C,filterable:B=!0,sortable:x=!0,endAdornment:S,AddColumnComponent:F,AdditionalHeaderWidget:Q,additionalIDHeaderWidget:P,emptyComponent:T,getIdColumnWidth:O,onTextSearchClick:R,textSearchLoading:L}){const j=d.useRef(null),W=De(),D=!!t,H=(u?.selectedEntities?.length>0?u?.selectedEntities:m)?.filter(Boolean),J=Ae(),[V,ae]=d.useState(_??"m"),Z=H?.map(I=>I.id),ee=!!C.filterValues&&Object.keys(C.filterValues).length>0,oe=d.useCallback(I=>{A&&A(I),ae(I)},[]),ie=d.useCallback(I=>C.setSearchString?.(I),[]),de=d.useMemo(()=>k?k.map(I=>({[I.key]:I})).reduce((I,K)=>({...I,...K}),{}):{},[k]),fe=s,M=({column:I,columnIndex:K,rowData:le,rowIndex:ne})=>{const he=le,Me=I.key;let Ge=I.custom?.disabled;const rt=he.values?Oe(he.values,Me):void 0,Ne=c?.({propertyKey:Me,propertyValue:rt,entity:he})??I.custom.resolvedProperty;return Ne?.disabled||(Ge=!1),Ne?r.jsx(re,{children:he?r.jsx(Ga,{readonly:!y,align:I.align??"left",propertyKey:Me,property:Ne,value:he?.values?Oe(he.values,Me):void 0,customFieldValidator:fe,columnIndex:K,width:I.width,height:ft(V),entity:he,disabled:Ge,path:he.path},`property_table_cell_${he.id}_${Me}`):je()}):null},N=d.useCallback(({column:I,rowData:K,width:le})=>{const ne=K,he=de[I.key],Me=he.dependencies?Object.entries(ne.values).filter(([Ne,ot])=>he.dependencies.includes(Ne)).reduce((Ne,ot)=>({...Ne,...ot}),{}):ne,Ge=he.Builder;if(!Ge&&!he.value)throw new Error("When using additional fields you need to provide a Builder or a value");const rt=Ge?r.jsx(Ge,{entity:ne,context:J}):r.jsx(r.Fragment,{children:he.value?.({entity:ne,context:J})});return r.jsx(Xt,{width:le,size:V,value:Me,selected:!1,disabled:!0,align:"left",allowScroll:!1,showExpandIcon:!1,disabledTooltip:"This column can't be edited directly",children:r.jsx(re,{children:rt})},`additional_table_cell_${ne.id}_${I.key}`)},[V,Z]),z=(()=>{const I=Ua({properties:E,sortable:x,forceFilter:t,disabledFilter:D,AdditionalHeaderWidget:Q}),K=k?k.map(le=>({key:le.key,align:"left",sortable:!1,title:le.name,width:le.width??200})):[];return[...I,...K]})(),$=[{key:"id_ewcfedcswdf3",width:O?.()??(W?160:130),title:"ID",resizable:!1,frozen:W,headerAlign:"center",align:"center",AdditionalHeaderWidget:()=>P},...v.map(I=>z.find(K=>K.key===I.key)).filter(Boolean)],G=I=>{const K=I.column,le=I.columns,ne=K.key;try{if(I.columnIndex===0)return i?i({entity:I.rowData,size:V,width:K.width,frozen:K.frozen}):r.jsx(Kt,{entity:I.rowData,width:K.width,frozen:K.frozen,isSelected:!1,size:V});if(de[ne])return N(I);if(I.columnIndex<le.length+1)return M(I);throw Error("Internal: columns not mapped properly")}catch(he){return console.error("Error rendering cell",he),r.jsx(Xt,{size:V,width:K.width,saved:!1,value:null,align:"left",fullHeight:!1,disabled:!0,children:r.jsx(be,{error:he})})}};return r.jsxs("div",{ref:j,className:"h-full w-full flex flex-col bg-white dark:bg-gray-950",children:[r.jsx(Ss,{forceFilter:D,filterIsSet:ee,onTextSearch:g?ie:void 0,textSearchLoading:L,onTextSearchClick:g?R:void 0,clearFilter:C.clearFilter,size:V,onSizeChanged:oe,title:n,actionsStart:o,actions:a,loading:C.dataLoading}),r.jsx(Xa,{columns:$,size:V,inlineEditing:y,cellRenderer:G,onEntityClick:h,highlightedRow:d.useCallback(I=>Z?.includes(I.id)??!1,[Z]),tableController:C,onValueChange:l,onColumnResize:f,hoverRow:b,filterable:B,emptyComponent:T,endAdornment:S,AddColumnComponent:F})]})};function Us({data:e,entitiesDisplayedFirst:t}){if(!t)return e;const o=new Set(t.map(a=>a.id));return[...t,...e.filter(a=>!o.has(a.id))]}function Ka(e,t,o=5e3){const[a,n]=d.useState(e),i=d.useRef(a.length??0),s=d.useRef(!1),c=d.useRef(t),l=!q(c.current,t),u=e.length>=i.current||l;return d.useEffect(()=>{const m=()=>{q(a,e)||(c.current=t,i.current=e.length,n(e)),s.current=!1};s.current=!0;let h;return u?m():h=setTimeout(m,o),()=>{clearTimeout(h),s.current&&u&&m()}},[e,o,t,u]),u?e:a}const qs=50;function to({fullPath:e,collection:t,entitiesDisplayedFirst:o,lastDeleteTimestamp:a,forceFilter:n}){const{initialFilter:i,initialSort:s,forceFilter:c}=t,[l,u]=d.useState(void 0),m=ue(),h=ze(t),f=d.useMemo(()=>m.resolveAliasesFrom(e),[e,m.resolveAliasesFrom]),A=n??c,g=t.pagination===void 0||!!t.pagination,b=typeof t.pagination=="number"?t.pagination:qs,[y,k]=d.useState(),[v,_]=d.useState(g?b:void 0),E=d.useMemo(()=>{if(s&&A&&!J(A,s)){console.warn("Initial sort is not compatible with the force filter. Ignoring initial sort");return}return s},[s,A]),[C,B]=d.useState(A??i??void 0),[x,S]=d.useState(E),F=x?x[0]:void 0,Q=x?x[1]:void 0,P=Ae(),[T,O]=d.useState([]),[R,L]=d.useState(!1),[j,W]=d.useState(),[D,H]=d.useState(!1),J=d.useCallback((oe,ie)=>h.isFilterCombinationValid?h.isFilterCombinationValid({path:f,collection:t,filterValues:oe,sortBy:ie}):!0,[]),V=d.useCallback(()=>B(A??void 0),[A]),ae=d.useCallback(oe=>{if(A){console.warn("Filter is not compatible with the force filter. Ignoring filter");return}oe&&Object.keys(oe).length===0?B(void 0):B(oe)},[A]);d.useEffect(()=>{L(!0);const oe=async de=>{if(t.callbacks?.onFetch)try{de=await Promise.all(de.map(fe=>t.callbacks.onFetch({collection:t,path:f,entity:fe,context:P})))}catch(fe){console.error(fe)}L(!1),W(void 0),O(de.map(fe=>({...fe}))),H(!v||de.length<v)},ie=de=>{console.error("ERROR",de),L(!1),O([]),W(de)};return h.listenCollection?h.listenCollection({path:f,collection:t,onUpdate:oe,onError:ie,searchString:y,filter:C,limit:v,startAfter:void 0,orderBy:F,order:Q}):(h.fetchCollection({path:f,collection:t,searchString:y,filter:C,limit:v,startAfter:void 0,orderBy:F,order:Q}).then(oe).catch(ie),()=>{})},[f,v,Q,F,C,y]);const Z=Us({data:T,entitiesDisplayedFirst:o});return{data:Ka(Z,{filterValues:C,sortBy:x,searchString:y,lastDeleteTimestamp:a}),dataLoading:R,noMoreToLoad:D,dataLoadingError:j,filterValues:C,setFilterValues:ae,sortBy:x,setSortBy:S,searchString:y,setSearchString:k,clearFilter:V,itemCount:v,setItemCount:_,paginationEnabled:g,pageSize:b,checkFilterCombination:J,popupCell:l,setPopupCell:u}}function ro(e){const[t,o]=d.useState([]),a=d.useCallback(i=>{let s;t.map(c=>c.id).includes(i.id)?(e?.(i,!1),s=t.filter(c=>c.id!==i.id)):(e?.(i,!0),s=[...t,i]),o(s)},[t]),n=d.useCallback(i=>t.map(s=>s.id).includes(i.id),[t]);return{selectedEntities:t,setSelectedEntities:o,isEntitySelected:n,toggleEntitySelection:a}}function oo({collection:e,fullPath:t,parentCollectionIds:o}){const a=Ae(),n=te(),[i,s]=d.useState(!1),[c,l]=d.useState(!1);let u,m=!!e.textSearchEnabled;return n?.plugins&&(u=n.plugins?.find(f=>!!f.collectionView?.onTextSearchClick)?()=>{s(!0),Promise.all(n.plugins?.map(f=>f.collectionView?.onTextSearchClick?f.collectionView.onTextSearchClick({context:a,path:t,collection:e,parentCollectionIds:o}):Promise.resolve(!0))).then(f=>{f.every(Boolean)&&l(!0)}).finally(()=>s(!1))}:void 0,n.plugins?.forEach(f=>{m||f.collectionView?.showTextSearchBar&&(m=f.collectionView.showTextSearchBar({context:a,path:t,collection:e,parentCollectionIds:o}))})),{textSearchLoading:i,textSearchInitialised:c,onTextSearchClick:u,textSearchEnabled:m}}function Ra({onSingleEntitySelected:e,onMultipleEntitiesSelected:t,multiselect:o,collection:a,path:n,selectedEntityIds:i,description:s,forceFilter:c,maxSelection:l}){const u=nr(),m=We(),h=ue(),f=pt(),A=te(),g=h.resolveAliasesFrom(n),b=ze(a),[y,k]=d.useState([]),v=j=>{let W;const D=_.selectedEntities;if(f.onAnalyticsEvent?.("reference_selection_toggle",{path:g,entityId:j.id}),D){if(D.map(H=>H.id).indexOf(j.id)>-1)W=D.filter(H=>H.id!==j.id);else{if(l&&D.length>=l)return;W=[...D,j]}_.setSelectedEntities(W),t&&t(W)}},_=ro(v);d.useEffect(()=>{let j=!1;const W=i?.map(D=>D?.toString()).filter(Boolean);return W&&a?Promise.all(W.map(D=>b.fetchEntity({path:g,entityId:D,collection:a}))).then(D=>{if(!j){const H=D.filter(J=>J!==void 0);_.setSelectedEntities(H),k(H)}}):(_.setSelectedEntities([]),k([])),()=>{j=!0}},[b,g,i,a,_.setSelectedEntities]);const E=()=>{f.onAnalyticsEvent?.("reference_selection_clear",{path:g}),_.setSelectedEntities([]),!o&&e?e(null):t&&t([])},C=j=>{!o&&e?(f.onAnalyticsEvent?.("reference_selected_single",{path:g,entityId:j.id}),e(j),u.close(!1)):v(j)},B=()=>{f.onAnalyticsEvent?.("reference_selection_new_entity",{path:g}),m.open({path:g,collection:a,updateUrl:!0,onUpdate:({entity:j})=>{k([j,...y]),C(j)},closeOnSave:!0})},x=({entity:j,size:W,width:D,frozen:H})=>{const J=_.selectedEntities,V=J&&J.map(ae=>ae.id).indexOf(j.id)>-1;return r.jsx(Kt,{width:D,frozen:H,entity:j,size:W,isSelected:V,selectionEnabled:o,hideId:a?.hideIdFromCollection,fullPath:g,selectionController:_})},S=d.useCallback(j=>{j.stopPropagation(),u.close(!1)},[u]);if(!a)return r.jsx(be,{error:"Could not find collection with id "+a});const F=d.useMemo(()=>Pe({collection:a,path:g,values:{},fields:A.propertyConfigs}),[a,A.propertyConfigs,g]),Q=Xr(F,!1),P=to({fullPath:g,collection:a,entitiesDisplayedFirst:y,forceFilter:c}),{textSearchLoading:T,textSearchInitialised:O,onTextSearchClick:R,textSearchEnabled:L}=oo({collection:a,fullPath:g});return r.jsxs("div",{className:"flex flex-col h-full",children:[r.jsx("div",{className:"flex-grow",children:y&&r.jsx(eo,{textSearchLoading:T,onTextSearchClick:O?void 0:R,textSearchEnabled:L,displayedColumnIds:Q,onEntityClick:C,tableController:P,tableRowActionsBuilder:x,title:r.jsx(p.Typography,{variant:"subtitle2",children:a.singularName?`Select ${a.singularName}`:`Select from ${a.name}`}),defaultSize:a.defaultSize,properties:F.properties,forceFilter:c,inlineEditing:!1,selectionController:_,actions:r.jsx($s,{collection:a,path:g,onNewClick:B,onClear:E})})}),r.jsxs(p.DialogActions,{translucent:!1,children:[s&&r.jsx(p.Typography,{variant:"body2",className:"flex-grow text-left",children:s}),r.jsx(p.Button,{onClick:S,color:"primary",variant:"filled",children:"Done"})]})]})}function $s({collection:e,path:t,onClear:o,onNewClick:a}){const n=$e(),i=De(),s=a?l=>{l.preventDefault(),a()}:void 0,c=lt(e,n,t,null)&&s&&(i?r.jsxs(p.Button,{onClick:s,startIcon:r.jsx(p.AddIcon,{}),variant:"outlined",color:"primary",children:["Add ",e.singularName??e.name]}):r.jsx(p.Button,{onClick:s,variant:"outlined",color:"primary",children:r.jsx(p.AddIcon,{})}));return r.jsxs(r.Fragment,{children:[r.jsx(p.Button,{onClick:o,variant:"text",color:"primary",children:"Clear"}),c]})}function rr(e){return Array.isArray(e)?e:e?[e]:[]}function ao({children:e,group:t}){const o=dt();return r.jsx(p.ExpandablePanel,{invisible:!0,titleClassName:"font-medium text-sm text-gray-600 dark:text-gray-400",className:"py-4",initiallyExpanded:!(o?.collapsedGroups??[]).includes(t??"ungrouped"),onExpandedChange:a=>{if(o)if(a)o.setCollapsedGroups((o.collapsedGroups??[]).filter(n=>n!==(t??"ungrouped")));else{const n=(o.collapsedGroups??[]).concat(t??"ungrouped");o.setCollapsedGroups(n)}},title:r.jsx(p.Typography,{color:"secondary",className:"font-medium ml-1",children:t?.toUpperCase()??"Views".toUpperCase()}),children:r.jsx("div",{className:"mb-8",children:e})})}function ei({name:e,description:t,icon:o,actions:a,onClick:n}){return r.jsx(p.Card,{className:p.cn("h-full p-4 cursor-pointer min-h-[230px]"),onClick:()=>{n?.()},children:r.jsxs("div",{className:"flex flex-col items-start h-full",children:[r.jsxs("div",{className:"flex-grow w-full",children:[r.jsxs("div",{className:"h-10 flex items-center w-full justify-between text-gray-300 dark:text-gray-600",children:[o,r.jsx("div",{className:"flex items-center gap-1",onClick:i=>{i.preventDefault(),i.stopPropagation()},children:a})]}),r.jsx(p.Typography,{gutterBottom:!0,variant:"h5",component:"h2",children:e}),t&&r.jsx(p.Typography,{variant:"body2",color:"secondary",component:"div",children:r.jsx(p.Markdown,{source:t})})]}),r.jsx("div",{style:{alignSelf:"flex-end"},children:r.jsx("div",{className:"p-4",children:r.jsx(p.ArrowForwardIcon,{className:"text-primary"})})})]})})}function ti({name:e,url:t,icon:o}){return r.jsx(r.Fragment,{children:r.jsxs(ge.Link,{tabIndex:0,className:p.cn(p.cardMixin,p.cardClickableMixin,p.focusedMixin,"cursor-pointer flex flex-row items-center px-4 py-2 text-inherit dark:text-inherit visited:text-inherit visited:dark:text-inherit hover:text-inherit hover:dark:text-inherit "),to:t,children:[r.jsxs("div",{className:"flex flex-row items-center flex-grow gap-2 ",children:[o,r.jsx(p.Typography,{gutterBottom:!0,variant:"h5",component:"h2",className:"mb-0 ml-4",children:e})]}),r.jsx("div",{className:"p-4",children:r.jsx(p.ArrowForwardIcon,{color:"primary"})})]})})}function ri({path:e,collection:t,view:o,url:a,name:n,description:i,onClick:s,type:c}){const l=dt(),u=r.jsx(Jt,{collectionOrView:t??o}),m=ge.useNavigate(),h=Ae(),f=te(),A=(l?.favouritePaths??[]).includes(e),g=l?[r.jsx(p.IconButton,{onClick:y=>{y.preventDefault(),y.stopPropagation(),A?l.setFavouritePaths(l.favouritePaths.filter(k=>k!==e)):l.setFavouritePaths([...l.favouritePaths,e])},children:A?r.jsx(p.StarIcon,{size:18,className:"text-secondary"}):r.jsx(p.StarBorderIcon,{size:18,className:"text-gray-400 dark:text-gray-500"})},"favourite")]:[];if(f.plugins&&t){const y={path:e,collection:t,context:h};f.plugins.forEach((k,v)=>g.push(k.homePage?.CollectionActions?r.jsx(k.homePage.CollectionActions,{...y,extraProps:k.homePage.extraProps},`actions_${v}`):null))}const b=r.jsx(r.Fragment,{children:g});return c==="admin"?r.jsx(ti,{icon:u,name:n,url:a}):r.jsx(ei,{icon:u,name:n,description:i,actions:b,onClick:()=>{s?.(),m(a),l&&l.setRecentlyVisitedPaths([e,...(l.recentlyVisitedPaths??[]).filter(y=>y!==e)])}})}function Ws({entry:e}){const t=ge.useNavigate(),o=dt();if(!o)return null;const a=o.favouritePaths.includes(e.path),n=i=>{i.preventDefault(),i.stopPropagation(),a?o.setFavouritePaths(o.favouritePaths.filter(s=>s!==e.path)):o.setFavouritePaths([...o.favouritePaths,e.path])};return r.jsx(p.Chip,{onClick:()=>t(e.url),icon:a?r.jsx(p.StarIcon,{onClick:n,size:18,className:"text-secondary"}):r.jsx(p.StarBorderIcon,{onClick:n,size:18,className:"text-gray-400 dark:text-gray-500"}),children:e.name},e.path)}function Js({hidden:e}){const t=ue(),o=dt();if(!o)return null;const a=(o?.favouritePaths??[]).map(n=>t.topLevelNavigation?.navigationEntries.find(i=>i.path===n)).filter(Boolean);return r.jsx(p.Collapse,{in:a.length>0,children:r.jsx("div",{className:"flex flex-row flex-wrap gap-2 pb-2 min-h-[32px]",children:a.map(n=>r.jsx(Ws,{entry:n},n.path))})})}const io={};function Hs(){const e=ge.useLocation(),t=d.useRef(null),[o,a]=d.useState(0),[n,i]=d.useState("down"),s=d.useCallback(()=>{!t.current||!e.key||(io[e.key]=t.current.scrollTop,a(t.current.scrollTop),i(t.current.scrollTop>o?"down":"up"))},[t,e.key,o]);return d.useEffect(()=>{const c=t.current;if(c)return c.addEventListener("scroll",s,{passive:!0}),()=>{c&&c.removeEventListener("scroll",s)}},[t,s,e]),d.useEffect(()=>{!t.current||!io[e.key]||t.current.scrollTo({top:io[e.key],behavior:"auto"})},[e]),{containerRef:t,scroll:o,direction:n}}const ht=new So.Search("url");ht.addIndex("name"),ht.addIndex("description"),ht.addIndex("group"),ht.addIndex("path");function oi({additionalActions:e,additionalChildrenStart:t,additionalChildrenEnd:o}){const a=Ae(),n=te(),i=ue();if(!i.topLevelNavigation)throw Error("Navigation not ready in FireCMSHomePage");const{containerRef:s,scroll:c,direction:l}=Hs(),{navigationEntries:u,groups:m}=i.topLevelNavigation,[h,f]=d.useState(null),A=h?u.filter(_=>h.includes(_.url)):u;d.useEffect(()=>{ht.addDocuments(u)},[u]);const g=d.useCallback(_=>{if(!_||_==="")f(null);else{const E=ht.search(_);f(E.map(C=>C.url))}},[]),b=[...m];(A.filter(_=>!_.group).length>0||A.length===0)&&b.push(void 0);let y,k,v;if(n.plugins){const _={context:a};v=r.jsx(r.Fragment,{children:n.plugins.filter(E=>E.homePage?.includeSection).map((E,C)=>{const B=E.homePage.includeSection(_);return r.jsx(ao,{group:B.title,children:B.children},`plugin_section_${E.name}`)})}),y=r.jsx("div",{className:"flex flex-col gap-2",children:n.plugins.filter(E=>E.homePage?.additionalChildrenStart).map((E,C)=>r.jsx("div",{children:E.homePage.additionalChildrenStart},`plugin_children_start_${C}`))}),k=r.jsx("div",{className:"flex flex-col gap-2",children:n.plugins.filter(E=>E.homePage?.additionalChildrenEnd).map((E,C)=>r.jsx("div",{children:E.homePage.additionalChildrenEnd},`plugin_children_start_${C}`))})}return r.jsx("div",{id:"home_page",ref:s,className:"py-2 overflow-auto h-full w-full",children:r.jsxs(p.Container,{maxWidth:"6xl",children:[r.jsxs("div",{className:"w-full sticky py-4 transition-all duration-400 ease-in-out top-0 z-10 flex flex-row gap-4",style:{top:l==="down"?-84:0},children:[r.jsx(p.SearchBar,{onTextSearch:g,placeholder:"Search collections",large:!1,innerClassName:"w-full",className:"w-full flex-grow"}),e]}),r.jsx(Js,{hidden:!!h}),t,y,b.map((_,E)=>{const C=[],B={group:_,context:a};n.plugins&&n.plugins.forEach(S=>{S.homePage?.AdditionalCards&&C.push(...rr(S.homePage?.AdditionalCards))});const x=A.filter(S=>S.group===_||!S.group&&_===void 0);return x.length===0&&C.length===0?null:r.jsx(ao,{group:_,children:r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[x.map(S=>r.jsx("div",{className:"col-span-1",children:r.jsx(ri,{...S,onClick:()=>{let F;S.type==="collection"?F="home_navigate_to_collection":S.type==="view"?F="home_navigate_to_view":S.type==="admin"?F="home_navigate_to_admin_view":F="unmapped_event",a.analyticsController?.onAnalyticsEvent?.(F,{path:S.path})}})},`nav_${S.group}_${S.name}`)),C&&C.map((S,F)=>r.jsx("div",{children:r.jsx(S,{...B})},`nav_${_}_add_${F}`))]})},`plugin_section_${_}`)}),v,k,o]})})}function ai({collection:e,relativePath:t,parentCollectionIds:o,onNewClick:a,onMultipleDeleteClick:n,selectionEnabled:i,path:s,selectionController:c,tableController:l,collectionEntitiesCount:u}){const m=Ae(),f=te().plugins??[],A=$e(),g=De(),b=c.selectedEntities,y=lt(e,A,s,null)&&a&&(g?r.jsxs(p.Button,{id:`add_entity_${s}`,onClick:a,startIcon:r.jsx(p.AddIcon,{}),variant:"filled",color:"primary",children:["Add ",e.singularName??e.name]}):r.jsx(p.Button,{id:`add_entity_${s}`,onClick:a,variant:"filled",color:"primary",children:r.jsx(p.AddIcon,{})})),k=$t(e,A,s,null);let v;if(i){const C=g?r.jsxs(p.Button,{variant:"text",disabled:!b?.length||!k,startIcon:r.jsx(p.DeleteIcon,{}),onClick:n,color:"primary",className:"lg:w-20",children:["(",b?.length,")"]}):r.jsx(p.IconButton,{color:"primary",disabled:!b?.length||!k,onClick:n,children:r.jsx(p.DeleteIcon,{})});v=r.jsx(p.Tooltip,{title:k?"Delete":"You have selected at least one entity you cannot delete",children:C})}const _={path:s,relativePath:t,parentCollectionIds:o,collection:e,selectionController:c,context:m,tableController:l,collectionEntitiesCount:u},E=rr(e.Actions).map((C,B)=>r.jsx(re,{children:r.jsx(C,{..._})},`actions_${B}`));return f&&f.forEach((C,B)=>{C.collectionView?.CollectionActions&&E.push(...rr(C.collectionView?.CollectionActions).map((x,S)=>r.jsx(re,{children:r.jsx(x,{..._,...C.collectionView?.collectionActionsProps})},`plugin_actions_${B}_${S}`)))}),r.jsxs(r.Fragment,{children:[E,v,y]})}function Zs({containerRef:e,innerRef:t,x:o,y:a,onMove:n}){let i=0,s=0;const c=d.useRef(!1),l=g=>{if(g.button!==0||!e.current||g.defaultPrevented||g.innerClicked)return;const{x:b,y}=e.current.getBoundingClientRect();i=g.screenX-b,s=g.screenY-y,document.addEventListener("mousemove",f),document.addEventListener("mouseup",h),document.addEventListener("selectstart",m),c.current=!0},u=g=>{g.innerClicked=!0},m=g=>{g.preventDefault(),g.stopPropagation()},h=g=>{document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",h),document.removeEventListener("selectstart",m),g.stopPropagation(),c.current=!1},f=g=>{g.target.localName==="input"||!c.current||(n({x:g.screenX-i,y:g.screenY-s}),g.stopPropagation())},A=()=>{e.current&&(e.current.style.top=`${a}px`,e.current.style.left=`${o}px`)};d.useEffect(()=>{const g=e.current,b=t.current;if(!(!g||!b))return b&&b.addEventListener("mousedown",u),g&&g.addEventListener("mousedown",l),A(),()=>{g&&g.removeEventListener("mousedown",l),b&&b.removeEventListener("mousedown",u)}})}function Xs(){const[e,t]=d.useState({width:0,height:0});return d.useLayoutEffect(()=>{function o(){t({width:window.innerWidth,height:window.innerHeight})}return window.addEventListener("resize",o),o(),()=>window.removeEventListener("resize",o)},[]),e}const Ks=({onResize:e})=>{const t=d.useRef(0),o=d.useRef(null),a=d.useRef(e);a.current=e;const n=d.useCallback(s=>{t.current&&cancelAnimationFrame(t.current),t.current=requestAnimationFrame(()=>{a.current(s)})},[]),i=d.useCallback(()=>{const s=o.current;s&&s.contentDocument&&s.contentDocument.defaultView&&s.contentDocument.defaultView.addEventListener("resize",n)},[n]);return d.useEffect(()=>{const s=o.current;return()=>{s&&s.contentDocument&&s.contentDocument.defaultView&&s.contentDocument.defaultView.removeEventListener("resize",n)}},[n]),r.jsx("object",{onLoad:i,ref:o,tabIndex:-1,type:"text/html",data:"about:blank",title:"",style:{position:"absolute",top:0,left:0,height:"100%",width:"100%",pointerEvents:"none",zIndex:-1,opacity:0}})};function or({name:e,addLabel:t,value:o,disabled:a=!1,buildEntry:n,small:i,onInternalIdAdded:s,includeAddButton:c,newDefaultEntry:l=null,setFieldValue:u}){return r.jsx(go,{droppableId:e,addLabel:t,value:o,disabled:a,buildEntry:n,size:i?"small":"medium",onInternalIdAdded:s,includeAddButton:c,newDefaultEntry:l,onValueChange:m=>u(e,m)})}function xe({error:e,showError:t,property:o,includeDescription:a=!0,disabled:n}){const i=o.description||o.longDescription;if(!(t&&e)&&(!a||!i))return null;if(t&&e)return r.jsx(p.Typography,{variant:"caption",className:"ml-3.5 text-red-500 dark:text-red-500",children:e});const s=typeof o.disabled=="object"?o.disabled.disabledMessage:void 0;return r.jsxs("div",{className:"flex ml-3.5 mt-1",children:[r.jsx(p.Typography,{variant:"caption",color:n?"disabled":"secondary",className:"flex-grow",children:s||o.description}),o.longDescription&&r.jsx(p.Tooltip,{title:o.longDescription,side:"bottom",children:r.jsx(p.IconButton,{size:"small",className:"self-start",children:r.jsx(p.InfoIcon,{color:"disabled",size:"small"})})})]})}function Ce({icon:e,title:t,small:o,className:a,required:n}){return r.jsxs("span",{className:`inline-flex items-center my-0.5 ${o?"gap-1":"gap-2"} ${a??""}`,children:[e,r.jsx("span",{className:`text-start font-medium text-${o?"base":"sm"} origin-top-left transform ${o?"translate-x-2 scale-75":""}`,children:(t??"")+(n?" *":"")})]})}function no({propertyKey:e,value:t,setValue:o,error:a,showError:n,disabled:i,autoFocus:s,touched:c,property:l,includeDescription:u}){const m=l.enumValues;Te({property:l,value:t,setValue:o});const h=d.useCallback(f=>{f.stopPropagation(),f.preventDefault(),o(null)},[o]);return r.jsxs(r.Fragment,{children:[r.jsx(p.Select,{value:t?t.toString():"",disabled:i,position:"item-aligned",inputClassName:p.cn("w-full"),label:r.jsx(Ce,{icon:ve(l,"small"),required:l.validation?.required,title:l.name,className:"text-text-secondary dark:text-text-secondary-dark ml-3.5"}),endAdornment:l.clearable&&r.jsx(p.IconButton,{onClick:h,children:r.jsx(p.ClearIcon,{})}),onValueChange:f=>{const A=f?l.dataType==="number"?parseFloat(f):f:null;return o(A)},renderValue:f=>r.jsx(Se,{enumKey:f,enumValues:m,size:"medium"}),children:m&&m.map(f=>r.jsx(p.SelectItem,{value:String(f.id),children:r.jsx(Se,{enumKey:String(f.id),enumValues:m,size:"medium"})},f.id))}),r.jsx(xe,{includeDescription:u,showError:n,error:a,disabled:i,property:l})]})}function so({propertyKey:e,value:t,setValue:o,error:a,showError:n,disabled:i,property:s,includeDescription:c,autoFocus:l}){const u=s.of;if(!u)throw Error("Using wrong component ArrayEnumSelect");if(Array.isArray(u))throw Error("Using array properties instead of single one in `of` in ArrayProperty");if(u.dataType!=="string"&&u.dataType!=="number")throw Error("Field misconfiguration: array field of type string or number");const m=Ue(u.enumValues);if(!m)throw console.error(s),Error("Field misconfiguration: array field of type string or number needs to have enumValues");Te({property:s,value:t,setValue:o});const h=!!t&&Array.isArray(t),f=d.useCallback((A,g)=>{const b=A!==void 0?Yt(m,A):void 0;return r.jsxs(Se,{enumKey:A,enumValues:m,size:"medium",children:[b?.label??A,!g&&r.jsx("button",{className:"ml-1 ring-offset-background rounded-full outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",onMouseDown:y=>{y.preventDefault(),y.stopPropagation()},onClick:y=>{y.preventDefault(),y.stopPropagation(),o(t.filter(k=>k!==A))},children:r.jsx(p.CloseIcon,{size:"smallest"})})]},A)},[m,o,t]);return r.jsxs("div",{className:"mt-0.5 ml-0.5 mt-2",children:[r.jsx(p.MultiSelect,{value:h?t.map(A=>A.toString()):[],disabled:i,label:r.jsx(Ce,{icon:ve(s,"small"),required:s.validation?.required,title:s.name,className:"text-text-secondary dark:text-text-secondary-dark ml-3.5"}),renderValue:d.useCallback(A=>f(A,!1),[f]),onMultiValueChange:A=>{let g;return u&&u?.dataType==="number"?g=A?A.map(b=>parseFloat(b)):[]:g=A,o(g)},children:m.map(A=>String(A.id)).map(A=>r.jsx(p.MultiSelectItem,{value:A,children:f(A,!0)},A))}),r.jsx(xe,{includeDescription:c,showError:n,error:a,disabled:i,property:s})]})}function ii({propertyKey:e,value:t,error:o,showError:a,disabled:n,isSubmitting:i,tableMode:s,property:c,includeDescription:l,setValue:u,setFieldValue:m}){const h=c.of;if(h.dataType!=="reference")throw Error("ArrayOfReferencesField expected a property containing references");const f=c.expanded===void 0?!0:c.expanded,A=t&&Array.isArray(t)?t.map(B=>B.id):[];Te({property:c,value:t,setValue:u});const g=ue(),b=d.useMemo(()=>h.path?g.getCollection(h.path):void 0,[h.path]);if(!b)throw Error(`Couldn't find the corresponding collection for the path: ${h.path}`);const y=d.useCallback(B=>{console.debug("onMultipleEntitiesSelected",B),u(B.map(x=>Ye(x)))},[u]),k=At({multiselect:!0,path:h.path,collection:b,onMultipleEntitiesSelected:y,selectedEntityIds:A,forceFilter:h.forceFilter}),v=d.useCallback(B=>{B.preventDefault(),k.open()},[k]),_=d.useCallback((B,x)=>{const S=t&&t.length>B?t[B]:void 0;return S?r.jsx(Ve,{disabled:!h.path,previewProperties:h.previewProperties,size:"medium",onClick:v,hover:!n,reference:S},x):r.jsx("div",{children:"Internal ERROR"})},[h.path,h.previewProperties,t]),E=r.jsx(Ce,{icon:ve(c,"small"),required:c.validation?.required,title:c.name,className:"text-text-secondary dark:text-text-secondary-dark"}),C=r.jsxs(r.Fragment,{children:[!b&&r.jsx(be,{error:"The specified collection does not exist. Check console"}),b&&r.jsxs("div",{className:"group",children:[r.jsx(or,{value:t,addLabel:c.name?"Add reference to "+c.name:"Add reference",name:e,buildEntry:_,disabled:i,setFieldValue:m,newDefaultEntry:c.of.defaultValue}),r.jsxs(p.Button,{className:"my-4 justify-center text-left",variant:"outlined",color:"primary",disabled:i,onClick:v,children:["Edit ",c.name]})]})]});return r.jsxs(r.Fragment,{children:[!s&&r.jsx(p.ExpandablePanel,{titleClassName:p.fieldBackgroundMixin,className:p.cn("px-2 md:px-4 pb-2 md:pb-4 pt-1 md:pt-2",p.fieldBackgroundMixin),initiallyExpanded:f,title:E,children:C}),s&&C,r.jsx(xe,{includeDescription:l,showError:a,error:o,disabled:n,property:c})]})}function ni({name:e,property:t,value:o,entity:a,onRemove:n,disabled:i,size:s,collection:c}){return r.jsxs("div",{className:p.cn(p.paperMixin,"relative m-4 border-box flex items-center justify-center",s==="medium"?"min-w-[220px] min-h-[220px] max-w-[220px]":"min-w-[118px] min-h-[118px] max-w-[118px]"),children:[!i&&r.jsx("div",{className:"absolute rounded-full -top-2 -right-2 z-10 bg-white dark:bg-gray-900",children:r.jsx(p.Tooltip,{title:"Remove",children:r.jsx(p.IconButton,{size:"small",onClick:l=>{l.stopPropagation(),n(o)},children:r.jsx(p.RemoveIcon,{size:"small"})})})}),o&&r.jsx(re,{children:r.jsx(ye,{propertyKey:e,value:o,property:t,size:s})})]})}const Rs="box-border relative pt-[2px] items-center border border-transparent min-h-[254px] outline-none rounded-md duration-200 ease-[cubic-bezier(0.4,0,0.2,1)] focus:border-primary-solid",el="border-dotted-gray",tl="hover:bg-field-hover dark:hover:bg-field-hover-dark",rl="pt-0 border-2 border-solid",ol="transition-colors duration-200 ease-[cubic-bezier(0,0,0.2,1)] border-2 border-solid border-green-500",al="transition-colors duration-200 ease-[cubic-bezier(0,0,0.2,1)] border-2 border-solid border-red-500";function lo({propertyKey:e,value:t,setValue:o,error:a,showError:n,autoFocus:i,tableMode:s,property:c,includeDescription:l,context:u,isSubmitting:m}){if(!u.entityId)throw new Error("StorageUploadFieldBinding: Entity id is null");const h=ct(u.collection),f=nt(c)||!!c.disabled||m,{internalValue:A,setInternalValue:g,onFilesAdded:b,storage:y,onFileUploadComplete:k,storagePathBuilder:v,multipleFilesSupported:_}=Na({entityValues:u.values,entityId:u.entityId,path:u.path,property:c,propertyKey:e,value:t,storageSource:h,disabled:f,onChange:o});Te({property:c,value:t,setValue:o});const E={id:u.entityId,values:u.values,path:u.path};return r.jsxs(r.Fragment,{children:[!s&&r.jsx(Ce,{icon:ve(c,"small"),required:c.validation?.required,title:c.name,className:"text-text-secondary dark:text-text-secondary-dark ml-3.5"}),r.jsx(nl,{value:A,collection:u.collection,name:e,disabled:f,autoFocus:i,property:c,onChange:o,setInternalValue:g,onFilesAdded:b,entity:E,onFileUploadComplete:k,storagePathBuilder:v,storage:y,multipleFilesSupported:_}),r.jsx(xe,{includeDescription:l,showError:n,error:a,disabled:f,property:c})]})}function il({storage:e,collection:t,disabled:o,isDraggingOver:a,onFilesAdded:n,multipleFilesSupported:i,droppableProvided:s,autoFocus:c,internalValue:l,property:u,entity:m,onClear:h,metadata:f,storagePathBuilder:A,onFileUploadComplete:g,size:b,name:y,helpText:k}){const v=Je(),{getRootProps:_,getInputProps:E,isDragActive:C,isDragAccept:B,isDragReject:x}=Eo.useDropzone({accept:e.acceptedFiles?e.acceptedFiles.map(S=>({[S]:[]})).reduce((S,F)=>({...S,...F}),{}):void 0,disabled:o||a,noDragEventsBubbling:!0,maxSize:e.maxSize,onDrop:n,onDropRejected:(S,F)=>{for(const Q of S)for(const P of Q.errors)v.open({type:"error",message:`Error uploading file: File is larger than ${e.maxSize} bytes`})}});return r.jsxs("div",{..._(),className:p.cn(p.fieldBackgroundMixin,o?p.fieldBackgroundDisabledMixin:p.fieldBackgroundHoverMixin,Rs,i&&l.length?"":"flex",p.focusedMixin,{[tl]:!C,[rl]:C,[al]:x,[ol]:B,[el]:o}),children:[r.jsxs("div",{...s.droppableProps,ref:s.innerRef,className:p.cn("flex items-center p-1 no-scrollbar",i&&l.length?"overflow-auto":"",i&&l.length?"min-h-[180px]":"min-h-[250px]"),children:[r.jsx("input",{autoFocus:c,...E()}),l.map((S,F)=>{let Q;return S.storagePathOrDownloadUrl?Q=r.jsx(ni,{collection:t,name:`storage_preview_${S.storagePathOrDownloadUrl}`,property:u,disabled:o,entity:m,value:S.storagePathOrDownloadUrl,onRemove:h,size:S.size}):S.file&&(Q=r.jsx(Da,{entry:S,metadata:f,storagePath:A(S.file),onFileUploadComplete:g,imageSize:b==="medium"?220:118,simple:!1})),r.jsx(at.Draggable,{draggableId:`array_field_${y}_${S.id}`,index:F,children:(P,T)=>r.jsx("div",{tabIndex:-1,ref:P.innerRef,...P.draggableProps,...P.dragHandleProps,className:p.cn(p.focusedMixin,"rounded-md"),style:{...P.draggableProps.style},children:Q})},`array_field_${y}_${S.id}`)}),s.placeholder]}),r.jsx("div",{className:"flex-grow min-h-[38px] box-border m-2 text-center",children:r.jsx(p.Typography,{align:"center",variant:"label",children:k})})]})}function nl({collection:e,property:t,name:o,value:a,setInternalValue:n,onChange:i,multipleFilesSupported:s,onFileUploadComplete:c,disabled:l,onFilesAdded:u,autoFocus:m,storage:h,entity:f,storagePathBuilder:A}){if(s){const C=t;if(C.of){if(Array.isArray(C.of)||C.of.dataType!=="string")throw Error("Storage field using array must be of data type string")}else throw Error("Storage field using array must be of data type string")}const g=h?.metadata,b=s?"small":"medium",y=d.useCallback((C,B)=>{if(!s)return;const x=[...a],S=x[C];x.splice(C,1),x.splice(B,0,S),n(x);const F=x.filter(Q=>!!Q.storagePathOrDownloadUrl).map(Q=>Q.storagePathOrDownloadUrl);i(F)},[s,i,n,a]),k=d.useCallback(C=>{C.destination&&y(C.source.index,C.destination.index)},[y]),v=d.useCallback(C=>{if(s){const B=a.filter(x=>x.storagePathOrDownloadUrl!==C);i(B.filter(x=>!!x.storagePathOrDownloadUrl).map(x=>x.storagePathOrDownloadUrl)),n(B)}else i(null),n([])},[a,s,i]),_=s?"Drag 'n' drop some files here, or click to select files":"Drag 'n' drop a file here, or click to select one",E=s?t.of:t;return r.jsx(at.DragDropContext,{onDragEnd:k,children:r.jsx(at.Droppable,{droppableId:`droppable_${o}`,direction:"horizontal",renderClone:(C,B,x)=>{const S=a[x.source.index];return r.jsx("div",{ref:C.innerRef,...C.draggableProps,...C.dragHandleProps,style:C.draggableProps.style,className:"rounded",children:r.jsx(ni,{collection:e,name:`storage_preview_${S.storagePathOrDownloadUrl}`,property:E,disabled:!0,entity:f,value:S.storagePathOrDownloadUrl,onRemove:v,size:S.size})})},children:(C,B)=>r.jsx(il,{storage:h,collection:e,disabled:l,isDraggingOver:B.isDraggingOver,droppableProvided:C,onFilesAdded:u,multipleFilesSupported:s,autoFocus:m,internalValue:a,property:E,entity:f,onClear:v,metadata:g,storagePathBuilder:A,onFileUploadComplete:c,size:b,name:o,helpText:_})})})}function gt({context:e,propertyKey:t,value:o,setValue:a,error:n,showError:i,disabled:s,autoFocus:c,property:l,includeDescription:u}){let m,h;l.dataType==="string"&&(m=l.multiline,h=l.url),Te({property:l,value:o,setValue:a});const f=d.useCallback(y=>{y.stopPropagation(),y.preventDefault(),a(null)},[a]),A=y=>{if(b==="number"){const k=y.target.value?parseFloat(y.target.value):void 0;k&&isNaN(k)?a(null):k!=null?a(k):a(null)}else a(y.target.value)},g=!!m,b=l.dataType==="number"?"number":void 0;return r.jsxs(r.Fragment,{children:[r.jsx(p.TextField,{value:o,onChange:A,autoFocus:c,label:r.jsx(Ce,{icon:ve(l,"small"),required:l.validation?.required,title:l.name}),type:b,multiline:g,disabled:s,endAdornment:l.clearable&&r.jsx(p.IconButton,{onClick:f,children:r.jsx(p.ClearIcon,{})}),error:i?n:void 0,inputClassName:n?"text-red-500 dark:text-red-600":""}),r.jsx(xe,{includeDescription:u,showError:i,error:n,disabled:s,property:l}),h&&r.jsx(p.Collapse,{className:"mt-1 ml-1",in:!!o,children:r.jsx(ye,{value:o,property:l,size:"medium"})})]})}const si=d.forwardRef(function({propertyKey:t,value:o,setValue:a,error:n,showError:i,autoFocus:s,disabled:c,touched:l,property:u,includeDescription:m},h){return Te({property:u,value:o,setValue:a}),r.jsxs(r.Fragment,{children:[r.jsx(p.BooleanSwitchWithLabel,{value:o,onValueChange:f=>a(f),error:i,label:r.jsx(Ce,{icon:ve(u,"small"),required:u.validation?.required,title:u.name}),disabled:c,autoFocus:s,size:"medium"}),r.jsx(xe,{includeDescription:m,showError:i,error:n,disabled:c,property:u})]})});function li({propertyKey:e,value:t,setValue:o,autoFocus:a,error:n,showError:i,disabled:s,touched:c,property:l,includeDescription:u}){const{locale:m}=te(),h=t||null;return Te({property:l,value:t,setValue:o}),r.jsxs(r.Fragment,{children:[r.jsx(p.DateTimeField,{value:h,onChange:f=>o(f),size:"medium",mode:l.mode,clearable:l.clearable,locale:m,error:i,label:r.jsx(Ce,{icon:ve(l,"small"),required:l.validation?.required,className:i?"text-red-500 dark:text-red-500":"text-text-secondary dark:text-text-secondary-dark",title:l.name})}),r.jsx(xe,{includeDescription:u,showError:i,error:n,disabled:s,property:l})]})}function co({propertyKey:e,value:t,error:o,showError:a,tableMode:n,property:i,includeDescription:s,context:c}){if(!c.entityId)throw new Error("ReadOnlyFieldBinding: Entity id is null");return c.entityId,c.values,c.path,r.jsxs(r.Fragment,{children:[!n&&r.jsx(Ce,{icon:ve(i,"small"),required:i.validation?.required,title:i.name,className:"text-text-secondary dark:text-text-secondary-dark ml-3.5"}),r.jsx("div",{className:p.cn(p.paperMixin,"min-h-14 p-4 md:p-6 overflow-x-scroll no-scrollbar"),children:r.jsx(re,{children:r.jsx(ye,{propertyKey:e,value:t,property:i,size:"medium"})})}),r.jsx(xe,{includeDescription:s,showError:a,error:o,property:i})]})}function ci(e){return typeof e.property.path!="string"?r.jsx(co,{...e}):r.jsx(sl,{...e})}function sl({value:e,setValue:t,error:o,showError:a,isSubmitting:n,disabled:i,touched:s,autoFocus:c,property:l,includeDescription:u,context:m}){if(!l.path)throw new Error("Property path is required for ReferenceFieldBinding");Te({property:l,value:e,setValue:t});const h=e&&e.isEntityReference&&e.isEntityReference(),f=ue(),A=d.useMemo(()=>l.path?f.getCollection(l.path):void 0,[l.path]);if(!A)throw Error(`Couldn't find the corresponding collection for the path: ${l.path}`);const g=d.useCallback(k=>{t(k?Ye(k):null)},[t]),b=At({multiselect:!1,path:l.path,collection:A,onSingleEntitySelected:g,selectedEntityIds:h?[e.id]:void 0,forceFilter:l.forceFilter}),y=d.useCallback(k=>{k.preventDefault(),b.open()},[b]);return r.jsxs(r.Fragment,{children:[r.jsx(Ce,{icon:ve(l,"small"),required:l.validation?.required,title:l.name,className:"text-text-secondary dark:text-text-secondary-dark ml-3.5"}),!A&&r.jsx(be,{error:"The specified collection does not exist. Check console"}),A&&r.jsxs(r.Fragment,{children:[e&&r.jsx(Ve,{disabled:!l.path,previewProperties:l.previewProperties,hover:!i,size:"medium",onClick:i||n?void 0:y,reference:e}),!e&&r.jsx("div",{className:"justify-center text-left",children:r.jsxs(p.Button,{variant:"outlined",color:"primary",disabled:i||n,onClick:y,children:["Edit ",l.name]})})]}),r.jsx(xe,{includeDescription:u,showError:a,error:o,disabled:i,property:l})]})}const tt=d.memo(ll,(e,t)=>{if(e.propertyKey!==t.propertyKey)return!1;const o=we(e.property)||e.property.fromBuilder,a=we(t.property)||t.property.fromBuilder;return!((o===a||q(e.property,t.property))&&e.disabled===t.disabled)||po(t.property),!1});function ll({propertyKey:e,property:t,context:o,includeDescription:a,underlyingValueHasChanged:n,disabled:i,tableMode:s,partOfArray:c,partOfBlock:l,autoFocus:u}){const m=te();return r.jsx(_e.Field,{name:e,children:h=>{let f;const A=Fe({propertyKey:e,propertyValue:h.field.value,propertyOrBuilder:t,values:h.form.values,path:o.path,entityId:o.entityId,fields:m.propertyConfigs});if(A===null||wt(A))return r.jsx(r.Fragment,{});if(nt(A))f=co;else if(A.Field)typeof A.Field=="function"&&(f=A.Field);else{const b=St(A,m.propertyConfigs);if(!b)throw console.log("INTERNAL: Could not find field config for property",{propertyKey:e,resolvedProperty:A,fields:m.propertyConfigs,propertyConfig:b}),new Error(`INTERNAL: Could not find field config for property ${e}`);f=Fe({propertyOrBuilder:b.property,propertyValue:h.field.value,values:h.form.values,path:o.path,entityId:o.entityId,fields:m.propertyConfigs}).Field}if(!f)return console.warn(`No field component found for property ${e}`),console.warn("Property:",t),r.jsx("div",{children:`Currently the field ${A.dataType} is not supported`});const g={propertyKey:e,property:A,includeDescription:a,underlyingValueHasChanged:n,context:o,disabled:i,tableMode:s,partOfArray:c,partOfBlock:l,autoFocus:u};return r.jsx(cl,{Component:f,componentProps:g,fieldProps:h})}})}function cl({Component:e,componentProps:{propertyKey:t,property:o,includeDescription:a,underlyingValueHasChanged:n,tableMode:i,partOfArray:s,partOfBlock:c,autoFocus:l,context:u,disabled:m},fieldProps:h}){const{plugins:f}=te(),A=o.customProps,g=h.field.value,b=_e.getIn(h.form.errors,t),y=_e.getIn(h.form.touched,t),k=b&&(h.form.submitCount>0||o.validation?.unique)&&(!Array.isArray(b)||!!b.filter(S=>!!S).length),_=dl(u.path,u.collection,t,o,e,f)??e,E=h.form.isSubmitting,C=d.useCallback((S,F)=>{h.form.setFieldTouched(t,!0,!1),h.form.setFieldValue(t,S,F)},[]),B=d.useCallback((S,F,Q)=>{h.form.setFieldTouched(t,!0,!1),h.form.setFieldValue(S,F,Q)},[]),x={propertyKey:t,value:g,setValue:C,setFieldValue:B,error:b,touched:y,showError:k,isSubmitting:E,includeDescription:a??!0,property:o,disabled:m??!1,underlyingValueHasChanged:n??!1,tableMode:i??!1,partOfArray:s??!1,partOfBlock:c??!1,autoFocus:l??!1,customProps:A,context:u};return r.jsxs(re,{children:[r.jsx(_,{...x}),n&&!E&&r.jsx(p.Typography,{variant:"caption",className:"ml-3.5",children:"This value has been updated elsewhere"})]})}const po=(e,t)=>{if(t?.some(n=>n.form?.fieldBuilder)||we(e))return!0;const o=e,a=!!o.Field||"fromBuilder"in o&&o.fromBuilder;return o.dataType==="map"&&o.properties?a||Object.values(o.properties).some(n=>po(n,t)):o.dataType==="array"&&"resolvedProperties"in o?a||o.resolvedProperties?.some(n=>n&&po(n,t)):a};function dl(e,t,o,a,n,i){return d.useRef((()=>{let c=null;return i&&i.forEach(l=>{const u=yo(a);if(u&&l.form?.fieldBuilder){const m={fieldConfigId:u,propertyKey:o,property:a,Field:n,plugin:l,path:e,collection:t},h=l.form?.fieldBuilderEnabled?.(m);(h===void 0||h)&&(c=l.form.fieldBuilder(m)||c)}u||console.warn("INTERNAL: Field id not found for property",a)}),c})()).current}function di({propertyKey:e,value:t,showError:o,error:a,disabled:n,property:i,setValue:s,partOfBlock:c,tableMode:l,includeDescription:u,underlyingValueHasChanged:m,autoFocus:h,context:f}){const A=i.pickOnlySomeKeys||!1,g=(i.expanded===void 0?!0:i.expanded)||h;if(!i.properties)throw Error(`You need to specify a 'properties' prop (or specify a custom field) in your map property ${e}`);let b;A?t?b=Po(i.properties,...Object.keys(t).filter(v=>v in i.properties)):b={}:b=i.properties;const y=r.jsx(r.Fragment,{children:r.jsx("div",{className:"py-1 flex flex-col space-y-2",children:Object.entries(b).filter(([v,_])=>!wt(_)).map(([v,_],E)=>{const C={propertyKey:`${e}.${v}`,disabled:n,property:_,includeDescription:u,underlyingValueHasChanged:m,context:f,tableMode:!1,partOfArray:!1,partOfBlock:!1,autoFocus:h&&E===0};return r.jsx("div",{children:r.jsx(re,{children:r.jsx(tt,{...C})})},`map-${e}-${E}`)})})}),k=r.jsx(Ce,{icon:ve(i,"small"),required:i.validation?.required,title:i.name,className:"text-text-secondary dark:text-text-secondary-dark"});return r.jsxs(re,{children:[!l&&!c&&r.jsx(p.ExpandablePanel,{initiallyExpanded:g,className:"px-2 md:px-4 pb-2 md:pb-4 pt-1 md:pt-2 bg-slate-50 bg-opacity-50 dark:bg-gray-900",title:k,children:y}),(l||c)&&y,r.jsx(xe,{includeDescription:u,showError:o,error:a?typeof a=="string"?a:"A property of this map has an error":void 0,disabled:n,property:i})]})}function pi({propertyKey:e,value:t,showError:o,error:a,disabled:n,property:i,setValue:s,tableMode:c,includeDescription:l,underlyingValueHasChanged:u,autoFocus:m,context:h}){const f=(i.expanded===void 0?!0:i.expanded)||m;if(!i.keyValue)throw Error(`Your property ${e} needs to have the 'keyValue' prop in order to use this field binding`);const A=r.jsx(uo,{value:t,setValue:s,disabled:n,fieldName:i.name??e}),g=r.jsx(Ce,{icon:ve(i,"small"),required:i.validation?.required,title:i.name,className:"text-text-secondary dark:text-text-secondary-dark"});return r.jsxs(r.Fragment,{children:[!c&&r.jsx(p.ExpandablePanel,{initiallyExpanded:f,title:g,className:"px-2 md:px-4 pb-2 md:pb-4 pt-1 md:pt-2",children:A}),c&&A,r.jsx(xe,{includeDescription:l,showError:o,error:a,disabled:n,property:i})]})}function uo({value:e,setValue:t,fieldName:o,disabled:a}){const[n,i]=d.useState(Object.keys(e??{}).map(l=>[mo(),{key:l,dataType:fo(e?.[l])??"string"}]));d.useEffect(()=>{const l=n.map(([A,{key:g}])=>g),u=Object.entries(e??{}).filter(([A,g])=>g!==void 0).map(([A])=>A),m=u.filter(A=>!l.includes(A)),h=l.filter(A=>!u.includes(A)),f=[...n];m.forEach(A=>{f.push([mo(),{key:A,dataType:fo(e?.[A])??"string"}])}),h.forEach(A=>{const g=f.findIndex(([b,{key:y}])=>y===A);f.splice(g,1)}),i(f)},[e]);const s=d.useRef(e??{}),c=(l,u)=>{if(!l){console.warn("No key selected for data type update");return}i(n.map(m=>m[0]===l?[m[0],{key:m[1].key,dataType:u}]:m)),t({...e??{},[n.find(m=>m[0]===l)?.[1].key??""]:br(u)})};return r.jsxs("div",{className:"py-1 flex flex-col gap-1",children:[n.map(([l,{key:u,dataType:m}],h)=>{const f=u?e?.[u]:"",A=g=>{if(i(n.map(y=>y[0]===l?[l,{key:g??"",dataType:y[1].dataType}]:y)),typeof e=="object"&&g in e)return;const b={...e??{}};typeof s.current=="object"&&u in s.current?b[u]=void 0:delete b[u],t({...b,[g??""]:f})};return r.jsx(pl,{rowId:l,fieldKey:u,value:e??{},onDeleteClick:()=>{const g={...e??{}};s.current&&u in s.current?g[u]=void 0:delete g[u],i(n.filter(b=>b[0]!==l)),t({...g})},onFieldKeyChange:A,setValue:t,entryValue:f,dataType:m,disabled:a,updateDataType:c},l)}),r.jsx(p.Button,{variant:"text",size:"small",color:"primary",className:"w-full",disabled:a,startIcon:r.jsx(p.AddIcon,{}),onClick:l=>{l.preventDefault(),t({...e??{},"":null}),i([...n,[mo(),{key:"",dataType:"string"}]])},children:o?`Add to ${o}`:"Add"})]})}function pl({rowId:e,fieldKey:t,value:o,onFieldKeyChange:a,onDeleteClick:n,setValue:i,entryValue:s,dataType:c,updateDataType:l,disabled:u}){const{locale:m}=te();function h(A,g,b){return b==="string"||b==="number"?r.jsx(p.TextField,{placeholder:"value",value:A,type:b==="number"?"number":"text",size:"small",disabled:u||!g,onChange:y=>{if(b==="number"){const k=y.target.value?parseFloat(y.target.value):void 0;k&&isNaN(k)?i({...o,[g]:null}):k!=null?i({...o,[g]:k}):i({...o,[g]:null})}else i({...o,[g]:y.target.value})}},b):b==="date"?r.jsx(p.DateTimeField,{value:A,size:"small",locale:m,disabled:u||!g,onChange:y=>{i({...o,[g]:y})}}):b==="boolean"?r.jsx(p.BooleanSwitchWithLabel,{value:A,size:"small",position:"start",disabled:u||!g,onValueChange:y=>{i({...o,[g]:y})}}):b==="array"?r.jsx("div",{className:p.cn(p.defaultBorderMixin,"ml-2 pl-2 border-l border-solid"),children:r.jsx(go,{value:A,newDefaultEntry:"",droppableId:e.toString(),addLabel:g?`Add to ${g}`:"Add",size:"small",disabled:u||!g,includeAddButton:!0,onValueChange:y=>{i({...o,[g]:y})},buildEntry:(y,k)=>r.jsx(ul,{index:y,id:k,value:A[y],disabled:u||!g,setValue:v=>{const _=[...A];_[y]=v,i({...o,[g]:_})}})})}):b==="map"?r.jsx("div",{className:p.cn(p.defaultBorderMixin,"ml-2 pl-2 border-l border-solid"),children:r.jsx(uo,{value:A,fieldName:g,setValue:y=>{i({...o,[g]:y})}})}):r.jsx(p.Typography,{variant:"caption",children:`Data type ${b} not supported yet`})}function f(A){l(e,A)}return r.jsxs(r.Fragment,{children:[r.jsxs(p.Typography,{component:"div",className:"font-mono flex flex-row gap-1",children:[r.jsx("div",{className:"w-[200px] max-w-[25%]",children:r.jsx(p.TextField,{value:t,placeholder:"key",disabled:u||s!=null&&s!=="",size:"small",onChange:A=>{a(A.target.value)}})}),r.jsx("div",{className:"flex-grow",children:c!=="map"&&c!=="array"&&h(s,t,c)}),r.jsxs(p.Menu,{trigger:r.jsx(p.IconButton,{size:"small",className:"h-7 w-7",children:r.jsx(p.ArrowDropDownIcon,{})}),children:[r.jsx(p.MenuItem,{dense:!0,onClick:()=>f("string"),children:"string"}),r.jsx(p.MenuItem,{dense:!0,onClick:()=>f("number"),children:"number"}),r.jsx(p.MenuItem,{dense:!0,onClick:()=>f("boolean"),children:"boolean"}),r.jsx(p.MenuItem,{dense:!0,onClick:()=>f("date"),children:"date"}),r.jsx(p.MenuItem,{dense:!0,onClick:()=>f("map"),children:"map"}),r.jsx(p.MenuItem,{dense:!0,onClick:()=>f("array"),children:"array"})]}),r.jsx(p.IconButton,{"aria-label":"delete",size:"small",onClick:n,className:"h-7 w-7",children:r.jsx(p.RemoveIcon,{size:"small"})})]},e.toString()),(c==="map"||c==="array")&&h(s,t,c)]})}function ul({id:e,index:t,value:o,setValue:a}){const{locale:n}=te(),[i,s]=d.useState(fo(o)??"string");function c(u){s(u)}function l(u,m){return m==="string"||m==="number"?r.jsx(p.TextField,{value:u,type:m==="number"?"number":"text",size:"small",onChange:h=>{if(m==="number"){const f=h.target.value?parseFloat(h.target.value):void 0;f&&isNaN(f)?a(null):f!=null?a(f):a(null)}else a(h.target.value)}}):m==="date"?r.jsx(p.DateTimeField,{value:u,size:"small",locale:n,onChange:h=>{a(h)}}):m==="boolean"?r.jsx(p.BooleanSwitchWithLabel,{value:u,size:"small",position:"start",onValueChange:h=>{a(h)}}):m==="array"?r.jsx(p.Typography,{variant:"caption",children:"Arrays of arrays are not supported."}):m==="map"?r.jsx("div",{className:p.cn(p.defaultBorderMixin,"ml-2 pl-2 border-l border-solid"),children:r.jsx(uo,{value:u,setValue:h=>{a(h)}})}):r.jsx(p.Typography,{variant:"caption",children:`Data type ${m} not supported yet`})}return r.jsxs(r.Fragment,{children:[r.jsxs(p.Typography,{component:"div",className:"font-mono flex min-h-12 flex-row gap-1 items-center",children:[r.jsx("div",{className:"flex-grow",children:i!=="map"&&l(o,i)}),r.jsxs(p.Menu,{trigger:r.jsx(p.IconButton,{size:"small",className:"h-7 w-7",children:r.jsx(p.ArrowDropDownIcon,{})}),children:[r.jsx(p.MenuItem,{dense:!0,onClick:()=>c("string"),children:"string"}),r.jsx(p.MenuItem,{dense:!0,onClick:()=>c("number"),children:"number"}),r.jsx(p.MenuItem,{dense:!0,onClick:()=>c("boolean"),children:"boolean"}),r.jsx(p.MenuItem,{dense:!0,onClick:()=>c("map"),children:"map"}),r.jsx(p.MenuItem,{dense:!0,onClick:()=>c("date"),children:"date"})]})]},e.toString()),i==="map"&&l(o,i)]})}function mo(){return Math.floor(Math.random()*Math.floor(Number.MAX_SAFE_INTEGER))}function fo(e){if(typeof e=="string"||e===null)return"string";if(typeof e=="number")return"number";if(typeof e=="boolean")return"boolean";if(Array.isArray(e))return"array";if(e instanceof Date)return"date";if(e?.isEntityReference&&e?.isEntityReference())return"reference";if(e instanceof Mt)return"geopoint";if(typeof e=="object")return"map"}function ui({propertyKey:e,value:t,error:o,showError:a,isSubmitting:n,setValue:i,setFieldValue:s,tableMode:c,property:l,includeDescription:u,underlyingValueHasChanged:m,context:h,disabled:f}){if(!l.of)throw Error("RepeatFieldBinding misconfiguration. Property `of` not set");if(!l.resolvedProperties||!Array.isArray(l.resolvedProperties))throw Error("RepeatFieldBinding - Internal error: Expected array in 'property.resolvedProperties'");const A=l.expanded===void 0?!0:l.expanded,g=l.of,[b,y]=d.useState();Te({property:l,value:t,setValue:i});const k=(E,C)=>{const B=l.resolvedProperties[E]??g,x={propertyKey:`${e}.${E}`,disabled:f,property:B,includeDescription:u,underlyingValueHasChanged:m,context:h,tableMode:!1,partOfArray:!0,partOfBlock:!1,autoFocus:C===b};return r.jsx(re,{children:r.jsx(tt,{...x})})},v=r.jsx(or,{value:t,addLabel:l.name?"Add entry to "+l.name:"Add entry",name:e,setFieldValue:s,buildEntry:k,onInternalIdAdded:y,disabled:n||!!l.disabled,includeAddButton:!l.disabled,newDefaultEntry:l.of.defaultValue}),_=r.jsx(Ce,{icon:ve(l,"small"),required:l.validation?.required,title:l.name,className:"text-text-secondary dark:text-text-secondary-dark"});return r.jsxs(r.Fragment,{children:[!c&&r.jsx(p.ExpandablePanel,{initiallyExpanded:A,className:"px-2 md:px-4 pb-2 md:pb-4 pt-1 md:pt-2",title:_,children:v}),c&&v,r.jsx(xe,{includeDescription:u,showError:a,error:o,disabled:f,property:l})]})}function mi({propertyKey:e,value:t,error:o,showError:a,isSubmitting:n,setValue:i,setFieldValue:s,tableMode:c,property:l,includeDescription:u,underlyingValueHasChanged:m,context:h,disabled:f}){if(!l.oneOf)throw Error("ArrayOneOfField misconfiguration. Property `oneOf` not set");const A=l.expanded===void 0?!0:l.expanded;Te({property:l,value:t,setValue:i});const[g,b]=d.useState(),y=d.useCallback((E,C)=>r.jsx(ml,{name:`${e}.${E}`,index:E,value:t[E],typeField:l.oneOf.typeField??yt,valueField:l.oneOf.valueField??zt,properties:l.oneOf.properties,autoFocus:C===g,context:h},`array_one_of_${E}`),[h,g,l.oneOf,e,t]),k=r.jsx(Ce,{icon:ve(l,"small"),required:l.validation?.required,title:l.name,className:"text-text-secondary dark:text-text-secondary-dark"}),v=Object.keys(l.oneOf.properties)[0],_=r.jsx(or,{value:t,name:e,addLabel:l.name?"Add entry to "+l.name:"Add entry",buildEntry:y,onInternalIdAdded:b,disabled:n||!!l.disabled,includeAddButton:!l.disabled,setFieldValue:s,newDefaultEntry:{[l.oneOf.typeField??yt]:v,[l.oneOf.valueField??zt]:Vt(l.oneOf.properties[v])}});return r.jsxs(r.Fragment,{children:[!c&&r.jsx(p.ExpandablePanel,{className:"px-2 md:px-4 pb-2 md:pb-4 pt-1 md:pt-2",initiallyExpanded:A,title:k,children:_}),c&&_,r.jsx(xe,{includeDescription:u,showError:a,error:o,disabled:f,property:l})]})}function ml({name:e,index:t,value:o,typeField:a,valueField:n,properties:i,autoFocus:s,context:c}){const l=o&&o[a],[u,m]=d.useState(l??void 0),h=_e.useFormex();d.useEffect(()=>{l||k(Object.keys(i)[0])},[]),d.useEffect(()=>{l!==u&&m(l)},[l]);const f=u?i[u]:void 0,A=Object.entries(i).map(([v,_])=>({id:v,label:_.name??v})),g=`${e}.${a}`,b=`${e}.${n}`,y=f?{propertyKey:b,property:f,context:c,autoFocus:s,partOfArray:!1,partOfBlock:!0,tableMode:!1}:void 0,k=v=>{const _=v?i[v]:void 0;m(v),h.setFieldTouched(g,!0),h.setFieldValue(g,v),h.setFieldValue(b,_?Vt(_):null)};return r.jsxs("div",{className:p.cn(p.paperMixin,"bg-transparent p-4 my-4 py-8"),children:[r.jsx(_e.Field,{name:g,children:v=>{const _=v.field.value!==void 0&&v.field.value!==null?v.field.value:"";return r.jsx(r.Fragment,{children:r.jsx(p.Select,{className:"mb-2",placeholder:r.jsx(p.Typography,{variant:"caption",className:"px-4 py-2 font-medium",children:"Type"}),size:"small",position:"item-aligned",value:_,renderValue:E=>r.jsx(Se,{enumKey:E,enumValues:A,size:"small"}),onValueChange:E=>{k(E)},children:A.map(E=>r.jsx(p.SelectItem,{value:String(E.id),children:r.jsx(Se,{enumKey:E.id,enumValues:A,size:"small"})},E.id))})})}}),y&&r.jsx(tt,{...y},`form_control_${e}_${u}`)]})}const fl=new ji;try{Ze.use(Ze.Plugins.AutoResize,{min:100}),Ze.unuse(Ze.Plugins.FontUnderline),Ze.unuse(Ze.Plugins.Clear)}catch{}function fi({propertyKey:e,value:t,setValue:o,error:a,showError:n,disabled:i,autoFocus:s,touched:c,property:l,tableMode:u,includeDescription:m,context:h}){const[f,A]=d.useState(t),g=d.useRef(t);p.useInjectStyles("MarkdownFieldBinding",hl);const b=d.useDeferredValue({internalValue:f,value:t});return d.useEffect(()=>{g.current=t,A(t)},[t]),d.useEffect(()=>{b.internalValue!==g.current&&o(b.internalValue)},[b]),r.jsxs(r.Fragment,{children:[!u&&r.jsx(p.Typography,{variant:"caption",className:"flex-grow",children:r.jsx(Ce,{icon:ve(l,"small"),required:l.validation?.required,title:l.name,className:"text-text-secondary dark:text-text-secondary-dark ml-3.5"})}),r.jsx(Ze,{value:f??"",className:p.cn(p.fieldBackgroundMixin,i?p.fieldBackgroundDisabledMixin:p.fieldBackgroundHoverMixin,"text-base"),readOnly:i,renderHTML:y=>fl.render(y),view:{menu:!0,md:!0,html:!1},onChange:({html:y,text:k})=>{A(k??null)}}),r.jsx(xe,{includeDescription:m,showError:n,error:a,disabled:i,property:l})]})}const hl=`
5
5
  @font-face {
6
6
  font-family: rmel-iconfont;
7
7
  src: url(data:application/vnd.ms-fontobject;base64,fBkAAMAYAAABAAIAAAAAAAIABQMAAAAAAAABAJABAAAAAExQAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAB9vj4gAAAAAAAAAAAAAAAAAAAAAAABoAcgBtAGUAbAAtAGkAYwBvAG4AZgBvAG4AdAAAAA4AUgBlAGcAdQBsAGEAcgAAABYAVgBlAHIAcwBpAG8AbgAgADEALgAwAAAAGgByAG0AZQBsAC0AaQBjAG8AbgBmAG8AbgB0AAAAAAAAAQAAAAsAgAADADBHU1VCsP6z7QAAATgAAABCT1MvMj3jT5QAAAF8AAAAVmNtYXBA5I9dAAACPAAAAwhnbHlmMImhbQAABXwAAA9gaGVhZBtQ+k8AAADgAAAANmhoZWEH3gObAAAAvAAAACRobXR4aAAAAAAAAdQAAABobG9jYTX6MgAAAAVEAAAANm1heHABMAB7AAABGAAAACBuYW1lc9ztwgAAFNwAAAKpcG9zdCcpv64AABeIAAABNQABAAADgP+AAFwEAAAAAAAEAAABAAAAAAAAAAAAAAAAAAAAGgABAAAAAQAA4uPbB18PPPUACwQAAAAAANwY2ykAAAAA3BjbKQAA//8EAAMBAAAACAACAAAAAAAAAAEAAAAaAG8ADAAAAAAAAgAAAAoACgAAAP8AAAAAAAAAAQAAAAoAHgAsAAFERkxUAAgABAAAAAAAAAABAAAAAWxpZ2EACAAAAAEAAAABAAQABAAAAAEACAABAAYAAAABAAAAAAABBAABkAAFAAgCiQLMAAAAjwKJAswAAAHrADIBCAAAAgAFAwAAAAAAAAAAAAAAAAAAAAAAAAAAAABQZkVkAEDnbe2iA4D/gABcA4AAgAAAAAEAAAAAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAAAAAUAAAADAAAALAAAAAQAAAHMAAEAAAAAAMYAAwABAAAALAADAAoAAAHMAAQAmgAAABYAEAADAAbnbelB7TztRe1h7XXteO2A7Y3tov//AADnbelB7TvtRO1f7W/td+2A7Yztn///AAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAWABYAFgAYABoAHgAqACwALAAuAAAAAQAEAAUAAwAGAAcACAAJAAoACwAMAA0ADgAPABAAEQASABMAAgAUABUAFgAXABgAGQAAAQYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAABPAAAAAAAAAAZAADnbQAA520AAAABAADpQQAA6UEAAAAEAADtOwAA7TsAAAAFAADtPAAA7TwAAAADAADtRAAA7UQAAAAGAADtRQAA7UUAAAAHAADtXwAA7V8AAAAIAADtYAAA7WAAAAAJAADtYQAA7WEAAAAKAADtbwAA7W8AAAALAADtcAAA7XAAAAAMAADtcQAA7XEAAAANAADtcgAA7XIAAAAOAADtcwAA7XMAAAAPAADtdAAA7XQAAAAQAADtdQAA7XUAAAARAADtdwAA7XcAAAASAADteAAA7XgAAAATAADtgAAA7YAAAAACAADtjAAA7YwAAAAUAADtjQAA7Y0AAAAVAADtnwAA7Z8AAAAWAADtoAAA7aAAAAAXAADtoQAA7aEAAAAYAADtogAA7aIAAAAZAAAAAABmAMwBHgGEAbwB/gJmAsgC/gM0A3IDogRABKgE7gUuBXAFygYKBmoGpAbEBugHRgewAAAABQAAAAADVgLWAAsAGAAlADQAQAAAEyEyFhQGByEuATQ2Fz4BNyEeARQGIyEiJgM0NjchHgEUBiMhIiY3PgEzITIeARQOASMhIiYnFhQPAQYmNRE0NhfWAlQSGRkS/awSGRnaARgTAWASGRkS/qASGfQZEgJUEhkZEv2sEhnzARgTAWAMFAsLFAz+oBIZOQgIkgseHgsC1RklGAEBGCUZ8hMYAQEYJRkZ/oUTGAEBGCUZGdkSGQsVFxQMGoYGFgaVDAwRASoRDAwAAAAADAAAAAADqwKrAA8AEwAXABsAHwAjACcAMwA3ADsAPwBDAAABIQ4BBwMeARchPgE3ES4BBTMVIxUzFSMnMxUjFTMVKwI1MzUjNTMBISImNDYzITIWFAY3IzUzNSM1MxcjNTM1IzUzA1X9ViQwAQEBMSQCqiQxAQEx/lxWVlZWgFZWVlYqVlZWVgFV/wASGBgSAQASGBgZVlZWVoBWVlZWAqsBMST+ViQxAQExJAGqJDF/VipW1lYqVlYqVv6AGCQZGSQYqlYqVtZWKlYAAwAAAAADKwMAAA8AHwAzAAAlHgEXIT4BNxEuASchDgEHMyEyFhcRDgEHIS4BJxE+ASUnJisBIg8BIyIGFBYzITI2NCYjAQABMCQBViQwAQEwJP6qJDABgAEAExcBARcT/wATFwEBFwEoHgsStBILHmsTFxcTAgARGRkRVSQwAQEwJAGrJDABATAkFxT+qxEZAQEZEQFVFBfVHg0NHhcnFxcnFwADAAAAAAOrAtkAFgAtAD4AAAEVBg8BBiIvASY0PwEnJjQ/ATYyHwEWBTc2NC8BJiIPAQYHFRYfARYyPwE2NCcBJyYGBwMGFh8BFjY3EzYmJwOrAQmwBxEHHgYGk5MGBh4HEQewCf0PkwYGHwYSBrAJAQEJsAcRBx4GBgFCKQkPBOMCBwgoCQ8E4gMHCQGIEA0KsAYGHgcRBpOTBhIGHgYGsAoVkwYRBx4GBrAKDRANCrAGBh4GEgYB2Q8DBwj9jAgQAw4DBwgCcwgPBAACAAAAAAOaAm8AEAAhAAAlJzc2NCYiDwEGFB8BFjI2NCU3JyY0NjIfARYUDwEGIiY0AXOmpg0ZJAzEDQ3EDiEaAQ2mpg0aIQ7EDQ3EDiEa2qamDiEaDcQNIg3EDRohDqamDCQZDcQNIg3EDRkkAAAAAwAAAAADuAKsAAsAFwAjAAABDgEHHgEXPgE3LgEDLgEnPgE3HgEXDgEDDgEHHgEXPgE3LgECAJjrNTXrmJjrNTXrmFZwAgJwVlZwAgJwVjRDAQFDNDRDAQFDAqwCpIaGpAICpIaGpP4OAnBWVnACAnBWVnABPgFDNDRDAQFDNDRDAAAABQAAAAADgAKrAAsAFwAjADAAQAAAEyEyNjQmIyEiBhQWFyE+ATQmJyEOARQWEyEyNjQmIyEiBhQWJx4BFyE+ATQmJyEOASUhHgEXEQ4BByEuATURNDarAQATFxcT/wARGRkRAQATFxcT/wARGRkRAQATFxcT/wARGRkaARkRAQATFxcT/wARGQHUAQARGQEBGRH/ABMXFwEAFycXFycXqwEZIhkBARkiGQFVFycXFycX1RMXAQEXJhcBARcYARcT/gARGQEBGRECABMXAAAAAAMAAAAAA6sCVgAZACYAQAAAASMiBhQWOwEeARcOAQcjIgYUFjsBPgE3LgEFHgEXIT4BNCYnIQ4BFyMuASc+ATczMjY0JisBDgEHHgEXMzI2NCYC1YASGBgSgDdIAQFIN4ASGBgSgFt4AwN4/iUBGBIBABIYGBL/ABIYVYA3SAEBSDeAEhgYEoBbeAMDeFuAEhgYAlUYJBkBSTY2SQEZJBgCeFtbeNMSGAEBGCQYAQEYkgFJNjZJARkkGAJ4W1t4AhgkGQABAAAAAAOsAisAHgAAAS4BJw4BBwYWFxY2Nz4BNzIWFwcGFhczPgE3NS4BBwMSO5ZVh9Q4ChMXFCMJK6FnP28sURMTHu4SGAECMRYBvDQ6AQKJchcqCAYPElZpASslUhYxAgEYEu8dFBMAAAABAAAAAAOyAisAHgAAAQ4BBycmBgcVHgEXMz4BLwE+ATMeARceATc+AScuAQIUVZY7URYxAgEYEu4eFBNSLW8+Z6ErCSQTFxMKOdMCKwE6NFAUFB3vEhgBAjEWUiUrAWlWEg8GCCoXcokAAAADAAAAAAL1Ar8AFAAcACQAAAE+ATcuAScjDgEHER4BFyE+ATc0JiUzHgEUBgcjEyM1Mx4BFAYCkyEpAQJmTu8UGQEBGRQBB0lpAjT+1IgdJycdiJ+fnx0nJwGKF0QkTmYCARoT/d4TGgECYUk1UtkBJjsmAf7viQEmOyYAAQAAAAADEgK/ABwAAAEeARczAyMOARQWFzM+ATQmJyMTMz4BNCYnIw4BAaUBJh0hnDsdJiYd5B0mJh0hnDsdJiYd5B0mAnodJgH+lAEmOicBASc6JgEBbAEmOicBAScABgAAAAADlgLWAAsAFwAjAEEAUgBuAAABIT4BNCYnIQ4BFBYBIQ4BFBYXIT4BNCYDIQ4BFBYXIT4BNCYFIyIGFBY7ARUjIgYUFjsBFSMiBhQWOwEyNjc1LgEDMxUeATI2PQE0JisBIgYUFhcjIgYUFjsBBwYdARQWOwEyNjQmKwE3Nj0BLgEBawIAEhgYEv4AEhkZAhL+ABIZGRICABIYGBL+ABIZGRICABIYGP1YVQkMDAlAFQoLCwoVQAkMDAlVCgsBAQtfFQELEwwMCSsJDAxeVQkMDAk3RwUMCVUKCwsKN0gFAQsCVQEYJBgBARgkGP5VARgkGAEBGCQYAQEBGCQYAQEYJBjVDBIMFgwSDBYMEgwMCYAJDAHWawkMDAmACQwMEgzWDBIMVAYICQkMDBIMVAYICQkMAAAAAAYAAAAAA4sCwAAIABEAGgAmADIAPwAAEw4BFBYyNjQmAw4BFBYyNjQmAw4BFBYyNjQmFyE+ATQmJyEOARQWNyE+ATQmJyEOARQWAx4BFyE+ATQmJyEOAbUbJCQ3JCQcGyQkNyQkHBskJDYlJI8CABIYGBL+ABIYGBICABIYGBL+ABIYGBkBGBICABIYGBL+ABIYAcABJDYkJDYkAQEBJDYkJDYk/gEBJDYkJDYkagEYJBgBARgkGP8BGCQYAQEYJBgBKhIYAQEYJBgBARgAAAACAAAAAANWAlYAFgAtAAAlMjY/ATY9AS4BKwEiBh0BFBYXMwcGFgUyNj8BNj0BNCYrASIGBxUeARczBwYWATIRGwc9CQEYEqsSGBgSViwOIAHMEBsIPAkYEqsSGAEBGBJVLA0gqxEOeRIUwhIYGBKrEhgBWB4zAREOeRIUwhIYGBKrEhgBWB4zAAAAAAMAAAAAA4ACwAAIABkAJQAAJT4BNzUjFR4BAR4BFzMVMzUzPgE0JichDgEDIT4BNCYnIQ4BFBYCACQwAaoBMP75ASQblqqWGyQkG/4qGyQrAqoSGRkS/VYSGRlAATAkKyskMAI/GyQBgIABJDYkAQEk/noBGCQYAQEYJBgAAAAAAgAA//8DKwMBABsAKAAAJT4BNxEuASIGBxEUBgcGLgI1ES4BIgYHER4BBx4BMyEyNjQmIyEiBgIiYnoCAR4tHgFBNSFBNR0BHi0eAQOm1AEYEgIAEhgYEv4AEhitD5NlARcWHh4W/uQ3UwwHDys8IwEgFh4eFv7gdpR2EhkZJBgYAAAAAwAAAAADcALHAAsALQA5AAATIT4BNCYjISIGFBYFISIGFBYXITIWFxYGByM1LgEPAQYUHwEWNjc1Mz4BJy4BBSMiBhQWFzM+ATQmwAJVEhkZEv2rEhgYAgv+BxIYGBICBiAzBgUxKGABGQtMBgZMDBgBVU1iBQhk/m2rEhgYEqsSGBgCcQEYJBgYJBisGCQYAScgKTkCIg8KCkwHEQdMCgoPIgJrTkRV/xgkGAEBGCQYAAAAAgAAAAADlgLAABQAKAAAARQWFzMRHgEyNjcRMz4BNCYnIQ4BAzMVFBYyNjc1MzI2NCYnIQ4BFBYBayQclQEkNiQBlRwkJBz+VhwkwEAkNyQBQBskJBv/ABwkJAKAGyQB/kAbJCQbAcABJDYkAQEk/tDrGyQkG+skNyQBASQ3JAAKAAAAAAN4AvgADwAWABoAIQAlACkALQA0ADgAPwAAASEOAQcRHgEXIT4BNxEuAQEjIiY9ATM1IzUzNSM1NDY7ARMjNTM1IzUzNSM1MxMjNTMVFAY3IzUzNSM1MzIWFQMs/aggKgEBKiACWCAqAQEq/h5xDxaWlpaWFg9x4ZaWlpaWlrxxlhYWlpaWcQ8WAvcBKiD9qCAqAQEqIAJYICr9XhYPcUuWS3EPFv2olkuWS5b9qJZxDxbhlkuWFg8AAAACAAD//wOAAwAADwAgAAAlES4BJyEOAQcRHgEXIT4BJRc3NjIfARYGIyEiJj8BPgEDgAEwJP2qJDABATAkAlYkMP39WYUHFAeVCAwN/gEOCwhqBxRVAlYkMAEBMCT9qiQwAQEw+2yqCAnHCxcXC4kIAQAAAAEAAAAAAzUCNgAQAAABBwYUFjI/ARcWMjY0LwEmIgHZ/hAhLBHX1xEsIRD+EC4CJv4RLCEQ19cQISwR/hAAAAABAAAAAAM1AjYAEgAAAQcnJiciDgEWHwEWMj8BNjQuAQLW1tcQFxEbDQYM/hEsEf4QIS0CJtfXDwESICAM/hAQ/hAtIAEAAAAEAAAAAANrAusAEAAhADMARAAANzMVFBYyNj0BNCYrASIGFBYTIyIGFBY7ATI2PQE0JiIGFQEyNj0BMzI2NCYrASIGHQEUFhM1NCYiBh0BFBY7ATI2NCYjyWgeLB0dFpwWHR1+aBYdHRacFh0dLB4BahYeaBYdHRacFh0dSh4sHR0WnBYdHRaxaBYdHRacFh0dLB4Bnh4sHR0WnBYdHRb9Xx0WaB4sHR0WnBYdAjloFh0dFpwWHR0sHgAAAAQAAAAAA1QC1AARACMANABGAAATDgEHFR4BFzM+ATQmKwE1NCYnPgE9ATMyNjQmJyMOAQcVHgEBIyIGFBYXMz4BNzUuASIGFQMeATsBFRQWMjY3NS4BJyMOAd0VGwEBGxWRFRsbFWEcFBQcYRUbGxWRFRsBARsCK2EVGxsVkRUbAQEbKRySARsVYRwpGwEBGxWRFRsBHwEbFZEVGwEBGykcYRUbwwEbFWEcKRsBARsVkRUb/qscKRsBARsVkRUbGxUBtRQcYRUbGxWRFRsBARsAAAAAAAASAN4AAQAAAAAAAAAVAAAAAQAAAAAAAQANABUAAQAAAAAAAgAHACIAAQAAAAAAAwANACkAAQAAAAAABAANADYAAQAAAAAABQALAEMAAQAAAAAABgANAE4AAQAAAAAACgArAFsAAQAAAAAACwATAIYAAwABBAkAAAAqAJkAAwABBAkAAQAaAMMAAwABBAkAAgAOAN0AAwABBAkAAwAaAOsAAwABBAkABAAaAQUAAwABBAkABQAWAR8AAwABBAkABgAaATUAAwABBAkACgBWAU8AAwABBAkACwAmAaUKQ3JlYXRlZCBieSBpY29uZm9udApybWVsLWljb25mb250UmVndWxhcnJtZWwtaWNvbmZvbnRybWVsLWljb25mb250VmVyc2lvbiAxLjBybWVsLWljb25mb250R2VuZXJhdGVkIGJ5IHN2ZzJ0dGYgZnJvbSBGb250ZWxsbyBwcm9qZWN0Lmh0dHA6Ly9mb250ZWxsby5jb20ACgBDAHIAZQBhAHQAZQBkACAAYgB5ACAAaQBjAG8AbgBmAG8AbgB0AAoAcgBtAGUAbAAtAGkAYwBvAG4AZgBvAG4AdABSAGUAZwB1AGwAYQByAHIAbQBlAGwALQBpAGMAbwBuAGYAbwBuAHQAcgBtAGUAbAAtAGkAYwBvAG4AZgBvAG4AdABWAGUAcgBzAGkAbwBuACAAMQAuADAAcgBtAGUAbAAtAGkAYwBvAG4AZgBvAG4AdABHAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAHMAdgBnADIAdAB0AGYAIABmAHIAbwBtACAARgBvAG4AdABlAGwAbABvACAAcAByAG8AagBlAGMAdAAuAGgAdAB0AHAAOgAvAC8AZgBvAG4AdABlAGwAbABvAC4AYwBvAG0AAAAAAgAAAAAAAAAKAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAaAQIBAwEEAQUBBgEHAQgBCQEKAQsBDAENAQ4BDwEQAREBEgETARQBFQEWARcBGAEZARoBGwADdGFiCGtleWJvYXJkBmRlbGV0ZQpjb2RlLWJsb2NrBGNvZGUKdmlzaWJpbGl0eQp2aWV3LXNwbGl0BGxpbmsEcmVkbwR1bmRvBGJvbGQGaXRhbGljDGxpc3Qtb3JkZXJlZA5saXN0LXVub3JkZXJlZAVxdW90ZQ1zdHJpa2V0aHJvdWdoCXVuZGVybGluZQR3cmFwCWZvbnQtc2l6ZQRncmlkBWltYWdlC2V4cGFuZC1sZXNzC2V4cGFuZC1tb3JlD2Z1bGxzY3JlZW4tZXhpdApmdWxsc2NyZWVuAAAAAAA=);
@@ -584,6 +584,6 @@
584
584
  .rc-md-editor .header-list .list-item:hover {
585
585
  }
586
586
 
587
- `;function sn({propertyKey:e,value:t,error:o,showError:a,isSubmitting:n,setValue:i,tableMode:s,property:l,includeDescription:d,underlyingValueHasChanged:u,context:m,disabled:g}){if(!Array.isArray(l.resolvedProperties))throw Error("ArrayCustomShapedFieldBinding misconfiguration. Property `of` not set");const f=l.expanded===void 0?!0:l.expanded;Pe({property:l,value:t,setValue:i});const b=r.jsx(_e,{icon:Ae(l,"small"),required:l.validation?.required,className:"text-text-secondary dark:text-text-secondary-dark",title:l.name}),h=l.resolvedProperties.map((A,y)=>{const k={propertyKey:`${e}[${y}]`,disabled:g,property:A,includeDescription:d,underlyingValueHasChanged:u,context:m,tableMode:!1,partOfArray:!0,partOfBlock:!1,autoFocus:!1};return r.jsx("div",{className:"pb-4",children:r.jsx(tt,{...k})},`custom_shaped_array_${y}`)});return r.jsxs(r.Fragment,{children:[!s&&r.jsx(p.ExpandablePanel,{initiallyExpanded:f,title:b,className:"px-2 md:px-4 pb-2 md:pb-4 pt-1 md:pt-2",children:h}),s&&h,r.jsx(ke,{includeDescription:d,showError:a,error:o,disabled:g,property:l})]})}const al=({containerRef:e})=>{const{isSubmitting:t,isValidating:o,errors:a}=ye.useFormex();return c.useEffect(()=>{const n=Object.keys(a);if(n.length>0&&t&&!o){const i=e?.current?.querySelector(`#form_field_${n[0]}`);if(i&&e?.current){const s=ln(e.current);if(s){const d=i.getBoundingClientRect().top;s.scrollTo({top:s.scrollTop+d-196,behavior:"smooth"})}const l=i.querySelector("input");l&&l.focus()}}},[t,o,a,e]),null},nl=e=>{const t=e&&e.scrollHeight>e.clientHeight,o=e?window.getComputedStyle(e).overflowY:null,a=o&&o.indexOf("hidden")!==-1;return t&&!a},ln=e=>!e||e===document.body?document.body:nl(e)?e:ln(e.parentNode);function il({customId:e,entityId:t,status:o,onChange:a,error:n,entity:i,loading:s}){const{errors:l}=ye.useFormex(),d=o==="existing"||!e,u=o!=="existing"&&!e,m=c.useMemo(()=>{if(!(!e||typeof e=="boolean"||e==="optional"))return $e(e)},[e]),g=Je(),{copy:f}=da({onSuccess:A=>g.open({type:"success",message:`Copied ${A}`})}),b=re(),h={label:u?"ID is set automatically":"ID",disabled:d||s,name:"id",value:(i&&o==="existing"?i.id:t)??"",endAdornment:s?r.jsx(p.CircularProgress,{size:"small"}):i?r.jsxs(r.Fragment,{children:[r.jsx(p.Tooltip,{title:"Copy",children:r.jsx(p.IconButton,{onClick:A=>f(i.id),"aria-label":"copy-id",children:r.jsx(p.ContentCopyIcon,{size:"small"})})}),b?.entityLinkBuilder&&r.jsx(p.Tooltip,{title:"Open in the console",children:r.jsx(p.IconButton,{component:"a",href:b.entityLinkBuilder({entity:i}),rel:"noopener noreferrer",target:"_blank",onClick:A=>A.stopPropagation(),"aria-label":"go-to-datasource",children:r.jsx(p.OpenInNewIcon,{size:"small"})})})]}):void 0};return r.jsxs(r.Fragment,{children:[m&&r.jsx(p.Select,{error:n,onValueChange:A=>a(A),...h,renderValue:A=>{const y=m.find(k=>k.id===A);return y?`${y.id} - ${y.label}`:A},children:m.map(A=>r.jsx(p.SelectItem,{value:String(A.id),children:r.jsx(Be,{enumKey:A.id,enumValues:m,size:"medium"})},A.id))}),!m&&r.jsx(p.TextField,{...h,error:n,placeholder:e==="optional"?"Autogenerated ID, it can be manually changed":o==="new"||o==="copy"?"ID of the new document":"ID of the document",onChange:A=>{let y=A.target.value;return y&&(y=y.trim()),a(y.length?y:void 0)}}),l.id&&r.jsx(p.Typography,{variant:"caption",className:"ml-3.5 text-red-500 dark:text-red-500",children:l.id})]})}function cn({entityOrEntitiesToDelete:e,collection:t,onClose:o,open:a,callbacks:n,onEntityDelete:i,onMultipleEntitiesDelete:s,path:l}){const d=ze(),u=re(),m=Je(),[g,f]=c.useState(!1),[b,h]=c.useState(),[A,y]=c.useState(),k=he();c.useEffect(()=>{if(e){const T=Array.isArray(e)&&e.length===1?e[0]:e;h(T),y(Array.isArray(T))}},[e]);const v=c.useMemo(()=>Te({collection:t,path:l,fields:u.propertyConfigs}),[t,l]),_=c.useCallback(()=>{o()},[o]),C=c.useCallback(T=>{console.debug("Deleted",T)},[]),E=c.useCallback((T,G)=>{m.open({type:"error",message:"Error deleting: "+G?.message}),console.error("Error deleting entity"),console.error(G)},[v.name]),B=c.useCallback((T,G)=>{m.open({type:"error",message:"Error before deleting: "+G?.message}),console.error(G)},[v.name]),x=c.useCallback((T,G)=>{m.open({type:"error",message:"Error after deleting: "+G?.message}),console.error(G)},[v.name]),I=c.useCallback(T=>la({dataSource:d,entity:T,collection:v,callbacks:n,onDeleteSuccess:C,onDeleteFailure:E,onPreDeleteHookError:B,onDeleteSuccessHookError:x,context:k}),[d,v,n,C,E,B,x,k]),F=c.useCallback(async()=>{b&&(f(!0),A?Promise.all(b.map(I)).then(T=>{f(!1),s&&b&&s(l,b),T.every(Boolean)?m.open({type:"success",message:`${v.name}: multiple deleted`}):T.some(Boolean)?m.open({type:"warning",message:`${v.name}: Some of the entities have been deleted, but not all`}):m.open({type:"error",message:`${v.name}: Error deleting entities`}),o()}):I(b).then(T=>{f(!1),T&&(i&&b&&i(l,b),m.open({type:"success",message:`${v.singularName??v.name} deleted`}),o())}))},[b,A,I,s,l,o,m,v.name,i]);let P;if(b&&A)P=r.jsx(r.Fragment,{children:"Multiple entities"});else{const T=b;P=T?r.jsx(Ur,{entity:T,collection:t,path:l}):r.jsx(r.Fragment,{})}const N=A?r.jsxs(r.Fragment,{children:[r.jsx("b",{children:v.name}),": Confirm multiple delete?"]}):`Would you like to delete this ${v.singularName??v.name}?`;return r.jsxs(p.Dialog,{maxWidth:"2xl","aria-labelledby":"delete-dialog",open:a,onOpenChange:T=>T?void 0:o(),children:[r.jsxs(p.DialogContent,{fullHeight:!0,children:[r.jsx(p.Typography,{variant:"subtitle2",className:"p-4",children:N}),!A&&r.jsx("div",{className:"p-4",children:P})]}),r.jsxs(p.DialogActions,{children:[g&&r.jsx(p.CircularProgress,{size:"small"}),r.jsx(p.Button,{onClick:_,disabled:g,variant:"text",color:"primary",children:"Cancel"}),r.jsx(p.Button,{autoFocus:!0,disabled:g,onClick:F,variant:"filled",color:"primary",children:"Ok"})]})]})}const sl={icon:r.jsx(p.KeyboardTabIcon,{}),name:"Edit",collapsed:!1,onClick({entity:e,collection:t,context:o,highlightEntity:a,unhighlightEntity:n}){return a?.(e),o.analyticsController?.onAnalyticsEvent?.("entity_click",{path:e.path,entityId:e.id}),o.sideEntityController.open({entityId:e.id,path:e.path,collection:t,updateUrl:!0,onClose:()=>n?.(e)}),Promise.resolve(void 0)}},dn={icon:r.jsx(p.FileCopyIcon,{}),name:"Copy",onClick({entity:e,collection:t,context:o,highlightEntity:a,unhighlightEntity:n}){return a?.(e),o.analyticsController?.onAnalyticsEvent?.("copy_entity_click",{path:e.path,entityId:e.id}),o.sideEntityController.open({entityId:e.id,path:e.path,copy:!0,collection:t,updateUrl:!0,onClose:()=>n?.(e)}),Promise.resolve(void 0)}},pn={icon:r.jsx(p.DeleteIcon,{}),name:"Delete",onClick({entity:e,fullPath:t,collection:o,context:a,selectionController:n,onCollectionChange:i,sideEntityController:s}){const{closeDialog:l}=a.dialogsController.open({key:"delete_entity_dialog_"+e.id,Component:({open:d})=>{if(!o||!t)throw new Error("deleteEntityAction: Collection is undefined");return r.jsx(cn,{entityOrEntitiesToDelete:e,path:t,collection:o,callbacks:o.callbacks,open:d,onEntityDelete:()=>{a.analyticsController?.onAnalyticsEvent?.("single_entity_deleted",{path:t}),n?.setSelectedEntities(n.selectedEntities.filter(u=>u.id!==e.id)),i?.(),s?.close()},onClose:l})}});return Promise.resolve(void 0)}};function ll({propertyId:e}){const[t,o]=c.useState(!1);return r.jsxs("div",{className:"flex flex-row gap-2 items-center justify-center text-white",children:[r.jsxs("div",{children:[r.jsx(p.Typography,{variant:"caption",className:"min-w-20 text-slate-400",color:"disabled",children:t?"Copied":"Property ID"}),r.jsx(p.Typography,{variant:"caption",className:"text-white",children:r.jsx("code",{children:e})})]}),r.jsx(p.IconButton,{size:"small",children:r.jsx(p.ContentPasteIcon,{size:"smallest",className:"text-white",onClick:c.useCallback(()=>{navigator.clipboard.writeText(e),o(!0),setTimeout(()=>o(!1),2e3)},[e])})})]})}const un=c.memo(cl,(e,t)=>e.status===t.status&&e.path===t.path&&$(e.entity?.values,t.entity?.values));function mn(e,t,o){const a=e.properties;if((t==="existing"||t==="copy")&&o)return o.values??wt(a);if(t==="new")return wt(a);throw console.error({status:t,entity:o}),new Error("Form has not been initialised with the correct parameters")}function cl({status:e,path:t,collection:o,entity:a,onEntitySaveRequested:n,onDiscard:i,onModified:s,onValuesChanged:l,onIdChange:d,onFormContextChange:u,hideId:m,autoSave:g,onIdUpdateError:f}){const b=dt(),h=re(),A=he(),y=ze(),k=h.plugins,v=c.useMemo(()=>Te({collection:o,path:t,values:a?.values,fields:h.propertyConfigs}),[a?.values,t]),_=(e==="new"||e==="copy")&&!!v.customId&&v.customId!=="optional",C=c.useMemo(()=>e==="new"||e==="copy"?_?void 0:y.generateEntityId(t):a?.id,[]),E=c.useRef(!1),B=c.useRef(mn(v,e,a)),[x,I]=c.useState(C),[F,P]=c.useState(!1),[N,T]=c.useState(),[G,ee]=c.useState(!1),[M,Y]=c.useState(a?.values??B.current),H=V=>n({collection:z,path:t,entityId:x,values:V,previousValues:a?.values,closeAfterSave:E.current,autoSave:g??!1}).then(q=>{const de=e==="new"?"new_entity_saved":e==="copy"?"entity_copied":e==="existing"?"entity_edited":"unmapped_event";b.onAnalyticsEvent?.(de,{path:t})}).catch(q=>{console.error(q),T(q)}).finally(()=>{E.current=!1}),Q=(V,q)=>{if(_&&!x){console.error("Missing custom Id"),P(!0),q.setSubmitting(!1);return}if(T(void 0),P(!1),e==="existing"){if(!a?.id)throw Error("Form misconfiguration when saving, no id for existing entity")}else if(e==="new"||e==="copy"){if(o.customId&&o.customId!=="optional"&&!x)throw Error("Form misconfiguration when saving, entityId should be set")}else throw Error("New FormType added, check EntityForm");return H(V)?.then(de=>{q.resetForm({values:V,submitCount:0,touched:{}})}).finally(()=>{q.setSubmitting(!1)})},J=ye.useCreateFormex({initialValues:B.current,onSubmit:Q,validation:V=>K?.validate(V,{abortEarly:!1}).then(()=>({})).catch(q=>{const de={};return q.inner.forEach(L=>{de[L.path]=L.message}),pl(q)})});c.useEffect(()=>{B.current=mn(v,e,a);const V=J.initialValues;!J.isSubmitting&&V&&e==="existing"?ne(Object.entries(z.properties).map(([q,de])=>{if(yt(de))return{};const L=V[q],ae=B.current[q];return $(L,ae)?{}:{[q]:ae}}).reduce((q,de)=>({...q,...de}),{})):ne({})},[a,v,e]);const Z=V=>{const q=J.initialValues;Y(V),l&&l(V),g&&V&&!$(V,q)&&H(V)};c.useEffect(()=>{x&&d&&d(x)},[x,d]);const z=Te({collection:o,path:t,entityId:x,values:M,previousValues:J.initialValues,fields:h.propertyConfigs}),ie=o.callbacks?.onIdUpdate,W=c.useCallback(async()=>{if(ie&&M&&(e==="new"||e==="copy")){ee(!0);try{const V=await ie({collection:z,path:t,entityId:x,values:M,context:A});I(V)}catch(V){f&&f(V),console.error(V)}ee(!1)}},[x,M,e]);c.useEffect(()=>{W()},[W]);const[te,ne]=c.useState({}),D=c.useCallback(({name:V,value:q,property:de})=>y.checkUniqueField(t,V,q,x),[y,t,x]),K=c.useMemo(()=>x?Qa(x,z.properties,D):void 0,[x,z.properties,D]),R=We(),X=c.useCallback(({entity:V,customEntityActions:q})=>{const de=st(o,R,De(t),null),L=V?Ut(o,R,De(t),V):!0,ae=[];return de&&ae.push(dn),L&&ae.push(pn),q&&ae.push(...q),ae},[R,o,t]),S=[],O={setFieldValue:J.setFieldValue,values:J.values,collection:z,entityId:x,path:t,save:H};if(c.useEffect(()=>{u&&u(O)},[u,O]),k&&o){const V={entityId:x,path:t,status:e,collection:o,context:A,currentEntityId:x,formContext:O};S.push(...k.map((q,de)=>q.form?.Actions?r.jsx(q.form.Actions,{...V},`actions_${q.name}`):null).filter(Boolean))}return r.jsx(ye.Formex,{value:J,children:r.jsxs("div",{className:"h-full overflow-auto",children:[S.length>0&&r.jsx("div",{className:p.cn("w-full flex justify-end items-center sticky top-0 right-0 left-0 z-10 bg-opacity-60 bg-slate-200 dark:bg-opacity-60 dark:bg-slate-800 backdrop-blur-md"),children:S}),r.jsxs("div",{className:"pt-12 pb-16 pl-8 pr-8 md:pl-10 md:pr-10",children:[r.jsxs("div",{className:`w-full py-2 flex flex-col items-start mt-${4+(S?8:0)} lg:mt-${8+(S?8:0)} mb-8`,children:[r.jsx(p.Typography,{className:"mt-4 flex-grow "+o.hideIdFromForm?"mb-2":"mb-0",variant:"h4",children:o.singularName??o.name}),r.jsx(p.Alert,{color:"base",className:"w-full",size:"small",children:r.jsxs("code",{className:"text-xs select-all",children:[t,"/",x]})})]}),!m&&r.jsx(il,{customId:o.customId,entityId:x,status:e,onChange:I,error:F,loading:G,entity:a}),x&&r.jsx(dl,{...J,initialValues:J.initialValues,onModified:s,onDiscard:i,onValuesChanged:Z,underlyingChanges:te,entity:a,resolvedCollection:z,formContext:O,status:e,savingError:N,closeAfterSaveRef:E,autoSave:g,entityActions:X({entity:a,customEntityActions:o.entityActions})})]})]})})}function dl(e){const{values:t,onDiscard:o,onModified:a,onValuesChanged:n,underlyingChanges:i,formContext:s,entity:l,touched:d,setFieldValue:u,resolvedCollection:m,isSubmitting:g,status:f,handleSubmit:b,resetForm:h,savingError:A,dirty:y,closeAfterSaveRef:k,autoSave:v,entityActions:_}=e,C=he(),E=_.filter(N=>N.includeInForm===void 0||N.includeInForm),B=He(),x=y;c.useEffect(()=>{a&&a(x),n&&n(t)},[x,t]),c.useEffect(()=>{!v&&!g&&i&&l&&Object.entries(i).forEach(([N,T])=>{const G=t[N];!$(T,G)&&!d[N]&&(console.debug("Updated value from the datasource:",N,T),u(N,T!==void 0?T:null))})},[g,v,i,l,t,d,u]);const I=r.jsx("div",{className:"flex flex-col gap-8",children:(m.propertiesOrder??Object.keys(m.properties)).map(N=>{const T=m.properties[N];if(!T)return console.warn(`Property ${N} not found in collection ${m.name}`),null;const G=!!i&&Object.keys(i).includes(N)&&!!d[N],ee=!v&&g||nt(T)||!!T.disabled;if(yt(T))return null;const Y={propertyKey:N,disabled:ee,property:T,includeDescription:T.description||T.longDescription,underlyingValueHasChanged:G&&!v,context:s,tableMode:!1,partOfArray:!1,partOfBlock:!1,autoFocus:!1};return r.jsx("div",{id:`form_field_${N}`,children:r.jsx(oe,{children:r.jsx(p.Tooltip,{title:r.jsx(ll,{propertyId:N}),delayDuration:800,side:"left",sideOffset:16,children:r.jsx(tt,{...Y})})})},`field_${m.name}_${N}`)}).filter(Boolean)}),F=g||!x&&f==="existing",P=c.useRef(null);return r.jsxs("form",{onSubmit:b,onReset:()=>(console.debug("Resetting form"),h(),o&&o()),noValidate:!0,children:[r.jsxs("div",{className:"mt-12",ref:P,children:[I,r.jsx(al,{containerRef:P})]}),r.jsx("div",{className:"h-14"}),!v&&r.jsxs(p.DialogActions,{position:"absolute",children:[A&&r.jsx("div",{className:"text-right",children:r.jsx(p.Typography,{color:"error",children:A.message})}),l&&E.length>0&&r.jsx("div",{className:"flex-grow flex overflow-auto no-scrollbar",children:E.map(N=>r.jsx(p.IconButton,{color:"primary",onClick:T=>{T.stopPropagation(),l&&N.onClick({entity:l,fullPath:m.path,collection:m,context:C,sideEntityController:B})},children:N.icon},N.name))}),r.jsx(p.Button,{variant:"text",disabled:F,type:"reset",children:f==="existing"?"Discard":"Clear"}),r.jsxs(p.Button,{variant:"text",color:"primary",type:"submit",disabled:F,onClick:()=>{k.current=!1},children:[f==="existing"&&"Save",f==="copy"&&"Create copy",f==="new"&&"Create"]}),r.jsxs(p.Button,{variant:"filled",color:"primary",type:"submit",disabled:F,onClick:()=>{k.current=!0},children:[f==="existing"&&"Save and close",f==="copy"&&"Create copy and close",f==="new"&&"Create and close"]})]})]})}function pl(e){let t={};if(e.inner){if(e.inner.length===0)return ye.setIn(t,e.path,e.message);for(const o of e.inner)ye.getIn(t,o.path)||(t=ye.setIn(t,o.path,o.message))}return t}function ul(e){return e.open?r.jsx(ml,{...e}):null}function ml({tableKey:e,entity:t,customFieldValidator:o,propertyKey:a,collection:n,path:i,cellRect:s,open:l,onClose:d,onCellValueChange:u,container:m}){const g=he(),f=re(),[b,h]=c.useState(),[A,y]=c.useState(),k=t?.id,[v,_]=c.useState(t),[C,E]=c.useState(v?.values),B=n?Te({collection:n,path:i,values:C,entityId:k,fields:f.propertyConfigs}):void 0,x=Vs(),I=c.useRef(null),F=c.useRef(null),P=c.useRef(!1),N=c.useCallback(()=>{if(!s)throw Error("getInitialLocation error");return{x:s.left<x.width-s.right?s.x+s.width/2:s.x-s.width/2,y:s.top<x.height-s.bottom?s.y+s.height/2:s.y-s.height/2}},[s,x.height,x.width]),T=c.useCallback(({x:S,y:O})=>{const V=I.current?.getBoundingClientRect();if(!V)throw Error("normalizePosition called before draggableBoundingRect is set");return{x:Math.max(0,Math.min(S,x.width-V.width)),y:Math.max(0,Math.min(O,x.height-V.height))}},[x]),G=c.useCallback(S=>{const O=I.current?.getBoundingClientRect();if(!s||!O)return;const V=S??T(N());(!A||V.x!==A.x||V.y!==A.y)&&y(V)},[s,N,T,A]);zs({containerRef:I,innerRef:F,x:A?.x,y:A?.y,onMove:G}),c.useEffect(()=>{P.current=!1},[a,v]),c.useLayoutEffect(()=>{const S=I.current?.getBoundingClientRect();!s||!S||P.current||(G(),P.current=!0)},[s,G,P.current]),c.useLayoutEffect(()=>{G(A)},[x,s]);const ee=c.useMemo(()=>{if(!(!B||!k))return Qa(k,a&&B.properties[a]?{[a]:B.properties[a]}:{},o)},[B,k,a,o]),M=c.useCallback(()=>G(A),[A,G]),Y=async S=>(h(null),n&&v&&u&&a?u({value:S[a],propertyKey:a,entity:v,setError:h,onValueUpdated:()=>{},fullPath:i,context:g}):Promise.resolve());if(!v)return r.jsx(r.Fragment,{});const H=ye.useCreateFormex({initialValues:v?.values??{},validation:S=>ee?.validate(S,{abortEarly:!1}).then(()=>({})).catch(O=>{const V={};return O.inner.forEach(q=>{V[q.path]=q.message}),V}),validateOnInitialRender:!0,onSubmit:(S,O)=>{Y(S).then(()=>d()).finally(()=>O.setSubmitting(!1))}}),{values:Q,isSubmitting:J,setFieldValue:Z,handleSubmit:z}=H;if(c.useEffect(()=>{$(Q,C)||E(Q)},[Q]),!v)return r.jsx(ge,{error:"PopupFormField misconfiguration"});if(!B)return r.jsx(r.Fragment,{});const ie=J,W={collection:B,entityId:k,values:Q,path:i,setFieldValue:Z,save:Y},te=a&&Ke(B.properties,a),ne=a&&te?{propertyKey:a,disabled:J||nt(te)||!!te.disabled,property:te,includeDescription:!1,underlyingValueHasChanged:!1,context:W,tableMode:!0,partOfArray:!1,partOfBlock:!1,autoFocus:l}:void 0;let D=r.jsx(r.Fragment,{children:r.jsx("div",{className:"w-[560px] max-w-full max-h-[85vh]",children:r.jsxs("form",{onSubmit:z,noValidate:!0,children:[r.jsx("div",{className:"mb-1 p-4 flex flex-col relative",children:r.jsx("div",{ref:F,className:"cursor-auto",style:{cursor:"auto !important"},children:ne&&r.jsx(tt,{...ne})})}),r.jsx(p.DialogActions,{children:r.jsx(p.Button,{variant:"filled",color:"primary",type:"submit",disabled:ie,children:"Save"})})]})},`popup_form_${e}_${k}_${a}`)});const K=f.plugins;K&&K.forEach(S=>{S.form?.provider&&(D=r.jsx(S.form.provider.Component,{status:"existing",path:i,collection:B,entity:v,context:g,currentEntityId:k,formContext:W,...S.form.provider.props,children:D}))});const R=r.jsxs("div",{className:`text-gray-900 dark:text-white overflow-auto rounded rounded-md bg-white dark:bg-gray-950 ${l?"":"hidden"} cursor-grab max-w-[100vw]`,children:[D,b&&r.jsx(p.Typography,{color:"error",children:b.message})]}),X=r.jsxs("div",{style:{boxShadow:"0 0 0 2px rgba(128,128,128,0.2)"},className:`inline-block fixed z-20 shadow-outline rounded-md bg-white dark:bg-gray-950 ${l?"visible":"invisible"} cursor-grab overflow-visible`,ref:I,children:[r.jsx(Gs,{onResize:M}),r.jsxs("div",{className:"overflow-hidden",children:[R,r.jsx("div",{className:"absolute -top-3.5 -right-3.5 bg-gray-500 rounded-full",style:{width:"32px",height:"32px"},children:r.jsx(p.IconButton,{size:"small",onClick:S=>{S.stopPropagation(),d()},children:r.jsx(p.ClearIcon,{className:"text-white",size:"small"})})})]})]},`draggable_${a}_${k}_${l}`);return r.jsx(Vn.Root,{asChild:!0,container:m,children:r.jsx(ye.Formex,{value:H,children:X})})}const fl="collectionGroupParent",co=c.memo(function({fullPath:t,parentCollectionIds:o,isSubCollection:a,className:n,...i}){const s=ze(),l=ue(),d=He(),u=We(),m=ct(),g=dt(),f=re(),b=c.useRef(null),h=c.useMemo(()=>{const U=m?.getCollectionConfig(t);return U?Qe(i,U):i},[i,t,m?.getCollectionConfig]),A=c.useRef(h);c.useEffect(()=>{A.current=h},[h]);const y=st(h,u,De(t),null),[k,v]=c.useState(void 0),[_,C]=c.useState(void 0),[E,B]=c.useState(0),[x,I]=c.useState(0),F=c.useCallback(()=>{const U=k;setTimeout(()=>{U===k&&v(void 0)},2400)},[k]),P=c.useCallback(U=>{const se=A.current;return Sr(se,u,De(t),U??null)?se.inlineEditing===void 0||se.inlineEditing:!1},[u,t]),N=h.selectionEnabled===void 0||h.selectionEnabled,T=!P(),[G,ee]=c.useState(!1),M=po(),Y=h.selectionController??M,{selectedEntities:H,toggleEntitySelection:Q,isEntitySelected:J,setSelectedEntities:Z}=Y;c.useEffect(()=>{C(void 0)},[H]);const z=Rr({fullPath:t,collection:A.current,entitiesDisplayedFirst:[],lastDeleteTimestamp:E}),ie=c.useRef(Math.random().toString(36)),W=z.popupCell,te=c.useCallback(()=>{z.setPopupCell?.(void 0)},[z.setPopupCell]),ne=c.useCallback(U=>{const se=A.current;return v(U),g.onAnalyticsEvent?.("edit_entity_clicked",{path:U.path,entityId:U.id}),d.open({entityId:U.id,path:U.path,collection:se,updateUrl:!0,onClose:F})},[F]),D=c.useCallback(()=>{const U=A.current;g.onAnalyticsEvent?.("new_entity_click",{path:t}),d.open({path:t,collection:U,updateUrl:!0,onClose:F})},[t]),K=()=>{g.onAnalyticsEvent?.("multiple_delete_dialog_open",{path:t}),C(H)},R=(U,se)=>{g.onAnalyticsEvent?.("single_entity_deleted",{path:t}),Z(ce=>ce.filter(le=>le.id!==se.id)),B(Date.now())},X=(U,se)=>{g.onAnalyticsEvent?.("multiple_entities_deleted",{path:t}),Z([]),C(void 0),B(Date.now())};let S;f?.plugins&&(S=f.plugins.find(U=>U.collectionView?.AddColumnComponent)?.collectionView?.AddColumnComponent);const O=c.useCallback((U,se)=>{if(m){const ce=m.getCollectionConfig(U),le=Qe(ce,se);m.onCollectionModified(U,le)}},[m]),V=c.useCallback(({width:U,key:se})=>{const ce=A.current;if(!Ke(ce.properties,se))return;const le=fn(se,U);O(t,le)},[O,t]),q=c.useCallback(U=>{m&&O(t,{defaultSize:U})},[O,t,m]),de=st(h,u,De(t),null),L=c.useCallback(({name:U,value:se,property:ce,entityId:le})=>s.checkUniqueField(t,U,se,le),[t]),ae=({fullPath:U,context:se,value:ce,propertyKey:le,onValueUpdated:be,setError:It,entity:Ft})=>{const ic=ye.setIn({...Ft.values},le,ce),sc={path:U,entityId:Ft.id,values:ic,previousValues:Ft.values,collection:h,status:"existing"};return Qr({...sc,collection:h,callbacks:h.callbacks,dataSource:s,context:se,onSaveSuccess:()=>be(),onSaveFailure:Fn=>{console.error("Save failure"),console.error(Fn),It(Fn)}})},Ne=l.resolveAliasesFrom(t),xe=c.useMemo(()=>Te({collection:h,path:t,fields:f.propertyConfigs}),[h,t]),me=c.useCallback(({propertyKey:U,propertyValue:se,entity:ce})=>{let le=Ke(h.properties,U);return le||(le=Ke(xe.properties,U)),Fe({propertyKey:U,propertyOrBuilder:le,path:t,propertyValue:se,values:ce.values,entityId:ce.id,fields:f.propertyConfigs})},[h.properties,f.propertyConfigs,t,xe.properties]),Oe=Jr(xe,!0),Ge=c.useMemo(()=>{const U=h.subcollections?.map(ce=>({key:Hr(ce),name:ce.name,width:200,dependencies:[],Builder:({entity:le})=>r.jsx(p.Button,{color:"primary",variant:"outlined",startIcon:r.jsx(p.KeyboardTabIcon,{size:"small"}),onClick:be=>{be.stopPropagation(),d.open({path:t,entityId:le.id,selectedSubPath:ce.id??ce.path,collection:h,updateUrl:!0})},children:ce.name})}))??[],se=h.collectionGroup?[{key:fl,name:"Parent entities",width:260,dependencies:[],Builder:({entity:ce})=>{const le=l.getParentReferencesFromPath(ce.path);return r.jsx(r.Fragment,{children:le.map(be=>r.jsx(Ve,{reference:be,size:"tiny"},be.path+"/"+be.id))})}}]:[];return[...h.additionalFields??[],...U,...se]},[h,t]),rt=c.useCallback(()=>{B(Date.now())},[]),Se=Me(),ot=({entity:U,customEntityActions:se})=>{const ce=U?Ut(h,u,De(t),U):!0,le=[sl];return de&&le.push(dn),ce&&le.push(pn),se&&le.push(...se),le},yo=c.useCallback(()=>{const U=ot({}),se=U.filter(be=>be.collapsed!==!1),le=U.filter(be=>be.collapsed===!1).length*(Se?40:30);return(Se?80+le:70+le)+(se.length>0?Se?40:30:0)},[Se]),wo=({entity:U,size:se,width:ce,frozen:le})=>{const be=J(U),It=ot({entity:U,customEntityActions:h.entityActions});return r.jsx(Xt,{entity:U,width:ce,frozen:le,isSelected:be,selectionEnabled:N,size:se,highlightEntity:v,unhighlightEntity:F,collection:h,fullPath:t,actions:It,hideId:h?.hideIdFromCollection,onCollectionChange:rt,selectionController:Y})},vo=r.jsx(p.Popover,{open:G,onOpenChange:ee,enabled:!!h.description,trigger:r.jsxs("div",{className:"flex flex-col items-start",children:[r.jsx(p.Typography,{variant:"subtitle1",className:`leading-none truncate max-w-[160px] lg:max-w-[240px] ${h.description?"cursor-pointer":"cursor-auto"}`,onClick:h.description?U=>{ee(!0),U.stopPropagation()}:void 0,children:`${h.name}`}),r.jsx(hl,{fullPath:t,collection:h,filter:z.filterValues,sortBy:z.sortBy,onCountChange:I})]}),children:h.description&&r.jsx("div",{className:"m-4 text-gray-900 dark:text-white",children:r.jsx(p.Markdown,{source:h.description})})}),j=c.useCallback(({property:U,propertyKey:se,onHover:ce})=>{const le=A.current;return f.plugins?r.jsx(r.Fragment,{children:f.plugins.filter(be=>be.collectionView?.HeaderAction).map((be,It)=>{const Ft=be.collectionView.HeaderAction;return r.jsx(Ft,{onHover:ce,propertyKey:se,property:U,fullPath:t,collection:le,parentCollectionIds:o??[]},`plugin_header_action_${It}`)})}):null},[f.plugins,t,o]),Ce=S?function(){return typeof S=="function"?r.jsx(S,{fullPath:t,parentCollectionIds:o??[],collection:h}):null}:void 0,{textSearchLoading:Ee,textSearchInitialised:Le,onTextSearchClick:Bt,textSearchEnabled:St}=eo({collection:h,fullPath:Ne,parentCollectionIds:o});return r.jsxs("div",{className:p.cn("overflow-hidden h-full w-full",n),ref:b,children:[r.jsx(Kr,{additionalFields:Ge,tableController:z,displayedColumnIds:Oe,onSizeChanged:q,onEntityClick:ne,onColumnResize:V,onValueChange:ae,tableRowActionsBuilder:wo,uniqueFieldValidator:L,title:vo,selectionController:Y,highlightedEntities:k?[k]:[],defaultSize:h.defaultSize,properties:xe.properties,getPropertyFor:me,onTextSearchClick:Le?void 0:Bt,textSearchLoading:Ee,textSearchEnabled:St,actions:r.jsx(Ja,{parentCollectionIds:o??[],collection:h,tableController:z,onMultipleDeleteClick:K,onNewClick:D,path:t,relativePath:h.path,selectionController:Y,selectionEnabled:N,collectionEntitiesCount:x}),emptyComponent:y&&z.filterValues===void 0&&z.sortBy===void 0?r.jsxs("div",{className:"flex flex-col items-center justify-center",children:[r.jsx(p.Typography,{variant:"subtitle2",children:"So empty..."}),r.jsxs(p.Button,{color:"primary",variant:"outlined",onClick:D,className:"mt-4",children:[r.jsx(p.AddIcon,{}),"Create your first entity"]})]}):r.jsx(p.Typography,{variant:"label",children:"No results with the applied filter/sort"}),hoverRow:T,inlineEditing:P(),AdditionalHeaderWidget:j,AddColumnComponent:Ce,getIdColumnWidth:yo,additionalIDHeaderWidget:r.jsx(gl,{path:t,collection:h})},`collection_table_${t}`),r.jsx(ul,{open:!!W,onClose:te,cellRect:W?.cellRect,propertyKey:W?.propertyKey,collection:h,entity:W?.entity,tableKey:ie.current,customFieldValidator:L,path:Ne,onCellValueChange:ae,container:b.current},`popup_form_${W?.propertyKey}_${W?.entity?.id}`),_&&r.jsx(cn,{entityOrEntitiesToDelete:_,path:t,collection:h,callbacks:h.callbacks,open:!!_,onEntityDelete:R,onMultipleEntitiesDelete:X,onClose:()=>C(void 0)})]})},(e,t)=>$(e.fullPath,t.fullPath)&&$(e.parentCollectionIds,t.parentCollectionIds)&&$(e.isSubCollection,t.isSubCollection)&&$(e.className,t.className)&&$(e.properties,t.properties)&&$(e.propertiesOrder,t.propertiesOrder)&&$(e.hideIdFromCollection,t.hideIdFromCollection)&&$(e.inlineEditing,t.inlineEditing)&&$(e.selectionEnabled,t.selectionEnabled)&&$(e.selectionController,t.selectionController)&&$(e.Actions,t.Actions)&&$(e.defaultSize,t.defaultSize)&&$(e.textSearchEnabled,t.textSearchEnabled)&&$(e.additionalFields,t.additionalFields)&&$(e.forceFilter,t.forceFilter));function po(e){const[t,o]=c.useState([]),a=c.useCallback(i=>{let s;t.map(l=>l.id).includes(i.id)?(e?.(i,!1),s=t.filter(l=>l.id!==i.id)):(e?.(i,!0),s=[...t,i]),o(s)},[t]),n=c.useCallback(i=>t.map(s=>s.id).includes(i.id),[t]);return{selectedEntities:t,setSelectedEntities:o,isEntitySelected:n,toggleEntitySelection:a}}function hl({fullPath:e,collection:t,filter:o,sortBy:a,onCountChange:n}){const i=ze(),s=ue(),[l,d]=c.useState(void 0),[u,m]=c.useState(void 0),g=a?a[0]:void 0,f=a?a[1]:void 0,b=c.useMemo(()=>s.resolveAliasesFrom(e),[e,s.resolveAliasesFrom]);return c.useEffect(()=>{i.countEntities&&i.countEntities({path:b,collection:t,filter:o,orderBy:g,order:f}).then(d).catch(m)},[e,i.countEntities,b,t,o,g,f]),c.useEffect(()=>{n&&n(l??0)},[n,l]),u?null:r.jsx(p.Typography,{className:"w-full text-ellipsis block overflow-hidden whitespace-nowrap max-w-xs text-left w-fit-content",variant:"caption",color:"secondary",children:l!==void 0?`${l} entities`:r.jsx(p.Skeleton,{className:"w-full max-w-[80px] mt-1"})})}function fn(e,t){if(e.includes(".")){const[o,...a]=e.split(".");return{properties:{[o]:fn(a.join("."),t)}}}return{properties:{[e]:{columnWidth:t}}}}function gl({collection:e,path:t}){const[o,a]=c.useState(!1),[n,i]=c.useState(""),s=He();return r.jsx(p.Tooltip,{title:o?void 0:"Find by ID",children:r.jsx(p.Popover,{open:o,onOpenChange:a,trigger:r.jsx(p.IconButton,{size:"small",children:r.jsx(p.SearchIcon,{size:"small"})}),children:r.jsx("form",{noValidate:!0,onSubmit:l=>{if(l.preventDefault(),!!n)return a(!1),s.open({entityId:n,path:t,collection:e,updateUrl:!0})},className:"text-gray-900 dark:text-white w-96 max-w-full",children:r.jsxs("div",{className:"flex p-2 w-full gap-4",children:[r.jsx("input",{autoFocus:o,placeholder:"Find entity by ID",onChange:l=>i(l.target.value),value:n,className:"flex-grow bg-transparent outline-none p-1"}),r.jsx(p.Button,{variant:"outlined",disabled:!n,type:"submit",children:"Go"})]})})})})}function hn({onSingleEntitySelected:e,onMultipleEntitiesSelected:t,multiselect:o,collection:a,path:n,selectedEntityIds:i,description:s,forceFilter:l,maxSelection:d}){const u=nr(),m=He(),g=ue(),f=dt(),b=re(),h=g.resolveAliasesFrom(n),A=ze(),[y,k]=c.useState([]),v=Y=>{let H;const Q=_.selectedEntities;if(f.onAnalyticsEvent?.("reference_selection_toggle",{path:h,entityId:Y.id}),Q){if(Q.map(J=>J.id).indexOf(Y.id)>-1)H=Q.filter(J=>J.id!==Y.id);else{if(d&&Q.length>=d)return;H=[...Q,Y]}_.setSelectedEntities(H),t&&t(H)}},_=po(v);c.useEffect(()=>{let Y=!1;const H=i?.map(Q=>Q?.toString()).filter(Boolean);return H&&a?Promise.all(H.map(Q=>A.fetchEntity({path:h,entityId:Q,collection:a}))).then(Q=>{if(!Y){const J=Q.filter(Z=>Z!==void 0);_.setSelectedEntities(J),k(J)}}):(_.setSelectedEntities([]),k([])),()=>{Y=!0}},[A,h,i,a,_.setSelectedEntities]);const C=()=>{f.onAnalyticsEvent?.("reference_selection_clear",{path:h}),_.setSelectedEntities([]),!o&&e?e(null):t&&t([])},E=Y=>{!o&&e?(f.onAnalyticsEvent?.("reference_selected_single",{path:h,entityId:Y.id}),e(Y),u.close(!1)):v(Y)},B=()=>{f.onAnalyticsEvent?.("reference_selection_new_entity",{path:h}),m.open({path:h,collection:a,updateUrl:!0,onUpdate:({entity:Y})=>{k([Y,...y]),E(Y)},closeOnSave:!0})},x=({entity:Y,size:H,width:Q,frozen:J})=>{const Z=_.selectedEntities,z=Z&&Z.map(ie=>ie.id).indexOf(Y.id)>-1;return r.jsx(Xt,{width:Q,frozen:J,entity:Y,size:H,isSelected:z,selectionEnabled:o,hideId:a?.hideIdFromCollection,fullPath:h,selectionController:_})},I=c.useCallback(Y=>{Y.stopPropagation(),u.close(!1)},[u]);if(!a)return r.jsx(ge,{error:"Could not find collection with id "+a});const F=c.useMemo(()=>Te({collection:a,path:h,values:{},fields:b.propertyConfigs}),[a,b.propertyConfigs,h]),P=Jr(F,!1),N=Rr({fullPath:h,collection:a,entitiesDisplayedFirst:y,forceFilter:l}),{textSearchLoading:T,textSearchInitialised:G,onTextSearchClick:ee,textSearchEnabled:M}=eo({collection:a,fullPath:h});return r.jsxs("div",{className:"flex flex-col h-full",children:[r.jsx("div",{className:"flex-grow",children:y&&r.jsx(Kr,{textSearchLoading:T,onTextSearchClick:G?void 0:ee,textSearchEnabled:M,displayedColumnIds:P,onEntityClick:E,tableController:N,tableRowActionsBuilder:x,title:r.jsx(p.Typography,{variant:"subtitle2",children:a.singularName?`Select ${a.singularName}`:`Select from ${a.name}`}),defaultSize:a.defaultSize,properties:F.properties,forceFilter:l,inlineEditing:!1,selectionController:_,actions:r.jsx(Al,{collection:a,path:h,onNewClick:B,onClear:C})})}),r.jsxs(p.DialogActions,{translucent:!1,children:[s&&r.jsx(p.Typography,{variant:"body2",className:"flex-grow text-left",children:s}),r.jsx(p.Button,{onClick:I,color:"primary",variant:"filled",children:"Done"})]})]})}function Al({collection:e,path:t,onClear:o,onNewClick:a}){const n=We(),i=Me(),s=a?d=>{d.preventDefault(),a()}:void 0,l=st(e,n,De(t),null)&&s&&(i?r.jsxs(p.Button,{onClick:s,startIcon:r.jsx(p.AddIcon,{}),variant:"outlined",color:"primary",children:["Add ",e.singularName??e.name]}):r.jsx(p.Button,{onClick:s,size:"medium",variant:"outlined",color:"primary",children:r.jsx(p.AddIcon,{})}));return r.jsxs(r.Fragment,{children:[r.jsx(p.Button,{onClick:o,variant:"text",color:"primary",children:"Clear"}),l]})}function uo({children:e,group:t}){const o=ct();return r.jsx(p.ExpandablePanel,{invisible:!0,titleClassName:"font-medium text-sm text-gray-600 dark:text-gray-400",className:"py-4",initiallyExpanded:!(o?.collapsedGroups??[]).includes(t??"ungrouped"),onExpandedChange:a=>{if(o)if(a)o.setCollapsedGroups((o.collapsedGroups??[]).filter(n=>n!==(t??"ungrouped")));else{const n=(o.collapsedGroups??[]).concat(t??"ungrouped");o.setCollapsedGroups(n)}},title:r.jsx(p.Typography,{color:"secondary",className:"font-medium ml-1",children:t?.toUpperCase()??"Views".toUpperCase()}),children:r.jsx("div",{className:"mb-8",children:e})})}function gn({view:e,path:t,collection:o,url:a,name:n,description:i,onClick:s}){const l=ct(),d=r.jsx(qt,{collectionOrView:o??e}),u=fe.useNavigate(),m=he(),g=re(),f=(l?.favouritePaths??[]).includes(t);let b;if(g.plugins&&o){const h={path:t,collection:o,context:m};b=r.jsx(r.Fragment,{children:g.plugins.map((A,y)=>A.homePage?.CollectionActions?r.jsx(A.homePage.CollectionActions,{...h,extraProps:A.homePage.extraProps},`actions_${y}`):null)})}return r.jsx(p.Card,{className:p.cn("h-full p-4 cursor-pointer min-h-[230px]"),onClick:()=>{s?.(),u(a),l&&l.setRecentlyVisitedPaths([t,...(l.recentlyVisitedPaths??[]).filter(h=>h!==t)])},children:r.jsxs("div",{className:"flex flex-col items-start h-full",children:[r.jsxs("div",{className:"flex-grow w-full",children:[r.jsxs("div",{className:"h-10 flex items-center w-full justify-between text-gray-300 dark:text-gray-600",children:[d,r.jsxs("div",{className:"flex items-center gap-1",onClick:h=>{h.preventDefault(),h.stopPropagation()},children:[b,l&&r.jsx(p.IconButton,{onClick:h=>{h.preventDefault(),h.stopPropagation(),f?l.setFavouritePaths(l.favouritePaths.filter(A=>A!==t)):l.setFavouritePaths([...l.favouritePaths,t])},children:f?r.jsx(p.StarIcon,{size:18,className:"text-secondary"}):r.jsx(p.StarBorderIcon,{size:18,className:"text-gray-400 dark:text-gray-500"})})]})]}),r.jsx(p.Typography,{gutterBottom:!0,variant:"h5",component:"h2",children:n}),i&&r.jsx(p.Typography,{variant:"body2",color:"secondary",component:"div",children:r.jsx(p.Markdown,{source:i})})]}),r.jsx("div",{style:{alignSelf:"flex-end"},children:r.jsx("div",{className:"p-4",children:r.jsx(p.ArrowForwardIcon,{className:"text-primary"})})})]})})}function bl({entry:e}){const t=fe.useNavigate(),o=ct();if(!o)return null;const a=o.favouritePaths.includes(e.path),n=i=>{i.preventDefault(),i.stopPropagation(),a?o.setFavouritePaths(o.favouritePaths.filter(s=>s!==e.path)):o.setFavouritePaths([...o.favouritePaths,e.path])};return r.jsx(p.Chip,{onClick:()=>t(e.url),icon:a?r.jsx(p.StarIcon,{onClick:n,size:18,className:"text-secondary"}):r.jsx(p.StarBorderIcon,{onClick:n,size:18,className:"text-gray-400 dark:text-gray-500"}),children:e.name},e.path)}function yl({hidden:e}){const t=ue(),o=ct();if(!o)return null;const a=(o?.favouritePaths??[]).map(n=>t.topLevelNavigation?.navigationEntries.find(i=>i.path===n)).filter(Boolean);return r.jsx(p.Collapse,{in:a.length>0,children:r.jsx("div",{className:"flex flex-row flex-wrap gap-2 pb-2 min-h-[32px]",children:a.map(n=>r.jsx(bl,{entry:n},n.path))})})}const mo={};function wl(){const e=fe.useLocation(),t=c.useRef(null),[o,a]=c.useState(0),[n,i]=c.useState("down"),s=c.useCallback(()=>{!t.current||!e.key||(mo[e.key]=t.current.scrollTop,a(t.current.scrollTop),i(t.current.scrollTop>o?"down":"up"))},[t,e.key,o]);return c.useEffect(()=>{const l=t.current;if(l)return l.addEventListener("scroll",s,{passive:!0}),()=>{l&&l.removeEventListener("scroll",s)}},[t,s,e]),c.useEffect(()=>{!t.current||!mo[e.key]||t.current.scrollTo({top:mo[e.key],behavior:"auto"})},[e]),{containerRef:t,scroll:o,direction:n}}const ht=new Bo.Search("url");ht.addIndex("name"),ht.addIndex("description"),ht.addIndex("group"),ht.addIndex("path");function An({additionalActions:e,additionalChildrenStart:t,additionalChildrenEnd:o}){const a=he(),n=re(),i=ue();if(!i.topLevelNavigation)throw Error("Navigation not ready in FireCMSHomePage");const{containerRef:s,scroll:l,direction:d}=wl(),{navigationEntries:u,groups:m}=i.topLevelNavigation,[g,f]=c.useState(null),b=g?u.filter(_=>g.includes(_.url)):u;c.useEffect(()=>{ht.addDocuments(u)},[u]);const h=c.useCallback(_=>{if(!_||_==="")f(null);else{const C=ht.search(_);f(C.map(E=>E.url))}},[]),A=[...m];(b.filter(_=>!_.group).length>0||b.length===0)&&A.push(void 0);let y,k,v;if(n.plugins){const _={context:a};v=r.jsx(r.Fragment,{children:n.plugins.filter(C=>C.homePage?.includeSection).map((C,E)=>{const B=C.homePage.includeSection(_);return r.jsx(uo,{group:B.title,children:B.children},`plugin_section_${C.name}`)})}),y=r.jsx("div",{className:"flex flex-col gap-2",children:n.plugins.filter(C=>C.homePage?.additionalChildrenStart).map((C,E)=>r.jsx("div",{children:C.homePage.additionalChildrenStart},`plugin_children_start_${E}`))}),k=r.jsx("div",{className:"flex flex-col gap-2",children:n.plugins.filter(C=>C.homePage?.additionalChildrenEnd).map((C,E)=>r.jsx("div",{children:C.homePage.additionalChildrenEnd},`plugin_children_start_${E}`))})}return r.jsx("div",{id:"home_page",ref:s,className:"py-2 overflow-auto h-full w-full",children:r.jsxs(p.Container,{maxWidth:"6xl",children:[r.jsxs("div",{className:"w-full sticky py-4 transition-all duration-400 ease-in-out top-0 z-10 flex flex-row gap-4",style:{top:d==="down"?-84:0},children:[r.jsx(p.SearchBar,{onTextSearch:h,placeholder:"Search collections",large:!1,innerClassName:"w-full",className:"w-full flex-grow"}),e]}),r.jsx(yl,{hidden:!!g}),t,y,A.map((_,C)=>{const E=[],B={group:_,context:a};n.plugins&&n.plugins.forEach(I=>{I.homePage?.AdditionalCards&&E.push(...tr(I.homePage?.AdditionalCards))});const x=b.filter(I=>I.group===_||!I.group&&_===void 0);return x.length===0&&E.length===0?null:r.jsx(uo,{group:_,children:r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[x.map(I=>r.jsx("div",{className:"col-span-1",children:r.jsx(gn,{...I,onClick:()=>{const F=I.type==="collection"?"home_navigate_to_collection":I.type==="view"?"home_navigate_to_view":"unmapped_event";a.analyticsController?.onAnalyticsEvent?.(F,{path:I.path})}})},`nav_${I.group}_${I.name}`)),E&&E.map((I,F)=>r.jsx("div",{children:r.jsx(I,{...B})},`nav_${_}_add_${F}`))]})},`plugin_section_${_}`)}),v,k,o]})})}function vl({propertyConfig:e}){const t="h-8 w-8 p-1 rounded-full shadow text-white",o=typeof e?.property=="object"?Sn(e.property):void 0;return r.jsx("div",{className:t,style:{background:e?.color??o?.color??"#888"},children:e?.Icon?jt(e,"medium"):jt(o,"medium")})}function bn(){return r.jsx("div",{className:"flex w-full h-full",children:r.jsxs("div",{className:"m-auto flex items-center flex-col",children:[r.jsx(p.Typography,{variant:"h4",align:"center",gutterBottom:!0,children:"Page not found"}),r.jsx(p.Typography,{align:"center",gutterBottom:!0,children:"This page does not exist or you may not have access to it"}),r.jsx(p.Button,{variant:"text",component:fe.Link,to:"/",children:"Back to home"})]})})}function kl({open:e,onAccept:t,onCancel:o,title:a,loading:n,body:i}){return r.jsxs(p.Dialog,{open:e,onOpenChange:s=>s?void 0:o(),children:[r.jsxs(p.DialogContent,{children:[r.jsx(p.Typography,{variant:"h6",className:"mb-2",children:a}),i]}),r.jsxs(p.DialogActions,{children:[r.jsx(p.Button,{variant:"text",onClick:o,autoFocus:!0,children:"Cancel"}),r.jsx(p.LoadingButton,{color:"primary",type:"submit",loading:n,onClick:t,children:"Ok"})]})]})}function yn({width:e,height:t,className:o,style:a}){return r.jsxs("svg",{width:e??"100%",height:t??"100%",viewBox:"0 0 599 599",version:"1.1",style:a,className:o,xmlns:"http://www.w3.org/2000/svg",children:[r.jsxs("defs",{children:[r.jsxs("radialGradient",{cx:"28.6213569%",cy:"43.1133328%",fx:"28.6213569%",fy:"43.1133328%",r:"71.5003456%",gradientTransform:"translate(0.286214,0.431133),rotate(3.343450),scale(1.000000,0.996175),translate(-0.286214,-0.431133)",id:"radialGradient-1",children:[r.jsx("stop",{stopColor:"#FF5B79",offset:"0%"}),r.jsx("stop",{stopColor:"#FA5574",offset:"28.0930803%"}),r.jsx("stop",{stopColor:"#EC4C51",offset:"44.7242531%"}),r.jsx("stop",{stopColor:"#9543C1",offset:"71.4578165%"}),r.jsx("stop",{stopColor:"#3857B3",offset:"100%"})]}),r.jsxs("radialGradient",{cx:"53.6205516%",cy:"47.2473036%",fx:"53.6205516%",fy:"47.2473036%",r:"50.8229649%",gradientTransform:"translate(0.536206,0.472473),rotate(90.000000),scale(1.000000,1.206631),translate(-0.536206,-0.472473)",id:"radialGradient-2",children:[r.jsx("stop",{stopColor:"#68294F",stopOpacity:"0",offset:"0%"}),r.jsx("stop",{stopColor:"#5E2548",stopOpacity:"0.04641108",offset:"75.3503173%"}),r.jsx("stop",{stopColor:"#0D060B",stopOpacity:"0.437431709",offset:"100%"})]}),r.jsxs("radialGradient",{cx:"53.8605015%",cy:"48.1990423%",fx:"53.8605015%",fy:"48.1990423%",r:"59.9151549%",gradientTransform:"translate(0.538605,0.481990),rotate(180.000000),scale(1.000000,0.925027),translate(-0.538605,-0.481990)",id:"radialGradient-3",children:[r.jsx("stop",{stopColor:"#68294F",stopOpacity:"0",offset:"0%"}),r.jsx("stop",{stopColor:"#5E2548",stopOpacity:"0.04641108",offset:"84.0867343%"}),r.jsx("stop",{stopColor:"#FF0000",stopOpacity:"0.567324765",offset:"100%"})]})]}),r.jsx("g",{id:"Page-1",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:r.jsxs("g",{id:"firecms_logo",children:[r.jsx("circle",{fill:"url(#radialGradient-1)",cx:"299.5",cy:"299.5",r:"299.5"}),r.jsx("circle",{fill:"url(#radialGradient-2)",cx:"299.5",cy:"299.5",r:"299.5"}),r.jsx("circle",{fill:"url(#radialGradient-3)",cx:"299.5",cy:"299.5",r:"299.5"})]})})]})}const wn=function({title:t,endAdornment:o,startAdornment:a,drawerOpen:n,dropDownActions:i,includeDrawer:s,className:l,style:d,user:u}){const m=ue(),g=We(),{mode:f,toggleMode:b}=Dr(),h=Me(),A=u??g.user;let y;if(A&&A.photoURL)y=r.jsx(p.Avatar,{src:A.photoURL});else if(A===void 0||g.initialLoading)y=r.jsx("div",{className:"p-1 flex justify-center",children:r.jsx(p.Skeleton,{className:"w-10 h-10 rounded-full"})});else{const k=A?.displayName?A.displayName[0].toUpperCase():A?.email?A.email[0].toUpperCase():"A";y=r.jsx(p.Avatar,{children:k})}return r.jsx("div",{style:d,className:p.cn("pr-2",{"ml-[17rem]":n&&h,"ml-16":s&&!(n&&h)&&!a,"h-16":!0,"z-10":h,"transition-all":!0,"ease-in":!0,"duration-75":!0,"w-full":!s,"w-[calc(100%-64px)]":s&&!(n&&h),"w-[calc(100%-17rem)]":s&&n&&h,"duration-150":n&&h,fixed:!0},l),children:r.jsxs("div",{className:"flex flex-row gap-2 px-4 h-full items-center",children:[a,m&&r.jsx("div",{className:"mr-8 hidden lg:block",children:r.jsx(fe.Link,{className:"visited:text-inherit visited:dark:text-inherit",to:m?.basePath??"/",children:r.jsx(p.Typography,{variant:"subtitle1",noWrap:!0,className:"ml-2 !font-medium",children:t})})}),r.jsx("div",{className:"flex-grow"}),o&&r.jsx(oe,{children:o}),r.jsx(p.IconButton,{color:"inherit","aria-label":"Open drawer",onClick:b,size:"large",children:f==="dark"?r.jsx(p.DarkModeIcon,{}):r.jsx(p.LightModeIcon,{})}),r.jsxs(p.Menu,{trigger:y,children:[i,!i&&r.jsxs(p.MenuItem,{onClick:g.signOut,children:[r.jsx(p.LogoutIcon,{}),"Log Out"]})]})]})})},_l=e=>e&&Array.isArray(e)&&e.length>0?e.map((t,o)=>t?{[hr(t)+o]:Et()}:{}).reduce((t,o)=>({...t,...o}),{}):{};function fo({droppableId:e,addLabel:t,value:o,disabled:a=!1,buildEntry:n,size:i="medium",onInternalIdAdded:s,includeAddButton:l,newDefaultEntry:d,onValueChange:u}){const m=o&&Array.isArray(o)&&o.length>0,g=c.useRef(_l(o)),[f,b]=c.useState(m?Object.values(g.current):[]);c.useEffect(()=>{if(m&&o&&o.length!==f.length){const v=o.map((_,C)=>{const E=hr(_)+C;if(E in g.current)return g.current[E];{const B=Et();return g.current[E]=B,B}});b(v)}},[m,f.length,o]);const h=v=>{if(v.preventDefault(),a)return;const _=Et(),C=[...f,_];s&&s(_),b(C),u([...o??[],d])},A=v=>{const _=[...f];_.splice(v,1),b(_),u(o.filter((C,E)=>E!==v))},y=v=>{const _=Et(),C=o[v],E=[...f.splice(0,v+1),_,...f.splice(v+1,f.length-v-1)];s&&s(_),b(E),u([...o.slice(0,v+1),C,...o.slice(v+1)])},k=v=>{if(!v.destination)return;const _=v.source.index,C=v.destination.index,E=[...f],B=E[_];E[_]=E[C],E[C]=B,b(E),u(xl(o,_,C))};return r.jsx(at.DragDropContext,{onDragEnd:k,children:r.jsx(at.Droppable,{droppableId:e,renderClone:(v,_,C)=>{const E=C.source.index,B=f[E];return r.jsx(ho,{provided:v,internalId:B,index:E,size:i,disabled:a,buildEntry:n,remove:A,copy:y,isDragging:_.isDragging})},children:(v,_)=>r.jsxs("div",{...v.droppableProps,ref:v.innerRef,children:[m&&f.map((C,E)=>r.jsx(at.Draggable,{draggableId:`array_field_${C}`,isDragDisabled:a,index:E,children:(B,x)=>r.jsx(ho,{provided:B,internalId:C,index:E,size:i,disabled:a,buildEntry:n,remove:A,copy:y,isDragging:x.isDragging})},`array_field_${C}`)),v.placeholder,l&&r.jsx("div",{className:"py-4 justify-center text-left",children:r.jsx(p.Button,{variant:"text",size:i==="small"?"small":"medium",color:"primary",disabled:a,startIcon:r.jsx(p.AddIcon,{}),onClick:h,children:t??"Add"})})]})})})}function ho({provided:e,index:t,internalId:o,size:a,disabled:n,buildEntry:i,remove:s,copy:l,isDragging:d}){const[u,m]=c.useState(!1),g=c.useCallback(()=>m(!0),[]),f=c.useCallback(()=>m(!1),[]);return r.jsx("div",{onMouseEnter:g,onMouseMove:g,onMouseLeave:f,ref:e.innerRef,...e.draggableProps,style:e.draggableProps.style,className:`${d||u?p.fieldBackgroundHoverMixin:""} mb-1 rounded-md opacity-100`,children:r.jsxs("div",{className:"flex items-start",children:[r.jsx("div",{className:"flex-grow w-[calc(100%-48px)] text-text-primary dark:text-text-primary-dark",children:i(t,o)}),r.jsx(vn,{direction:a==="small"?"row":"column",disabled:n,remove:s,index:t,provided:e,copy:l})]})})}function vn({direction:e,disabled:t,remove:o,index:a,provided:n,copy:i}){const[s,l]=c.useState(!1),d=c.useRef(null);return p.useOutsideAlerter(d,()=>l(!1)),r.jsx("div",{className:`pl-2 pt-1 pb-4 flex ${e==="row"?"flex-row-reverse":"flex-col"} items-center`,ref:d,...n.dragHandleProps,children:r.jsxs(p.Tooltip,{delayDuration:400,open:s?!1:void 0,side:e==="column"?"left":void 0,title:"Drag to move. Click for more options",children:[r.jsx(p.IconButton,{size:"small",disabled:t,onClick:()=>l(!0),onDragStart:u=>{l(!1)},className:`cursor-${t?"inherit":"grab"}`,children:r.jsx(p.HandleIcon,{})}),r.jsxs(p.Menu,{portalContainer:d.current,open:s,trigger:r.jsx("div",{}),children:[r.jsxs(p.MenuItem,{dense:!0,onClick:u=>{l(!1),o(a)},children:[r.jsx(p.RemoveIcon,{size:"small"}),"Remove"]}),r.jsxs(p.MenuItem,{dense:!0,onClick:()=>{l(!1),i(a)},children:[r.jsx(p.ContentCopyIcon,{size:"small"}),"Copy"]})]})]})})}function xl(e,t,o){const a=Array.from(e),[n]=a.splice(t,1);return a.splice(o,0,n),a}function Et(){return Math.floor(Math.random()*Math.floor(Number.MAX_SAFE_INTEGER))}function Cl({name:e,multiselect:t=!1,path:o,disabled:a,value:n,onReferenceSelected:i,onMultipleReferenceSelected:s,previewProperties:l,forceFilter:d,size:u,className:m}){const g=ue(),f=c.useMemo(()=>g.getCollection(o),[o,g]);if(!f)throw Error(`Couldn't find the corresponding collection for the path: ${o}`);const b=c.useCallback(v=>{if(!a&&i){const _=v?Ye(v):null;i?.({reference:_,entity:v})}},[a,i]),h=c.useCallback(v=>{if(!a&&s){const _=v?v.map(C=>Ye(C)):null;s({references:_,entities:v})}},[a,i]),A=gt({multiselect:t,path:o,collection:f,onSingleEntitySelected:b,onMultipleEntitiesSelected:h,forceFilter:d});c.useCallback(v=>{v.stopPropagation(),t?h([]):b(null)},[i]);let y;const k=()=>{a||A.open()};return Array.isArray(n)?y=r.jsx("div",{className:"flex flex-col gap-4",children:n.map((v,_)=>r.jsx(Ve,{onClick:k,reference:v,disabled:a,previewProperties:l,size:u},`reference_preview_${_}`))}):n?.isEntityReference&&n?.isEntityReference()&&(y=r.jsx(Ve,{reference:n,onClick:k,disabled:a,previewProperties:l,size:u})),r.jsxs("div",{className:p.cn("text-sm font-medium text-gray-500","min-w-80 flex flex-col gap-4","relative transition-colors duration-200 ease-in rounded font-medium",a?"bg-opacity-50":"hover:bg-opacity-75","text-opacity-50 dark:text-white dark:text-opacity-50",m),children:[y,!n&&r.jsx("div",{className:"justify-center text-left",children:r.jsxs(p.Button,{variant:"outlined",color:"primary",disabled:a,onClick:k,children:["Edit ",e]})})]})}const El=220;process.env.NODE_ENV!=="production"&&Object.keys(Ir).forEach(e=>{p.iconKeys.includes(e)||console.warn(`The icon ${e} no longer exists. Remove it from \`icon_synonyms\``)});function Bl({selectedIcon:e="",onIconSelected:t}){const[o,a]=c.useState(null),[n,i]=c.useState(""),s=c.useMemo(()=>p.debounce(d=>{if(!d||d==="")a(null);else{const u=$t.search(d);a(u.map(m=>m.key))}},El),[]);c.useEffect(()=>(s(n),()=>{s.clear()}),[n,s]);const l=o===null?p.coolIconKeys:o;return r.jsxs(r.Fragment,{children:[r.jsx(p.SearchBar,{autoFocus:!0,innerClassName:"w-full sticky top-0 z-10",onTextSearch:d=>i(d??""),placeholder:"Search for more icons…"}),r.jsx("div",{className:"flex max-w-full flex-wrap mt-4",children:l.map(d=>r.jsx(p.Tooltip,{title:d,children:r.jsx(p.IconButton,{shape:"square",toggled:e===d,onClick:t?()=>t(d):void 0,className:"box-content m-1",children:r.jsx(p.Icon,{iconKey:d,size:24})})},d))})]})}function gt(e){const t=ue(),o=kt(),a=c.useCallback(()=>{if(e.path){let i=e.collection;if(i||(i=t.getCollection(e.path)),!i)throw Error("Not able to resolve the collection in useReferenceDialog");o.open({key:`reference_${e.path}`,component:r.jsx(hn,{collection:i,...e}),width:"90vw",onClose:()=>{e.onClose?.()}})}else throw Error("useReferenceDialog: You are trying to open a reference dialog, but have not declared the `path`")},[t,e,o]),n=c.useCallback(()=>{o.close()},[o]);return{open:a,close:n}}const Sl=`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAAASAAAAEgARslrPgAAB9pJREFUWMONl12obVUVx39jzLk+9j7nHq9y1QT1qpcbSIaXQFGs24PQl3HroSQyqHwJFJF6qaceCsqQoJdELHoIC6EeJCSKsi/TFLGozGsKXksljRLxnrP3WmvOOUYPa+19zsmPWpux5pxrzTX///Exx5hb+B/X1y+/nuIlVKF5m0v1YbQ55tIcKTQXFerNQkumOZ1oTiXCqUH8saR+74L8ZIWWux7+7JuuL2/04s5jJyhWQlXV71KtbhCtr1WtD6s0KlrjNBRaEi3JGzpv6bymQ0sn9mwv9otB7Ls7kn9Xo+U7D9z8/xG4+bz3cs35SjE/HEK8NWr8RBOrs+tQUUlEtAYaijRkbxmY0fuMzucsfcbSWnZQtiWxJL3Uid09iH0jIM8/1f+d3/zuS29M4PvHrmG+cZA8dMdjiLfNYrx6owrMVKlVUQkgkeI1iYbBJ3A2WPpKNtnx+UQisy29L0gPDGKfrwkPn2bJPfd/Zo0ZVp0fvOOdnLGxheX+A/Mq3nGwqS8/q645o4psxkgbhFqdSgqVJKIkghgqjuDoWh+dlm1AI0gUC3o4C9d04idbmZ06euQDPPHMj3YJ3HnkrZx98Fys2PFZ1dxxsJkdPbOecaBqmcWGqBVBIkEiKkoQJ5IJJBTbY8aRgBMwjxgVJoJJwDScnYUrOy2PBamfv/CS4zz9zE+IAIfPuQQzPzyrmq9u1e3RM+qWeaipNCCiE4DjbjgF94xZQj2htpjeK84ImqlIUpO9JllgEKgJDFpfOoh8paN8chbOeQ4g/OTq97PdLXSz3fjiVjO7/sx6g804ow41QWuCrjQPBB3bkZQgAkpBJOMojmIEjIgRKV6RpaYIZHGKQlK5OIv0L8bul8eOfsxjDJGD8613z6rmhq1qxkY1o9YKFUFEEED2xqoE1MNoWgPBwQZMl2SrSbQM9NQyUMlA5S3Rlcqd6E50RdRvPMvn9yE8qP9+9WWtQvXxzdic8xrwPaJrUYJGoq4sVBM1Ukuiln4UBipJVJrGoHUhrARB0XMQ/cizbSd61uaZlzUhXjuvWmqt9oOyAmUPEabnkSDV2j0Rp2YgksZdQpoCtRBwAiN4cKYdw4m3pNnbY9Tw4SZUh9tQEda+ld1WpmThgoivU8fYDbgEggRcleiZ6BOoFNRXLQQX1Eelggsgh8GPx6DhWB2iRgkj2OTuVX8dBzJtMx93BAKK4hIwUUSEID4BGspecWTfDwSCw+UxqByJoqPf9+xmYWQg7H3u+5Poyk3o5BZDxRBxxH29fdkF3YcBXKHgF+m+hLxn4OvbnnbPzMkjsm/+f5cXec2ye6ZfpO6+OX7pE8TqPj1zcN/7Zu8CDm44Bu6skrKjuOs0FlxWCJNMYxMOqLlR3DAvsAKaZo6t7+u7r6nhjN/5RKIQKESKhykhjeIINgJi+0m4Fiuns2WKZQybtJ2AfAWzGu/ayt0wz5gXimeKQyKSPI4kiCMhDxSgyLiOiY9kxnW2NVs+1ZeBbAmzhLmtgd0d8z1k1mIUTxQbKD5gnkmuDN6QvCF5TaIie0UmkIU1id3WcfwZHUo61eWB3gayDdOiZR+JXUuMWmcbyGWcny2RzOi8obeWwRsGrxm8JlGPBHCyOJmpJkwkHHs09pnfL1L60KLqtBKZtprhU+lVmSq9+xRsBfOMW6L4QLFM7zWdz+l8Ru8tA+10YKlJIiSxkcC6dQqlmJc/xaHIvTuZT7UpHalFUHEqL6iGsfKtM8FEzMdy7J4oXui9mk5CczpGErtEKgacQUZJE3gSwzw/i+dfx2G7e6IcOPALCXIkakGkYx4iwceyq+uENPp+RSI7DN7Q+5ylb7JgJLH0+XRGbOlRerWJwNgmnOwJ83Tvq/7KX2KZb1nJfnfp5YRoda7hFC/MQyGI7Mteow2E4pHkDT2zyfS758HV4bSjolOjF2PYS4KBbN2L5vmHZ7DpsWQnDsvfLj1+Lwufy9LSO2y5M1Mnik8OEJxAoSJRk7xhoKX3+URiztI3WPgGS2/p1OnE6CcSvRQGH+htQfH07dPSP7Lp9ajcNy+9DnG/oMT67qqZHz/QtGxVyjworQqVCIjiPiaaTD1ttZZ+fTIeCXQ+Y6HCQm0tO5LYpmfHlyy9/1nCPi3ICw/99JbxUHrdvxr6Q4depdhTfeGapVeH+imKxwhv6ZnR+5zeN0aNGU2+ZIPON0cX0LBQYSnGQgsLSSzoWdiCHVvQ2fLP2fMtwf2vDz50K6TpVPxj/sn7Ni5iu9l6Tof+yd78yoWFQ0uvWYvVLK1h6e34B8RnY9DZnIW3LAijxpLYkZ6Fd+z4km3bYcd2WNry8ezppsZ5ZMd2+MfTv3xtjbr9/PfwyoFDzPvtq7I2t+Vq/m6pt4hxThVaojao1CANRkORmkwkiTCI00thKYWOzJJR+6V1JE8/z2JfqGgfW9jLPPLg7a9Xe8frHs7j5MVXESxfmLS5KYXmxhQ3z/a4icQNRFtEGlwjJkoRIamTmIKNTE+it57kw0sF+1ah3CkSXkiPf42Htl+3WL/2+vIFJ6ishJ3QXD1o9dEhVCcGbS7ModUcakwrigaKChkoYmQK2XMp5L8V/F7DfuDePYrEcv8f7npdnDcksEvkg9RewquhuayTcHzQeCyJXpFVD2fRzSxCFtkuwqks8mjB/ujYr9y6k0gs9528503X/w/F3eUgyIBI4wAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMS0wNS0xMFQxOToyODozMyswMDowMEzeSx4AAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjEtMDUtMTBUMTk6Mjg6MzMrMDA6MDA9g/OiAAAARnRFWHRzb2Z0d2FyZQBJbWFnZU1hZ2ljayA2LjcuOC05IDIwMTQtMDUtMTIgUTE2IGh0dHA6Ly93d3cuaW1hZ2VtYWdpY2sub3Jn3IbtAAAAABh0RVh0VGh1bWI6OkRvY3VtZW50OjpQYWdlcwAxp/+7LwAAABh0RVh0VGh1bWI6OkltYWdlOjpoZWlnaHQAMTkyDwByhQAAABd0RVh0VGh1bWI6OkltYWdlOjpXaWR0aAAxOTLTrCEIAAAAGXRFWHRUaHVtYjo6TWltZXR5cGUAaW1hZ2UvcG5nP7JWTgAAABd0RVh0VGh1bWI6Ok1UaW1lADE2MjA2NzQ5MTMk8oswAAAAD3RFWHRUaHVtYjo6U2l6ZQAwQkKUoj7sAAAAVnRFWHRUaHVtYjo6VVJJAGZpbGU6Ly8vbW50bG9nL2Zhdmljb25zLzIwMjEtMDUtMTAvOGIxNDNhYjgwODhkMjBlZThkYmUzOTFhN2NkNmQ3NmQuaWNvLnBuZ9msgG0AAAAASUVORK5CYII=
588
- `;function Il(e,t){c.useEffect(()=>{if(document){document.title=`${e} - FireCMS`;let o=document.querySelector("link[rel~='icon']");o||(o=document.createElement("link"),o.rel="icon",document.getElementsByTagName("head")[0].appendChild(o)),o.href=t??Sl}},[e,t])}function kn(e){const{path:t,collections:o=[],currentFullPath:a}=e,n=pe(t).split("/"),i=Pt(n),s=[];for(let l=0;l<i.length;l++){const d=i[l],u=o&&o.find(m=>m.id===d||m.path===d);if(u){const m=u.id??u.path,g=a&&a.length>0?a+"/"+m:m,f=pe(pe(t).replace(d,"")),b=f.length>0?f.split("/"):[];if(b.length>0){const h=b[0],A=g+"/"+h;if(s.push(new mr(h,g)),b.length>1){const y=b.slice(1).join("/");if(!u)throw Error("collection not found resolving path: "+u);u.subcollections&&s.push(...kn({path:y,collections:u.subcollections,currentFullPath:A}))}}break}}return s}const Fl="/",Nl="/c";function Tl({basePath:e=Fl,baseCollectionPath:t=Nl,authController:o,collections:a,views:n,userConfigPersistence:i,dataSourceDelegate:s,injectCollections:l}){const d=fe.useLocation(),u=c.useRef(),[m,g]=c.useState(),[f,b]=c.useState(),[h,A]=c.useState(!1),[y,k]=c.useState(void 0),[v,_]=c.useState(!0),[C,E]=c.useState(void 0),B=pe(e),x=pe(t),I=B?`/${B}`:"/",F=B?`/${B}/${x}`:`/${x}`,P=c.useCallback(D=>B?`/${B}/${or(D)}`:`/${or(D)}`,[B]),N=c.useCallback(D=>`${pe(t)}/${or(D)}`,[t]),T=c.useCallback((D,K)=>{const R=[...(D??[]).map(S=>S.hideFromNavigation?void 0:{url:N(S.id??S.path),type:"collection",name:S.name.trim(),path:S.id??S.path,collection:S,description:S.description?.trim(),group:S.group?.trim()}).filter(Boolean),...(K??[]).map(S=>S.hideFromNavigation?void 0:{url:P(Array.isArray(S.path)?S.path[0]:S.path),name:S.name.trim(),type:"view",view:S,description:S.description?.trim(),group:S.group?.trim()}).filter(Boolean)],X=Object.values(R).map(S=>S.group).filter(Boolean).filter((S,O,V)=>V.indexOf(S)===O);return{navigationEntries:R,groups:X}},[P,N]),G=c.useCallback(async()=>{if(!o.initialLoading){try{const[D=[],K=[]]=await Promise.all([Ql(a,o,s,l),Dl(n,o,s)]);(!$(u.current,D)||!$(f,K)||!$(y,T(D,K)))&&(u.current=D,g(D),b(K),k(T(D??[],K)))}catch(D){console.error(D),E(D)}_(!1),A(!0)}},[a,o.user,o.initialLoading,n,T,l]);c.useEffect(()=>{G()},[G]);const ee=c.useCallback((D,K,R=!1)=>{if(!m)return;const X=Tt(pe(D),m),S=R?i?.getCollectionConfig(D):void 0,O=X?Qe(X,S):void 0;let V=O;if(O){const q=O.subcollections,de=O.callbacks,L=O.permissions;V={...V,subcollections:V?.subcollections??q,callbacks:V?.callbacks??de,permissions:V?.permissions??L}}if(V)return{...O,...V}},[e,t,m]),M=c.useCallback(D=>{let K=m;if(!K)throw Error("Collections have not been initialised yet");for(let R=0;R<D.length;R++){const X=D[R],S=K.find(O=>O.id===X||O.path===X);if(!S)return;if(K=S.subcollections,R===D.length-1)return S}},[m]),Y=c.useCallback(D=>{let K=m;if(!K)throw Error("Collections have not been initialised yet");for(let R=0;R<D.length;R++){const X=D[R],S=K.find(O=>O.id===X);if(!S)return;if(K=S.subcollections,R===D.length-1)return S}},[m]),H=c.useCallback(D=>pe(D+"/").startsWith(pe(F)+"/"),[F]),Q=c.useCallback(D=>{if(D.startsWith(F))return D.replace(F,"");throw Error("Expected path starting with "+F)},[F]),J=c.useCallback(({path:D})=>`s/edit/${or(D)}`,[]),Z=c.useCallback(D=>{if(!m)throw Error("Collections have not been initialised yet");return ur(D,m)},[m]),z=d.state,ie=z&&z.base_location?z.base_location:d,W=c.useCallback(D=>kn({path:D,collections:m}),[m]),te=c.useCallback(D=>{const R=D.split("/").filter((S,O)=>O%2===0);R.pop();const X=[];for(let S=1;S<=R.length;S++)X.push(R.slice(0,S));return X.map(S=>M(S)?.id).filter(Boolean)},[W]),ne=c.useCallback(D=>{let K=m;const R=[];for(let X=0;X<D.length;X++){const S=D[X],O=K.find(V=>V.id===S);if(!O)throw Error(`Collection with id ${S} not found`);R.push(O.path),K=O.subcollections}return R},[Y]);return{collections:m,views:f,loading:!h||v,navigationLoadingError:C,homeUrl:I,basePath:e,baseCollectionPath:t,initialised:h,getCollection:ee,getCollectionFromPaths:M,getCollectionFromIds:Y,isUrlCollectionPath:H,urlPathToDataPath:Q,buildUrlCollectionPath:N,buildUrlEditCollectionPath:J,buildCMSUrlPath:P,resolveAliasesFrom:Z,topLevelNavigation:y,baseLocation:ie,refreshNavigation:G,getParentReferencesFromPath:W,getParentCollectionIds:te,convertIdsToPaths:ne}}function Pl(e,t){return t?`${pe(e)}/${pe(t)}`:pe(e)}function or(e){return encodeURIComponent(pe(e)).replaceAll("%2F","/").replaceAll("%23","#")}function _n(e,t){return e.filter(o=>o.permissions?vt(o,t,[o.path],null).read!==!1:!0).map(o=>o.subcollections?{...o,subcollections:_n(o.subcollections,t)}:o)}async function Ql(e,t,o,a){let n=[];return typeof e=="function"?n=await e({user:t.user,authController:t,dataSource:o}):Array.isArray(e)&&(n=e),n=_n(n,t),a&&(n=a(n??[])),n}async function Dl(e,t,o){let a=[];return typeof e=="function"?a=await e({user:t.user,authController:t,dataSource:o}):Array.isArray(e)&&(a=e),a}function Ml(){const[e,t]=c.useState({}),o=c.useCallback(h=>{const A=localStorage.getItem(h);return A?JSON.parse(A):{}},[]),a=c.useCallback(h=>{const A=`collection_config::${Er(h)}`;return e[A]?e[A]:o(A)},[e,o]),n=c.useCallback((h,A)=>{const y=`collection_config::${Er(h)}`;localStorage.setItem(y,JSON.stringify(A)),t(k=>{const v=k[y],_=Qe(v??o(h),A);return Qe(k,_)})},[o]),[i,s]=c.useState([]),[l,d]=c.useState([]),[u,m]=c.useState([]);c.useEffect(()=>{s(localStorage.getItem("recently_visited_paths")?JSON.parse(localStorage.getItem("recently_visited_paths")):[]),d(localStorage.getItem("favourite_paths")?JSON.parse(localStorage.getItem("favourite_paths")):[]),m(localStorage.getItem("collapsed_groups")?JSON.parse(localStorage.getItem("collapsed_groups")):[])},[]);const g=c.useCallback(h=>{localStorage.setItem("recently_visited_paths",JSON.stringify(h)),s(h)},[]),f=c.useCallback(h=>{localStorage.setItem("favourite_paths",JSON.stringify(h)),d(h)},[]),b=c.useCallback(h=>{localStorage.setItem("collapsed_groups",JSON.stringify(h)),m(h)},[]);return{onCollectionModified:n,getCollectionConfig:a,recentlyVisitedPaths:i,setRecentlyVisitedPaths:g,favouritePaths:l,setFavouritePaths:f,collapsedGroups:u,setCollapsedGroups:b}}function Ol(){const e=typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)"),o=(localStorage.getItem("prefers-dark-mode")!=null?localStorage.getItem("prefers-dark-mode")==="true":null)??e,[a,n]=c.useState(o?"dark":"light");c.useEffect(()=>{n(o?"dark":"light"),l(o?"dark":"light")},[o]);const i=c.useCallback(()=>{n("dark"),l("dark")},[e]),s=c.useCallback(()=>{n("light"),l("light")},[]),l=u=>{document.body.style.setProperty("color-scheme",u),document.documentElement.dataset.theme=u},d=c.useCallback(()=>{a==="light"?(e?localStorage.removeItem("prefers-dark-mode"):localStorage.setItem("prefers-dark-mode","true"),i()):(e?localStorage.setItem("prefers-dark-mode","false"):localStorage.removeItem("prefers-dark-mode"),s())},[a,e]);return{mode:a,setMode:n,toggleMode:d}}const ar="main_##Q$SC^#S6";function zl({path:e,entityId:t,selectedSubPath:o,copy:a,collection:n,parentCollectionIds:i,onValuesAreModified:s,formWidth:l,onUpdate:d,onClose:u}){n.customId&&n.formAutoSave&&console.warn(`The collection ${n.path} has customId and formAutoSave enabled. This is not supported and formAutoSave will be ignored`);const[m,g]=c.useState(!1),[f,b]=c.useState(void 0);Yt(f,()=>{f&&O({entityId:W?.id,collection:n,path:e,values:f,closeAfterSave:!1})},!1,2e3);const h=ze(),A=nr(),y=He(),k=Je(),v=re(),_=he(),C=We(),[E,B]=c.useState(void 0),[x,I]=c.useState(a?"copy":t?"existing":"new"),F=c.useRef(void 0),P=F.current,N=(n.subcollections??[]).filter(j=>!j.hideFromNavigation),T=N?.length??0,G=n.entityViews,ee=G?.length??0,M=n.formAutoSave&&!n.customId,Y=ee>0||T>0,H=o??Cr(n?n.defaultSelectedView:void 0,{status:x,entityId:t}),Q=c.useRef(H??ar),J=Q.current===ar,{entity:Z,dataLoading:z,dataLoadingError:ie}=Pr({path:e,entityId:t,collection:n,useCache:!1}),[W,te]=c.useState(Z),[ne,D]=c.useState(void 0);c.useEffect(()=>{Z&&te(Z)},[Z]),c.useEffect(()=>{if(x==="new")D(!1);else{const j=W?Sr(n,C,De(e),W??null):!1;W&&D(!j)}},[C,W,x]);const K=c.useCallback(j=>{g(!1),k.open({type:"error",message:"Error before saving: "+j?.message}),console.error(j)},[k]),R=c.useCallback(j=>{g(!1),k.open({type:"error",message:"Error after saving (entity is saved): "+j?.message}),console.error(j)},[k]),X=(j,Ce)=>{g(!1),M||k.open({type:"success",message:`${n.singularName??n.name}: Saved correctly`}),te(j),I("existing"),s(!1),d&&d({entity:j}),Ce?(A.setBlocked(!1),A.close(!0),u?.()):x!=="existing"&&y.replace({path:e,entityId:j.id,selectedSubPath:Q.current,updateUrl:!0,collection:n})},S=c.useCallback(j=>{g(!1),k.open({type:"error",message:"Error saving: "+j?.message}),console.error("Error saving entity",e,t),console.error(j)},[t,e,k]),O=({values:j,previousValues:Ce,closeAfterSave:Ee,entityId:Le,collection:Bt,path:St})=>{g(!0),Qr({path:St,entityId:Le,values:j,previousValues:Ce,collection:Bt,status:x,dataSource:h,context:_,onSaveSuccess:U=>X(U,Ee),onSaveFailure:S,onPreSaveHookError:K,onSaveSuccessHookError:R}).then()},V=async({collection:j,path:Ce,entityId:Ee,values:Le,previousValues:Bt,closeAfterSave:St,autoSave:U})=>{x&&(U?b(Le):O({collection:j,path:Ce,entityId:Ee,values:Le,previousValues:Bt,closeAfterSave:St}))},q=G?G.map(j=>kr(j,v.entityViews)).filter(Boolean):[],de=G&&q.map((j,Ce)=>{if(!j||Q.current!==j.key)return null;const Ee=j.Builder;return Ee?r.jsx("div",{className:p.cn(p.defaultBorderMixin,"relative flex-grow w-full h-full overflow-auto "),role:"tabpanel",children:r.jsx(oe,{children:E&&r.jsx(Ee,{collection:n,entity:W,modifiedValues:P??W?.values,formContext:E})})},`custom_view_${j.key}`):(console.error("customView.Builder is not defined"),null)}).filter(Boolean),L=z&&!W||(!W||ne===void 0)&&(x==="existing"||x==="copy"),ae=L||m,Ne=N&&N.map((j,Ce)=>{const Ee=j.id??j.path,Le=W?`${e}/${W?.id}/${pe(Ee)}`:void 0;return Q.current!==Ee?null:r.jsxs("div",{className:"relative flex-grow h-full overflow-auto w-full",role:"tabpanel",children:[ae&&r.jsx(Rt,{}),!L&&(W&&Le?r.jsx(co,{fullPath:Le,parentCollectionIds:[...i,n.id],isSubCollection:!0,...j}):r.jsx("div",{className:"flex items-center justify-center w-full h-full p-3",children:r.jsx(p.Typography,{variant:"label",children:"You need to save your entity before adding additional collections"})}))]},`subcol_${Ee}`)}).filter(Boolean),xe=c.useCallback(()=>{s(!1)},[]),me=j=>{Q.current=j,y.replace({path:e,entityId:t,selectedSubPath:j===ar?void 0:j,updateUrl:!0,collection:n})},Oe=c.useCallback(j=>{F.current=j},[]),Ge=c.useCallback(j=>{k.open({type:"error",message:"Error updating id, check the console"})},[]),rt=c.useCallback(j=>{te(Ce=>Ce?{...Ce,id:j}:void 0)},[]),Se=j=>{M||s(j)};function ot(){const j=v.plugins;let Ce=r.jsx(un,{status:x,path:e,collection:n,onEntitySaveRequested:V,onDiscard:xe,onValuesChanged:Oe,onModified:Se,entity:W,onIdChange:rt,onFormContextChange:B,hideId:n.hideIdFromForm,autoSave:M,onIdUpdateError:Ge});return j&&j.forEach(Ee=>{Ee.form?.provider&&(Ce=r.jsx(Ee.form.provider.Component,{status:x,path:e,collection:n,onDiscard:xe,onValuesChanged:Oe,onModified:Se,entity:W,context:_,formContext:E,...Ee.form.provider.props,children:Ce}))}),r.jsx(oe,{children:Ce})}const yo=ne===void 0?r.jsx(r.Fragment,{}):ne?r.jsxs(r.Fragment,{children:[r.jsx(p.Typography,{className:"mt-16 mb-8 mx-8",variant:"h4",children:n.singularName??n.name}),r.jsx(Ur,{className:"px-12",entity:W,path:e,collection:n})]}):ot(),wo=N&&N.map(j=>r.jsx(p.Tab,{className:"text-sm min-w-[140px]",value:j.id,children:j.name},`entity_detail_collection_tab_${j.name}`)),vo=q.map(j=>r.jsx(p.Tab,{className:"text-sm min-w-[140px]",value:j.key,children:j.name},`entity_detail_collection_tab_${j.name}`));return r.jsx("div",{className:"flex flex-col h-full w-full transition-width duration-250 ease-in-out",children:r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:p.cn(p.defaultBorderMixin,"no-scrollbar border-b pl-2 pr-2 pt-1 flex items-end overflow-scroll bg-gray-50 dark:bg-gray-950"),children:[r.jsx("div",{className:"pb-1 self-center",children:r.jsx(p.IconButton,{onClick:()=>(u?.(),A.close(!1)),size:"large",children:r.jsx(p.CloseIcon,{})})}),r.jsx("div",{className:"flex-grow"}),L&&r.jsx("div",{className:"self-center",children:r.jsx(p.CircularProgress,{size:"small"})}),r.jsxs(p.Tabs,{value:Q.current,onValueChange:j=>{me(j)},className:"pl-4 pr-4 pt-0",children:[r.jsx(p.Tab,{disabled:!Y,value:ar,className:`${Y?"":"hidden"} text-sm min-w-[140px]`,children:n.singularName??n.name}),vo,wo]})]}),r.jsxs("div",{className:"flex-grow h-full flex overflow-auto flex-row w-full ",style:{},children:[r.jsx("div",{role:"tabpanel",hidden:!J,id:`form_${e}`,className:" w-full",children:L?r.jsx(Rt,{}):yo}),de,Ne]})]})})}function Vl(e,t){const[o,a]=c.useState(),{navigator:n}=c.useContext(fe.UNSAFE_NavigationContext),i=fe.useNavigate(),s=()=>{a(void 0)},l=()=>{t(),a(void 0),i(-1)},d=c.useCallback(({action:u,location:m,retry:g})=>{switch(u){case"REPLACE":{g();return}case"POP":a(m)}},[]);return c.useEffect(()=>{if(!e||o||!("block"in n))return;const u=n.block(m=>{const g={...m,retry(){u(),m.retry()}};d(g)});return u},[n,d,e,o]),{navigationWasBlocked:!!o,handleCancel:s,handleOk:l}}function Gl({open:e,handleOk:t,handleCancel:o,body:a,title:n}){return r.jsxs(p.Dialog,{open:e,onOpenChange:i=>i?o():t(),children:[r.jsxs(p.DialogContent,{children:[r.jsx(p.Typography,{variant:"h6",children:n}),a,r.jsx(p.Typography,{children:"Are you sure you want to leave this page?"})]}),r.jsxs(p.DialogActions,{children:[r.jsx(p.Button,{variant:"text",onClick:o,autoFocus:!0,children:" Cancel "}),r.jsx(p.Button,{onClick:t,children:" Ok "})]})]})}const xn=c.createContext({width:"",blocked:!1,setBlocked:e=>{},setBlockedNavigationMessage:e=>{},close:()=>{}}),nr=()=>c.useContext(xn);function Yl(){const t=kt().sidePanels,o=[...t];return o.push(void 0),r.jsx(r.Fragment,{children:o.map((a,n)=>r.jsx(jl,{panel:a,offsetPosition:t.length-n-1},`side_dialog_${n}`))})}function jl({offsetPosition:e,panel:t}){const[o,a]=c.useState(!1),[n,i]=c.useState(!1),[s,l]=c.useState(),d=c.useRef(t?.width),u=d.current,m=kt(),{navigationWasBlocked:g,handleOk:f,handleCancel:b}=Vl(n&&!o,()=>i(!1));c.useEffect(()=>{t&&(d.current=t.width)},[t]);const h=()=>{i(!1),a(!1),m.close(),t?.onClose?.()},A=()=>{a(!1)},y=k=>{n&&!k?a(!0):(m.close(),t?.onClose?.())};return r.jsxs(xn.Provider,{value:{blocked:n,setBlocked:i,setBlockedNavigationMessage:l,width:u,close:y},children:[r.jsxs(p.Sheet,{open:!!t,onOpenChange:k=>!k&&y(),children:[t&&r.jsx("div",{className:"transform max-w-[100vw] lg:max-w-[95vw] flex flex-col h-full transition-all duration-250 ease-in-out bg-white dark:bg-gray-900 ",style:{width:t.width,transform:`translateX(-${e*200}px)`},children:r.jsx(oe,{children:t.component})}),!t&&r.jsx("div",{style:{width:u}})]}),r.jsx(Gl,{open:g||o,handleOk:o?h:f,handleCancel:o?A:b,body:s})]})}function Ll(e){const{blocked:t,setBlocked:o,setBlockedNavigationMessage:a}=nr(),n=ue(),i=c.useMemo(()=>n.getParentCollectionIds(e.path),[n,e.path]),s=c.useMemo(()=>{if(!e)return;let d=e.collection;const u=n.getCollection(e.path,e.entityId);if(u&&(d=u),!d)throw console.error("ERROR: No collection found in path `",e.path,"`. Entity id: ",e.entityId),Error("ERROR: No collection found in path `"+e.path+"`. Make sure you have defined a collection for this path in the root navigation.");return d},[n,e]);c.useEffect(()=>{function d(u){t&&s&&(u.preventDefault(),u.returnValue=`You have unsaved changes in this ${s.name}. Are you sure you want to leave this page?`)}return typeof window<"u"&&window.addEventListener("beforeunload",d),()=>{typeof window<"u"&&window.removeEventListener("beforeunload",d)}},[t,s]);const l=c.useCallback(d=>{o(d),a(d?r.jsxs(r.Fragment,{children:[" You have unsaved changes in this ",r.jsx("b",{children:s?.singularName??s?.name}),"."]}):void 0)},[s?.name,o,a]);return!e||!s?r.jsx("div",{className:"w-full"}):r.jsx(r.Fragment,{children:r.jsx(oe,{children:r.jsx(zl,{...e,formWidth:e.width,collection:s,parentCollectionIds:i,onValuesAreModified:l})})})}const Cn="new";function Ul(e,t){if(t)return wi;const o=!e.selectedSubPath,a=typeof e.width=="number"?`${e.width}px`:e.width;return o?a??Ko:`calc(${vi} + ${a??Ko})`}const $l=(e,t)=>{const o=fe.useLocation(),a=c.useRef(!1),n=!Me();c.useEffect(()=>{if(!e.loading&&!a.current){if(e.isUrlCollectionPath(o.pathname)){const d=o.hash===`#${Cn}`,u=e.urlPathToDataPath(o.pathname),m=ql(u,e.collections??[],d);for(let g=0;g<m.length;g++){const f=m[g];setTimeout(()=>{g===0?t.replace(ir(f,e,n)):t.open(ir(f,e,n))},1)}}a.current=!0}},[o,e,t,n]);const i=c.useCallback(()=>{t.close()},[t]),s=c.useCallback(d=>{if(d.copy&&!d.entityId)throw Error("If you want to copy an entity you need to provide an entityId");const u=Cr(d.collection?d.collection.defaultSelectedView:void 0,{status:d.copy?"copy":d.entityId?"existing":"new",entityId:d.entityId});t.open(ir({selectedSubPath:u,...d},e,n))},[t,e,n]),l=c.useCallback(d=>{if(d.copy&&!d.entityId)throw Error("If you want to copy an entity you need to provide an entityId");t.replace(ir(d,e,n))},[e,t,n]);return{close:i,open:s,replace:l}};function ql(e,t,o){const a=_r({path:e,collections:t}),n=[];let i="";for(let s=0;s<a.length;s++){const l=a[s];if(l.type==="collection"&&(i=l.path),s>0){const d=a[s-1];if(l.type==="entity")n.push({path:l.path,entityId:l.entityId,copy:!1});else if(l.type==="custom_view"){if(d.type==="entity"){const u=n[n.length-1];u&&(u.selectedSubPath=l.view.key)}}else if(l.type==="collection"&&d.type==="entity"){const u=n[n.length-1];u&&(u.selectedSubPath=l.collection.id??l.collection.path)}}}return o&&n.push({path:i,copy:!1}),n}const ir=(e,t,o)=>{const a=pe(e.path),n=e.entityId?t.buildUrlCollectionPath(`${a}/${e.entityId}/${e.selectedSubPath||""}`):t.buildUrlCollectionPath(`${a}#${Cn}`),i=t.resolveAliasesFrom(e.path),s={...e,path:i};return{key:`${e.path}/${e.entityId}`,component:r.jsx(Ll,{...s}),urlPath:n,parentUrlPath:t.buildUrlCollectionPath(a),width:Ul(e,o),onClose:e.onClose}};function Wl(){const e=fe.useLocation(),t=fe.useNavigate(),[o,a]=c.useState([]),n=c.useRef(o),i=c.useRef({}),s=c.useRef(0),l=g=>{n.current=g,a(g)};c.useEffect(()=>{const b=(e.state?.panels??[]).map(h=>i.current[h]).filter(h=>!!h);$(n.current.map(h=>h.key),b.map(h=>h.key))||l(b)},[e]);const d=c.useCallback(()=>{if(o.length===0)return;const g=o[o.length-1],f=[...o.slice(0,-1)];if(l(f),s.current>0)g.urlPath&&t(-1),s.current--;else if(g.parentUrlPath){const b=e.state?.base_location??e;t(g.parentUrlPath,{replace:!0,state:{base_location:b,panels:f.map(h=>h.key)}})}},[o,t,e]),u=c.useCallback(g=>{const f=Array.isArray(g)?g:[g];f.forEach(A=>{i.current[A.key]=A}),s.current=s.current+f.length;const b=e.state?.base_location??e,h=[...o,...f];l(h),f.forEach(A=>{A.urlPath&&t(A.urlPath,{state:{base_location:b,panels:h.map(y=>y.key)}})})},[e,t,o]),m=c.useCallback(g=>{const f=Array.isArray(g)?g:[g];f.forEach(A=>{i.current[A.key]=A});const b=e.state?.base_location??e,h=[...o.slice(0,-f.length),...f];l(h),f.forEach(A=>{A.urlPath&&t(A.urlPath,{replace:!0,state:{base_location:b,panels:h.map(y=>y.key)}})})},[e,t,o]);return{sidePanels:o,close:d,open:u,replace:m}}function Hl(e){c.useEffect(()=>{if(!e)return;const t=So[e];t&&(Eo.registerLocale(e,t),Eo.setDefaultLocale(e))},[e])}function Jl({delegate:e,propertyConfigs:t,navigationController:o}){return{fetchCollection:c.useCallback(({path:a,collection:n,filter:i,limit:s,startAfter:l,searchString:d,orderBy:u,order:m})=>e.fetchCollection({path:a,filter:i,limit:s,startAfter:l,searchString:d,orderBy:u,order:m}),[e]),listenCollection:e.listenCollection?c.useCallback(({path:a,collection:n,filter:i,limit:s,startAfter:l,searchString:d,orderBy:u,order:m,onUpdate:g,onError:f})=>{const b=n??o.getCollection(a),h=!!b?.collectionGroup;if(!e.listenCollection)throw Error("useBuildDataSource delegate not initialised");return e.listenCollection({path:a,filter:i,limit:s,startAfter:l,searchString:d,orderBy:u,order:m,onUpdate:g,onError:f,isCollectionGroup:h,collection:b})},[e,o.getCollection]):void 0,fetchEntity:c.useCallback(({path:a,entityId:n})=>e.fetchEntity({path:a,entityId:n}),[e]),listenEntity:e.listenEntity?c.useCallback(({path:a,entityId:n,collection:i,onUpdate:s,onError:l})=>{if(!e.listenEntity)throw Error("useBuildDataSource delegate not initialised");return e.listenEntity({path:a,entityId:n,onUpdate:s,onError:l})},[e.listenEntity]):void 0,saveEntity:c.useCallback(({path:a,entityId:n,values:i,collection:s,status:l})=>{const d=s??o.getCollection(a),m=(d?Te({collection:d,path:a,entityId:n,fields:t}):void 0)?.properties,g=go(i,e.buildReference,e.buildGeoPoint,e.buildDate,e.buildDeleteFieldValue),f=m?Po({inputValues:g,properties:m,status:l,timestampNowValue:e.currentTime(),setDateToMidnight:e.setDateToMidnight}):g;return e.saveEntity({path:a,entityId:n,values:f,status:l}).then(b=>({id:b.id,path:b.path,values:e.delegateToCMSModel(f)}))},[e.saveEntity,o.getCollection]),deleteEntity:c.useCallback(({entity:a})=>e.deleteEntity({entity:a}),[e.deleteEntity]),checkUniqueField:c.useCallback((a,n,i,s)=>e.checkUniqueField(a,n,i,s),[e.checkUniqueField]),generateEntityId:c.useCallback(a=>e.generateEntityId(a),[e.generateEntityId]),countEntities:e.countEntities?async({path:a,collection:n,filter:i,order:s,orderBy:l})=>e.countEntities({path:a,filter:i,orderBy:l,order:s,isCollectionGroup:!!n.collectionGroup}):void 0,isFilterCombinationValid:c.useCallback(({path:a,filterValues:n,sortBy:i})=>e.isFilterCombinationValid?e.isFilterCombinationValid({path:a,filterValues:n,sortBy:i}):!0,[e.isFilterCombinationValid])}}function go(e,t,o,a,n){return e===void 0?n():e===null?null:Array.isArray(e)?e.map(i=>go(i,t,o,a,n)):e.isEntityReference&&e.isEntityReference()?t(e):e instanceof Qt?o(e):e instanceof Date?a(e):e&&typeof e=="object"?Object.entries(e).map(([i,s])=>({[i]:go(s,t,o,a,n)})).reduce((i,s)=>({...i,...s}),{}):e}function lc(e){return e}const Zl="https://api-drplyi3b6q-ey.a.run.app";async function Xl(e){const t=await e.getAuthToken();return fetch(Zl+"/access_log",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Basic ${t}`},body:JSON.stringify({})}).then(async o=>{})}function Kl(e){const t=c.useRef(null);c.useEffect(()=>{e.user&&e.user.uid!==t.current&&!e.initialLoading&&(Xl(e),t.current=e.user.uid)},[e])}function Rl(e){const t=Dr(),{children:o,entityLinkBuilder:a,userConfigPersistence:n,dateTimeFormat:i,locale:s,authController:l,storageSource:d,dataSourceDelegate:u,plugins:m,onAnalyticsEvent:g,propertyConfigs:f,entityViews:b,components:h,navigationController:A}=e;Hl(s);const y=Jl({delegate:u,propertyConfigs:f,navigationController:A}),k=Wl(),v=$l(A,k),_=m?.some(x=>x.loading)??!1,C=l.initialLoading||A.loading||_,E={dateTimeFormat:i,locale:s,entityLinkBuilder:a,plugins:m,entityViews:b??[],propertyConfigs:f??{},components:h},B=c.useMemo(()=>({onAnalyticsEvent:g}),[]);return Kl(l),A.navigationLoadingError?r.jsx(p.CenteredView,{maxWidth:"md",children:r.jsx(ge,{title:"Error loading navigation",error:A.navigationLoadingError})}):l.authError?r.jsx(p.CenteredView,{maxWidth:"md",children:r.jsx(ge,{title:"Error loading auth",error:l.authError})}):r.jsx(Nt.Provider,{value:t,children:r.jsx(sa.Provider,{value:B,children:r.jsx(ia.Provider,{value:E,children:r.jsx(aa.Provider,{value:n,children:r.jsx(oa.Provider,{value:d,children:r.jsx(Ro.Provider,{value:y,children:r.jsx(pr.Provider,{value:l,children:r.jsx(ta.Provider,{value:k,children:r.jsx(ra.Provider,{value:v,children:r.jsx(ea.Provider,{value:A,children:r.jsx(ki,{children:r.jsx(ec,{loading:C,children:o})})})})})})})})})})})})}function ec({loading:e,children:t}){const o=he(),a=re();let n=t({context:o,loading:e});const i=a.plugins;return!e&&i&&i.forEach(s=>{s.provider&&(n=r.jsx(s.provider.Component,{...s.provider.props,context:o,children:n}))}),r.jsx(r.Fragment,{children:n})}function En({hovered:e,drawerOpen:t,closeDrawer:o}){const a=dt(),n=ue(),i=e&&!t,s=Me();if(!n.topLevelNavigation)throw Error("Navigation not ready in Drawer");const{navigationEntries:l,groups:d}=n.topLevelNavigation,u=Object.values(l).filter(f=>!f.group),m=c.useCallback(f=>t?r.jsx("div",{className:"pt-8 pl-6 pr-8 pb-2 flex flex-row items-center",children:r.jsx(p.Typography,{variant:"caption",color:"secondary",className:"font-medium flex-grow line-clamp-1",children:f?f.toUpperCase():"Views".toUpperCase()})}):r.jsx("div",{className:"h-12 w-full"}),[t]),g=f=>{const b=f.type==="collection"?"drawer_navigate_to_collection":f.type==="view"?"drawer_navigate_to_view":"unmapped_event";a.onAnalyticsEvent?.(b,{url:f.url}),s||o()};return r.jsxs("div",{className:"flex-grow overflow-scroll no-scrollbar",children:[d.map(f=>r.jsxs(c.Fragment,{children:[m(f),Object.values(l).filter(b=>b.group===f).map((b,h)=>r.jsx(Ao,{icon:r.jsx(qt,{collectionOrView:b.collection??b.view}),tooltipsOpen:i,drawerOpen:t,onClick:()=>g(b),url:b.url,name:b.name},`navigation_${h}`))]},`drawer_group_${f}`)),u.length>0&&m(),u.map((f,b)=>r.jsx(Ao,{icon:r.jsx(qt,{collectionOrView:f.collection??f.view}),tooltipsOpen:i,onClick:()=>g(f),drawerOpen:t,url:f.url,name:f.name},`navigation_${b}`))]})}function Ao({name:e,icon:t,drawerOpen:o,tooltipsOpen:a,url:n,onClick:i}){const s=r.jsx("div",{className:"text-gray-600 dark:text-gray-500",children:t}),l=r.jsxs(fe.NavLink,{onClick:i,style:{width:o?"280px":"72px",transition:o?"width 150ms ease-in":void 0},className:({isActive:d})=>p.cn("rounded-r-xl truncate","hover:bg-slate-300 hover:bg-opacity-75 dark:hover:bg-gray-700 dark:hover:bg-opacity-75 text-gray-800 dark:text-gray-200 hover:text-gray-900 hover:dark:text-gray-100","flex flex-row items-center mr-8",o?"pl-8 h-12":"pl-6 h-11","font-medium text-sm",d?"bg-slate-200 bg-opacity-75 dark:bg-gray-800":""),to:n,children:[s,r.jsx("div",{className:p.cn(o?"opacity-100":"opacity-0 hidden","ml-4 font-inherit text-inherit"),children:e.toUpperCase()})]});return r.jsx(p.Tooltip,{open:o?!1:a,side:"right",title:e,children:l})}const tc=280,rc=c.memo(function(t){const{children:o,name:a,logo:n,includeDrawer:i=!0,autoOpenDrawer:s,Drawer:l=En,drawerProps:d,FireCMSAppBar:u=wn,fireCMSAppBarProps:m}=t,g=Me(),[f,b]=c.useState(!1),[h,A]=c.useState(!1),y=c.useCallback(()=>A(!0),[]),k=c.useCallback(()=>A(!1),[]),v=c.useCallback(()=>{b(!1)},[]),_=f||!!(g&&s&&h);return r.jsxs("div",{className:"flex h-screen w-screen bg-gray-50 dark:bg-gray-900 text-gray-900 dark:text-white overflow-hidden",style:{paddingTop:"env(safe-area-inset-top)",paddingLeft:"env(safe-area-inset-left)",paddingRight:"env(safe-area-inset-right)",paddingBottom:"env(safe-area-inset-bottom)",height:"100dvh"},children:[r.jsx(u,{title:a,includeDrawer:i,drawerOpen:_,...m}),r.jsx(ac,{displayed:i,onMouseEnter:y,onMouseMove:y,onMouseLeave:k,open:_,logo:n,hovered:h,setDrawerOpen:b,children:i&&r.jsx(l,{hovered:h,drawerOpen:_,closeDrawer:v,...d})}),r.jsxs("main",{className:"flex flex-col flex-grow overflow-auto",children:[r.jsx(oc,{}),r.jsx("div",{className:p.cn(p.defaultBorderMixin,"flex-grow overflow-auto lg:m-0 lg:mx-4 lg:mb-4 lg:rounded-lg lg:border lg:border-solid m-0 mt-1"),children:r.jsx(oe,{children:o})})]})]})},$),oc=()=>r.jsx("div",{className:"flex flex-col min-h-[68px]"});function ac(e){const t=ue(),o=e.displayed?e.open?tc:72:0,a=r.jsxs("div",{className:"relative h-full no-scrollbar overflow-y-auto overflow-x-hidden",style:{width:o,transition:"left 100ms cubic-bezier(0.4, 0, 0.6, 1) 0ms, opacity 100ms cubic-bezier(0.4, 0, 0.6, 1) 0ms, width 100ms cubic-bezier(0.4, 0, 0.6, 1) 0ms"},children:[!e.open&&e.displayed&&r.jsx(p.Tooltip,{title:"Open menu",side:"right",sideOffset:12,className:"fixed top-2 left-3 !bg-gray-50 dark:!bg-gray-900 rounded-full w-fit",children:r.jsx(p.IconButton,{color:"inherit","aria-label":"Open menu",className:"sticky top-2 left-3 ",onClick:()=>e.setDrawerOpen(!0),size:"large",children:r.jsx(p.MenuIcon,{})})}),r.jsxs("div",{className:"flex flex-col h-full",children:[r.jsx("div",{style:{transition:"padding 100ms cubic-bezier(0.4, 0, 0.6, 1) 0ms",padding:e.open?"32px 144px 0px 24px":"72px 16px 0px"},className:p.cn("cursor-pointer"),children:r.jsx(p.Tooltip,{title:"Home",sideOffset:20,side:"right",children:r.jsx(fe.Link,{to:t.basePath,children:e.logo?r.jsx("img",{src:e.logo,alt:"Logo",className:p.cn("max-w-full max-h-full",e.open??"w-[112px] h-[112px]")}):r.jsx(yn,{})})})}),e.children]})]});return Me()?r.jsxs("div",{className:"relative",onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseLeave:e.onMouseLeave,style:{width:o,transition:"left 100ms cubic-bezier(0.4, 0, 0.6, 1) 0ms, opacity 100ms cubic-bezier(0.4, 0, 0.6, 1) 0ms, width 100ms cubic-bezier(0.4, 0, 0.6, 1) 0ms"},children:[a,r.jsx("div",{className:`absolute right-0 top-4 ${e.open?"opacity-100":"opacity-0 invisible"} transition-opacity duration-1000 ease-in-out`,children:r.jsx(p.IconButton,{"aria-label":"Close drawer",onClick:()=>e.setDrawerOpen(!1),children:r.jsx(p.ChevronLeftIcon,{})})})]}):e.displayed?r.jsxs(r.Fragment,{children:[r.jsx(p.IconButton,{color:"inherit","aria-label":"Open drawer",onClick:()=>e.setDrawerOpen(!0),size:"large",className:"absolute top-2 left-6",children:r.jsx(p.MenuIcon,{})}),r.jsx(p.Sheet,{side:"left",transparent:!0,open:e.open,onOpenChange:e.setDrawerOpen,children:a})]}):null}function Bn(e){return Object.keys(sr).includes(e)}const sr={text_field:{key:"text_field",name:"Text field",description:"Simple short text",Icon:p.ShortTextIcon,color:"#2d7ff9",property:{dataType:"string",Field:ft}},multiline:{key:"multiline",name:"Multiline",description:"Text with multiple lines",Icon:p.SubjectIcon,color:"#2d7ff9",property:{dataType:"string",multiline:!0,Field:ft}},markdown:{key:"markdown",name:"Markdown",description:"Text with advanced markdown syntax",Icon:p.FormatQuoteIcon,color:"#2d7ff9",property:{dataType:"string",markdown:!0,Field:nn}},url:{key:"url",name:"Url",description:"Text with URL validation",Icon:p.HttpIcon,color:"#154fb3",property:{dataType:"string",url:!0,Field:ft}},email:{key:"email",name:"Email",description:"Text with email validation",Icon:p.EmailIcon,color:"#154fb3",property:{dataType:"string",email:!0,Field:ft}},switch:{key:"switch",name:"Switch",description:"Boolean true or false field (or yes or no, 0 or 1...)",Icon:p.FlagIcon,color:"#20d9d2",property:{dataType:"boolean",Field:Ka}},select:{key:"select",name:"Select/enum",description:"Select one text value from within an enumeration",Icon:p.ListIcon,color:"#4223c9",property:{dataType:"string",enumValues:[],Field:to}},multi_select:{key:"multi_select",name:"Multi select",description:"Select multiple text values from within an enumeration",Icon:p.ListAltIcon,color:"#4223c9",property:{dataType:"array",of:{dataType:"string",enumValues:[]},Field:ro}},number_input:{key:"number_input",name:"Number input",description:"Simple number field with validation",Icon:p.NumbersIcon,color:"#bec920",property:{dataType:"number",Field:ft}},number_select:{key:"number_select",name:"Number select",description:"Select a number value from within an enumeration",Icon:p.FormatListNumberedIcon,color:"#bec920",property:{dataType:"number",enumValues:[],Field:to}},multi_number_select:{key:"multi_number_select",name:"Multiple number select",description:"Select multiple number values from within an enumeration",Icon:p.FormatListNumberedIcon,color:"#bec920",property:{dataType:"array",of:{dataType:"number",enumValues:[]},Field:ro}},file_upload:{key:"file_upload",name:"File upload",description:"Input for uploading single files",Icon:p.UploadFileIcon,color:"#f92d9a",property:{dataType:"string",storage:{storagePath:"{path}"},Field:oo}},multi_file_upload:{key:"multi_file_upload",name:"Multiple file upload",description:"Input for uploading multiple files",Icon:p.DriveFolderUploadIcon,color:"#f92d9a",property:{dataType:"array",of:{dataType:"string",storage:{storagePath:"{path}"}},Field:oo}},reference:{key:"reference",name:"Reference",description:"The value refers to a different collection",Icon:p.LinkIcon,color:"#ff0042",property:{dataType:"reference",Field:en}},multi_references:{key:"multi_references",name:"Multiple references",description:"Multiple values that refer to a different collection",Icon:p.AddLinkIcon,color:"#ff0042",property:{dataType:"array",of:{dataType:"reference"},Field:Za}},date_time:{key:"date_time",name:"Date/time",description:"A date time select field",Icon:p.ScheduleIcon,color:"#8b46ff",property:{dataType:"date",Field:Ra}},group:{key:"group",name:"Group",description:"Group of multiple fields",Icon:p.BallotIcon,color:"#ff9408",property:{dataType:"map",properties:{},Field:tn}},key_value:{key:"key_value",name:"Key-value",description:"Flexible field that allows the user to add multiple key-value pairs",Icon:p.BallotIcon,color:"#ff9408",property:{dataType:"map",keyValue:!0,Field:rn}},repeat:{key:"repeat",name:"Repeat/list",description:"A field that gets repeated multiple times (e.g. multiple text fields)",Icon:p.RepeatIcon,color:"#ff9408",property:{dataType:"array",of:{dataType:"string"},Field:on}},custom_array:{key:"custom_array",name:"Custom array",description:"A field that saved its value as an array of custom objects",Icon:p.RepeatIcon,color:"#ff9408",property:{dataType:"array",of:[],Field:sn}},block:{key:"block",name:"Block",description:"A complex field that allows the user to compose different fields together, with a key->value format",Icon:p.ViewStreamIcon,color:"#ff9408",property:{dataType:"array",oneOf:{properties:{}},Field:an}}};function Sn(e){const t=cr(e);if(!t){console.error("No field id found for property",e);return}return sr[t]}function lr(e,t){const o=bo(e),a=cr(e);if(!a){console.error("No field id found for property",e);return}const n=sr[a],i=o?t[o]:void 0;return Qe(n??{},i??{})}function cr(e){if(e.dataType==="string")return e.multiline?"multiline":e.markdown?"markdown":e.storage?"file_upload":e.url?"url":e.email?"email":e.enumValues?"select":"text_field";if(e.dataType==="number")return e.enumValues?"number_select":"number_input";if(e.dataType==="map"){if(e.keyValue)return"key_value";if(e.properties)return"group"}else if(e.dataType==="array"){const t=e.of;return e.oneOf?"block":Array.isArray(t)?"custom_array":we(t)?"repeat":t?.dataType==="string"&&t.enumValues?"multi_select":t?.dataType==="number"&&t.enumValues?"multi_number_select":t?.dataType==="string"&&t.storage?"multi_file_upload":t?.dataType==="reference"?"multi_references":"repeat"}else{if(e.dataType==="boolean")return"switch";if(e.dataType==="date")return"date_time";if(e.dataType==="reference")return"reference"}console.error("Unsupported field config mapping",e)}function bo(e){return e.propertyConfig?e.propertyConfig:cr(e)}const nc=c.memo(function({HomePage:t=An,customRoutes:o}){const a=fe.useLocation(),n=ue();if(!n)return r.jsx(r.Fragment,{});const i=a.state,s=i&&i.base_location?i.base_location:a,l=[];n.views&&n.views.forEach(f=>{Array.isArray(f.path)?l.push(...f.path.map(b=>In(b,f))):l.push(In(f.path,f))});const u=[...n.collections??[]].sort((f,b)=>b.path.length-f.path.length).map(f=>{const b=n.buildUrlCollectionPath(f.id??f.path);return r.jsx(fe.Route,{path:b+"/*",element:r.jsx(oe,{children:r.jsx(co,{isSubCollection:!1,parentCollectionIds:[],fullPath:f.id??f.path,...f,Actions:tr(f.Actions)},`collection_view_${f.id??f.path}`)})},`navigation_${f.id??f.path}`)}),m=r.jsx(fe.Route,{path:"/",element:r.jsx(t,{})}),g=r.jsx(fe.Route,{path:"*",element:r.jsx(bn,{})});return r.jsxs(fe.Routes,{location:s,children:[u,l,m,g,o]})}),In=(e,t)=>r.jsx(fe.Route,{path:e,element:t.view},"navigation_view_"+e);w.ArrayContainer=fo,w.ArrayContainerItem=ho,w.ArrayCustomShapedFieldBinding=sn,w.ArrayEnumPreview=Yr,w.ArrayItemOptions=vn,w.ArrayOfMapsPreview=Ui,w.ArrayOfReferencesFieldBinding=Za,w.ArrayOfReferencesPreview=ba,w.ArrayOfStorageComponentsPreview=ya,w.ArrayOfStringsPreview=wa,w.ArrayOneOfPreview=va,w.ArrayPropertyEnumPreview=jr,w.ArrayPropertyPreview=Gr,w.AsyncPreviewComponent=$i,w.AuthControllerContext=pr,w.BlockFieldBinding=an,w.BooleanPreview=xa,w.COLLECTION_PATH_SEPARATOR=Oo,w.CircularProgressCenter=Rt,w.DEFAULT_FIELD_CONFIGS=sr,w.DatePreview=_a,w.DateTimeFieldBinding=Ra,w.DefaultHomePage=An,w.DeleteConfirmationDialog=kl,w.Drawer=En,w.DrawerNavigationItem=Ao,w.EmptyValue=Re,w.EntityCollectionRowActions=Xt,w.EntityCollectionTable=Kr,w.EntityCollectionView=co,w.EntityCollectionViewActions=Ja,w.EntityForm=un,w.EntityPreview=Ur,w.EntityReference=mr,w.EnumValuesChip=Be,w.ErrorBoundary=oe,w.ErrorView=ge,w.FieldHelperText=ke,w.FireCMS=Rl,w.FireCMSAppBar=wn,w.FireCMSLogo=yn,w.FormikArrayContainer=rr,w.GeoPoint=Qt,w.IconForView=qt,w.ImagePreview=ma,w.KeyValueFieldBinding=rn,w.KeyValuePreview=Lr,w.LabelWithIcon=_e,w.MapFieldBinding=tn,w.MapPropertyPreview=ka,w.MarkdownFieldBinding=nn,w.ModeControllerContext=Nt,w.ModeControllerProvider=jn,w.MultiSelectBinding=ro,w.NavigationCollectionCard=gn,w.NavigationGroup=uo,w.NavigationRoutes=nc,w.NotFoundPage=bn,w.NumberPropertyPreview=Ca,w.PropertyConfigBadge=vl,w.PropertyFieldBinding=tt,w.PropertyPreview=ve,w.PropertyTableCell=Ma,w.ReadOnlyFieldBinding=ao,w.ReferenceFieldBinding=en,w.ReferencePreview=Ve,w.ReferencePreviewContainer=Jt,w.ReferenceSelectionTable=hn,w.ReferenceWidget=Cl,w.RepeatFieldBinding=on,w.Scaffold=rc,w.SearchIconsView=Bl,w.SelectFieldBinding=to,w.SelectableTable=Wa,w.SideDialogs=Yl,w.SkeletonPropertyComponent=ut,w.SnackbarProvider=Gn,w.StorageThumbnail=fa,w.StorageThumbnailInternal=ga,w.StorageUploadFieldBinding=oo,w.StringPropertyPreview=Vr,w.SwitchFieldBinding=Ka,w.TextFieldBinding=ft,w.UrlComponentPreview=xt,w.VirtualTable=ja,w.addInitialSlash=Ln,w.buildAdditionalFieldDelegate=Ai,w.buildCollection=di,w.buildEntityCallbacks=gi,w.buildEnumLabel=Do,w.buildEnumValueConfig=hi,w.buildEnumValues=fi,w.buildFieldConfig=bi,w.buildIdColumn=_s,w.buildProperties=ui,w.buildPropertiesOrBuilder=mi,w.buildProperty=pi,w.canCreateEntity=st,w.canDeleteEntity=Ut,w.canEditEntity=Sr,w.defaultDateFormat=Mo,w.deleteEntityWithCallbacks=la,w.enumToObjectEntries=$e,w.flattenObject=Fr,w.fullPathToCollectionSegments=De,w.getArrayValuesCount=Uo,w.getBracketNotation=ni,w.getCollectionByPathOrId=Tt,w.getCollectionPathsCombinations=Pt,w.getColorForProperty=ai,w.getColorScheme=Qo,w.getColumnKeysForProperty=Kt,w.getDefaultFieldConfig=Sn,w.getDefaultFieldId=cr,w.getDefaultPropertiesOrder=ii,w.getDefaultValueFor=Ot,w.getDefaultValueForDataType=br,w.getDefaultValuesFor=wt,w.getFieldConfig=lr,w.getFieldId=bo,w.getHashValue=hr,w.getIcon=jo,w.getIconForProperty=Ae,w.getIconForWidget=jt,w.getIdIcon=oi,w.getLabelOrConfigFrom=Vt,w.getLastSegment=Un,w.getPropertiesWithPropertiesOrder=Yo,w.getPropertyInPath=Ke,w.getRandomId=Et,w.getReferenceFrom=Ye,w.getReferencePreviewKeys=Lo,w.getResolvedPropertyInPath=Br,w.getSidePanelKey=Pl,w.getValueInPath=Ue,w.hydrateRegExp=Vo,w.icon_synonyms=Ir,w.iconsSearch=$t,w.isDefaultFieldConfigId=Bn,w.isEmptyObject=Ar,w.isEnumValueDisabled=Wn,w.isHidden=yt,w.isObject=Dt,w.isPropertyBuilder=we,w.isReadOnly=nt,w.isReferenceProperty=Go,w.isValidRegExp=ri,w.joinCollectionLists=Wo,w.makePropertiesEditable=$o,w.makePropertiesNonEditable=qo,w.mergeCollection=Ho,w.mergeDeep=Qe,w.pick=No,w.plural=li,w.propertiesToColumns=Ga,w.randomColor=Rn,w.randomString=it,w.removeFunctions=fr,w.removeInPath=$n,w.removeInitialAndTrailingSlashes=pe,w.removeInitialSlash=Io,w.removePropsIfExisting=To,w.removeTrailingSlash=Fo,w.removeUndefined=gr,w.renderSkeletonCaptionText=zi,w.renderSkeletonIcon=zr,w.renderSkeletonImageThumbnail=Or,w.renderSkeletonText=je,w.resolveArrayProperty=qe,w.resolveCollection=Te,w.resolveCollectionPathIds=ur,w.resolveDefaultSelectedView=Cr,w.resolveEntityView=kr,w.resolveEnumValues=Hn,w.resolveNavigationFrom=ca,w.resolvePermissions=vt,w.resolveProperties=wr,w.resolveProperty=Fe,w.resolvePropertyEnum=vr,w.sanitizeData=qn,w.saveEntityWithCallbacks=Qr,w.segmentsToStrippedPath=zo,w.serializeRegExp=ti,w.singular=ci,w.slugify=Gt,w.sortProperties=xr,w.stripCollectionPath=Er,w.toKebabCase=Zn,w.toSnakeCase=Kn,w.traverseValueProperty=zt,w.traverseValuesProperties=yr,w.unslugify=ei,w.updateDateAutoValues=Po,w.useAuthController=We,w.useBrowserTitleAndIcon=Il,w.useBuildLocalConfigurationPersistence=Ml,w.useBuildModeController=Ol,w.useBuildNavigationController=Tl,w.useClearRestoreValue=Pe,w.useClipboard=da,w.useCollectionFetch=xi,w.useColumnIds=Jr,w.useCustomizationController=re,w.useDataSource=ze,w.useDataSourceEntityCollectionTableController=Rr,w.useDebouncedCallback=Yt,w.useDebouncedData=Ha,w.useEntityFetch=Pr,w.useFireCMSContext=he,w.useLargeLayout=Me,w.useModeController=Dr,w.useNavigationController=ue,w.useReferenceDialog=gt,w.useResolvedNavigationFrom=Ci,w.useSelectionController=po,w.useSideDialogContext=nr,w.useSideDialogsController=kt,w.useSideEntityController=He,w.useSnackbarController=Je,w.useStorageSource=lt,w.useTableSearchHelper=eo,w.useTraceUpdate=yi,Object.defineProperty(w,Symbol.toStringTag,{value:"Module"})});
587
+ `;function hi({propertyKey:e,value:t,error:o,showError:a,isSubmitting:n,setValue:i,tableMode:s,property:c,includeDescription:l,underlyingValueHasChanged:u,context:m,disabled:h}){if(!Array.isArray(c.resolvedProperties))throw Error("ArrayCustomShapedFieldBinding misconfiguration. Property `of` not set");const f=c.expanded===void 0?!0:c.expanded;Te({property:c,value:t,setValue:i});const A=r.jsx(Ce,{icon:ve(c,"small"),required:c.validation?.required,className:"text-text-secondary dark:text-text-secondary-dark",title:c.name}),g=c.resolvedProperties.map((b,y)=>{const k={propertyKey:`${e}[${y}]`,disabled:h,property:b,includeDescription:l,underlyingValueHasChanged:u,context:m,tableMode:!1,partOfArray:!0,partOfBlock:!1,autoFocus:!1};return r.jsx("div",{className:"pb-4",children:r.jsx(tt,{...k})},`custom_shaped_array_${y}`)});return r.jsxs(r.Fragment,{children:[!s&&r.jsx(p.ExpandablePanel,{initiallyExpanded:f,title:A,className:"px-2 md:px-4 pb-2 md:pb-4 pt-1 md:pt-2",children:g}),s&&g,r.jsx(xe,{includeDescription:l,showError:a,error:o,disabled:h,property:c})]})}const gl=({containerRef:e})=>{const{isSubmitting:t,isValidating:o,errors:a}=_e.useFormex();return d.useEffect(()=>{const n=Object.keys(a);if(n.length>0&&t&&!o){const i=e?.current?.querySelector(`#form_field_${n[0]}`);if(i&&e?.current){const s=gi(e.current);if(s){const l=i.getBoundingClientRect().top;s.scrollTo({top:s.scrollTop+l-196,behavior:"smooth"})}const c=i.querySelector("input");c&&c.focus()}}},[t,o,a,e]),null},Al=e=>{const t=e&&e.scrollHeight>e.clientHeight,o=e?window.getComputedStyle(e).overflowY:null,a=o&&o.indexOf("hidden")!==-1;return t&&!a},gi=e=>!e||e===document.body?document.body:Al(e)?e:gi(e.parentNode);function bl({customId:e,entityId:t,status:o,onChange:a,error:n,entity:i,loading:s}){const{errors:c}=_e.useFormex(),l=o==="existing"||!e,u=o!=="existing"&&!e,m=d.useMemo(()=>{if(!(!e||typeof e=="boolean"||e==="optional"))return Ue(e)},[e]),h=Je(),{copy:f}=ma({onSuccess:b=>h.open({type:"success",message:`Copied ${b}`})}),A=te(),g={label:u?"ID is set automatically":"ID",disabled:l||s,name:"id",value:(i&&o==="existing"?i.id:t)??"",endAdornment:s?r.jsx(p.CircularProgress,{size:"small"}):i?r.jsxs(r.Fragment,{children:[r.jsx(p.Tooltip,{title:"Copy",children:r.jsx(p.IconButton,{onClick:b=>f(i.id),"aria-label":"copy-id",children:r.jsx(p.ContentCopyIcon,{size:"small"})})}),A?.entityLinkBuilder&&r.jsx(p.Tooltip,{title:"Open in the console",children:r.jsx(p.IconButton,{component:"a",href:A.entityLinkBuilder({entity:i}),rel:"noopener noreferrer",target:"_blank",onClick:b=>b.stopPropagation(),"aria-label":"go-to-datasource",children:r.jsx(p.OpenInNewIcon,{size:"small"})})})]}):void 0};return r.jsxs(r.Fragment,{children:[m&&r.jsx(p.Select,{error:n,onValueChange:b=>a(b),...g,renderValue:b=>{const y=m.find(k=>k.id===b);return y?`${y.id} - ${y.label}`:b},children:m.map(b=>r.jsx(p.SelectItem,{value:String(b.id),children:r.jsx(Se,{enumKey:b.id,enumValues:m,size:"medium"})},b.id))}),!m&&r.jsx(p.TextField,{...g,error:n,placeholder:e==="optional"?"Autogenerated ID, it can be manually changed":o==="new"||o==="copy"?"ID of the new document":"ID of the document",onChange:b=>{let y=b.target.value;return y&&(y=y.trim()),a(y.length?y:void 0)}}),c.id&&r.jsx(p.Typography,{variant:"caption",className:"ml-3.5 text-red-500 dark:text-red-500",children:c.id})]})}function Ai({entityOrEntitiesToDelete:e,collection:t,onClose:o,open:a,callbacks:n,onEntityDelete:i,onMultipleEntitiesDelete:s,path:c}){const l=ze(t),u=te(),m=Je(),[h,f]=d.useState(!1),[A,g]=d.useState(),[b,y]=d.useState(),k=Ae();d.useEffect(()=>{if(e){const T=Array.isArray(e)&&e.length===1?e[0]:e;g(T),y(Array.isArray(T))}},[e]);const v=d.useMemo(()=>Pe({collection:t,path:c,fields:u.propertyConfigs}),[t,c]),_=d.useCallback(()=>{o()},[o]),E=d.useCallback(T=>{console.debug("Deleted",T)},[]),C=d.useCallback((T,O)=>{m.open({type:"error",message:"Error deleting: "+O?.message}),console.error("Error deleting entity"),console.error(O)},[v.name]),B=d.useCallback((T,O)=>{m.open({type:"error",message:"Error before deleting: "+O?.message}),console.error(O)},[v.name]),x=d.useCallback((T,O)=>{m.open({type:"error",message:"Error after deleting: "+O?.message}),console.error(O)},[v.name]),S=d.useCallback(T=>pa({dataSource:l,entity:T,collection:v,callbacks:n,onDeleteSuccess:E,onDeleteFailure:C,onPreDeleteHookError:B,onDeleteSuccessHookError:x,context:k}),[l,v,n,E,C,B,x,k]),F=d.useCallback(async()=>{A&&(f(!0),b?Promise.all(A.map(S)).then(T=>{f(!1),s&&A&&s(c,A),T.every(Boolean)?m.open({type:"success",message:`${v.name}: multiple deleted`}):T.some(Boolean)?m.open({type:"warning",message:`${v.name}: Some of the entities have been deleted, but not all`}):m.open({type:"error",message:`${v.name}: Error deleting entities`}),o()}):S(A).then(T=>{f(!1),T&&(i&&A&&i(c,A),m.open({type:"success",message:`${v.singularName??v.name} deleted`}),o())}))},[A,b,S,s,c,o,m,v.name,i]);let Q;if(A&&b)Q=r.jsx(r.Fragment,{children:"Multiple entities"});else{const T=A;Q=T?r.jsx($r,{entity:T,collection:t,path:c}):r.jsx(r.Fragment,{})}const P=b?r.jsxs(r.Fragment,{children:[r.jsx("b",{children:v.name}),": Confirm multiple delete?"]}):`Would you like to delete this ${v.singularName??v.name}?`;return r.jsxs(p.Dialog,{maxWidth:b?"lg":"2xl","aria-labelledby":"delete-dialog",open:a,onOpenChange:T=>T?void 0:o(),children:[r.jsxs(p.DialogContent,{fullHeight:!0,children:[r.jsx(p.Typography,{variant:"subtitle2",className:"p-4",children:P}),!b&&r.jsx("div",{className:"p-4",children:Q})]}),r.jsxs(p.DialogActions,{children:[h&&r.jsx(p.CircularProgress,{size:"small"}),r.jsx(p.Button,{onClick:_,disabled:h,variant:"text",color:"primary",children:"Cancel"}),r.jsx(p.Button,{autoFocus:!0,disabled:h,onClick:F,variant:"filled",color:"primary",children:"Ok"})]})]})}const yl={icon:r.jsx(p.KeyboardTabIcon,{}),name:"Edit",collapsed:!1,onClick({entity:e,collection:t,fullPath:o,context:a,highlightEntity:n,unhighlightEntity:i}){n?.(e),a.analyticsController?.onAnalyticsEvent?.("entity_click",{path:e.path,entityId:e.id});const s=t?.collectionGroup?e.path:o??e.path;return a.sideEntityController.open({entityId:e.id,path:s,collection:t,updateUrl:!0,onClose:()=>i?.(e)}),Promise.resolve(void 0)}},bi={icon:r.jsx(p.FileCopyIcon,{}),name:"Copy",onClick({entity:e,collection:t,context:o,highlightEntity:a,unhighlightEntity:n}){return a?.(e),o.analyticsController?.onAnalyticsEvent?.("copy_entity_click",{path:e.path,entityId:e.id}),o.sideEntityController.open({entityId:e.id,path:e.path,copy:!0,collection:t,updateUrl:!0,onClose:()=>n?.(e)}),Promise.resolve(void 0)}},yi={icon:r.jsx(p.DeleteIcon,{}),name:"Delete",onClick({entity:e,fullPath:t,collection:o,context:a,selectionController:n,onCollectionChange:i,sideEntityController:s}){const{closeDialog:c}=a.dialogsController.open({key:"delete_entity_dialog_"+e.id,Component:({open:l})=>{if(!o||!t)throw new Error("deleteEntityAction: Collection is undefined");return r.jsx(Ai,{entityOrEntitiesToDelete:e,path:t,collection:o,callbacks:o.callbacks,open:l,onEntityDelete:()=>{a.analyticsController?.onAnalyticsEvent?.("single_entity_deleted",{path:t}),n?.setSelectedEntities(n.selectedEntities.filter(u=>u.id!==e.id)),i?.(),s?.close()},onClose:c})}});return Promise.resolve(void 0)}};function wl({propertyId:e}){const[t,o]=d.useState(!1);return r.jsxs("div",{className:"flex flex-row gap-2 items-center justify-center text-white",children:[r.jsxs("div",{children:[r.jsx(p.Typography,{variant:"caption",className:"min-w-20 text-slate-400",color:"disabled",children:t?"Copied":"Property ID"}),r.jsx(p.Typography,{variant:"caption",className:"text-white",children:r.jsx("code",{children:e})})]}),r.jsx(p.IconButton,{size:"small",children:r.jsx(p.ContentPasteIcon,{size:"smallest",className:"text-white",onClick:d.useCallback(()=>{navigator.clipboard.writeText(e),o(!0),setTimeout(()=>o(!1),2e3)},[e])})})]})}const wi=d.memo(vl,(e,t)=>e.status===t.status&&e.path===t.path&&q(e.entity?.values,t.entity?.values));function vi(e,t,o){const a=e.properties;if((t==="existing"||t==="copy")&&o)return o.values??vt(a);if(t==="new")return vt(a);throw console.error({status:t,entity:o}),new Error("Form has not been initialised with the correct parameters")}function vl({status:e,path:t,collection:o,entity:a,onEntitySaveRequested:n,onDiscard:i,onModified:s,onValuesChanged:c,onIdChange:l,onFormContextChange:u,hideId:m,autoSave:h,onIdUpdateError:f}){const A=pt(),g=te(),b=Ae(),y=ze(o),k=g.plugins,v=d.useMemo(()=>Pe({collection:o,path:t,values:a?.values,fields:g.propertyConfigs}),[a?.values,t]),_=(e==="new"||e==="copy")&&!!v.customId&&v.customId!=="optional",E=d.useMemo(()=>e==="new"||e==="copy"?_?void 0:y.generateEntityId(t):a?.id,[]),C=d.useRef(!1),B=d.useRef(vi(v,e,a)),[x,S]=d.useState(E),[F,Q]=d.useState(!1),[P,T]=d.useState(),[O,R]=d.useState(!1),[L,j]=d.useState(a?.values??B.current),W=G=>n({collection:V,path:t,entityId:x,values:G,previousValues:a?.values,closeAfterSave:C.current,autoSave:h??!1}).then(I=>{const K=e==="new"?"new_entity_saved":e==="copy"?"entity_copied":e==="existing"?"entity_edited":"unmapped_event";A.onAnalyticsEvent?.(K,{path:t})}).catch(I=>{console.error(I),T(I)}).finally(()=>{C.current=!1}),D=(G,I)=>{if(_&&!x){console.error("Missing custom Id"),Q(!0),I.setSubmitting(!1);return}if(T(void 0),Q(!1),e==="existing"){if(!a?.id)throw Error("Form misconfiguration when saving, no id for existing entity")}else if(e==="new"||e==="copy"){if(o.customId&&o.customId!=="optional"&&!x)throw Error("Form misconfiguration when saving, entityId should be set")}else throw Error("New FormType added, check EntityForm");return W(G)?.then(K=>{I.resetForm({values:G,submitCount:0,touched:{}})}).finally(()=>{I.setSubmitting(!1)})},H=_e.useCreateFormex({initialValues:B.current,onSubmit:D,validation:G=>M?.validate(G,{abortEarly:!1}).then(()=>({})).catch(I=>{const K={};return I.inner.forEach(le=>{K[le.path]=le.message}),_l(I)})});d.useEffect(()=>{B.current=vi(v,e,a);const G=H.initialValues;!H.isSubmitting&&G&&e==="existing"?de(Object.entries(V.properties).map(([I,K])=>{if(wt(K))return{};const le=G[I],ne=B.current[I];return q(le,ne)?{}:{[I]:ne}}).reduce((I,K)=>({...I,...K}),{})):de({})},[a,v,e]);const J=G=>{const I=H.initialValues;j(G),c&&c(G),h&&G&&!q(G,I)&&W(G)};d.useEffect(()=>{x&&l&&l(x)},[x,l]);const V=Pe({collection:o,path:t,entityId:x,values:L,previousValues:H.initialValues,fields:g.propertyConfigs}),ae=Nr(V,g.propertyConfigs),Z=L&&ae?Oe(L,ae):void 0,ee=o.callbacks?.onIdUpdate,oe=d.useCallback(async()=>{if(ee&&L&&(e==="new"||e==="copy")){R(!0);try{const G=await ee({collection:V,path:t,entityId:x,values:L,context:b});S(G)}catch(G){f&&f(G),console.error(G)}R(!1)}},[x,L,e]);d.useEffect(()=>{oe()},[oe]);const[ie,de]=d.useState({}),fe=d.useCallback(({name:G,value:I,property:K})=>y.checkUniqueField(t,G,I,x),[y,t,x]),M=d.useMemo(()=>x?za(x,V.properties,fe):void 0,[x,V.properties,fe]),N=$e(),z=d.useCallback(({entity:G,customEntityActions:I})=>{const K=lt(o,N,t,null),le=G?$t(o,N,t,G):!0,ne=[];return K&&ne.push(bi),le&&ne.push(yi),I&&ne.push(...I),ne},[N,o,t]),X=[],$={setFieldValue:H.setFieldValue,values:H.values,collection:V,entityId:x,path:t,save:W};if(d.useEffect(()=>{u&&u($)},[u,$]),k&&o){const G={entityId:x,path:t,status:e,collection:o,context:b,currentEntityId:x,formContext:$};X.push(...k.map((I,K)=>I.form?.Actions?r.jsx(I.form.Actions,{...G},`actions_${I.name}`):null).filter(Boolean))}return r.jsx(_e.Formex,{value:H,children:r.jsxs("div",{className:"h-full overflow-auto",children:[X.length>0&&r.jsx("div",{className:p.cn("w-full flex justify-end items-center sticky top-0 right-0 left-0 z-10 bg-opacity-60 bg-slate-200 dark:bg-opacity-60 dark:bg-slate-800 backdrop-blur-md"),children:X}),r.jsxs("div",{className:"pt-12 pb-16 pl-8 pr-8 md:pl-10 md:pr-10",children:[r.jsxs("div",{className:`w-full py-2 flex flex-col items-start mt-${4+(X?8:0)} lg:mt-${8+(X?8:0)} mb-8`,children:[r.jsx(p.Typography,{className:"mt-4 flex-grow line-clamp-1 "+o.hideIdFromForm?"mb-2":"mb-0",variant:"h4",children:Z??o.singularName??o.name}),r.jsx(p.Alert,{color:"base",className:"w-full",size:"small",children:r.jsxs("code",{className:"text-xs select-all",children:[t,"/",x]})})]}),!m&&r.jsx(bl,{customId:o.customId,entityId:x,status:e,onChange:S,error:F,loading:O,entity:a}),x&&r.jsx(kl,{...H,initialValues:H.initialValues,onModified:s,onDiscard:i,onValuesChanged:J,underlyingChanges:ie,entity:a,resolvedCollection:V,formContext:$,status:e,savingError:P,closeAfterSaveRef:C,autoSave:h,entityActions:z({entity:a,customEntityActions:o.entityActions})})]})]})})}function kl(e){const{values:t,onDiscard:o,onModified:a,onValuesChanged:n,underlyingChanges:i,formContext:s,entity:c,touched:l,setFieldValue:u,resolvedCollection:m,isSubmitting:h,status:f,handleSubmit:A,resetForm:g,savingError:b,dirty:y,closeAfterSaveRef:k,autoSave:v,entityActions:_}=e,E=Ae(),C=_.filter(P=>P.includeInForm===void 0||P.includeInForm),B=We(),x=y;d.useEffect(()=>{a&&a(x),n&&n(t)},[x,t]),d.useEffect(()=>{!v&&!h&&i&&c&&Object.entries(i).forEach(([P,T])=>{const O=t[P];!q(T,O)&&!l[P]&&(console.debug("Updated value from the datasource:",P,T),u(P,T!==void 0?T:null))})},[h,v,i,c,t,l,u]);const S=r.jsx("div",{className:"flex flex-col gap-8",children:(m.propertiesOrder??Object.keys(m.properties)).map(P=>{const T=m.properties[P];if(!T)return console.warn(`Property ${P} not found in collection ${m.name}`),null;const O=!!i&&Object.keys(i).includes(P)&&!!l[P],R=!v&&h||nt(T)||!!T.disabled;if(wt(T))return null;const j={propertyKey:P,disabled:R,property:T,includeDescription:T.description||T.longDescription,underlyingValueHasChanged:O&&!v,context:s,tableMode:!1,partOfArray:!1,partOfBlock:!1,autoFocus:!1};return r.jsx("div",{id:`form_field_${P}`,children:r.jsx(re,{children:r.jsx(p.Tooltip,{title:r.jsx(wl,{propertyId:P}),delayDuration:800,side:"left",align:"start",sideOffset:16,children:r.jsx(tt,{...j})})})},`field_${m.name}_${P}`)}).filter(Boolean)}),F=h||!x&&f==="existing",Q=d.useRef(null);return r.jsxs("form",{onSubmit:A,onReset:()=>(console.debug("Resetting form"),g(),o&&o()),noValidate:!0,children:[r.jsxs("div",{className:"mt-12",ref:Q,children:[S,r.jsx(gl,{containerRef:Q})]}),r.jsx("div",{className:"h-14"}),!v&&r.jsxs(p.DialogActions,{position:"absolute",children:[b&&r.jsx("div",{className:"text-right",children:r.jsx(p.Typography,{color:"error",children:b.message})}),c&&C.length>0&&r.jsx("div",{className:"flex-grow flex overflow-auto no-scrollbar",children:C.map(P=>r.jsx(p.IconButton,{color:"primary",onClick:T=>{T.stopPropagation(),c&&P.onClick({entity:c,fullPath:m.path,collection:m,context:E,sideEntityController:B})},children:P.icon},P.name))}),r.jsx(p.Button,{variant:"text",disabled:F,type:"reset",children:f==="existing"?"Discard":"Clear"}),r.jsxs(p.Button,{variant:"text",color:"primary",type:"submit",disabled:F,onClick:()=>{k.current=!1},children:[f==="existing"&&"Save",f==="copy"&&"Create copy",f==="new"&&"Create"]}),r.jsxs(p.Button,{variant:"filled",color:"primary",type:"submit",disabled:F,onClick:()=>{k.current=!0},children:[f==="existing"&&"Save and close",f==="copy"&&"Create copy and close",f==="new"&&"Create and close"]})]})]})}function _l(e){let t={};if(e.inner){if(e.inner.length===0)return _e.setIn(t,e.path,e.message);for(const o of e.inner)_e.getIn(t,o.path)||(t=_e.setIn(t,o.path,o.message))}return t}function xl(e){return e.open?r.jsx(Cl,{...e}):null}function Cl({tableKey:e,entity:t,customFieldValidator:o,propertyKey:a,collection:n,path:i,cellRect:s,open:c,onClose:l,onCellValueChange:u,container:m}){const h=Ae(),f=te(),[A,g]=d.useState(),[b,y]=d.useState(),k=t?.id,[v,_]=d.useState(t),[E,C]=d.useState(v?.values),B=n?Pe({collection:n,path:i,values:E,entityId:k,fields:f.propertyConfigs}):void 0,x=Xs(),S=d.useRef(null),F=d.useRef(null),Q=d.useRef(!1),P=d.useCallback(()=>{if(!s)throw Error("getInitialLocation error");return{x:s.left<x.width-s.right?s.x+s.width/2:s.x-s.width/2,y:s.top<x.height-s.bottom?s.y+s.height/2:s.y-s.height/2}},[s,x.height,x.width]),T=d.useCallback(({x:N,y:z})=>{const X=S.current?.getBoundingClientRect();if(!X)throw Error("normalizePosition called before draggableBoundingRect is set");return{x:Math.max(0,Math.min(N,x.width-X.width)),y:Math.max(0,Math.min(z,x.height-X.height))}},[x]),O=d.useCallback(N=>{const z=S.current?.getBoundingClientRect();if(!s||!z)return;const X=N??T(P());(!b||X.x!==b.x||X.y!==b.y)&&y(X)},[s,P,T,b]);Zs({containerRef:S,innerRef:F,x:b?.x,y:b?.y,onMove:O}),d.useEffect(()=>{Q.current=!1},[a,v]),d.useLayoutEffect(()=>{const N=S.current?.getBoundingClientRect();!s||!N||Q.current||(O(),Q.current=!0)},[s,O,Q.current]),d.useLayoutEffect(()=>{O(b)},[x,s]);const R=d.useMemo(()=>{if(!(!B||!k))return za(k,a&&B.properties[a]?{[a]:B.properties[a]}:{},o)},[B,k,a,o]),L=d.useCallback(()=>O(b),[b,O]),j=async N=>(g(null),n&&v&&u&&a?u({value:N[a],propertyKey:a,entity:v,setError:g,onValueUpdated:()=>{},fullPath:i,context:h}):Promise.resolve());if(!v)return r.jsx(r.Fragment,{});const W=_e.useCreateFormex({initialValues:v?.values??{},validation:N=>R?.validate(N,{abortEarly:!1}).then(()=>({})).catch(z=>{const X={};return z.inner.forEach($=>{X[$.path]=$.message}),X}),validateOnInitialRender:!0,onSubmit:(N,z)=>{j(N).then(()=>l()).finally(()=>z.setSubmitting(!1))}}),{values:D,isSubmitting:H,setFieldValue:J,handleSubmit:V}=W;if(d.useEffect(()=>{q(D,E)||C(D)},[D]),!v)return r.jsx(be,{error:"PopupFormField misconfiguration"});if(!B)return r.jsx(r.Fragment,{});const ae=H,Z={collection:B,entityId:k,values:D,path:i,setFieldValue:J,save:j},ee=a&&Xe(B.properties,a),oe=a&&ee?{propertyKey:a,disabled:H||nt(ee)||!!ee.disabled,property:ee,includeDescription:!1,underlyingValueHasChanged:!1,context:Z,tableMode:!0,partOfArray:!1,partOfBlock:!1,autoFocus:c}:void 0;let ie=r.jsx(r.Fragment,{children:r.jsx("div",{className:"w-[560px] max-w-full max-h-[85vh]",children:r.jsxs("form",{onSubmit:V,noValidate:!0,children:[r.jsx("div",{className:"mb-1 p-4 flex flex-col relative",children:r.jsx("div",{ref:F,className:"cursor-auto",style:{cursor:"auto !important"},children:oe&&r.jsx(tt,{...oe})})}),r.jsx(p.DialogActions,{children:r.jsx(p.Button,{variant:"filled",color:"primary",type:"submit",disabled:ae,children:"Save"})})]})},`popup_form_${e}_${k}_${a}`)});const de=f.plugins;de&&de.forEach(N=>{N.form?.provider&&(ie=r.jsx(N.form.provider.Component,{status:"existing",path:i,collection:B,entity:v,context:h,currentEntityId:k,formContext:Z,...N.form.provider.props,children:ie}))});const fe=r.jsxs("div",{className:`text-gray-900 dark:text-white overflow-auto rounded rounded-md bg-white dark:bg-gray-950 ${c?"":"hidden"} cursor-grab max-w-[100vw]`,children:[ie,A&&r.jsx(p.Typography,{color:"error",children:A.message})]}),M=r.jsxs("div",{style:{boxShadow:"0 0 0 2px rgba(128,128,128,0.2)"},className:`inline-block fixed z-20 shadow-outline rounded-md bg-white dark:bg-gray-950 ${c?"visible":"invisible"} cursor-grab overflow-visible`,ref:S,children:[r.jsx(Ks,{onResize:L}),r.jsxs("div",{className:"overflow-hidden",children:[fe,r.jsx("div",{className:"absolute -top-3.5 -right-3.5 bg-gray-500 rounded-full",style:{width:"32px",height:"32px"},children:r.jsx(p.IconButton,{size:"small",onClick:N=>{N.stopPropagation(),l()},children:r.jsx(p.ClearIcon,{className:"text-white",size:"small"})})})]})]},`draggable_${a}_${k}_${c}`);return r.jsx(qi.Root,{asChild:!0,container:m,children:r.jsx(_e.Formex,{value:W,children:M})})}const El="collectionGroupParent",ho=d.memo(function({fullPath:t,parentCollectionIds:o,isSubCollection:a,className:n,...i}){const s=ze(i),c=ue(),l=We(),u=$e(),m=dt(),h=pt(),f=te(),A=d.useRef(null),g=d.useMemo(()=>{const U=m?.getCollectionConfig(t);return U?Qe(i,U):i},[i,t,m?.getCollectionConfig]),b=d.useRef(g);d.useEffect(()=>{b.current=g},[g]);const y=lt(g,u,t,null),[k,v]=d.useState(void 0),[_,E]=d.useState(void 0),[C,B]=d.useState(0),[x,S]=d.useState(0),F=d.useCallback(()=>{const U=k;setTimeout(()=>{U===k&&v(void 0)},2400)},[k]),Q=d.useCallback(U=>{const se=b.current;return Ir(se,u,t,U??null)?se.inlineEditing===void 0||se.inlineEditing:!1},[u,t]),P=g.selectionEnabled===void 0||g.selectionEnabled,T=!Q(),[O,R]=d.useState(!1),L=ro(),j=g.selectionController??L,{selectedEntities:W,toggleEntitySelection:D,isEntitySelected:H,setSelectedEntities:J}=j;d.useEffect(()=>{E(void 0)},[W]);const V=to({fullPath:t,collection:b.current,entitiesDisplayedFirst:[],lastDeleteTimestamp:C}),ae=d.useRef(Math.random().toString(36)),Z=V.popupCell,ee=d.useCallback(()=>{V.setPopupCell?.(void 0)},[V.setPopupCell]),oe=d.useCallback(U=>{console.log("Entity clicked",U);const se=b.current;return v(U),h.onAnalyticsEvent?.("edit_entity_clicked",{path:U.path,entityId:U.id}),l.open({entityId:U.id,path:U.path,collection:se,updateUrl:!0,onClose:F})},[F,l]),ie=d.useCallback(()=>{const U=b.current;h.onAnalyticsEvent?.("new_entity_click",{path:t}),l.open({path:t,collection:U,updateUrl:!0,onClose:F})},[t,l]),de=()=>{h.onAnalyticsEvent?.("multiple_delete_dialog_open",{path:t}),E(W)},fe=(U,se)=>{h.onAnalyticsEvent?.("single_entity_deleted",{path:t}),J(pe=>pe.filter(ce=>ce.id!==se.id)),B(Date.now())},M=(U,se)=>{h.onAnalyticsEvent?.("multiple_entities_deleted",{path:t}),J([]),E(void 0),B(Date.now())};let N;f?.plugins&&(N=f.plugins.find(U=>U.collectionView?.AddColumnComponent)?.collectionView?.AddColumnComponent);const z=d.useCallback((U,se)=>{if(m){const pe=m.getCollectionConfig(U),ce=Qe(pe,se);m.onCollectionModified(U,ce)}},[m]),X=d.useCallback(({width:U,key:se})=>{const pe=b.current;if(!Xe(pe.properties,se))return;const ce=ki(se,U);z(t,ce)},[z,t]),$=d.useCallback(U=>{m&&z(t,{defaultSize:U})},[z,t,m]),G=lt(g,u,t,null),I=d.useCallback(({name:U,value:se,property:pe,entityId:ce})=>s.checkUniqueField(t,U,se,ce),[t]),K=({fullPath:U,context:se,value:pe,propertyKey:ce,onValueUpdated:ke,setError:Nt,entity:Pt})=>{const fc=_e.setIn({...Pt.values},ce,pe),hc={path:U,entityId:Pt.id,values:fc,previousValues:Pt.values,collection:g,status:"existing"};return Mr({...hc,collection:g,callbacks:g.callbacks,dataSource:s,context:se,onSaveSuccess:()=>ke(),onSaveFailure:Mi=>{console.error("Save failure"),console.error(Mi),Nt(Mi)}})},le=c.resolveAliasesFrom(t),ne=d.useMemo(()=>Pe({collection:g,path:t,fields:f.propertyConfigs}),[g,t]),he=d.useCallback(({propertyKey:U,propertyValue:se,entity:pe})=>{let ce=Xe(g.properties,U);return ce||(ce=Xe(ne.properties,U)),Fe({propertyKey:U,propertyOrBuilder:ce,path:t,propertyValue:se,values:pe.values,entityId:pe.id,fields:f.propertyConfigs})},[g.properties,f.propertyConfigs,t,ne.properties]),Me=Xr(ne,!0),Ge=d.useMemo(()=>{const U=g.subcollections?.map(pe=>({key:Zr(pe),name:pe.name,width:200,dependencies:[],Builder:({entity:ce})=>r.jsx(p.Button,{color:"primary",variant:"outlined",startIcon:r.jsx(p.KeyboardTabIcon,{size:"small"}),onClick:ke=>{ke.stopPropagation(),l.open({path:t,entityId:ce.id,selectedSubPath:pe.id??pe.path,collection:g,updateUrl:!0})},children:pe.name})}))??[],se=g.collectionGroup?[{key:El,name:"Parent entities",width:260,dependencies:[],Builder:({entity:pe})=>{const ce=c.getParentReferencesFromPath(pe.path);return r.jsx(r.Fragment,{children:ce.map(ke=>r.jsx(Ve,{reference:ke,size:"tiny"},ke.path+"/"+ke.id))})}}]:[];return[...g.additionalFields??[],...U,...se]},[g,t,l]),rt=d.useCallback(()=>{B(Date.now())},[]),Ne=De(),ot=({entity:U,customEntityActions:se})=>{const pe=U?$t(g,u,t,U):!0,ce=[yl];return G&&ce.push(bi),pe&&ce.push(yi),se&&ce.push(...se),ce},wo=()=>{const U=ot({}),se=U.filter(ke=>ke.collapsed!==!1),ce=U.filter(ke=>ke.collapsed===!1).length*(Ne?40:30);return(Ne?80+ce:70+ce)+(se.length>0?Ne?40:30:0)},vo=({entity:U,size:se,width:pe,frozen:ce})=>{const ke=H(U),Nt=ot({entity:U,customEntityActions:g.entityActions});return r.jsx(Kt,{entity:U,width:pe,frozen:ce,isSelected:ke,selectionEnabled:P,size:se,highlightEntity:v,unhighlightEntity:F,collection:g,fullPath:t,actions:Nt,hideId:g?.hideIdFromCollection,onCollectionChange:rt,selectionController:j})},ko=r.jsx(p.Popover,{open:O,onOpenChange:R,enabled:!!g.description,trigger:r.jsxs("div",{className:"flex flex-col items-start",children:[r.jsx(p.Typography,{variant:"subtitle1",className:`leading-none truncate max-w-[160px] lg:max-w-[240px] ${g.description?"cursor-pointer":"cursor-auto"}`,onClick:g.description?U=>{R(!0),U.stopPropagation()}:void 0,children:`${g.name}`}),r.jsx(Bl,{fullPath:t,collection:g,filter:V.filterValues,sortBy:V.sortBy,onCountChange:S})]}),children:g.description&&r.jsx("div",{className:"m-4 text-gray-900 dark:text-white",children:r.jsx(p.Markdown,{source:g.description})})}),Y=d.useCallback(({property:U,propertyKey:se,onHover:pe})=>{const ce=b.current;return f.plugins?r.jsx(r.Fragment,{children:f.plugins.filter(ke=>ke.collectionView?.HeaderAction).map((ke,Nt)=>{const Pt=ke.collectionView.HeaderAction;return r.jsx(Pt,{onHover:pe,propertyKey:se,property:U,fullPath:t,collection:ce,parentCollectionIds:o??[]},`plugin_header_action_${Nt}`)})}):null},[f.plugins,t,o]),Ee=N?function(){return typeof N=="function"?r.jsx(N,{fullPath:t,parentCollectionIds:o??[],collection:g}):null}:void 0,{textSearchLoading:Be,textSearchInitialised:Le,onTextSearchClick:It,textSearchEnabled:Ft}=oo({collection:g,fullPath:le,parentCollectionIds:o});return r.jsxs("div",{className:p.cn("overflow-hidden h-full w-full rounded-md",n),ref:A,children:[r.jsx(eo,{additionalFields:Ge,tableController:V,displayedColumnIds:Me,onSizeChanged:$,onEntityClick:oe,onColumnResize:X,onValueChange:K,tableRowActionsBuilder:vo,uniqueFieldValidator:I,title:ko,selectionController:j,highlightedEntities:k?[k]:[],defaultSize:g.defaultSize,properties:ne.properties,getPropertyFor:he,onTextSearchClick:Le?void 0:It,textSearchLoading:Be,textSearchEnabled:Ft,actions:r.jsx(ai,{parentCollectionIds:o??[],collection:g,tableController:V,onMultipleDeleteClick:de,onNewClick:ie,path:t,relativePath:g.path,selectionController:j,selectionEnabled:P,collectionEntitiesCount:x}),emptyComponent:y&&V.filterValues===void 0&&V.sortBy===void 0?r.jsxs("div",{className:"flex flex-col items-center justify-center",children:[r.jsx(p.Typography,{variant:"subtitle2",children:"So empty..."}),r.jsxs(p.Button,{color:"primary",variant:"outlined",onClick:ie,className:"mt-4",children:[r.jsx(p.AddIcon,{}),"Create your first entity"]})]}):r.jsx(p.Typography,{variant:"label",children:"No results with the applied filter/sort"}),hoverRow:T,inlineEditing:Q(),AdditionalHeaderWidget:Y,AddColumnComponent:Ee,getIdColumnWidth:wo,additionalIDHeaderWidget:r.jsx(Sl,{path:t,collection:g})},`collection_table_${t}`),r.jsx(xl,{open:!!Z,onClose:ee,cellRect:Z?.cellRect,propertyKey:Z?.propertyKey,collection:g,entity:Z?.entity,tableKey:ae.current,customFieldValidator:I,path:le,onCellValueChange:K,container:A.current},`popup_form_${Z?.propertyKey}_${Z?.entity?.id}`),_&&r.jsx(Ai,{entityOrEntitiesToDelete:_,path:t,collection:g,callbacks:g.callbacks,open:!!_,onEntityDelete:fe,onMultipleEntitiesDelete:M,onClose:()=>E(void 0)})]})},(e,t)=>q(e.fullPath,t.fullPath)&&q(e.parentCollectionIds,t.parentCollectionIds)&&q(e.isSubCollection,t.isSubCollection)&&q(e.className,t.className)&&q(e.properties,t.properties)&&q(e.propertiesOrder,t.propertiesOrder)&&q(e.hideIdFromCollection,t.hideIdFromCollection)&&q(e.inlineEditing,t.inlineEditing)&&q(e.selectionEnabled,t.selectionEnabled)&&q(e.selectionController,t.selectionController)&&q(e.Actions,t.Actions)&&q(e.defaultSize,t.defaultSize)&&q(e.textSearchEnabled,t.textSearchEnabled)&&q(e.additionalFields,t.additionalFields)&&q(e.forceFilter,t.forceFilter));function Bl({fullPath:e,collection:t,filter:o,sortBy:a,onCountChange:n}){const i=ze(t),s=ue(),[c,l]=d.useState(void 0),[u,m]=d.useState(void 0),h=a?a[0]:void 0,f=a?a[1]:void 0,A=d.useMemo(()=>s.resolveAliasesFrom(e),[e,s.resolveAliasesFrom]);return d.useEffect(()=>{i.countEntities&&i.countEntities({path:A,collection:t,filter:o,orderBy:h,order:f}).then(l).catch(m)},[e,i.countEntities,A,t,o,h,f]),d.useEffect(()=>{n&&n(c??0)},[n,c]),u?null:r.jsx(p.Typography,{className:"w-full text-ellipsis block overflow-hidden whitespace-nowrap max-w-xs text-left w-fit-content",variant:"caption",color:"secondary",children:c!==void 0?`${c} entities`:r.jsx(p.Skeleton,{className:"w-full max-w-[80px] mt-1"})})}function ki(e,t){if(e.includes(".")){const[o,...a]=e.split(".");return{properties:{[o]:ki(a.join("."),t)}}}return{properties:{[e]:{columnWidth:t}}}}function Sl({collection:e,path:t}){const[o,a]=d.useState(!1),[n,i]=d.useState(""),s=We();return r.jsx(p.Tooltip,{title:o?void 0:"Find by ID",children:r.jsx(p.Popover,{open:o,onOpenChange:a,trigger:r.jsx(p.IconButton,{size:"small",children:r.jsx(p.SearchIcon,{size:"small"})}),children:r.jsx("form",{noValidate:!0,onSubmit:c=>{if(c.preventDefault(),!!n)return a(!1),s.open({entityId:n,path:t,collection:e,updateUrl:!0})},className:"text-gray-900 dark:text-white w-96 max-w-full",children:r.jsxs("div",{className:"flex p-2 w-full gap-4",children:[r.jsx("input",{autoFocus:o,placeholder:"Find entity by ID",onChange:c=>i(c.target.value),value:n,className:"flex-grow bg-transparent outline-none p-1"}),r.jsx(p.Button,{variant:"outlined",disabled:!n,type:"submit",children:"Go"})]})})})})}function Il({propertyConfig:e}){const t="h-8 w-8 p-1 rounded-full shadow text-white",o=typeof e?.property=="object"?Di(e.property):void 0;return r.jsx("div",{className:t,style:{background:e?.color??o?.color??"#888"},children:e?.Icon?Ut(e,"medium"):Ut(o,"medium")})}function _i(){return r.jsx("div",{className:"flex w-full h-full",children:r.jsxs("div",{className:"m-auto flex items-center flex-col",children:[r.jsx(p.Typography,{variant:"h4",align:"center",gutterBottom:!0,children:"Page not found"}),r.jsx(p.Typography,{align:"center",gutterBottom:!0,children:"This page does not exist or you may not have access to it"}),r.jsx(p.Button,{variant:"text",component:ge.Link,to:"/",children:"Back to home"})]})})}function Fl({open:e,onAccept:t,onCancel:o,title:a,loading:n,body:i}){return r.jsxs(p.Dialog,{open:e,onOpenChange:s=>s?void 0:o(),children:[r.jsxs(p.DialogContent,{children:[r.jsx(p.Typography,{variant:"h6",className:"mb-2",children:a}),i]}),r.jsxs(p.DialogActions,{children:[r.jsx(p.Button,{variant:"text",onClick:o,autoFocus:!0,children:"Cancel"}),r.jsx(p.LoadingButton,{color:"primary",type:"submit",loading:n,onClick:t,children:"Ok"})]})]})}function xi({width:e,height:t,className:o,style:a}){return r.jsxs("svg",{width:e??"100%",height:t??"100%",viewBox:"0 0 599 599",version:"1.1",style:a,className:o,xmlns:"http://www.w3.org/2000/svg",children:[r.jsxs("defs",{children:[r.jsxs("radialGradient",{cx:"28.6213569%",cy:"43.1133328%",fx:"28.6213569%",fy:"43.1133328%",r:"71.5003456%",gradientTransform:"translate(0.286214,0.431133),rotate(3.343450),scale(1.000000,0.996175),translate(-0.286214,-0.431133)",id:"radialGradient-1",children:[r.jsx("stop",{stopColor:"#FF5B79",offset:"0%"}),r.jsx("stop",{stopColor:"#FA5574",offset:"28.0930803%"}),r.jsx("stop",{stopColor:"#EC4C51",offset:"44.7242531%"}),r.jsx("stop",{stopColor:"#9543C1",offset:"71.4578165%"}),r.jsx("stop",{stopColor:"#3857B3",offset:"100%"})]}),r.jsxs("radialGradient",{cx:"53.6205516%",cy:"47.2473036%",fx:"53.6205516%",fy:"47.2473036%",r:"50.8229649%",gradientTransform:"translate(0.536206,0.472473),rotate(90.000000),scale(1.000000,1.206631),translate(-0.536206,-0.472473)",id:"radialGradient-2",children:[r.jsx("stop",{stopColor:"#68294F",stopOpacity:"0",offset:"0%"}),r.jsx("stop",{stopColor:"#5E2548",stopOpacity:"0.04641108",offset:"75.3503173%"}),r.jsx("stop",{stopColor:"#0D060B",stopOpacity:"0.437431709",offset:"100%"})]}),r.jsxs("radialGradient",{cx:"53.8605015%",cy:"48.1990423%",fx:"53.8605015%",fy:"48.1990423%",r:"59.9151549%",gradientTransform:"translate(0.538605,0.481990),rotate(180.000000),scale(1.000000,0.925027),translate(-0.538605,-0.481990)",id:"radialGradient-3",children:[r.jsx("stop",{stopColor:"#68294F",stopOpacity:"0",offset:"0%"}),r.jsx("stop",{stopColor:"#5E2548",stopOpacity:"0.04641108",offset:"84.0867343%"}),r.jsx("stop",{stopColor:"#FF0000",stopOpacity:"0.567324765",offset:"100%"})]})]}),r.jsx("g",{id:"Page-1",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:r.jsxs("g",{id:"firecms_logo",children:[r.jsx("circle",{fill:"url(#radialGradient-1)",cx:"299.5",cy:"299.5",r:"299.5"}),r.jsx("circle",{fill:"url(#radialGradient-2)",cx:"299.5",cy:"299.5",r:"299.5"}),r.jsx("circle",{fill:"url(#radialGradient-3)",cx:"299.5",cy:"299.5",r:"299.5"})]})})]})}const Ci=function({title:t,endAdornment:o,startAdornment:a,drawerOpen:n,dropDownActions:i,includeDrawer:s,className:c,style:l,user:u}){const m=ue(),h=$e(),{mode:f,toggleMode:A}=Or(),g=De(),b=u??h.user;let y;if(b&&b.photoURL)y=r.jsx(p.Avatar,{src:b.photoURL});else if(b===void 0||h.initialLoading)y=r.jsx("div",{className:"p-1 flex justify-center",children:r.jsx(p.Skeleton,{className:"w-10 h-10 rounded-full"})});else{const k=b?.displayName?b.displayName[0].toUpperCase():b?.email?b.email[0].toUpperCase():"A";y=r.jsx(p.Avatar,{children:k})}return r.jsx("div",{style:l,className:p.cn("pr-2",{"ml-[17rem]":n&&g,"ml-16":s&&!(n&&g)&&!a,"h-16":!0,"z-10":g,"transition-all":!0,"ease-in":!0,"duration-75":!0,"w-full":!s,"w-[calc(100%-64px)]":s&&!(n&&g),"w-[calc(100%-17rem)]":s&&n&&g,"duration-150":n&&g,fixed:!0},c),children:r.jsxs("div",{className:"flex flex-row gap-2 px-4 h-full items-center",children:[a,m&&r.jsx("div",{className:"mr-8 hidden lg:block",children:r.jsx(ge.Link,{className:"visited:text-inherit visited:dark:text-inherit",to:m?.basePath??"/",children:r.jsx(p.Typography,{variant:"subtitle1",noWrap:!0,className:"ml-2 !font-medium",children:t})})}),r.jsx("div",{className:"flex-grow"}),o&&r.jsx(re,{children:o}),r.jsx(p.IconButton,{color:"inherit","aria-label":"Open drawer",onClick:A,size:"large",children:f==="dark"?r.jsx(p.DarkModeIcon,{}):r.jsx(p.LightModeIcon,{})}),r.jsxs(p.Menu,{trigger:y,children:[b&&r.jsxs("div",{className:"px-4 py-2 mb-2",children:[b.displayName&&r.jsx(p.Typography,{variant:"body1",color:"secondary",children:b.displayName}),b.email&&r.jsx(p.Typography,{variant:"body2",color:"secondary",children:b.email})]}),i,!i&&r.jsxs(p.MenuItem,{onClick:h.signOut,children:[r.jsx(p.LogoutIcon,{}),"Log Out"]})]})]})})},Nl=e=>e&&Array.isArray(e)&&e.length>0?e.map((t,o)=>t?{[hr(t)+o]:Bt()}:{}).reduce((t,o)=>({...t,...o}),{}):{};function go({droppableId:e,addLabel:t,value:o,disabled:a=!1,buildEntry:n,size:i="medium",onInternalIdAdded:s,includeAddButton:c,newDefaultEntry:l,onValueChange:u}){const m=o&&Array.isArray(o)&&o.length>0,h=d.useRef(Nl(o)),[f,A]=d.useState(m?Object.values(h.current):[]);d.useEffect(()=>{if(m&&o&&o.length!==f.length){const v=o.map((_,E)=>{const C=hr(_)+E;if(C in h.current)return h.current[C];{const B=Bt();return h.current[C]=B,B}});A(v)}},[m,f.length,o]);const g=v=>{if(v.preventDefault(),a)return;const _=Bt(),E=[...f,_];s&&s(_),A(E),u([...o??[],l])},b=v=>{const _=[...f];_.splice(v,1),A(_),u(o.filter((E,C)=>C!==v))},y=v=>{const _=Bt(),E=o[v],C=[...f.splice(0,v+1),_,...f.splice(v+1,f.length-v-1)];s&&s(_),A(C),u([...o.slice(0,v+1),E,...o.slice(v+1)])},k=v=>{if(!v.destination)return;const _=v.source.index,E=v.destination.index,C=[...f],B=C[_];C[_]=C[E],C[E]=B,A(C),u(Pl(o,_,E))};return r.jsx(at.DragDropContext,{onDragEnd:k,children:r.jsx(at.Droppable,{droppableId:e,renderClone:(v,_,E)=>{const C=E.source.index,B=f[C];return r.jsx(Ao,{provided:v,internalId:B,index:C,size:i,disabled:a,buildEntry:n,remove:b,copy:y,isDragging:_.isDragging})},children:(v,_)=>r.jsxs("div",{...v.droppableProps,ref:v.innerRef,children:[m&&f.map((E,C)=>r.jsx(at.Draggable,{draggableId:`array_field_${E}`,isDragDisabled:a,index:C,children:(B,x)=>r.jsx(Ao,{provided:B,internalId:E,index:C,size:i,disabled:a,buildEntry:n,remove:b,copy:y,isDragging:x.isDragging})},`array_field_${E}`)),v.placeholder,c&&r.jsx("div",{className:"py-4 justify-center text-left",children:r.jsx(p.Button,{variant:"text",size:i==="small"?"small":"medium",color:"primary",disabled:a,startIcon:r.jsx(p.AddIcon,{}),onClick:g,children:t??"Add"})})]})})})}function Ao({provided:e,index:t,internalId:o,size:a,disabled:n,buildEntry:i,remove:s,copy:c,isDragging:l}){const[u,m]=d.useState(!1),h=d.useCallback(()=>m(!0),[]),f=d.useCallback(()=>m(!1),[]);return r.jsx("div",{onMouseEnter:h,onMouseMove:h,onMouseLeave:f,ref:e.innerRef,...e.draggableProps,style:e.draggableProps.style,className:`${l||u?p.fieldBackgroundHoverMixin:""} mb-1 rounded-md opacity-100`,children:r.jsxs("div",{className:"flex items-start",children:[r.jsx("div",{className:"flex-grow w-[calc(100%-48px)] text-text-primary dark:text-text-primary-dark",children:i(t,o)}),r.jsx(Ei,{direction:a==="small"?"row":"column",disabled:n,remove:s,index:t,provided:e,copy:c})]})})}function Ei({direction:e,disabled:t,remove:o,index:a,provided:n,copy:i}){const[s,c]=d.useState(!1),l=d.useRef(null);return p.useOutsideAlerter(l,()=>c(!1)),r.jsx("div",{className:`pl-2 pt-1 pb-4 flex ${e==="row"?"flex-row-reverse":"flex-col"} items-center`,ref:l,...n.dragHandleProps,children:r.jsxs(p.Tooltip,{delayDuration:400,open:s?!1:void 0,side:e==="column"?"left":void 0,title:"Drag to move. Click for more options",children:[r.jsx(p.IconButton,{size:"small",disabled:t,onClick:()=>c(!0),onDragStart:u=>{c(!1)},className:`cursor-${t?"inherit":"grab"}`,children:r.jsx(p.HandleIcon,{})}),r.jsxs(p.Menu,{portalContainer:l.current,open:s,trigger:r.jsx("div",{}),children:[r.jsxs(p.MenuItem,{dense:!0,onClick:u=>{c(!1),o(a)},children:[r.jsx(p.RemoveIcon,{size:"small"}),"Remove"]}),r.jsxs(p.MenuItem,{dense:!0,onClick:()=>{c(!1),i(a)},children:[r.jsx(p.ContentCopyIcon,{size:"small"}),"Copy"]})]})]})})}function Pl(e,t,o){const a=Array.from(e),[n]=a.splice(t,1);return a.splice(o,0,n),a}function Bt(){return Math.floor(Math.random()*Math.floor(Number.MAX_SAFE_INTEGER))}function Tl({name:e,multiselect:t=!1,path:o,disabled:a,value:n,onReferenceSelected:i,onMultipleReferenceSelected:s,previewProperties:c,forceFilter:l,size:u,className:m}){const h=ue(),f=d.useMemo(()=>h.getCollection(o),[o,h]),A=d.useCallback(v=>{if(!a&&i){const _=v?Ye(v):null;i?.({reference:_,entity:v})}},[a,i]),g=d.useCallback(v=>{if(!a&&s){const _=v?v.map(E=>Ye(E)):null;s({references:_,entities:v})}},[a,i]),b=At({multiselect:t,path:o,collection:f,onSingleEntitySelected:A,onMultipleEntitiesSelected:g,forceFilter:l});d.useCallback(v=>{v.stopPropagation(),t?g([]):A(null)},[i]);let y;const k=()=>{a||b.open()};return Array.isArray(n)?y=r.jsx("div",{className:"flex flex-col gap-4",children:n.map((v,_)=>r.jsx(Ve,{onClick:k,reference:v,disabled:a,previewProperties:c,size:u},`reference_preview_${_}`))}):n?.isEntityReference&&n?.isEntityReference()&&(y=r.jsx(Ve,{reference:n,onClick:k,disabled:a,previewProperties:c,size:u})),r.jsxs("div",{className:p.cn("text-sm font-medium text-gray-500","min-w-80 flex flex-col gap-4","relative transition-colors duration-200 ease-in rounded font-medium",a?"bg-opacity-50":"hover:bg-opacity-75","text-opacity-50 dark:text-white dark:text-opacity-50",m),children:[y,!n&&r.jsx("div",{className:"justify-center text-left",children:r.jsxs(p.Button,{variant:"outlined",color:"primary",disabled:a,onClick:k,children:["Edit ",e]})})]})}const Ql=220;process.env.NODE_ENV!=="production"&&Object.keys(Fr).forEach(e=>{p.iconKeys.includes(e)||console.warn(`The icon ${e} no longer exists. Remove it from \`icon_synonyms\``)});function Dl({selectedIcon:e="",onIconSelected:t}){const[o,a]=d.useState(null),[n,i]=d.useState(""),s=d.useMemo(()=>p.debounce(l=>{if(!l||l==="")a(null);else{const u=Wt.search(l);a(u.map(m=>m.key))}},Ql),[]);d.useEffect(()=>(s(n),()=>{s.clear()}),[n,s]);const c=o===null?p.coolIconKeys:o;return r.jsxs(r.Fragment,{children:[r.jsx(p.SearchBar,{autoFocus:!0,innerClassName:"w-full sticky top-0 z-10",onTextSearch:l=>i(l??""),placeholder:"Search for more icons…"}),r.jsx("div",{className:"flex max-w-full flex-wrap mt-4",children:c.map(l=>r.jsx(p.Tooltip,{title:l,children:r.jsx(p.IconButton,{shape:"square",toggled:e===l,onClick:t?()=>t(l):void 0,className:"box-content m-1",children:r.jsx(p.Icon,{iconKey:l,size:24})})},l))})]})}function Ml({error:e,children:t}){return t?r.jsx(p.Typography,{variant:"caption",color:e?"error":"secondary",className:"ml-3.5 mt-0.5",children:t}):null}function At(e){const t=ue(),o=_t(),a=d.useCallback(()=>{if(e.path){let i=e.collection;if(i||(i=t.getCollection(e.path)),!i)throw Error("Not able to resolve the collection in useReferenceDialog. Make sure a collection is registered in path "+e.path);o.open({key:`reference_${e.path}`,component:r.jsx(Ra,{collection:i,...e}),width:"90vw",onClose:()=>{e.onClose?.()}})}else throw Error("useReferenceDialog: You are trying to open a reference dialog, but have not declared the `path`")},[t,e,o]),n=d.useCallback(()=>{o.close()},[o]);return{open:a,close:n}}const Ol=`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAAASAAAAEgARslrPgAAB9pJREFUWMONl12obVUVx39jzLk+9j7nHq9y1QT1qpcbSIaXQFGs24PQl3HroSQyqHwJFJF6qaceCsqQoJdELHoIC6EeJCSKsi/TFLGozGsKXksljRLxnrP3WmvOOUYPa+19zsmPWpux5pxrzTX///Exx5hb+B/X1y+/nuIlVKF5m0v1YbQ55tIcKTQXFerNQkumOZ1oTiXCqUH8saR+74L8ZIWWux7+7JuuL2/04s5jJyhWQlXV71KtbhCtr1WtD6s0KlrjNBRaEi3JGzpv6bymQ0sn9mwv9otB7Ls7kn9Xo+U7D9z8/xG4+bz3cs35SjE/HEK8NWr8RBOrs+tQUUlEtAYaijRkbxmY0fuMzucsfcbSWnZQtiWxJL3Uid09iH0jIM8/1f+d3/zuS29M4PvHrmG+cZA8dMdjiLfNYrx6owrMVKlVUQkgkeI1iYbBJ3A2WPpKNtnx+UQisy29L0gPDGKfrwkPn2bJPfd/Zo0ZVp0fvOOdnLGxheX+A/Mq3nGwqS8/q645o4psxkgbhFqdSgqVJKIkghgqjuDoWh+dlm1AI0gUC3o4C9d04idbmZ06euQDPPHMj3YJ3HnkrZx98Fys2PFZ1dxxsJkdPbOecaBqmcWGqBVBIkEiKkoQJ5IJJBTbY8aRgBMwjxgVJoJJwDScnYUrOy2PBamfv/CS4zz9zE+IAIfPuQQzPzyrmq9u1e3RM+qWeaipNCCiE4DjbjgF94xZQj2htpjeK84ImqlIUpO9JllgEKgJDFpfOoh8paN8chbOeQ4g/OTq97PdLXSz3fjiVjO7/sx6g804ow41QWuCrjQPBB3bkZQgAkpBJOMojmIEjIgRKV6RpaYIZHGKQlK5OIv0L8bul8eOfsxjDJGD8613z6rmhq1qxkY1o9YKFUFEEED2xqoE1MNoWgPBwQZMl2SrSbQM9NQyUMlA5S3Rlcqd6E50RdRvPMvn9yE8qP9+9WWtQvXxzdic8xrwPaJrUYJGoq4sVBM1Ukuiln4UBipJVJrGoHUhrARB0XMQ/cizbSd61uaZlzUhXjuvWmqt9oOyAmUPEabnkSDV2j0Rp2YgksZdQpoCtRBwAiN4cKYdw4m3pNnbY9Tw4SZUh9tQEda+ld1WpmThgoivU8fYDbgEggRcleiZ6BOoFNRXLQQX1Eelggsgh8GPx6DhWB2iRgkj2OTuVX8dBzJtMx93BAKK4hIwUUSEID4BGspecWTfDwSCw+UxqByJoqPf9+xmYWQg7H3u+5Poyk3o5BZDxRBxxH29fdkF3YcBXKHgF+m+hLxn4OvbnnbPzMkjsm/+f5cXec2ye6ZfpO6+OX7pE8TqPj1zcN/7Zu8CDm44Bu6skrKjuOs0FlxWCJNMYxMOqLlR3DAvsAKaZo6t7+u7r6nhjN/5RKIQKESKhykhjeIINgJi+0m4Fiuns2WKZQybtJ2AfAWzGu/ayt0wz5gXimeKQyKSPI4kiCMhDxSgyLiOiY9kxnW2NVs+1ZeBbAmzhLmtgd0d8z1k1mIUTxQbKD5gnkmuDN6QvCF5TaIie0UmkIU1id3WcfwZHUo61eWB3gayDdOiZR+JXUuMWmcbyGWcny2RzOi8obeWwRsGrxm8JlGPBHCyOJmpJkwkHHs09pnfL1L60KLqtBKZtprhU+lVmSq9+xRsBfOMW6L4QLFM7zWdz+l8Ru8tA+10YKlJIiSxkcC6dQqlmJc/xaHIvTuZT7UpHalFUHEqL6iGsfKtM8FEzMdy7J4oXui9mk5CczpGErtEKgacQUZJE3gSwzw/i+dfx2G7e6IcOPALCXIkakGkYx4iwceyq+uENPp+RSI7DN7Q+5ylb7JgJLH0+XRGbOlRerWJwNgmnOwJ83Tvq/7KX2KZb1nJfnfp5YRoda7hFC/MQyGI7Mteow2E4pHkDT2zyfS758HV4bSjolOjF2PYS4KBbN2L5vmHZ7DpsWQnDsvfLj1+Lwufy9LSO2y5M1Mnik8OEJxAoSJRk7xhoKX3+URiztI3WPgGS2/p1OnE6CcSvRQGH+htQfH07dPSP7Lp9ajcNy+9DnG/oMT67qqZHz/QtGxVyjworQqVCIjiPiaaTD1ttZZ+fTIeCXQ+Y6HCQm0tO5LYpmfHlyy9/1nCPi3ICw/99JbxUHrdvxr6Q4depdhTfeGapVeH+imKxwhv6ZnR+5zeN0aNGU2+ZIPON0cX0LBQYSnGQgsLSSzoWdiCHVvQ2fLP2fMtwf2vDz50K6TpVPxj/sn7Ni5iu9l6Tof+yd78yoWFQ0uvWYvVLK1h6e34B8RnY9DZnIW3LAijxpLYkZ6Fd+z4km3bYcd2WNry8ezppsZ5ZMd2+MfTv3xtjbr9/PfwyoFDzPvtq7I2t+Vq/m6pt4hxThVaojao1CANRkORmkwkiTCI00thKYWOzJJR+6V1JE8/z2JfqGgfW9jLPPLg7a9Xe8frHs7j5MVXESxfmLS5KYXmxhQ3z/a4icQNRFtEGlwjJkoRIamTmIKNTE+it57kw0sF+1ah3CkSXkiPf42Htl+3WL/2+vIFJ6ishJ3QXD1o9dEhVCcGbS7ModUcakwrigaKChkoYmQK2XMp5L8V/F7DfuDePYrEcv8f7npdnDcksEvkg9RewquhuayTcHzQeCyJXpFVD2fRzSxCFtkuwqks8mjB/ujYr9y6k0gs9528503X/w/F3eUgyIBI4wAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMS0wNS0xMFQxOToyODozMyswMDowMEzeSx4AAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjEtMDUtMTBUMTk6Mjg6MzMrMDA6MDA9g/OiAAAARnRFWHRzb2Z0d2FyZQBJbWFnZU1hZ2ljayA2LjcuOC05IDIwMTQtMDUtMTIgUTE2IGh0dHA6Ly93d3cuaW1hZ2VtYWdpY2sub3Jn3IbtAAAAABh0RVh0VGh1bWI6OkRvY3VtZW50OjpQYWdlcwAxp/+7LwAAABh0RVh0VGh1bWI6OkltYWdlOjpoZWlnaHQAMTkyDwByhQAAABd0RVh0VGh1bWI6OkltYWdlOjpXaWR0aAAxOTLTrCEIAAAAGXRFWHRUaHVtYjo6TWltZXR5cGUAaW1hZ2UvcG5nP7JWTgAAABd0RVh0VGh1bWI6Ok1UaW1lADE2MjA2NzQ5MTMk8oswAAAAD3RFWHRUaHVtYjo6U2l6ZQAwQkKUoj7sAAAAVnRFWHRUaHVtYjo6VVJJAGZpbGU6Ly8vbW50bG9nL2Zhdmljb25zLzIwMjEtMDUtMTAvOGIxNDNhYjgwODhkMjBlZThkYmUzOTFhN2NkNmQ3NmQuaWNvLnBuZ9msgG0AAAAASUVORK5CYII=
588
+ `;function zl(e,t){d.useEffect(()=>{if(document){document.title=`${e} - FireCMS`;let o=document.querySelector("link[rel~='icon']");o||(o=document.createElement("link"),o.rel="icon",document.getElementsByTagName("head")[0].appendChild(o)),o.href=t??Ol}},[e,t])}function Bi(e){const{path:t,collections:o=[],currentFullPath:a}=e,n=me(t).split("/"),i=Dt(n),s=[];for(let c=0;c<i.length;c++){const l=i[c],u=o&&o.find(m=>m.id===l||m.path===l);if(u){const m=u.id??u.path,h=a&&a.length>0?a+"/"+m:m,f=me(me(t).replace(l,"")),A=f.length>0?f.split("/"):[];if(A.length>0){const g=A[0],b=h+"/"+g;if(s.push(new mr(g,h)),A.length>1){const y=A.slice(1).join("/");if(!u)throw Error("collection not found resolving path: "+u);u.subcollections&&s.push(...Bi({path:y,collections:u.subcollections,currentFullPath:b}))}}break}}return s}const Vl="/",Gl="/c";function Yl(e){const{basePath:t=Vl,baseCollectionPath:o=Gl,authController:a,collections:n,collectionPermissions:i,views:s,adminViews:c,viewsOrder:l,userConfigPersistence:u,dataSourceDelegate:m,injectCollections:h}=e,f=d.useRef(),[A,g]=d.useState(),[b,y]=d.useState(),[k,v]=d.useState(),[_,E]=d.useState(!1),[C,B]=d.useState(void 0),[x,S]=d.useState(!0),[F,Q]=d.useState(void 0),P=me(t),T=me(o),O=P?`/${P}`:"/",R=P?`/${P}/${T}`:`/${T}`,L=d.useCallback(M=>P?`/${P}/${ar(M)}`:`/${ar(M)}`,[P]),j=d.useCallback(M=>`${me(o)}/${ar(M)}`,[o]),W=d.useCallback((M,N,z,X)=>{let $=[...(M??[]).map(I=>I.hideFromNavigation?void 0:{url:j(I.id??I.path),type:"collection",name:I.name.trim(),path:I.id??I.path,collection:I,description:I.description?.trim(),group:I.group?.trim()??"Views"}).filter(Boolean),...(N??[]).map(I=>I.hideFromNavigation?void 0:{url:L(Array.isArray(I.path)?I.path[0]:I.path),name:I.name.trim(),type:"view",path:I.path,view:I,description:I.description?.trim(),group:I.group?.trim()??"Views"}).filter(Boolean),...(z??[]).map(I=>I.hideFromNavigation?void 0:{url:L(Array.isArray(I.path)?I.path[0]:I.path),name:I.name.trim(),type:"admin",path:I.path,view:I,description:I.description?.trim(),group:"Admin"}).filter(Boolean)];X&&($=$.sort((I,K)=>{const le=X.indexOf(I.path),ne=X.indexOf(K.path);return le===-1&&ne===-1?0:le===-1?1:ne===-1?-1:le-ne}));const G=Object.values($).map(I=>I.group).filter(Boolean).filter((I,K,le)=>le.indexOf(I)===K);return{navigationEntries:$,groups:G}},[L,j]),D=d.useCallback(async()=>{if(!a.initialLoading){try{const[M=[],N,z=[]]=await Promise.all([Ll(n,i,a,m,h),Ii(s,a,m),Ii(c,a,m)]);(!q(f.current,M)||!q(b,N)||!q(k,z)||!q(C,W(M,N,z,l)))&&(f.current=M,g(M),y(N),v(z),B(W(M??[],N,z,l)))}catch(M){console.error(M),Q(M)}S(!1),E(!0)}},[n,i,a.user,a.initialLoading,s,c,W,h]);d.useEffect(()=>{D()},[D]);const H=d.useCallback((M,N,z=!1)=>{if(!A)return;const X=Qt(me(M),A),$=z?u?.getCollectionConfig(M):void 0,G=X?Qe(X,$):void 0;let I=G;if(G){const K=G.subcollections,le=G.callbacks,ne=G.permissions;I={...I,subcollections:I?.subcollections??K,callbacks:I?.callbacks??le,permissions:I?.permissions??ne}}if(I)return{...G,...I}},[t,o,A]),J=d.useCallback(M=>{let N=A;if(!N)throw Error("Collections have not been initialised yet");for(let z=0;z<M.length;z++){const X=M[z],$=N.find(G=>G.id===X||G.path===X);if(!$)return;if(N=$.subcollections,z===M.length-1)return $}},[A]),V=d.useCallback(M=>{let N=A;if(!N)throw Error("Collections have not been initialised yet");for(let z=0;z<M.length;z++){const X=M[z],$=N.find(G=>G.id===X);if(!$)return;if(N=$.subcollections,z===M.length-1)return $}},[A]),ae=d.useCallback(M=>me(M+"/").startsWith(me(R)+"/"),[R]),Z=d.useCallback(M=>{if(M.startsWith(R))return M.replace(R,"");throw Error("Expected path starting with "+R)},[R]),ee=d.useCallback(({path:M})=>`s/edit/${ar(M)}`,[]),oe=d.useCallback(M=>{if(!A)throw Error("Collections have not been initialised yet");return ur(M,A)},[A]),ie=d.useCallback(M=>Bi({path:M,collections:A}),[A]),de=d.useCallback(M=>{const z=M.split("/").filter(($,G)=>G%2===0);z.pop();const X=[];for(let $=1;$<=z.length;$++)X.push(z.slice(0,$));return X.map($=>J($)?.id).filter(Boolean)},[ie]),fe=d.useCallback(M=>{let N=A;const z=[];for(let X=0;X<M.length;X++){const $=M[X],G=N.find(I=>I.id===$);if(!G)throw Error(`Collection with id ${$} not found`);z.push(G.path),N=G.subcollections}return z},[V]);return{collections:A,views:b,adminViews:k,loading:!_||x,navigationLoadingError:F,homeUrl:O,basePath:t,baseCollectionPath:o,initialised:_,getCollection:H,getCollectionFromPaths:J,getCollectionFromIds:V,isUrlCollectionPath:ae,urlPathToDataPath:Z,buildUrlCollectionPath:j,buildUrlEditCollectionPath:ee,buildCMSUrlPath:L,resolveAliasesFrom:oe,topLevelNavigation:C,refreshNavigation:D,getParentReferencesFromPath:ie,getParentCollectionIds:de,convertIdsToPaths:fe}}function jl(e,t){return t?`${me(e)}/${me(t)}`:me(e)}function ar(e){return encodeURIComponent(me(e)).replaceAll("%2F","/").replaceAll("%23","#")}function Si(e,t){return e.filter(o=>o.permissions?kt(o,t,o.path,null)?.read!==!1:!0).map(o=>o.subcollections?{...o,subcollections:Si(o.subcollections,t)}:o)}async function Ll(e,t,o,a,n){let i=[];return typeof e=="function"?i=await e({user:o.user,authController:o,dataSource:a}):Array.isArray(e)&&(i=e),i=Oo(i,t),i=Si(i,o),n&&(i=n(i??[])),i}async function Ii(e,t,o){let a=[];return typeof e=="function"?a=await e({user:t.user,authController:t,dataSource:o}):Array.isArray(e)&&(a=e),a}function Ul(){const[e,t]=d.useState({}),o=d.useCallback(g=>{const b=localStorage.getItem(g);return b?JSON.parse(b):{}},[]),a=d.useCallback(g=>{const b=`collection_config::${Er(g)}`;return e[b]?e[b]:o(b)},[e,o]),n=d.useCallback((g,b)=>{const y=`collection_config::${Er(g)}`;localStorage.setItem(y,JSON.stringify(b)),t(k=>{const v=k[y],_=Qe(v??o(g),b);return Qe(k,_)})},[o]),[i,s]=d.useState([]),[c,l]=d.useState([]),[u,m]=d.useState([]);d.useEffect(()=>{s(localStorage.getItem("recently_visited_paths")?JSON.parse(localStorage.getItem("recently_visited_paths")):[]),l(localStorage.getItem("favourite_paths")?JSON.parse(localStorage.getItem("favourite_paths")):[]),m(localStorage.getItem("collapsed_groups")?JSON.parse(localStorage.getItem("collapsed_groups")):[])},[]);const h=d.useCallback(g=>{localStorage.setItem("recently_visited_paths",JSON.stringify(g)),s(g)},[]),f=d.useCallback(g=>{localStorage.setItem("favourite_paths",JSON.stringify(g)),l(g)},[]),A=d.useCallback(g=>{localStorage.setItem("collapsed_groups",JSON.stringify(g)),m(g)},[]);return{onCollectionModified:n,getCollectionConfig:a,recentlyVisitedPaths:i,setRecentlyVisitedPaths:h,favouritePaths:c,setFavouritePaths:f,collapsedGroups:u,setCollapsedGroups:A}}function ql(){const e=typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)"),o=(localStorage.getItem("prefers-dark-mode")!=null?localStorage.getItem("prefers-dark-mode")==="true":null)??e,[a,n]=d.useState(o?"dark":"light");d.useEffect(()=>{n(o?"dark":"light"),c(o?"dark":"light")},[o]);const i=d.useCallback(()=>{n("dark"),c("dark")},[e]),s=d.useCallback(()=>{n("light"),c("light")},[]),c=u=>{document.body.style.setProperty("color-scheme",u),document.documentElement.dataset.theme=u},l=d.useCallback(()=>{a==="light"?(e?localStorage.removeItem("prefers-dark-mode"):localStorage.setItem("prefers-dark-mode","true"),i()):(e?localStorage.setItem("prefers-dark-mode","false"):localStorage.removeItem("prefers-dark-mode"),s())},[a,e]);return{mode:a,setMode:n,toggleMode:l}}const ir="main_##Q$SC^#S6";function $l({path:e,entityId:t,selectedSubPath:o,copy:a,collection:n,parentCollectionIds:i,onValuesAreModified:s,formWidth:c,onUpdate:l,onClose:u}){n.customId&&n.formAutoSave&&console.warn(`The collection ${n.path} has customId and formAutoSave enabled. This is not supported and formAutoSave will be ignored`);const[m,h]=d.useState(!1),[f,A]=d.useState(void 0);Lt(f,()=>{f&&z({entityId:Z?.id,collection:n,path:e,values:f,closeAfterSave:!1})},!1,2e3);const g=ze(n),b=nr(),y=We(),k=Je(),v=te(),_=Ae(),E=$e(),[C,B]=d.useState(void 0),[x,S]=d.useState(a?"copy":t?"existing":"new"),F=d.useRef(void 0),Q=F.current,P=(n.subcollections??[]).filter(Y=>!Y.hideFromNavigation),T=P?.length??0,O=n.entityViews,R=O?.length??0,L=n.formAutoSave&&!n.customId,j=R>0||T>0,W=o??Cr(n?n.defaultSelectedView:void 0,{status:x,entityId:t}),D=d.useRef(W??ir),H=D.current===ir,{entity:J,dataLoading:V,dataLoadingError:ae}=Dr({path:e,entityId:t,collection:n,useCache:!1}),[Z,ee]=d.useState(J),[oe,ie]=d.useState(void 0);d.useEffect(()=>{J&&ee(J)},[J]),d.useEffect(()=>{if(x==="new")ie(!1);else{const Y=Z?Ir(n,E,e,Z??null):!1;Z&&ie(!Y)}},[E,Z,x]);const de=d.useCallback(Y=>{h(!1),k.open({type:"error",message:"Error before saving: "+Y?.message}),console.error(Y)},[k]),fe=d.useCallback(Y=>{h(!1),k.open({type:"error",message:"Error after saving (entity is saved): "+Y?.message}),console.error(Y)},[k]),M=(Y,Ee)=>{h(!1),L||k.open({type:"success",message:`${n.singularName??n.name}: Saved correctly`}),ee(Y),S("existing"),s(!1),l&&l({entity:Y}),Ee?(b.setBlocked(!1),b.close(!0),u?.()):x!=="existing"&&y.replace({path:e,entityId:Y.id,selectedSubPath:D.current,updateUrl:!0,collection:n})},N=d.useCallback(Y=>{h(!1),k.open({type:"error",message:"Error saving: "+Y?.message}),console.error("Error saving entity",e,t),console.error(Y)},[t,e,k]),z=({values:Y,previousValues:Ee,closeAfterSave:Be,entityId:Le,collection:It,path:Ft})=>{h(!0),Mr({path:Ft,entityId:Le,values:Y,previousValues:Ee,collection:It,status:x,dataSource:g,context:_,onSaveSuccess:U=>M(U,Be),onSaveFailure:N,onPreSaveHookError:de,onSaveSuccessHookError:fe}).then()},X=async({collection:Y,path:Ee,entityId:Be,values:Le,previousValues:It,closeAfterSave:Ft,autoSave:U})=>{x&&(U?A(Le):z({collection:Y,path:Ee,entityId:Be,values:Le,previousValues:It,closeAfterSave:Ft}))},$=O?O.map(Y=>kr(Y,v.entityViews)).filter(Boolean):[],G=O&&$.map((Y,Ee)=>{if(!Y||D.current!==Y.key)return null;const Be=Y.Builder;return Be?r.jsx("div",{className:p.cn(p.defaultBorderMixin,"relative flex-grow w-full h-full overflow-auto "),role:"tabpanel",children:r.jsx(re,{children:C&&r.jsx(Be,{collection:n,entity:Z,modifiedValues:Q??Z?.values,formContext:C})})},`custom_view_${Y.key}`):(console.error("customView.Builder is not defined"),null)}).filter(Boolean),I=V&&!Z||(!Z||oe===void 0)&&(x==="existing"||x==="copy"),K=I||m,le=P&&P.map((Y,Ee)=>{const Be=Y.id??Y.path,Le=Z?`${e}/${Z?.id}/${me(Be)}`:void 0;return D.current!==Be?null:r.jsxs("div",{className:"relative flex-grow h-full overflow-auto w-full",role:"tabpanel",children:[K&&r.jsx(er,{}),!I&&(Z&&Le?r.jsx(ho,{fullPath:Le,parentCollectionIds:[...i,n.id],isSubCollection:!0,...Y}):r.jsx("div",{className:"flex items-center justify-center w-full h-full p-3",children:r.jsx(p.Typography,{variant:"label",children:"You need to save your entity before adding additional collections"})}))]},`subcol_${Be}`)}).filter(Boolean),ne=d.useCallback(()=>{s(!1)},[]),he=Y=>{D.current=Y,y.replace({path:e,entityId:t,selectedSubPath:Y===ir?void 0:Y,updateUrl:!0,collection:n})},Me=d.useCallback(Y=>{F.current=Y},[]),Ge=d.useCallback(Y=>{k.open({type:"error",message:"Error updating id, check the console"})},[]),rt=d.useCallback(Y=>{ee(Ee=>Ee?{...Ee,id:Y}:void 0)},[]),Ne=Y=>{L||s(Y)};function ot(){const Y=v.plugins;let Ee=r.jsx(wi,{status:x,path:e,collection:n,onEntitySaveRequested:X,onDiscard:ne,onValuesChanged:Me,onModified:Ne,entity:Z,onIdChange:rt,onFormContextChange:B,hideId:n.hideIdFromForm,autoSave:L,onIdUpdateError:Ge});return Y&&Y.forEach(Be=>{Be.form?.provider&&(Ee=r.jsx(Be.form.provider.Component,{status:x,path:e,collection:n,onDiscard:ne,onValuesChanged:Me,onModified:Ne,entity:Z,context:_,formContext:C,...Be.form.provider.props,children:Ee}))}),r.jsx(re,{children:Ee})}const wo=oe===void 0?r.jsx(r.Fragment,{}):oe?r.jsxs(r.Fragment,{children:[r.jsx(p.Typography,{className:"mt-16 mb-8 mx-8",variant:"h4",children:n.singularName??n.name}),r.jsx($r,{className:"px-12",entity:Z,path:e,collection:n})]}):ot(),vo=P&&P.map(Y=>r.jsx(p.Tab,{className:"text-sm min-w-[140px]",value:Y.id,children:Y.name},`entity_detail_collection_tab_${Y.name}`)),ko=$.map(Y=>r.jsx(p.Tab,{className:"text-sm min-w-[140px]",value:Y.key,children:Y.name},`entity_detail_collection_tab_${Y.name}`));return r.jsx("div",{className:"flex flex-col h-full w-full transition-width duration-250 ease-in-out",children:r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:p.cn(p.defaultBorderMixin,"no-scrollbar border-b pl-2 pr-2 pt-1 flex items-end overflow-scroll bg-gray-50 dark:bg-gray-950"),children:[r.jsx("div",{className:"pb-1 self-center",children:r.jsx(p.IconButton,{onClick:()=>(u?.(),b.close(!1)),size:"large",children:r.jsx(p.CloseIcon,{})})}),r.jsx("div",{className:"flex-grow"}),I&&r.jsx("div",{className:"self-center",children:r.jsx(p.CircularProgress,{size:"small"})}),r.jsxs(p.Tabs,{value:D.current,onValueChange:Y=>{he(Y)},className:"pl-4 pr-4 pt-0",children:[r.jsx(p.Tab,{disabled:!j,value:ir,className:`${j?"":"hidden"} text-sm min-w-[140px]`,children:n.singularName??n.name}),ko,vo]})]}),r.jsxs("div",{className:"flex-grow h-full flex overflow-auto flex-row w-full ",style:{},children:[r.jsx("div",{role:"tabpanel",hidden:!H,id:`form_${e}`,className:" w-full",children:I?r.jsx(er,{}):wo}),G,le]})]})})}function Wl(e,t){const[o,a]=d.useState(),{navigator:n}=d.useContext(ge.UNSAFE_NavigationContext),i=ge.useNavigate(),s=()=>{a(void 0)},c=()=>{t(),a(void 0),i(-1)},l=d.useCallback(({action:u,location:m,retry:h})=>{switch(u){case"REPLACE":{h();return}case"POP":a(m)}},[]);return d.useEffect(()=>{if(!e||o||!("block"in n))return;const u=n.block(m=>{const h={...m,retry(){u(),m.retry()}};l(h)});return u},[n,l,e,o]),{navigationWasBlocked:!!o,handleCancel:s,handleOk:c}}function Jl({open:e,handleOk:t,handleCancel:o,body:a,title:n}){return r.jsxs(p.Dialog,{open:e,onOpenChange:i=>i?o():t(),children:[r.jsxs(p.DialogContent,{children:[r.jsx(p.Typography,{variant:"h6",children:n}),a,r.jsx(p.Typography,{children:"Are you sure you want to leave this page?"})]}),r.jsxs(p.DialogActions,{children:[r.jsx(p.Button,{variant:"text",onClick:o,autoFocus:!0,children:" Cancel "}),r.jsx(p.Button,{onClick:t,children:" Ok "})]})]})}const Fi=d.createContext({width:"",blocked:!1,setBlocked:e=>{},setBlockedNavigationMessage:e=>{},close:()=>{}}),nr=()=>d.useContext(Fi);function Hl(){const t=_t().sidePanels,o=[...t];return o.push(void 0),r.jsx(r.Fragment,{children:o.map((a,n)=>r.jsx(Zl,{panel:a,offsetPosition:t.length-n-1},`side_dialog_${n}`))})}function Zl({offsetPosition:e,panel:t}){const[o,a]=d.useState(!1),[n,i]=d.useState(!1),[s,c]=d.useState(),l=d.useRef(t?.width),u=l.current,m=_t(),{navigationWasBlocked:h,handleOk:f,handleCancel:A}=Wl(n&&!o,()=>i(!1));d.useEffect(()=>{t&&(l.current=t.width)},[t]);const g=()=>{i(!1),a(!1),m.close(),t?.onClose?.()},b=()=>{a(!1)},y=k=>{n&&!k?a(!0):(m.close(),t?.onClose?.())};return r.jsxs(Fi.Provider,{value:{blocked:n,setBlocked:i,setBlockedNavigationMessage:c,width:u,close:y},children:[r.jsxs(p.Sheet,{open:!!t,onOpenChange:k=>!k&&y(),children:[t&&r.jsx("div",{className:"transform max-w-[100vw] lg:max-w-[95vw] flex flex-col h-full transition-all duration-250 ease-in-out bg-white dark:bg-gray-900 ",style:{width:t.width,transform:`translateX(-${e*200}px)`},children:r.jsx(re,{children:t.component})}),!t&&r.jsx("div",{style:{width:u}})]}),r.jsx(Jl,{open:h||o,handleOk:o?g:f,handleCancel:o?b:A,body:s})]})}function Xl(e){const{blocked:t,setBlocked:o,setBlockedNavigationMessage:a}=nr(),n=ue(),i=d.useMemo(()=>n.getParentCollectionIds(e.path),[n,e.path]),s=d.useMemo(()=>{if(!e)return;let l=e.collection;const u=n.getCollection(e.path,e.entityId);if(u&&(l=u),!l)throw console.error("ERROR: No collection found in path `",e.path,"`. Entity id: ",e.entityId),Error("ERROR: No collection found in path `"+e.path+"`. Make sure you have defined a collection for this path in the root navigation.");return l},[n,e]);d.useEffect(()=>{function l(u){t&&s&&(u.preventDefault(),u.returnValue=`You have unsaved changes in this ${s.name}. Are you sure you want to leave this page?`)}return typeof window<"u"&&window.addEventListener("beforeunload",l),()=>{typeof window<"u"&&window.removeEventListener("beforeunload",l)}},[t,s]);const c=d.useCallback(l=>{o(l),a(l?r.jsxs(r.Fragment,{children:[" You have unsaved changes in this ",r.jsx("b",{children:s?.singularName??s?.name}),"."]}):void 0)},[s?.name,o,a]);return!e||!s?r.jsx("div",{className:"w-full"}):r.jsx(r.Fragment,{children:r.jsx(re,{children:r.jsx($l,{...e,formWidth:e.width,collection:s,parentCollectionIds:i,onValuesAreModified:c})})})}const Ni="new";function Kl(e,t){if(t)return Bn;const o=!e.selectedSubPath,a=typeof e.width=="number"?`${e.width}px`:e.width;return o?a??ta:`calc(${Sn} + ${a??ta})`}const Rl=(e,t)=>{const o=ge.useLocation(),a=d.useRef(!1),n=!De();d.useEffect(()=>{if(!e.loading&&!a.current){if(e.isUrlCollectionPath(o.pathname)){const l=o.hash===`#${Ni}`,u=e.urlPathToDataPath(o.pathname),m=ec(u,e.collections??[],l);for(let h=0;h<m.length;h++){const f=m[h];setTimeout(()=>{h===0?t.replace(sr(f,e,n)):t.open(sr(f,e,n))},1)}}a.current=!0}},[o,e,t,n]);const i=d.useCallback(()=>{t.close()},[t]),s=d.useCallback(l=>{if(l.copy&&!l.entityId)throw Error("If you want to copy an entity you need to provide an entityId");const u=Cr(l.collection?l.collection.defaultSelectedView:void 0,{status:l.copy?"copy":l.entityId?"existing":"new",entityId:l.entityId});t.open(sr({selectedSubPath:u,...l},e,n))},[t,e,n]),c=d.useCallback(l=>{if(l.copy&&!l.entityId)throw Error("If you want to copy an entity you need to provide an entityId");t.replace(sr(l,e,n))},[e,t,n]);return{close:i,open:s,replace:c}};function ec(e,t,o){const a=_r({path:e,collections:t}),n=[];let i="";for(let s=0;s<a.length;s++){const c=a[s];if(c.type==="collection"&&(i=c.path),s>0){const l=a[s-1];if(c.type==="entity")n.push({path:c.path,entityId:c.entityId,copy:!1});else if(c.type==="custom_view"){if(l.type==="entity"){const u=n[n.length-1];u&&(u.selectedSubPath=c.view.key)}}else if(c.type==="collection"&&l.type==="entity"){const u=n[n.length-1];u&&(u.selectedSubPath=c.collection.id??c.collection.path)}}}return o&&n.push({path:i,copy:!1}),n}const sr=(e,t,o)=>{const a=me(e.path),n=e.entityId?t.buildUrlCollectionPath(`${a}/${e.entityId}/${e.selectedSubPath||""}`):t.buildUrlCollectionPath(`${a}#${Ni}`),i=t.resolveAliasesFrom(e.path),s={...e,path:i};return{key:`${e.path}/${e.entityId}`,component:r.jsx(Xl,{...s}),urlPath:n,parentUrlPath:t.buildUrlCollectionPath(a),width:Kl(e,o),onClose:e.onClose}};function tc(){const e=ge.useLocation(),t=ge.useNavigate(),[o,a]=d.useState([]),n=d.useRef(o),i=d.useRef({}),s=d.useRef(0),c=h=>{n.current=h,a(h)};d.useEffect(()=>{const A=(e.state?.panels??[]).map(g=>i.current[g]).filter(g=>!!g);q(n.current.map(g=>g.key),A.map(g=>g.key))||c(A)},[e]);const l=d.useCallback(()=>{if(o.length===0)return;const h=o[o.length-1],f=[...o.slice(0,-1)];if(c(f),s.current>0)h.urlPath&&t(-1),s.current--;else if(h.parentUrlPath){const A=e.state?.base_location??e;t(h.parentUrlPath,{replace:!0,state:{base_location:A,panels:f.map(g=>g.key)}})}},[o,t,e]),u=d.useCallback(h=>{const f=Array.isArray(h)?h:[h];f.forEach(b=>{i.current[b.key]=b}),s.current=s.current+f.length;const A=e.state?.base_location??e,g=[...o,...f];c(g),f.forEach(b=>{b.urlPath&&t(b.urlPath,{state:{base_location:A,panels:g.map(y=>y.key)}})})},[e,t,o]),m=d.useCallback(h=>{const f=Array.isArray(h)?h:[h];f.forEach(b=>{i.current[b.key]=b});const A=e.state?.base_location??e,g=[...o.slice(0,-f.length),...f];c(g),f.forEach(b=>{b.urlPath&&t(b.urlPath,{replace:!0,state:{base_location:A,panels:g.map(y=>y.key)}})})},[e,t,o]);return{sidePanels:o,close:l,open:u,replace:m}}function rc(e){d.useEffect(()=>{if(!e)return;const t=Io[e];t&&(Bo.registerLocale(e,t),Bo.setDefaultLocale(e))},[e])}function oc({delegate:e,propertyConfigs:t,navigationController:o}){return{fetchCollection:d.useCallback(({path:a,collection:n,filter:i,limit:s,startAfter:c,searchString:l,orderBy:u,order:m})=>e.fetchCollection({path:a,filter:i,limit:s,startAfter:c,searchString:l,orderBy:u,order:m}),[e]),listenCollection:e.listenCollection?d.useCallback(({path:a,collection:n,filter:i,limit:s,startAfter:c,searchString:l,orderBy:u,order:m,onUpdate:h,onError:f})=>{const A=n??o.getCollection(a),g=!!A?.collectionGroup;if(!e.listenCollection)throw Error("useBuildDataSource delegate not initialised");return e.listenCollection({path:a,filter:i,limit:s,startAfter:c,searchString:l,orderBy:u,order:m,onUpdate:h,onError:f,isCollectionGroup:g,collection:A})},[e,o.getCollection]):void 0,fetchEntity:d.useCallback(({path:a,entityId:n})=>e.fetchEntity({path:a,entityId:n}),[e]),listenEntity:e.listenEntity?d.useCallback(({path:a,entityId:n,collection:i,onUpdate:s,onError:c})=>{if(!e.listenEntity)throw Error("useBuildDataSource delegate not initialised");return e.listenEntity({path:a,entityId:n,onUpdate:s,onError:c})},[e.listenEntity]):void 0,saveEntity:d.useCallback(({path:a,entityId:n,values:i,collection:s,status:c})=>{const l=s??o.getCollection(a),m=(l?Pe({collection:l,path:a,entityId:n,fields:t}):void 0)?.properties,h=bo(i,e.buildReference,e.buildGeoPoint,e.buildDate,e.buildDeleteFieldValue),f=m?Qo({inputValues:h,properties:m,status:c,timestampNowValue:e.currentTime(),setDateToMidnight:e.setDateToMidnight}):h;return e.saveEntity({path:a,entityId:n,values:f,status:c}).then(A=>({id:A.id,path:A.path,values:e.delegateToCMSModel(f)}))},[e.saveEntity,o.getCollection]),deleteEntity:d.useCallback(({entity:a})=>e.deleteEntity({entity:a}),[e.deleteEntity]),checkUniqueField:d.useCallback((a,n,i,s)=>e.checkUniqueField(a,n,i,s),[e.checkUniqueField]),generateEntityId:d.useCallback(a=>e.generateEntityId(a),[e.generateEntityId]),countEntities:e.countEntities?async({path:a,collection:n,filter:i,order:s,orderBy:c})=>e.countEntities({path:a,filter:i,orderBy:c,order:s,isCollectionGroup:!!n.collectionGroup}):void 0,isFilterCombinationValid:d.useCallback(({path:a,filterValues:n,sortBy:i})=>e.isFilterCombinationValid?e.isFilterCombinationValid({path:a,filterValues:n,sortBy:i}):!0,[e.isFilterCombinationValid])}}function bo(e,t,o,a,n){return e===void 0?n():e===null?null:Array.isArray(e)?e.map(i=>bo(i,t,o,a,n)):e.isEntityReference&&e.isEntityReference()?t(e):e instanceof Mt?o(e):e instanceof Date?a(e):e&&typeof e=="object"?Object.entries(e).map(([i,s])=>({[i]:bo(s,t,o,a,n)})).reduce((i,s)=>({...i,...s}),{}):e}function gc(e){return e}const ac="https://api-drplyi3b6q-ey.a.run.app";async function ic(e){const t=await e.getAuthToken();return fetch(ac+"/access_log",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Basic ${t}`},body:JSON.stringify({})}).then(async o=>o.json())}function nc(e){const[t,o]=d.useState(null),a=d.useRef(null);return d.useEffect(()=>{e.user&&e.user.uid!==a.current&&!e.initialLoading&&(ic(e).then(o),a.current=e.user.uid)},[e]),t}function sc(e){const t=Or(),{children:o,entityLinkBuilder:a,userConfigPersistence:n,dateTimeFormat:i,locale:s,authController:c,storageSource:l,dataSourceDelegate:u,plugins:m,onAnalyticsEvent:h,propertyConfigs:f,entityViews:A,components:g,navigationController:b}=e;rc(s);const y=oc({delegate:u,propertyConfigs:f,navigationController:b}),k=tc(),v=Rl(b,k),_=m?.some(S=>S.loading)??!1,E=c.initialLoading||b.loading||_,C={dateTimeFormat:i,locale:s,entityLinkBuilder:a,plugins:m,entityViews:A??[],propertyConfigs:f??{},components:g},B=d.useMemo(()=>({onAnalyticsEvent:h}),[]),x=nc(c);return b.navigationLoadingError?r.jsx(p.CenteredView,{maxWidth:"md",children:r.jsx(be,{title:"Error loading navigation",error:b.navigationLoadingError})}):c.authError?r.jsx(p.CenteredView,{maxWidth:"md",children:r.jsx(be,{title:"Error loading auth",error:c.authError})}):x?.blocked?r.jsxs(p.CenteredView,{maxWidth:"md",fullScreen:!0,children:[r.jsx(p.Typography,{variant:"h4",children:"Access blocked"}),r.jsxs(p.Typography,{children:["This app has been blocked. Please reach out at ",r.jsx("a",{href:"mailto:hello@firecms.co",children:"hello@firecms.co"})," for more information."]}),x?.message&&r.jsxs(p.Typography,{children:["Response from the server: ",x?.message]})]}):r.jsx(Tt.Provider,{value:t,children:r.jsx(da.Provider,{value:B,children:r.jsx(ca.Provider,{value:C,children:r.jsx(sa.Provider,{value:n,children:r.jsx(na.Provider,{value:l,children:r.jsx(ra.Provider,{value:y,children:r.jsx(pr.Provider,{value:c,children:r.jsx(aa.Provider,{value:k,children:r.jsx(ia.Provider,{value:v,children:r.jsx(oa.Provider,{value:b,children:r.jsx(In,{children:r.jsx(lc,{loading:E,children:o})})})})})})})})})})})})}function lc({loading:e,children:t}){const o=Ae(),a=te();let n=t({context:o,loading:e});const i=a.plugins;return!e&&i&&i.forEach(s=>{s.provider&&(n=r.jsx(s.provider.Component,{...s.provider.props,context:o,children:n}))}),r.jsx(r.Fragment,{children:n})}function Pi({hovered:e,drawerOpen:t,closeDrawer:o}){const a=pt(),n=ue(),i=e&&!t,s=De(),c=ge.useNavigate(),[l,u]=d.useState(!1);if(!n.topLevelNavigation)throw Error("Navigation not ready in Drawer");const{navigationEntries:m,groups:h}=n.topLevelNavigation,f=m.filter(y=>y.type==="admin")??[],A=h.filter(y=>y!=="Admin"),g=d.useCallback(y=>t?r.jsx("div",{className:"pt-8 pl-6 pr-8 pb-2 flex flex-row items-center",children:r.jsx(p.Typography,{variant:"caption",color:"secondary",className:"font-medium flex-grow line-clamp-1",children:y?y.toUpperCase():"Views".toUpperCase()})}):r.jsx("div",{className:"h-12 w-full"}),[t]),b=y=>{const k=y.type==="collection"?"drawer_navigate_to_collection":y.type==="view"?"drawer_navigate_to_view":"unmapped_event";a.onAnalyticsEvent?.(k,{url:y.url}),s||o()};return r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"flex-grow overflow-scroll no-scrollbar",children:A.map(y=>r.jsxs(d.Fragment,{children:[g(y),Object.values(m).filter(k=>k.group===y).map((k,v)=>r.jsx(Ti,{icon:r.jsx(Jt,{collectionOrView:k.collection??k.view}),tooltipsOpen:i,drawerOpen:t,onClick:()=>b(k),url:k.url,name:k.name},`navigation_${v}`))]},`drawer_group_${y}`))}),f.length>0&&r.jsx(p.Menu,{open:l,onOpenChange:u,trigger:r.jsxs(p.IconButton,{shape:"square",className:"m-4 text-gray-900 dark:text-white w-fit",children:[r.jsx(p.Tooltip,{title:"Admin",open:i,side:"right",sideOffset:28,children:r.jsx(p.MoreVertIcon,{})}),t&&r.jsx("div",{className:p.cn(t?"opacity-100":"opacity-0 hidden","mx-4 font-inherit text-inherit"),children:"ADMIN"})]}),children:f.map((y,k)=>r.jsxs(p.MenuItem,{onClick:v=>{v.preventDefault(),c(y.path)},children:[r.jsx(Jt,{collectionOrView:y.view}),y.name]},`navigation_${k}`))})]})}function Ti({name:e,icon:t,drawerOpen:o,tooltipsOpen:a,url:n,onClick:i}){const s=r.jsx("div",{className:"text-gray-600 dark:text-gray-500",children:t}),c=r.jsxs(ge.NavLink,{onClick:i,style:{width:o?"280px":"72px",transition:o?"width 150ms ease-in":void 0},className:({isActive:l})=>p.cn("rounded-r-xl truncate","hover:bg-slate-300 hover:bg-opacity-75 dark:hover:bg-gray-700 dark:hover:bg-opacity-75 text-gray-800 dark:text-gray-200 hover:text-gray-900 hover:dark:text-white","flex flex-row items-center mr-8",o?"pl-8 h-12":"pl-6 h-11","font-medium text-sm",l?"bg-slate-200 bg-opacity-75 dark:bg-gray-800":""),to:n,children:[s,r.jsx("div",{className:p.cn(o?"opacity-100":"opacity-0 hidden","ml-4 font-inherit text-inherit"),children:e.toUpperCase()})]});return r.jsx(p.Tooltip,{open:o?!1:a,side:"right",title:e,children:c})}const cc=280,dc=d.memo(function(t){const{children:o,name:a,logo:n,includeDrawer:i=!0,autoOpenDrawer:s,Drawer:c=Pi,drawerProps:l,FireCMSAppBar:u=Ci,fireCMSAppBarProps:m}=t,h=De(),[f,A]=d.useState(!1),[g,b]=d.useState(!1),y=d.useCallback(()=>b(!0),[]),k=d.useCallback(()=>b(!1),[]),v=d.useCallback(()=>{A(!1)},[]),_=f||!!(h&&s&&g);return r.jsxs("div",{className:"flex h-screen w-screen bg-gray-50 dark:bg-gray-900 text-gray-900 dark:text-white overflow-hidden",style:{paddingTop:"env(safe-area-inset-top)",paddingLeft:"env(safe-area-inset-left)",paddingRight:"env(safe-area-inset-right)",paddingBottom:"env(safe-area-inset-bottom)",height:"100dvh"},children:[r.jsx(u,{title:a,includeDrawer:i,drawerOpen:_,...m}),r.jsx(uc,{displayed:i,onMouseEnter:y,onMouseMove:y,onMouseLeave:k,open:_,logo:n,hovered:g,setDrawerOpen:A,children:i&&r.jsx(c,{hovered:g,drawerOpen:_,closeDrawer:v,...l})}),r.jsxs("main",{className:"flex flex-col flex-grow overflow-auto",children:[r.jsx(pc,{}),r.jsx("div",{className:p.cn(p.defaultBorderMixin,"flex-grow overflow-auto lg:m-0 lg:mx-4 lg:mb-4 lg:rounded-lg lg:border lg:border-solid m-0 mt-1"),children:r.jsx(re,{children:o})})]})]})},q),pc=()=>r.jsx("div",{className:"flex flex-col min-h-[68px]"});function uc(e){const t=ue(),o=e.displayed?e.open?cc:72:0,a=r.jsxs("div",{className:"relative h-full no-scrollbar overflow-y-auto overflow-x-hidden",style:{width:o,transition:"left 100ms cubic-bezier(0.4, 0, 0.6, 1) 0ms, opacity 100ms cubic-bezier(0.4, 0, 0.6, 1) 0ms, width 100ms cubic-bezier(0.4, 0, 0.6, 1) 0ms"},children:[!e.open&&e.displayed&&r.jsx(p.Tooltip,{title:"Open menu",side:"right",sideOffset:12,className:"fixed top-2 left-3 !bg-gray-50 dark:!bg-gray-900 rounded-full w-fit",children:r.jsx(p.IconButton,{color:"inherit","aria-label":"Open menu",className:"sticky top-2 left-3 ",onClick:()=>e.setDrawerOpen(!0),size:"large",children:r.jsx(p.MenuIcon,{})})}),r.jsxs("div",{className:"flex flex-col h-full",children:[r.jsx("div",{style:{transition:"padding 100ms cubic-bezier(0.4, 0, 0.6, 1) 0ms",padding:e.open?"32px 144px 0px 24px":"72px 16px 0px"},className:p.cn("cursor-pointer"),children:r.jsx(p.Tooltip,{title:"Home",sideOffset:20,side:"right",children:r.jsx(ge.Link,{to:t.basePath,children:e.logo?r.jsx("img",{src:e.logo,alt:"Logo",className:p.cn("max-w-full max-h-full",e.open??"w-[112px] h-[112px]")}):r.jsx(xi,{})})})}),e.children]})]});return De()?r.jsxs("div",{className:"relative",onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseLeave:e.onMouseLeave,style:{width:o,transition:"left 100ms cubic-bezier(0.4, 0, 0.6, 1) 0ms, opacity 100ms cubic-bezier(0.4, 0, 0.6, 1) 0ms, width 100ms cubic-bezier(0.4, 0, 0.6, 1) 0ms"},children:[a,r.jsx("div",{className:`absolute right-0 top-4 ${e.open?"opacity-100":"opacity-0 invisible"} transition-opacity duration-1000 ease-in-out`,children:r.jsx(p.IconButton,{"aria-label":"Close drawer",onClick:()=>e.setDrawerOpen(!1),children:r.jsx(p.ChevronLeftIcon,{})})})]}):e.displayed?r.jsxs(r.Fragment,{children:[r.jsx(p.IconButton,{color:"inherit","aria-label":"Open drawer",onClick:()=>e.setDrawerOpen(!0),size:"large",className:"absolute top-2 left-6",children:r.jsx(p.MenuIcon,{})}),r.jsx(p.Sheet,{side:"left",transparent:!0,open:e.open,onOpenChange:e.setDrawerOpen,children:a})]}):null}function Qi(e){return Object.keys(lr).includes(e)}const lr={text_field:{key:"text_field",name:"Text field",description:"Simple short text",Icon:p.ShortTextIcon,color:"#2d7ff9",property:{dataType:"string",Field:gt}},multiline:{key:"multiline",name:"Multiline",description:"Text with multiple lines",Icon:p.SubjectIcon,color:"#2d7ff9",property:{dataType:"string",multiline:!0,Field:gt}},markdown:{key:"markdown",name:"Markdown",description:"Text with advanced markdown syntax",Icon:p.FormatQuoteIcon,color:"#2d7ff9",property:{dataType:"string",markdown:!0,Field:fi}},url:{key:"url",name:"Url",description:"Text with URL validation",Icon:p.HttpIcon,color:"#154fb3",property:{dataType:"string",url:!0,Field:gt}},email:{key:"email",name:"Email",description:"Text with email validation",Icon:p.EmailIcon,color:"#154fb3",property:{dataType:"string",email:!0,Field:gt}},switch:{key:"switch",name:"Switch",description:"Boolean true or false field (or yes or no, 0 or 1...)",Icon:p.FlagIcon,color:"#20d9d2",property:{dataType:"boolean",Field:si}},select:{key:"select",name:"Select/enum",description:"Select one text value from within an enumeration",Icon:p.ListIcon,color:"#4223c9",property:{dataType:"string",enumValues:[],Field:no}},multi_select:{key:"multi_select",name:"Multi select",description:"Select multiple text values from within an enumeration",Icon:p.ListAltIcon,color:"#4223c9",property:{dataType:"array",of:{dataType:"string",enumValues:[]},Field:so}},number_input:{key:"number_input",name:"Number input",description:"Simple number field with validation",Icon:p.NumbersIcon,color:"#bec920",property:{dataType:"number",Field:gt}},number_select:{key:"number_select",name:"Number select",description:"Select a number value from within an enumeration",Icon:p.FormatListNumberedIcon,color:"#bec920",property:{dataType:"number",enumValues:[],Field:no}},multi_number_select:{key:"multi_number_select",name:"Multiple number select",description:"Select multiple number values from within an enumeration",Icon:p.FormatListNumberedIcon,color:"#bec920",property:{dataType:"array",of:{dataType:"number",enumValues:[]},Field:so}},file_upload:{key:"file_upload",name:"File upload",description:"Input for uploading single files",Icon:p.UploadFileIcon,color:"#f92d9a",property:{dataType:"string",storage:{storagePath:"{path}"},Field:lo}},multi_file_upload:{key:"multi_file_upload",name:"Multiple file upload",description:"Input for uploading multiple files",Icon:p.DriveFolderUploadIcon,color:"#f92d9a",property:{dataType:"array",of:{dataType:"string",storage:{storagePath:"{path}"}},Field:lo}},reference:{key:"reference",name:"Reference",description:"The value refers to a different collection",Icon:p.LinkIcon,color:"#ff0042",property:{dataType:"reference",Field:ci}},multi_references:{key:"multi_references",name:"Multiple references",description:"Multiple values that refer to a different collection",Icon:p.AddLinkIcon,color:"#ff0042",property:{dataType:"array",of:{dataType:"reference"},Field:ii}},date_time:{key:"date_time",name:"Date/time",description:"A date time select field",Icon:p.ScheduleIcon,color:"#8b46ff",property:{dataType:"date",Field:li}},group:{key:"group",name:"Group",description:"Group of multiple fields",Icon:p.BallotIcon,color:"#ff9408",property:{dataType:"map",properties:{},Field:di}},key_value:{key:"key_value",name:"Key-value",description:"Flexible field that allows the user to add multiple key-value pairs",Icon:p.BallotIcon,color:"#ff9408",property:{dataType:"map",keyValue:!0,Field:pi}},repeat:{key:"repeat",name:"Repeat/list",description:"A field that gets repeated multiple times (e.g. multiple text fields)",Icon:p.RepeatIcon,color:"#ff9408",property:{dataType:"array",of:{dataType:"string"},Field:ui}},custom_array:{key:"custom_array",name:"Custom array",description:"A field that saved its value as an array of custom objects",Icon:p.RepeatIcon,color:"#ff9408",property:{dataType:"array",of:[],Field:hi}},block:{key:"block",name:"Block",description:"A complex field that allows the user to compose different fields together, with a key->value format",Icon:p.ViewStreamIcon,color:"#ff9408",property:{dataType:"array",oneOf:{properties:{}},Field:mi}}};function Di(e){const t=cr(e);if(!t){console.error("No field id found for property",e);return}return lr[t]}function St(e,t){const o=yo(e),a=cr(e);if(!a){console.error("No field id found for property",e);return}const n=lr[a],i=o?t[o]:void 0;return Qe(n??{},i??{})}function cr(e){if(e.dataType==="string")return e.multiline?"multiline":e.markdown?"markdown":e.storage?"file_upload":e.url?"url":e.email?"email":e.enumValues?"select":"text_field";if(e.dataType==="number")return e.enumValues?"number_select":"number_input";if(e.dataType==="map"){if(e.keyValue)return"key_value";if(e.properties)return"group"}else if(e.dataType==="array"){const t=e.of;return e.oneOf?"block":Array.isArray(t)?"custom_array":we(t)?"repeat":t?.dataType==="string"&&t.enumValues?"multi_select":t?.dataType==="number"&&t.enumValues?"multi_number_select":t?.dataType==="string"&&t.storage?"multi_file_upload":t?.dataType==="reference"?"multi_references":"repeat"}else{if(e.dataType==="boolean")return"switch";if(e.dataType==="date")return"date_time";if(e.dataType==="reference")return"reference"}console.error("Unsupported field config mapping",e)}function yo(e){return e.propertyConfig?e.propertyConfig:cr(e)}const mc=d.memo(function({HomePage:t=oi,customRoutes:o}){const a=ge.useLocation(),n=ue();if(!n)return r.jsx(r.Fragment,{});const i=a.state,s=i&&i.base_location?i.base_location:a,c=[];n.views&&n.views.forEach(f=>{Array.isArray(f.path)?c.push(...f.path.map(A=>dr(A,f))):c.push(dr(f.path,f))}),n.adminViews&&n.adminViews.forEach(f=>{Array.isArray(f.path)?c.push(...f.path.map(A=>dr(A,f))):c.push(dr(f.path,f))});const u=[...n.collections??[]].sort((f,A)=>A.path.length-f.path.length).map(f=>{const A=n.buildUrlCollectionPath(f.id??f.path);return r.jsx(ge.Route,{path:A+"/*",element:r.jsx(re,{children:r.jsx(ho,{isSubCollection:!1,parentCollectionIds:[],fullPath:f.id??f.path,...f,Actions:rr(f.Actions)},`collection_view_${f.id??f.path}`)})},`navigation_${f.id??f.path}`)}),m=r.jsx(ge.Route,{path:"/",element:r.jsx(t,{})}),h=r.jsx(ge.Route,{path:"*",element:r.jsx(_i,{})});return r.jsxs(ge.Routes,{location:s,children:[u,c,m,h,o]})}),dr=(e,t)=>r.jsx(ge.Route,{path:e,element:t.view},"navigation_view_"+e);w.ArrayContainer=go,w.ArrayContainerItem=Ao,w.ArrayCustomShapedFieldBinding=hi,w.ArrayEnumPreview=Lr,w.ArrayItemOptions=Ei,w.ArrayOfMapsPreview=Kn,w.ArrayOfReferencesFieldBinding=ii,w.ArrayOfReferencesPreview=ka,w.ArrayOfStorageComponentsPreview=_a,w.ArrayOfStringsPreview=xa,w.ArrayOneOfPreview=Ca,w.ArrayPropertyEnumPreview=Ur,w.ArrayPropertyPreview=jr,w.AsyncPreviewComponent=Rn,w.AuthControllerContext=pr,w.BlockFieldBinding=mi,w.BooleanPreview=Sa,w.COLLECTION_PATH_SEPARATOR=Vo,w.CircularProgressCenter=er,w.DEFAULT_FIELD_CONFIGS=lr,w.DatePreview=Ba,w.DateTimeFieldBinding=li,w.DefaultHomePage=oi,w.DeleteConfirmationDialog=Fl,w.Drawer=Pi,w.DrawerNavigationItem=Ti,w.EmptyValue=Ke,w.EntityCollectionRowActions=Kt,w.EntityCollectionTable=eo,w.EntityCollectionView=ho,w.EntityCollectionViewActions=ai,w.EntityForm=wi,w.EntityReference=mr,w.EntityView=$r,w.EnumValuesChip=Se,w.ErrorBoundary=re,w.ErrorView=be,w.FieldCaption=Ml,w.FieldHelperText=xe,w.FireCMS=sc,w.FireCMSAppBar=Ci,w.FireCMSLogo=xi,w.FormikArrayContainer=or,w.GeoPoint=Mt,w.IconForView=Jt,w.ImagePreview=ga,w.KeyValueFieldBinding=pi,w.KeyValuePreview=qr,w.LabelWithIcon=Ce,w.MapFieldBinding=di,w.MapPropertyPreview=Ea,w.MarkdownFieldBinding=fi,w.ModeControllerContext=Tt,w.ModeControllerProvider=Ji,w.MultiSelectBinding=so,w.NavigationCard=ei,w.NavigationCardBinding=ri,w.NavigationGroup=ao,w.NavigationRoutes=mc,w.NotFoundPage=_i,w.NumberPropertyPreview=Ia,w.PropertyConfigBadge=Il,w.PropertyFieldBinding=tt,w.PropertyPreview=ye,w.PropertyTableCell=Ga,w.ReadOnlyFieldBinding=co,w.ReferenceFieldBinding=ci,w.ReferencePreview=Ve,w.ReferenceSelectionTable=Ra,w.ReferenceWidget=Tl,w.RepeatFieldBinding=ui,w.Scaffold=dc,w.SearchIconsView=Dl,w.SelectFieldBinding=no,w.SelectableTable=Xa,w.SideDialogs=Hl,w.SkeletonPropertyComponent=Re,w.SmallNavigationCard=ti,w.SnackbarProvider=$i,w.StorageThumbnail=Aa,w.StorageThumbnailInternal=ya,w.StorageUploadFieldBinding=lo,w.StringPropertyPreview=Yr,w.SwitchFieldBinding=si,w.TextFieldBinding=gt,w.UrlComponentPreview=Ct,w.VirtualTable=$a,w.addInitialSlash=Hi,w.applyPermissionsFunctionIfEmpty=Oo,w.buildAdditionalFieldDelegate=xn,w.buildCollection=An,w.buildEntityCallbacks=_n,w.buildEnumLabel=Mo,w.buildEnumValueConfig=kn,w.buildEnumValues=vn,w.buildFieldConfig=Cn,w.buildIdColumn=Ns,w.buildProperties=yn,w.buildPropertiesOrBuilder=wn,w.buildProperty=bn,w.canCreateEntity=lt,w.canDeleteEntity=$t,w.canEditEntity=Ir,w.defaultDateFormat=zo,w.deleteEntityWithCallbacks=pa,w.enumToObjectEntries=Ue,w.flattenObject=Pr,w.fullPathToCollectionSegments=Br,w.getArrayValuesCount=Wo,w.getBracketNotation=un,w.getCollectionByPathOrId=Qt,w.getCollectionPathsCombinations=Dt,w.getColorForProperty=pn,w.getColorScheme=Do,w.getColumnKeysForProperty=Rt,w.getDefaultFieldConfig=Di,w.getDefaultFieldId=cr,w.getDefaultPropertiesOrder=mn,w.getDefaultValueFor=Vt,w.getDefaultValueForDataType=br,w.getDefaultValuesFor=vt,w.getEntityImagePreviewPropertyKey=$o,w.getEntityPreviewKeys=qo,w.getEntityTitlePropertyKey=Nr,w.getFieldConfig=St,w.getFieldId=yo,w.getHashValue=hr,w.getIcon=Uo,w.getIconForProperty=ve,w.getIconForWidget=Ut,w.getIdIcon=dn,w.getLabelOrConfigFrom=Yt,w.getLastSegment=Zi,w.getPropertiesWithPropertiesOrder=Lo,w.getPropertyInPath=Xe,w.getRandomId=Bt,w.getReferenceFrom=Ye,w.getResolvedPropertyInPath=Sr,w.getSidePanelKey=jl,w.getValueInPath=Oe,w.hydrateRegExp=Yo,w.icon_synonyms=Fr,w.iconsSearch=Wt,w.isDefaultFieldConfigId=Qi,w.isEmptyObject=Ar,w.isEnumValueDisabled=Ri,w.isHidden=wt,w.isObject=Ot,w.isPropertyBuilder=we,w.isReadOnly=nt,w.isReferenceProperty=jo,w.isValidRegExp=cn,w.joinCollectionLists=Zo,w.makePropertiesEditable=Jo,w.makePropertiesNonEditable=Ho,w.mergeCollection=Xo,w.mergeDeep=Qe,w.pick=Po,w.plural=hn,w.propertiesToColumns=Ua,w.randomColor=nn,w.randomString=st,w.removeFunctions=fr,w.removeInPath=Xi,w.removeInitialAndTrailingSlashes=me,w.removeInitialSlash=Fo,w.removePropsIfExisting=To,w.removeTrailingSlash=No,w.removeUndefined=gr,w.renderSkeletonCaptionText=qn,w.renderSkeletonIcon=Gr,w.renderSkeletonImageThumbnail=Vr,w.renderSkeletonText=je,w.resolveArrayProperty=qe,w.resolveCollection=Pe,w.resolveCollectionPathIds=ur,w.resolveDefaultSelectedView=Cr,w.resolveEntityView=kr,w.resolveEnumValues=en,w.resolveNavigationFrom=ua,w.resolvePermissions=kt,w.resolveProperties=wr,w.resolveProperty=Fe,w.resolvePropertyEnum=vr,w.sanitizeData=Ki,w.saveEntityWithCallbacks=Mr,w.segmentsToStrippedPath=Go,w.serializeRegExp=ln,w.singular=gn,w.slugify=jt,w.sortProperties=xr,w.stripCollectionPath=Er,w.toKebabCase=rn,w.toSnakeCase=an,w.traverseValueProperty=Gt,w.traverseValuesProperties=yr,w.unslugify=sn,w.updateDateAutoValues=Qo,w.useAuthController=$e,w.useBrowserTitleAndIcon=zl,w.useBuildLocalConfigurationPersistence=Ul,w.useBuildModeController=ql,w.useBuildNavigationController=Yl,w.useClearRestoreValue=Te,w.useClipboard=ma,w.useCollectionFetch=Nn,w.useColumnIds=Xr,w.useCustomizationController=te,w.useDataSource=ze,w.useDataSourceEntityCollectionTableController=to,w.useDebouncedCallback=Lt,w.useDebouncedData=Ka,w.useEntityFetch=Dr,w.useFireCMSContext=Ae,w.useLargeLayout=De,w.useModeController=Or,w.useNavigationController=ue,w.useReferenceDialog=At,w.useResolvedNavigationFrom=Pn,w.useSelectionController=ro,w.useSideDialogContext=nr,w.useSideDialogsController=_t,w.useSideEntityController=We,w.useSnackbarController=Je,w.useStorageSource=ct,w.useTableSearchHelper=oo,w.useTraceUpdate=En,Object.defineProperty(w,Symbol.toStringTag,{value:"Module"})});
589
589
  //# sourceMappingURL=index.umd.js.map