@limetech/lime-crm-building-blocks 1.93.2 → 1.94.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/cjs/lime-crm-building-blocks.cjs.js +1 -1
  3. package/dist/cjs/limebb-feed-timeline-item.cjs.entry.js +1 -1
  4. package/dist/cjs/limebb-lime-query-builder.cjs.entry.js +705 -0
  5. package/dist/cjs/limebb-live-docs-info.cjs.entry.js +2 -2
  6. package/dist/cjs/limebb-locale-picker.cjs.entry.js +1 -1
  7. package/dist/cjs/limebb-mention-group-counter.cjs.entry.js +2 -2
  8. package/dist/cjs/limebb-navigation-button_2.cjs.entry.js +3 -3
  9. package/dist/cjs/limebb-notification-item.cjs.entry.js +1 -1
  10. package/dist/cjs/limebb-percentage-visualizer.cjs.entry.js +2 -2
  11. package/dist/cjs/limebb-text-editor.cjs.entry.js +1 -1
  12. package/dist/cjs/limebb-trend-indicator.cjs.entry.js +1 -1
  13. package/dist/cjs/loader.cjs.js +1 -1
  14. package/dist/collection/collection-manifest.json +1 -0
  15. package/dist/collection/components/feed/feed-item/feed-timeline-item.css +1 -1
  16. package/dist/collection/components/lime-query-builder/filter-conversion.js +158 -0
  17. package/dist/collection/components/lime-query-builder/lime-query-builder.css +110 -0
  18. package/dist/collection/components/lime-query-builder/lime-query-builder.js +248 -0
  19. package/dist/collection/components/lime-query-builder/lime-query-validation.js +379 -0
  20. package/dist/collection/components/lime-query-builder/lime-query.types.js +57 -0
  21. package/dist/collection/components/lime-query-builder/property-resolution.js +61 -0
  22. package/dist/collection/components/lime-query-builder/property-types.js +27 -0
  23. package/dist/collection/components/limeobject/file-viewer/live-docs-info.js +2 -2
  24. package/dist/collection/components/locale-picker/locale-picker.js +1 -1
  25. package/dist/collection/components/notification-list/notification-item/notification-item.js +1 -1
  26. package/dist/collection/components/percentage-visualizer/percentage-visualizer.js +2 -2
  27. package/dist/collection/components/summary-popover/summary-popover.js +3 -3
  28. package/dist/collection/components/text-editor/mention-group-counter.js +2 -2
  29. package/dist/collection/components/text-editor/text-editor.js +1 -1
  30. package/dist/collection/components/trend-indicator/trend-indicator.js +1 -1
  31. package/dist/collection/util/limetype.js +38 -0
  32. package/dist/components/feed-timeline-item.js +1 -1
  33. package/dist/components/limebb-lime-query-builder.d.ts +11 -0
  34. package/dist/components/limebb-lime-query-builder.js +727 -0
  35. package/dist/components/limebb-locale-picker.js +1 -1
  36. package/dist/components/limebb-mention-group-counter.js +2 -2
  37. package/dist/components/limebb-percentage-visualizer.js +2 -2
  38. package/dist/components/limebb-text-editor.js +1 -1
  39. package/dist/components/limebb-trend-indicator.js +1 -1
  40. package/dist/components/live-docs-info.js +2 -2
  41. package/dist/components/notification-item.js +1 -1
  42. package/dist/components/summary-popover.js +3 -3
  43. package/dist/esm/lime-crm-building-blocks.js +1 -1
  44. package/dist/esm/limebb-feed-timeline-item.entry.js +1 -1
  45. package/dist/esm/limebb-lime-query-builder.entry.js +701 -0
  46. package/dist/esm/limebb-live-docs-info.entry.js +2 -2
  47. package/dist/esm/limebb-locale-picker.entry.js +1 -1
  48. package/dist/esm/limebb-mention-group-counter.entry.js +2 -2
  49. package/dist/esm/limebb-navigation-button_2.entry.js +3 -3
  50. package/dist/esm/limebb-notification-item.entry.js +1 -1
  51. package/dist/esm/limebb-percentage-visualizer.entry.js +2 -2
  52. package/dist/esm/limebb-text-editor.entry.js +1 -1
  53. package/dist/esm/limebb-trend-indicator.entry.js +1 -1
  54. package/dist/esm/loader.js +1 -1
  55. package/dist/lime-crm-building-blocks/lime-crm-building-blocks.esm.js +1 -1
  56. package/dist/lime-crm-building-blocks/{p-e3c0183c.entry.js → p-047c89de.entry.js} +1 -1
  57. package/dist/lime-crm-building-blocks/{p-efc9d455.entry.js → p-29346b1a.entry.js} +1 -1
  58. package/dist/lime-crm-building-blocks/p-4ccce5cc.entry.js +1 -0
  59. package/dist/lime-crm-building-blocks/{p-8274ea5c.entry.js → p-7db8652e.entry.js} +1 -1
  60. package/dist/lime-crm-building-blocks/{p-98c63d2d.entry.js → p-7ef3bace.entry.js} +1 -1
  61. package/dist/lime-crm-building-blocks/{p-5f336ee9.entry.js → p-85e11ff7.entry.js} +1 -1
  62. package/dist/lime-crm-building-blocks/{p-df6ff5d6.entry.js → p-8ef39ab8.entry.js} +1 -1
  63. package/dist/lime-crm-building-blocks/{p-aac46e3c.entry.js → p-abf1c197.entry.js} +1 -1
  64. package/dist/lime-crm-building-blocks/{p-c56f158d.entry.js → p-cc1abcd7.entry.js} +1 -1
  65. package/dist/lime-crm-building-blocks/{p-5821e0c8.entry.js → p-d6a07ea4.entry.js} +1 -1
  66. package/dist/types/components/lime-query-builder/filter-conversion.d.ts +13 -0
  67. package/dist/types/components/lime-query-builder/lime-query-builder.d.ts +57 -0
  68. package/dist/types/components/lime-query-builder/lime-query-validation.d.ts +58 -0
  69. package/dist/types/components/lime-query-builder/lime-query.types.d.ts +140 -0
  70. package/dist/types/components/lime-query-builder/property-resolution.d.ts +17 -0
  71. package/dist/types/components/lime-query-builder/property-types.d.ts +4 -0
  72. package/dist/types/components.d.ts +122 -0
  73. package/dist/types/util/feature-switches.d.ts +1 -0
  74. package/dist/types/util/limetype.d.ts +17 -0
  75. package/package.json +3 -3
@@ -9,8 +9,8 @@ const LiveDocsInfo = class {
9
9
  }
10
10
  render() {
11
11
  return [
12
- h("div", { key: 'c9f2a93f053062a3c3c02c2e3653f9d3240a1dd8', class: "header" }, h("limel-icon", { key: 'cee77268f6abf4dee77fdc6e3ba49477ad24d3a6', name: "not_showing_video_frames" }), h("h2", { key: '05034620f48cbeb2195238e4e63e20ef46d1ffb5' }, "Viewing this file type requires ", h("em", { key: 'b556aeb0136a0252682fb54af461d1e779ea6060' }, "Live Docs"))),
13
- h("p", { key: '3833b1b024525c143a6c03619fcf37e308ac7409' }, h("em", { key: '9cd6242503906d79305a03a67326c756697615cb' }, "Live Docs"), " not only enables you to view many file formats such as Microsoft Office documents, but it also empowers you to edit them right in the CRM. No need to download anything on your device!", h("a", { key: '8c95828f4b111d62c9629cfed54d099bc60eb159', target: "_blank", href: "https://www.lime-technologies.com/en/lime-crm/live-docs/" }, "Learn more")),
12
+ h("div", { key: 'afca6783253565c24917f26fa037d47555cc79ee', class: "header" }, h("limel-icon", { key: 'e3119195e169a5c1b5534985d92537f4bd71036c', name: "not_showing_video_frames" }), h("h2", { key: 'a00ac4d1cccf23e00975d0f95f423b3179170d1f' }, "Viewing this file type requires ", h("em", { key: 'cd66615d34d92b74943d0d87c796ac5d14f3f314' }, "Live Docs"))),
13
+ h("p", { key: '39d0f82f29ec687cfd209b9c32c36b3be08b23aa' }, h("em", { key: 'aea7387f90684dc1571434530708971800a09d49' }, "Live Docs"), " not only enables you to view many file formats such as Microsoft Office documents, but it also empowers you to edit them right in the CRM. No need to download anything on your device!", h("a", { key: 'a254ad58b3d56386bae9e3ef4113b8d6c70a236e', target: "_blank", href: "https://www.lime-technologies.com/en/lime-crm/live-docs/" }, "Learn more")),
14
14
  ];
15
15
  }
16
16
  };
@@ -1614,7 +1614,7 @@ const LocalePicker = class {
1614
1614
  const value = this.value;
1615
1615
  selectedOptions = options.find((option) => option.value === value);
1616
1616
  }
1617
- return (h("limel-select", { key: '8796010a6c1c7413d6e7ea8b6db963d82717c1c6', value: selectedOptions, options: sortBy$1(options, 'text'), helperText: this.helperText, label: this.label, required: this.required, disabled: this.disabled, readonly: this.readonly, onChange: this.handleChange, multiple: this.multipleChoice }));
1617
+ return (h("limel-select", { key: '54389312bd8cae7d92626c67a45bd2455f2a956f', value: selectedOptions, options: sortBy$1(options, 'text'), helperText: this.helperText, label: this.label, required: this.required, disabled: this.disabled, readonly: this.readonly, onChange: this.handleChange, multiple: this.multipleChoice }));
1618
1618
  }
1619
1619
  };
1620
1620
 
@@ -11,8 +11,8 @@ const MentionGroupCounter = class {
11
11
  render() {
12
12
  const label = this.getLabel();
13
13
  return [
14
- h("span", { key: '298e2c1a6917dd732e96875ac0fc45eb05120cef', id: this.tooltipId }, label),
15
- h("limel-tooltip", { key: '836b49c9627198f232f0a3f07a74be3f3ea260d7', elementId: this.tooltipId, label: label, helperLabel: this.helperLabel }),
14
+ h("span", { key: '22b685ed5902c71153903f165e9d6098518aaf92', id: this.tooltipId }, label),
15
+ h("limel-tooltip", { key: '18f8f6f5b28f322151e53253263ca86e62e0cc0a', elementId: this.tooltipId, label: label, helperLabel: this.helperLabel }),
16
16
  ];
17
17
  }
18
18
  getLabel() {
@@ -120,14 +120,14 @@ const SummaryPopover = class {
120
120
  top: '0.125rem',
121
121
  right: '0.125rem',
122
122
  };
123
- return (h("limel-popover", { key: '126d39c5b55b3b0c363d0f8ef832c77928815a1b', style: {
123
+ return (h("limel-popover", { key: '61b0f5899c7d7a72f924bdfeb029ecce66e7cc9b', style: {
124
124
  '--limebb-summary-popover-timeout': `${this.triggerDelay}ms`,
125
- }, open: this.isPopoverOpen, onClose: this.onPopoverClose, openDirection: this.openDirection }, h("div", { key: '45ce61d635aed881f3e1cd3a59f3b224820030f1', slot: "trigger", tabIndex: 0, onMouseEnter: this.openPopoverWithDelay, onMouseLeave: this.resetTimeout, onFocus: this.openPopoverWithDelay }, h("slot", { key: '750536b95b4e44f7e05fd2e418d52928c6a4b7c3', name: "trigger" }), h("div", { key: '8eb3a32ec5a03a145b1b1b447a9d8d4a35b44572', class: "opening-countdown-indicator" })), h("limel-card", { key: '5011cf53fd7e41f3401a7de5271b9a988bf6368d', style: {
125
+ }, open: this.isPopoverOpen, onClose: this.onPopoverClose, openDirection: this.openDirection }, h("div", { key: '3f21df09b18083e568eab2e77f5ea5c58bcbfcad', slot: "trigger", tabIndex: 0, onMouseEnter: this.openPopoverWithDelay, onMouseLeave: this.resetTimeout, onFocus: this.openPopoverWithDelay }, h("slot", { key: '4f51bda5be27a848a69b57c9798865668cec6a44', name: "trigger" }), h("div", { key: '2b801e9ad42a9823efd7736b062a0fd70a7d6698', class: "opening-countdown-indicator" })), h("limel-card", { key: 'c964d35c5671c73a42f5202f51226ccac634eff8', style: {
126
126
  'max-width': this.popoverMaxWidth,
127
127
  'max-height': this.popoverMaxHeight,
128
128
  'min-width': '7rem',
129
129
  'min-height': '3rem',
130
- }, orientation: "landscape", heading: this.heading, subheading: this.subheading, icon: this.icon, value: this.value, image: this.image, actions: this.actions, onActionSelected: this.handleSelected }, h("limebb-navigation-button", { key: '35cd8a0d34214cccb5ca2bb722e23c72c78fa7b9', slot: "component", type: "close", style: closeButtonStyle, tooltipLabel: "Close", tooltipHelperLabel: "Esc", onClick: this.handleCloseClick }))));
130
+ }, orientation: "landscape", heading: this.heading, subheading: this.subheading, icon: this.icon, value: this.value, image: this.image, actions: this.actions, onActionSelected: this.handleSelected }, h("limebb-navigation-button", { key: '3a55e6e6d8bf15284fe826d7065ebd61304d8248', slot: "component", type: "close", style: closeButtonStyle, tooltipLabel: "Close", tooltipHelperLabel: "Esc", onClick: this.handleCloseClick }))));
131
131
  }
132
132
  };
133
133
  SummaryPopover.currentOpenPopover = null;
@@ -56,7 +56,7 @@ const NotificationListItem = class {
56
56
  }
57
57
  render() {
58
58
  var _a, _b;
59
- return (h(Host, { key: 'd02a619aeed66ab5c79556f858e5603ef153a850', id: this.item.id, class: {
59
+ return (h(Host, { key: 'db6570da8224ed4be6e67b0c876f67a74dd226b7', id: this.item.id, class: {
60
60
  'is-clickable': this.isItemClickable(),
61
61
  'is-read': !!((_a = this.item) === null || _a === void 0 ? void 0 : _a.read),
62
62
  'is-selected': !!((_b = this.item) === null || _b === void 0 ? void 0 : _b.selected),
@@ -74,11 +74,11 @@ const PercentageVisualizer = class {
74
74
  render() {
75
75
  const normalizedValue = this.getNormalizedValue();
76
76
  const zeroPoint = this.getZeroPointPosition();
77
- return (h(Host, { key: 'ad5e9cdb104ade1dfa71497ff3b6aac94d91c2f6', class: this.getContainerClassList(), style: {
77
+ return (h(Host, { key: 'b9876aea271ead3ed18a7fdc59d652b541aed30a', class: this.getContainerClassList(), style: {
78
78
  '--limebb-percentage-visualizer-zero-point-position': `${zeroPoint}%`,
79
79
  '--limebb-percentage-visualizer-width': `${Math.abs(normalizedValue)}%`,
80
80
  '--limebb-percentage-visualizer-rotate': `${normalizedValue >= 0 ? '0deg' : '180deg'}`,
81
- } }, h("limel-notched-outline", { key: '68e10eee563dff4c4142906820b041f3f42f41e9', tabIndex: 0, role: "meter", "aria-valuemin": this.rangeMin, "aria-valuemax": this.rangeMax, "aria-valuenow": this.numValue, "aria-labelledby": this.labelId, "aria-describedby": this.helperTextId, label: this.label, labelId: this.labelId, invalid: this.invalid, required: this.required, hasValue: true, hasFloatingLabel: true, "aria-controls": this.helperTextId }, h("div", { key: 'ecb1cfbd1b90442fe0aa34cf727ab7666a6908e6', slot: "content" }, this.renderVisualization())), this.renderHelperLine()));
81
+ } }, h("limel-notched-outline", { key: '64bea0a1e95c001494e8ecee42b6061c6d6c007c', tabIndex: 0, role: "meter", "aria-valuemin": this.rangeMin, "aria-valuemax": this.rangeMax, "aria-valuenow": this.numValue, "aria-labelledby": this.labelId, "aria-describedby": this.helperTextId, label: this.label, labelId: this.labelId, invalid: this.invalid, required: this.required, hasValue: true, hasFloatingLabel: true, "aria-controls": this.helperTextId }, h("div", { key: 'd1dc81b554828d9998ad6c1567c49c56a005b547', slot: "content" }, this.renderVisualization())), this.renderHelperLine()));
82
82
  }
83
83
  renderVisualization() {
84
84
  if (this.reducePresence && (this.numValue === 0 || !this.hasValue())) {
@@ -1831,7 +1831,7 @@ const LimeBBTextEditor = class {
1831
1831
  }
1832
1832
  render() {
1833
1833
  return [
1834
- h("limel-text-editor", { key: '260e595d9d833230601d45dfade2dd101ad220d2', ref: (el) => (this.textEditor = el), tabindex: this.disabled ? -1 : 0, value: this.value, contentType: this.contentType, customElements: this.registeredCustomElements, "aria-disabled": this.disabled, language: this.language, triggers: this.registeredTriggers, onTriggerStart: this.handleTriggerStart, onTriggerStop: this.handleTriggerStop, onTriggerChange: this.handleTriggerChange, onImagePasted: this.handleImagePasted, onMetadataChange: this.handleMetadataChange, ui: this.ui, allowResize: this.allowResize, required: this.required, disabled: this.disabled, readonly: this.readonly, helperText: this.helperText, placeholder: this.placeholder, label: this.label, invalid: this.invalid }),
1834
+ h("limel-text-editor", { key: 'f2f48910b31ecf37bc6e41245f3e6e6a70b87695', ref: (el) => (this.textEditor = el), tabindex: this.disabled ? -1 : 0, value: this.value, contentType: this.contentType, customElements: this.registeredCustomElements, "aria-disabled": this.disabled, language: this.language, triggers: this.registeredTriggers, onTriggerStart: this.handleTriggerStart, onTriggerStop: this.handleTriggerStop, onTriggerChange: this.handleTriggerChange, onImagePasted: this.handleImagePasted, onMetadataChange: this.handleMetadataChange, ui: this.ui, allowResize: this.allowResize, required: this.required, disabled: this.disabled, readonly: this.readonly, helperText: this.helperText, placeholder: this.placeholder, label: this.label, invalid: this.invalid }),
1835
1835
  this.renderPicker(),
1836
1836
  ];
1837
1837
  }
@@ -35,7 +35,7 @@ const TrendIndicator = class {
35
35
  this.numValue = this.parseValue(this.value);
36
36
  }
37
37
  render() {
38
- return (h(Host, { key: '50c4e69d2b6f010418e8a53e6510e22ab14ad1de', class: this.getContainerClassList() }, h("limel-notched-outline", { key: 'f2dc52dcb1bf2af327965e6fd9cd13dde2c542b5', id: this.tooltipId, label: this.label, labelId: this.labelId, invalid: this.invalid, required: this.required, hasValue: true, hasFloatingLabel: true, "aria-labelledby": this.labelId, "aria-describedby": this.helperTextId, "aria-controls": this.helperTextId }, h("div", { key: '41049706a85d38c99877a8e790f8323a9bd23c1e', slot: "content", tabIndex: 0 }, this.renderVisualization())), this.renderHelperLine(), this.renderTooltip()));
38
+ return (h(Host, { key: 'e3f051b38577e06c5b31fe18558747e9476ca7bd', class: this.getContainerClassList() }, h("limel-notched-outline", { key: '2d7eed12e714dcbdd4d7fa366c7ab5079d0e0c79', id: this.tooltipId, label: this.label, labelId: this.labelId, invalid: this.invalid, required: this.required, hasValue: true, hasFloatingLabel: true, "aria-labelledby": this.labelId, "aria-describedby": this.helperTextId, "aria-controls": this.helperTextId }, h("div", { key: '13f6acd297b66716dca8581d99fb129fb1dec035', slot: "content", tabIndex: 0 }, this.renderVisualization())), this.renderHelperLine(), this.renderTooltip()));
39
39
  }
40
40
  renderVisualization() {
41
41
  if (this.reducePresence && (this.numValue === 0 || !this.hasValue())) {
@@ -5,7 +5,7 @@ import { g as globalScripts } from './app-globals-0f993ce5.js';
5
5
  const defineCustomElements = async (win, options) => {
6
6
  if (typeof window === 'undefined') return undefined;
7
7
  await globalScripts();
8
- return bootstrapLazy([["limebb-feed",[[1,"limebb-feed",{"platform":[16],"context":[16],"items":[16],"emptyStateMessage":[1,"empty-state-message"],"heading":[1],"loading":[4],"minutesOfProximity":[2,"minutes-of-proximity"],"totalCount":[2,"total-count"],"direction":[513],"lastVisitedTimestamp":[1,"last-visited-timestamp"],"highlightedItemId":[8,"highlighted-item-id"]},null,{"highlightedItemId":["highlightedItemIdChanged"]}]]],["limebb-kanban",[[1,"limebb-kanban",{"platform":[16],"context":[16],"groups":[16]}]]],["limebb-chat-list",[[1,"limebb-chat-list",{"platform":[16],"context":[16],"items":[16],"loading":[516],"isTypingIndicatorVisible":[516,"is-typing-indicator-visible"],"lastVisitedTimestamp":[513,"last-visited-timestamp"],"order":[513]},null,{"items":["handleItemsChange"]}]]],["limebb-limeobject-file-viewer",[[1,"limebb-limeobject-file-viewer",{"platform":[16],"context":[16],"property":[1],"fileTypes":[16],"limeobject":[32],"limetype":[32]}]]],["limebb-text-editor",[[1,"limebb-text-editor",{"platform":[16],"context":[16],"allowMentioning":[4,"allow-mentioning"],"contentType":[1,"content-type"],"language":[513],"disabled":[516],"readonly":[516],"helperText":[513,"helper-text"],"placeholder":[513],"label":[513],"invalid":[516],"required":[516],"selectedContext":[16],"ui":[513],"allowResize":[4,"allow-resize"],"value":[1],"draftIdentifier":[1,"draft-identifier"],"triggerMap":[16],"customElements":[16],"allowInlineImages":[4,"allow-inline-images"],"items":[32],"highlightedItemIndex":[32],"editorPickerQuery":[32],"searchableLimetypes":[32],"isPickerOpen":[32],"isSearching":[32]},null,{"isPickerOpen":["watchOpen"],"editorPickerQuery":["watchQuery"]}]]],["limebb-date-range",[[1,"limebb-date-range",{"platform":[16],"context":[16],"startTime":[16],"endTime":[16],"startTimeLabel":[1,"start-time-label"],"endTimeLabel":[1,"end-time-label"],"language":[1],"timeFormat":[1,"time-format"],"type":[1]}]]],["limebb-info-tile-currency-format",[[1,"limebb-info-tile-currency-format",{"platform":[16],"context":[16],"value":[16]}]]],["limebb-notification-list",[[1,"limebb-notification-list",{"platform":[16],"context":[16],"items":[16],"loading":[4],"lastVisitedTimestamp":[1,"last-visited-timestamp"]},null,{"items":["handleItemsChange"]}]]],["limebb-browser",[[17,"limebb-browser",{"platform":[16],"context":[16],"items":[16],"layout":[1],"filter":[32]}]]],["limebb-component-config",[[1,"limebb-component-config",{"platform":[16],"context":[16],"value":[16],"required":[4],"readonly":[4],"disabled":[4],"label":[1],"helperText":[1,"helper-text"],"formInfo":[16],"type":[1],"nameField":[1,"name-field"],"configComponent":[32],"configViewType":[32]},null,{"formInfo":["watchFormInfo"],"configComponent":["watchconfigComponent"]}]]],["limebb-component-picker",[[1,"limebb-component-picker",{"platform":[16],"context":[16],"type":[1],"tags":[16],"value":[1],"copyLabel":[1,"copy-label"],"hideCopyButton":[4,"hide-copy-button"],"required":[4],"readonly":[4],"disabled":[4],"label":[1],"helperText":[1,"helper-text"]}]]],["limebb-dashboard-widget",[[1,"limebb-dashboard-widget",{"heading":[513],"subheading":[513],"supportingText":[513,"supporting-text"],"icon":[513]}]]],["limebb-icon-picker",[[1,"limebb-icon-picker",{"value":[1],"required":[4],"readonly":[4],"invalid":[4],"disabled":[4],"label":[1],"helperText":[1,"helper-text"]}]]],["limebb-info-tile",[[1,"limebb-info-tile",{"platform":[16],"context":[16],"filterId":[513,"filter-id"],"disabled":[4],"icon":[513],"label":[1],"prefix":[1],"suffix":[1],"propertyName":[1,"property-name"],"aggregateOperator":[1,"aggregate-operator"],"format":[16],"config":[32],"filters":[32],"value":[32],"loading":[32],"error":[32]},null,{"filterId":["watchFilterId"],"propertyName":["watchPropertyName"],"aggregateOperator":["watchAggregateOperator"]}]]],["limebb-info-tile-date-format",[[1,"limebb-info-tile-date-format",{"value":[16]}]]],["limebb-info-tile-decimal-format",[[1,"limebb-info-tile-decimal-format",{"value":[16]}]]],["limebb-info-tile-format",[[1,"limebb-info-tile-format",{"platform":[16],"context":[16],"type":[1],"value":[16]}]]],["limebb-info-tile-relative-date-format",[[1,"limebb-info-tile-relative-date-format",{"value":[16]}]]],["limebb-info-tile-unit-format",[[1,"limebb-info-tile-unit-format",{"value":[16]}]]],["limebb-loader",[[1,"limebb-loader",{"platform":[16],"context":[16]}]]],["limebb-locale-picker",[[1,"limebb-locale-picker",{"platform":[16],"context":[16],"value":[1],"required":[4],"disabled":[4],"label":[1],"helperText":[1,"helper-text"],"readonly":[4],"multipleChoice":[4,"multiple-choice"],"allLanguages":[32]}]]],["limebb-mention",[[1,"limebb-mention",{"limetype":[1],"objectid":[2],"limeobject":[32]}]]],["limebb-mention-group-counter",[[1,"limebb-mention-group-counter",{"count":[2],"limetype":[16],"helperLabel":[1,"helper-label"]}]]],["limebb-percentage-visualizer",[[1,"limebb-percentage-visualizer",{"platform":[16],"context":[16],"value":[520],"rangeMax":[514,"range-max"],"rangeMin":[514,"range-min"],"multiplier":[514],"label":[513],"invalid":[516],"required":[516],"helperText":[513,"helper-text"],"reducePresence":[516,"reduce-presence"],"displayPercentageColors":[516,"display-percentage-colors"]},null,{"value":["valueChanged"]}]]],["limebb-trend-indicator",[[1,"limebb-trend-indicator",{"platform":[16],"context":[16],"value":[520],"formerValue":[514,"former-value"],"suffix":[513],"label":[513],"invalid":[516],"required":[516],"helperText":[513,"helper-text"],"reducePresence":[516,"reduce-presence"]},null,{"value":["valueChanged"]}]]],["limebb-feed-item-thumbnail-file-info",[[1,"limebb-feed-item-thumbnail-file-info",{"description":[1]}]]],["limebb-navigation-button_2",[[1,"limebb-summary-popover",{"triggerDelay":[514,"trigger-delay"],"heading":[513],"subheading":[513],"image":[16],"icon":[513],"value":[1],"openDirection":[513,"open-direction"],"popoverMaxWidth":[513,"popover-max-width"],"popoverMaxHeight":[513,"popover-max-height"],"actions":[16],"isPopoverOpen":[32]}],[17,"limebb-navigation-button",{"href":[513],"tooltipLabel":[513,"tooltip-label"],"tooltipHelperLabel":[513,"tooltip-helper-label"],"type":[513]}]]],["limebb-feed-timeline-item",[[1,"limebb-feed-timeline-item",{"platform":[16],"context":[16],"item":[16],"ui":[513],"helperText":[1,"helper-text"],"hasError":[516,"has-error"],"isBundled":[516,"is-bundled"],"headingCanExpand":[32],"isHeadingExpanded":[32],"showMore":[32],"isTall":[32]}]]],["limebb-kanban-group",[[1,"limebb-kanban-group",{"platform":[16],"context":[16],"identifier":[1],"heading":[513],"help":[1],"items":[16],"summary":[1],"loading":[516],"totalCount":[514,"total-count"]}]]],["limebb-text-editor-picker",[[1,"limebb-text-editor-picker",{"items":[16],"open":[516],"isSearching":[4,"is-searching"],"emptyMessage":[1,"empty-message"]},null,{"open":["watchOpen"]}]]],["limebb-currency-picker",[[1,"limebb-currency-picker",{"platform":[16],"context":[16],"label":[513],"currencies":[16],"helperText":[513,"helper-text"],"required":[516],"readonly":[516],"invalid":[516],"disabled":[516],"value":[1]}]]],["limebb-date-picker",[[1,"limebb-date-picker",{"platform":[16],"context":[16],"disabled":[516],"readonly":[516],"invalid":[516],"label":[513],"placeholder":[513],"helperText":[513,"helper-text"],"required":[516],"value":[1],"type":[513]}]]],["limebb-live-docs-info",[[1,"limebb-live-docs-info"]]],["limebb-notification-item",[[1,"limebb-notification-item",{"platform":[16],"context":[16],"item":[16]}]]],["limebb-kanban-item",[[1,"limebb-kanban-item",{"platform":[16],"context":[16],"item":[16]}]]],["limebb-chat-item_2",[[1,"limebb-chat-item",{"platform":[16],"context":[16],"item":[16],"helperText":[1,"helper-text"],"hasError":[516,"has-error"]}],[1,"limebb-typing-indicator"]]],["limebb-empty-state",[[1,"limebb-empty-state",{"heading":[513],"value":[513],"icon":[16]}]]]], options);
8
+ return bootstrapLazy([["limebb-feed",[[1,"limebb-feed",{"platform":[16],"context":[16],"items":[16],"emptyStateMessage":[1,"empty-state-message"],"heading":[1],"loading":[4],"minutesOfProximity":[2,"minutes-of-proximity"],"totalCount":[2,"total-count"],"direction":[513],"lastVisitedTimestamp":[1,"last-visited-timestamp"],"highlightedItemId":[8,"highlighted-item-id"]},null,{"highlightedItemId":["highlightedItemIdChanged"]}]]],["limebb-kanban",[[1,"limebb-kanban",{"platform":[16],"context":[16],"groups":[16]}]]],["limebb-chat-list",[[1,"limebb-chat-list",{"platform":[16],"context":[16],"items":[16],"loading":[516],"isTypingIndicatorVisible":[516,"is-typing-indicator-visible"],"lastVisitedTimestamp":[513,"last-visited-timestamp"],"order":[513]},null,{"items":["handleItemsChange"]}]]],["limebb-limeobject-file-viewer",[[1,"limebb-limeobject-file-viewer",{"platform":[16],"context":[16],"property":[1],"fileTypes":[16],"limeobject":[32],"limetype":[32]}]]],["limebb-text-editor",[[1,"limebb-text-editor",{"platform":[16],"context":[16],"allowMentioning":[4,"allow-mentioning"],"contentType":[1,"content-type"],"language":[513],"disabled":[516],"readonly":[516],"helperText":[513,"helper-text"],"placeholder":[513],"label":[513],"invalid":[516],"required":[516],"selectedContext":[16],"ui":[513],"allowResize":[4,"allow-resize"],"value":[1],"draftIdentifier":[1,"draft-identifier"],"triggerMap":[16],"customElements":[16],"allowInlineImages":[4,"allow-inline-images"],"items":[32],"highlightedItemIndex":[32],"editorPickerQuery":[32],"searchableLimetypes":[32],"isPickerOpen":[32],"isSearching":[32]},null,{"isPickerOpen":["watchOpen"],"editorPickerQuery":["watchQuery"]}]]],["limebb-date-range",[[1,"limebb-date-range",{"platform":[16],"context":[16],"startTime":[16],"endTime":[16],"startTimeLabel":[1,"start-time-label"],"endTimeLabel":[1,"end-time-label"],"language":[1],"timeFormat":[1,"time-format"],"type":[1]}]]],["limebb-info-tile-currency-format",[[1,"limebb-info-tile-currency-format",{"platform":[16],"context":[16],"value":[16]}]]],["limebb-notification-list",[[1,"limebb-notification-list",{"platform":[16],"context":[16],"items":[16],"loading":[4],"lastVisitedTimestamp":[1,"last-visited-timestamp"]},null,{"items":["handleItemsChange"]}]]],["limebb-browser",[[17,"limebb-browser",{"platform":[16],"context":[16],"items":[16],"layout":[1],"filter":[32]}]]],["limebb-component-config",[[1,"limebb-component-config",{"platform":[16],"context":[16],"value":[16],"required":[4],"readonly":[4],"disabled":[4],"label":[1],"helperText":[1,"helper-text"],"formInfo":[16],"type":[1],"nameField":[1,"name-field"],"configComponent":[32],"configViewType":[32]},null,{"formInfo":["watchFormInfo"],"configComponent":["watchconfigComponent"]}]]],["limebb-component-picker",[[1,"limebb-component-picker",{"platform":[16],"context":[16],"type":[1],"tags":[16],"value":[1],"copyLabel":[1,"copy-label"],"hideCopyButton":[4,"hide-copy-button"],"required":[4],"readonly":[4],"disabled":[4],"label":[1],"helperText":[1,"helper-text"]}]]],["limebb-dashboard-widget",[[1,"limebb-dashboard-widget",{"heading":[513],"subheading":[513],"supportingText":[513,"supporting-text"],"icon":[513]}]]],["limebb-icon-picker",[[1,"limebb-icon-picker",{"value":[1],"required":[4],"readonly":[4],"invalid":[4],"disabled":[4],"label":[1],"helperText":[1,"helper-text"]}]]],["limebb-info-tile",[[1,"limebb-info-tile",{"platform":[16],"context":[16],"filterId":[513,"filter-id"],"disabled":[4],"icon":[513],"label":[1],"prefix":[1],"suffix":[1],"propertyName":[1,"property-name"],"aggregateOperator":[1,"aggregate-operator"],"format":[16],"config":[32],"filters":[32],"value":[32],"loading":[32],"error":[32]},null,{"filterId":["watchFilterId"],"propertyName":["watchPropertyName"],"aggregateOperator":["watchAggregateOperator"]}]]],["limebb-info-tile-date-format",[[1,"limebb-info-tile-date-format",{"value":[16]}]]],["limebb-info-tile-decimal-format",[[1,"limebb-info-tile-decimal-format",{"value":[16]}]]],["limebb-info-tile-format",[[1,"limebb-info-tile-format",{"platform":[16],"context":[16],"type":[1],"value":[16]}]]],["limebb-info-tile-relative-date-format",[[1,"limebb-info-tile-relative-date-format",{"value":[16]}]]],["limebb-info-tile-unit-format",[[1,"limebb-info-tile-unit-format",{"value":[16]}]]],["limebb-lime-query-builder",[[1,"limebb-lime-query-builder",{"platform":[16],"context":[16],"value":[16],"label":[1],"limetypes":[32],"mode":[32],"codeValue":[32]}]]],["limebb-loader",[[1,"limebb-loader",{"platform":[16],"context":[16]}]]],["limebb-locale-picker",[[1,"limebb-locale-picker",{"platform":[16],"context":[16],"value":[1],"required":[4],"disabled":[4],"label":[1],"helperText":[1,"helper-text"],"readonly":[4],"multipleChoice":[4,"multiple-choice"],"allLanguages":[32]}]]],["limebb-mention",[[1,"limebb-mention",{"limetype":[1],"objectid":[2],"limeobject":[32]}]]],["limebb-mention-group-counter",[[1,"limebb-mention-group-counter",{"count":[2],"limetype":[16],"helperLabel":[1,"helper-label"]}]]],["limebb-percentage-visualizer",[[1,"limebb-percentage-visualizer",{"platform":[16],"context":[16],"value":[520],"rangeMax":[514,"range-max"],"rangeMin":[514,"range-min"],"multiplier":[514],"label":[513],"invalid":[516],"required":[516],"helperText":[513,"helper-text"],"reducePresence":[516,"reduce-presence"],"displayPercentageColors":[516,"display-percentage-colors"]},null,{"value":["valueChanged"]}]]],["limebb-trend-indicator",[[1,"limebb-trend-indicator",{"platform":[16],"context":[16],"value":[520],"formerValue":[514,"former-value"],"suffix":[513],"label":[513],"invalid":[516],"required":[516],"helperText":[513,"helper-text"],"reducePresence":[516,"reduce-presence"]},null,{"value":["valueChanged"]}]]],["limebb-navigation-button_2",[[1,"limebb-summary-popover",{"triggerDelay":[514,"trigger-delay"],"heading":[513],"subheading":[513],"image":[16],"icon":[513],"value":[1],"openDirection":[513,"open-direction"],"popoverMaxWidth":[513,"popover-max-width"],"popoverMaxHeight":[513,"popover-max-height"],"actions":[16],"isPopoverOpen":[32]}],[17,"limebb-navigation-button",{"href":[513],"tooltipLabel":[513,"tooltip-label"],"tooltipHelperLabel":[513,"tooltip-helper-label"],"type":[513]}]]],["limebb-kanban-item",[[1,"limebb-kanban-item",{"platform":[16],"context":[16],"item":[16]}]]],["limebb-feed-item-thumbnail-file-info",[[1,"limebb-feed-item-thumbnail-file-info",{"description":[1]}]]],["limebb-feed-timeline-item",[[1,"limebb-feed-timeline-item",{"platform":[16],"context":[16],"item":[16],"ui":[513],"helperText":[1,"helper-text"],"hasError":[516,"has-error"],"isBundled":[516,"is-bundled"],"headingCanExpand":[32],"isHeadingExpanded":[32],"showMore":[32],"isTall":[32]}]]],["limebb-kanban-group",[[1,"limebb-kanban-group",{"platform":[16],"context":[16],"identifier":[1],"heading":[513],"help":[1],"items":[16],"summary":[1],"loading":[516],"totalCount":[514,"total-count"]}]]],["limebb-text-editor-picker",[[1,"limebb-text-editor-picker",{"items":[16],"open":[516],"isSearching":[4,"is-searching"],"emptyMessage":[1,"empty-message"]},null,{"open":["watchOpen"]}]]],["limebb-currency-picker",[[1,"limebb-currency-picker",{"platform":[16],"context":[16],"label":[513],"currencies":[16],"helperText":[513,"helper-text"],"required":[516],"readonly":[516],"invalid":[516],"disabled":[516],"value":[1]}]]],["limebb-date-picker",[[1,"limebb-date-picker",{"platform":[16],"context":[16],"disabled":[516],"readonly":[516],"invalid":[516],"label":[513],"placeholder":[513],"helperText":[513,"helper-text"],"required":[516],"value":[1],"type":[513]}]]],["limebb-live-docs-info",[[1,"limebb-live-docs-info"]]],["limebb-notification-item",[[1,"limebb-notification-item",{"platform":[16],"context":[16],"item":[16]}]]],["limebb-chat-item_2",[[1,"limebb-chat-item",{"platform":[16],"context":[16],"item":[16],"helperText":[1,"helper-text"],"hasError":[516,"has-error"]}],[1,"limebb-typing-indicator"]]],["limebb-empty-state",[[1,"limebb-empty-state",{"heading":[513],"value":[513],"icon":[16]}]]]], options);
9
9
  };
10
10
 
11
11
  export { defineCustomElements };
@@ -1 +1 @@
1
- import{p as e,b as t}from"./p-1556b545.js";export{s as setNonce}from"./p-1556b545.js";import{g as i}from"./p-e1255160.js";(()=>{const t=import.meta.url,i={};return""!==t&&(i.resourcesUrl=new URL(".",t).href),e(i)})().then((async e=>(await i(),t([["p-a694aae5",[[1,"limebb-feed",{platform:[16],context:[16],items:[16],emptyStateMessage:[1,"empty-state-message"],heading:[1],loading:[4],minutesOfProximity:[2,"minutes-of-proximity"],totalCount:[2,"total-count"],direction:[513],lastVisitedTimestamp:[1,"last-visited-timestamp"],highlightedItemId:[8,"highlighted-item-id"]},null,{highlightedItemId:["highlightedItemIdChanged"]}]]],["p-3a406a20",[[1,"limebb-kanban",{platform:[16],context:[16],groups:[16]}]]],["p-8c8b7115",[[1,"limebb-chat-list",{platform:[16],context:[16],items:[16],loading:[516],isTypingIndicatorVisible:[516,"is-typing-indicator-visible"],lastVisitedTimestamp:[513,"last-visited-timestamp"],order:[513]},null,{items:["handleItemsChange"]}]]],["p-a1818969",[[1,"limebb-limeobject-file-viewer",{platform:[16],context:[16],property:[1],fileTypes:[16],limeobject:[32],limetype:[32]}]]],["p-efc9d455",[[1,"limebb-text-editor",{platform:[16],context:[16],allowMentioning:[4,"allow-mentioning"],contentType:[1,"content-type"],language:[513],disabled:[516],readonly:[516],helperText:[513,"helper-text"],placeholder:[513],label:[513],invalid:[516],required:[516],selectedContext:[16],ui:[513],allowResize:[4,"allow-resize"],value:[1],draftIdentifier:[1,"draft-identifier"],triggerMap:[16],customElements:[16],allowInlineImages:[4,"allow-inline-images"],items:[32],highlightedItemIndex:[32],editorPickerQuery:[32],searchableLimetypes:[32],isPickerOpen:[32],isSearching:[32]},null,{isPickerOpen:["watchOpen"],editorPickerQuery:["watchQuery"]}]]],["p-8491aaa1",[[1,"limebb-date-range",{platform:[16],context:[16],startTime:[16],endTime:[16],startTimeLabel:[1,"start-time-label"],endTimeLabel:[1,"end-time-label"],language:[1],timeFormat:[1,"time-format"],type:[1]}]]],["p-568b7520",[[1,"limebb-info-tile-currency-format",{platform:[16],context:[16],value:[16]}]]],["p-d4016891",[[1,"limebb-notification-list",{platform:[16],context:[16],items:[16],loading:[4],lastVisitedTimestamp:[1,"last-visited-timestamp"]},null,{items:["handleItemsChange"]}]]],["p-5e4ba110",[[17,"limebb-browser",{platform:[16],context:[16],items:[16],layout:[1],filter:[32]}]]],["p-92ec9205",[[1,"limebb-component-config",{platform:[16],context:[16],value:[16],required:[4],readonly:[4],disabled:[4],label:[1],helperText:[1,"helper-text"],formInfo:[16],type:[1],nameField:[1,"name-field"],configComponent:[32],configViewType:[32]},null,{formInfo:["watchFormInfo"],configComponent:["watchconfigComponent"]}]]],["p-42e52b50",[[1,"limebb-component-picker",{platform:[16],context:[16],type:[1],tags:[16],value:[1],copyLabel:[1,"copy-label"],hideCopyButton:[4,"hide-copy-button"],required:[4],readonly:[4],disabled:[4],label:[1],helperText:[1,"helper-text"]}]]],["p-10ac8b3e",[[1,"limebb-dashboard-widget",{heading:[513],subheading:[513],supportingText:[513,"supporting-text"],icon:[513]}]]],["p-46d2f604",[[1,"limebb-icon-picker",{value:[1],required:[4],readonly:[4],invalid:[4],disabled:[4],label:[1],helperText:[1,"helper-text"]}]]],["p-16199127",[[1,"limebb-info-tile",{platform:[16],context:[16],filterId:[513,"filter-id"],disabled:[4],icon:[513],label:[1],prefix:[1],suffix:[1],propertyName:[1,"property-name"],aggregateOperator:[1,"aggregate-operator"],format:[16],config:[32],filters:[32],value:[32],loading:[32],error:[32]},null,{filterId:["watchFilterId"],propertyName:["watchPropertyName"],aggregateOperator:["watchAggregateOperator"]}]]],["p-01cff04f",[[1,"limebb-info-tile-date-format",{value:[16]}]]],["p-4caa8bbe",[[1,"limebb-info-tile-decimal-format",{value:[16]}]]],["p-d6af09a8",[[1,"limebb-info-tile-format",{platform:[16],context:[16],type:[1],value:[16]}]]],["p-25e1a434",[[1,"limebb-info-tile-relative-date-format",{value:[16]}]]],["p-6c56121c",[[1,"limebb-info-tile-unit-format",{value:[16]}]]],["p-2aa18c2b",[[1,"limebb-loader",{platform:[16],context:[16]}]]],["p-98c63d2d",[[1,"limebb-locale-picker",{platform:[16],context:[16],value:[1],required:[4],disabled:[4],label:[1],helperText:[1,"helper-text"],readonly:[4],multipleChoice:[4,"multiple-choice"],allLanguages:[32]}]]],["p-3a620226",[[1,"limebb-mention",{limetype:[1],objectid:[2],limeobject:[32]}]]],["p-5821e0c8",[[1,"limebb-mention-group-counter",{count:[2],limetype:[16],helperLabel:[1,"helper-label"]}]]],["p-df6ff5d6",[[1,"limebb-percentage-visualizer",{platform:[16],context:[16],value:[520],rangeMax:[514,"range-max"],rangeMin:[514,"range-min"],multiplier:[514],label:[513],invalid:[516],required:[516],helperText:[513,"helper-text"],reducePresence:[516,"reduce-presence"],displayPercentageColors:[516,"display-percentage-colors"]},null,{value:["valueChanged"]}]]],["p-aac46e3c",[[1,"limebb-trend-indicator",{platform:[16],context:[16],value:[520],formerValue:[514,"former-value"],suffix:[513],label:[513],invalid:[516],required:[516],helperText:[513,"helper-text"],reducePresence:[516,"reduce-presence"]},null,{value:["valueChanged"]}]]],["p-a44f543c",[[1,"limebb-feed-item-thumbnail-file-info",{description:[1]}]]],["p-5f336ee9",[[1,"limebb-summary-popover",{triggerDelay:[514,"trigger-delay"],heading:[513],subheading:[513],image:[16],icon:[513],value:[1],openDirection:[513,"open-direction"],popoverMaxWidth:[513,"popover-max-width"],popoverMaxHeight:[513,"popover-max-height"],actions:[16],isPopoverOpen:[32]}],[17,"limebb-navigation-button",{href:[513],tooltipLabel:[513,"tooltip-label"],tooltipHelperLabel:[513,"tooltip-helper-label"],type:[513]}]]],["p-c56f158d",[[1,"limebb-feed-timeline-item",{platform:[16],context:[16],item:[16],ui:[513],helperText:[1,"helper-text"],hasError:[516,"has-error"],isBundled:[516,"is-bundled"],headingCanExpand:[32],isHeadingExpanded:[32],showMore:[32],isTall:[32]}]]],["p-88cc5b66",[[1,"limebb-kanban-group",{platform:[16],context:[16],identifier:[1],heading:[513],help:[1],items:[16],summary:[1],loading:[516],totalCount:[514,"total-count"]}]]],["p-218b7f38",[[1,"limebb-text-editor-picker",{items:[16],open:[516],isSearching:[4,"is-searching"],emptyMessage:[1,"empty-message"]},null,{open:["watchOpen"]}]]],["p-34357744",[[1,"limebb-currency-picker",{platform:[16],context:[16],label:[513],currencies:[16],helperText:[513,"helper-text"],required:[516],readonly:[516],invalid:[516],disabled:[516],value:[1]}]]],["p-f402184f",[[1,"limebb-date-picker",{platform:[16],context:[16],disabled:[516],readonly:[516],invalid:[516],label:[513],placeholder:[513],helperText:[513,"helper-text"],required:[516],value:[1],type:[513]}]]],["p-8274ea5c",[[1,"limebb-live-docs-info"]]],["p-e3c0183c",[[1,"limebb-notification-item",{platform:[16],context:[16],item:[16]}]]],["p-5be6acf1",[[1,"limebb-kanban-item",{platform:[16],context:[16],item:[16]}]]],["p-3b42fbbc",[[1,"limebb-chat-item",{platform:[16],context:[16],item:[16],helperText:[1,"helper-text"],hasError:[516,"has-error"]}],[1,"limebb-typing-indicator"]]],["p-292631ea",[[1,"limebb-empty-state",{heading:[513],value:[513],icon:[16]}]]]],e))));
1
+ import{p as e,b as t}from"./p-1556b545.js";export{s as setNonce}from"./p-1556b545.js";import{g as i}from"./p-e1255160.js";(()=>{const t=import.meta.url,i={};return""!==t&&(i.resourcesUrl=new URL(".",t).href),e(i)})().then((async e=>(await i(),t([["p-a694aae5",[[1,"limebb-feed",{platform:[16],context:[16],items:[16],emptyStateMessage:[1,"empty-state-message"],heading:[1],loading:[4],minutesOfProximity:[2,"minutes-of-proximity"],totalCount:[2,"total-count"],direction:[513],lastVisitedTimestamp:[1,"last-visited-timestamp"],highlightedItemId:[8,"highlighted-item-id"]},null,{highlightedItemId:["highlightedItemIdChanged"]}]]],["p-3a406a20",[[1,"limebb-kanban",{platform:[16],context:[16],groups:[16]}]]],["p-8c8b7115",[[1,"limebb-chat-list",{platform:[16],context:[16],items:[16],loading:[516],isTypingIndicatorVisible:[516,"is-typing-indicator-visible"],lastVisitedTimestamp:[513,"last-visited-timestamp"],order:[513]},null,{items:["handleItemsChange"]}]]],["p-a1818969",[[1,"limebb-limeobject-file-viewer",{platform:[16],context:[16],property:[1],fileTypes:[16],limeobject:[32],limetype:[32]}]]],["p-29346b1a",[[1,"limebb-text-editor",{platform:[16],context:[16],allowMentioning:[4,"allow-mentioning"],contentType:[1,"content-type"],language:[513],disabled:[516],readonly:[516],helperText:[513,"helper-text"],placeholder:[513],label:[513],invalid:[516],required:[516],selectedContext:[16],ui:[513],allowResize:[4,"allow-resize"],value:[1],draftIdentifier:[1,"draft-identifier"],triggerMap:[16],customElements:[16],allowInlineImages:[4,"allow-inline-images"],items:[32],highlightedItemIndex:[32],editorPickerQuery:[32],searchableLimetypes:[32],isPickerOpen:[32],isSearching:[32]},null,{isPickerOpen:["watchOpen"],editorPickerQuery:["watchQuery"]}]]],["p-8491aaa1",[[1,"limebb-date-range",{platform:[16],context:[16],startTime:[16],endTime:[16],startTimeLabel:[1,"start-time-label"],endTimeLabel:[1,"end-time-label"],language:[1],timeFormat:[1,"time-format"],type:[1]}]]],["p-568b7520",[[1,"limebb-info-tile-currency-format",{platform:[16],context:[16],value:[16]}]]],["p-d4016891",[[1,"limebb-notification-list",{platform:[16],context:[16],items:[16],loading:[4],lastVisitedTimestamp:[1,"last-visited-timestamp"]},null,{items:["handleItemsChange"]}]]],["p-5e4ba110",[[17,"limebb-browser",{platform:[16],context:[16],items:[16],layout:[1],filter:[32]}]]],["p-92ec9205",[[1,"limebb-component-config",{platform:[16],context:[16],value:[16],required:[4],readonly:[4],disabled:[4],label:[1],helperText:[1,"helper-text"],formInfo:[16],type:[1],nameField:[1,"name-field"],configComponent:[32],configViewType:[32]},null,{formInfo:["watchFormInfo"],configComponent:["watchconfigComponent"]}]]],["p-42e52b50",[[1,"limebb-component-picker",{platform:[16],context:[16],type:[1],tags:[16],value:[1],copyLabel:[1,"copy-label"],hideCopyButton:[4,"hide-copy-button"],required:[4],readonly:[4],disabled:[4],label:[1],helperText:[1,"helper-text"]}]]],["p-10ac8b3e",[[1,"limebb-dashboard-widget",{heading:[513],subheading:[513],supportingText:[513,"supporting-text"],icon:[513]}]]],["p-46d2f604",[[1,"limebb-icon-picker",{value:[1],required:[4],readonly:[4],invalid:[4],disabled:[4],label:[1],helperText:[1,"helper-text"]}]]],["p-16199127",[[1,"limebb-info-tile",{platform:[16],context:[16],filterId:[513,"filter-id"],disabled:[4],icon:[513],label:[1],prefix:[1],suffix:[1],propertyName:[1,"property-name"],aggregateOperator:[1,"aggregate-operator"],format:[16],config:[32],filters:[32],value:[32],loading:[32],error:[32]},null,{filterId:["watchFilterId"],propertyName:["watchPropertyName"],aggregateOperator:["watchAggregateOperator"]}]]],["p-01cff04f",[[1,"limebb-info-tile-date-format",{value:[16]}]]],["p-4caa8bbe",[[1,"limebb-info-tile-decimal-format",{value:[16]}]]],["p-d6af09a8",[[1,"limebb-info-tile-format",{platform:[16],context:[16],type:[1],value:[16]}]]],["p-25e1a434",[[1,"limebb-info-tile-relative-date-format",{value:[16]}]]],["p-6c56121c",[[1,"limebb-info-tile-unit-format",{value:[16]}]]],["p-4ccce5cc",[[1,"limebb-lime-query-builder",{platform:[16],context:[16],value:[16],label:[1],limetypes:[32],mode:[32],codeValue:[32]}]]],["p-2aa18c2b",[[1,"limebb-loader",{platform:[16],context:[16]}]]],["p-7ef3bace",[[1,"limebb-locale-picker",{platform:[16],context:[16],value:[1],required:[4],disabled:[4],label:[1],helperText:[1,"helper-text"],readonly:[4],multipleChoice:[4,"multiple-choice"],allLanguages:[32]}]]],["p-3a620226",[[1,"limebb-mention",{limetype:[1],objectid:[2],limeobject:[32]}]]],["p-d6a07ea4",[[1,"limebb-mention-group-counter",{count:[2],limetype:[16],helperLabel:[1,"helper-label"]}]]],["p-8ef39ab8",[[1,"limebb-percentage-visualizer",{platform:[16],context:[16],value:[520],rangeMax:[514,"range-max"],rangeMin:[514,"range-min"],multiplier:[514],label:[513],invalid:[516],required:[516],helperText:[513,"helper-text"],reducePresence:[516,"reduce-presence"],displayPercentageColors:[516,"display-percentage-colors"]},null,{value:["valueChanged"]}]]],["p-abf1c197",[[1,"limebb-trend-indicator",{platform:[16],context:[16],value:[520],formerValue:[514,"former-value"],suffix:[513],label:[513],invalid:[516],required:[516],helperText:[513,"helper-text"],reducePresence:[516,"reduce-presence"]},null,{value:["valueChanged"]}]]],["p-85e11ff7",[[1,"limebb-summary-popover",{triggerDelay:[514,"trigger-delay"],heading:[513],subheading:[513],image:[16],icon:[513],value:[1],openDirection:[513,"open-direction"],popoverMaxWidth:[513,"popover-max-width"],popoverMaxHeight:[513,"popover-max-height"],actions:[16],isPopoverOpen:[32]}],[17,"limebb-navigation-button",{href:[513],tooltipLabel:[513,"tooltip-label"],tooltipHelperLabel:[513,"tooltip-helper-label"],type:[513]}]]],["p-5be6acf1",[[1,"limebb-kanban-item",{platform:[16],context:[16],item:[16]}]]],["p-a44f543c",[[1,"limebb-feed-item-thumbnail-file-info",{description:[1]}]]],["p-cc1abcd7",[[1,"limebb-feed-timeline-item",{platform:[16],context:[16],item:[16],ui:[513],helperText:[1,"helper-text"],hasError:[516,"has-error"],isBundled:[516,"is-bundled"],headingCanExpand:[32],isHeadingExpanded:[32],showMore:[32],isTall:[32]}]]],["p-88cc5b66",[[1,"limebb-kanban-group",{platform:[16],context:[16],identifier:[1],heading:[513],help:[1],items:[16],summary:[1],loading:[516],totalCount:[514,"total-count"]}]]],["p-218b7f38",[[1,"limebb-text-editor-picker",{items:[16],open:[516],isSearching:[4,"is-searching"],emptyMessage:[1,"empty-message"]},null,{open:["watchOpen"]}]]],["p-34357744",[[1,"limebb-currency-picker",{platform:[16],context:[16],label:[513],currencies:[16],helperText:[513,"helper-text"],required:[516],readonly:[516],invalid:[516],disabled:[516],value:[1]}]]],["p-f402184f",[[1,"limebb-date-picker",{platform:[16],context:[16],disabled:[516],readonly:[516],invalid:[516],label:[513],placeholder:[513],helperText:[513,"helper-text"],required:[516],value:[1],type:[513]}]]],["p-7db8652e",[[1,"limebb-live-docs-info"]]],["p-047c89de",[[1,"limebb-notification-item",{platform:[16],context:[16],item:[16]}]]],["p-3b42fbbc",[[1,"limebb-chat-item",{platform:[16],context:[16],item:[16],helperText:[1,"helper-text"],hasError:[516,"has-error"]}],[1,"limebb-typing-indicator"]]],["p-292631ea",[[1,"limebb-empty-state",{heading:[513],value:[513],icon:[16]}]]]],e))));
@@ -1 +1 @@
1
- import{r as t,c as i,h as e,H as r}from"./p-1556b545.js";import{c as o}from"./p-1fba0ade.js";const a=class{constructor(r){t(this,r),this.interact=i(this,"interact",7),this.handleClick=()=>{this.isItemClickable()&&this.handleNotificationListItemClick()},this.handleKeyDown=t=>{this.isItemClickable()&&"Enter"===t.key&&this.handleNotificationListItemClick()},this.renderHeading=()=>{if(!this.item.heading)return;if(!this.item.author)return e("limel-markdown",{value:this.translator.get(this.item.heading)});const t=this.getAuthorLink(),i=this.translator.get(this.item.heading,{author:t});return e("limel-markdown",{class:"heading",value:i})},this.createMenuItem=t=>{var i,e;return"separator"in t?t:{value:t,text:null!==(i=t.label)&&void 0!==i?i:"",secondaryText:t.description,disabled:t.disabled,icon:null!==(e=t.icon)&&void 0!==e?e:""}},this.handleMenuItemSelect=t=>{var i;t.stopPropagation();const e=null===(i=t.detail.value)||void 0===i?void 0:i.command;e&&this.commandbus.handle(e)},this.handleNotificationListItemClick=()=>{this.interact.emit(this.item)}}render(){var t,i;return e(r,{key:"d02a619aeed66ab5c79556f858e5603ef153a850",id:this.item.id,class:{"is-clickable":this.isItemClickable(),"is-read":!!(null===(t=this.item)||void 0===t?void 0:t.read),"is-selected":!!(null===(i=this.item)||void 0===i?void 0:i.selected)},onClick:this.handleClick,onKeyDown:this.handleKeyDown,tabindex:0},this.renderSource(),this.renderContent())}isItemClickable(){var t;return!!(null===(t=this.item)||void 0===t?void 0:t.clickable)}renderSource(){return e("div",{class:"header"},this.renderIcon(),this.renderCaption(),this.renderTimestamp(),this.renderUnpromotedActionsMenu())}renderIcon(){var t,i,r,o;if(this.item.icon)return e("limel-icon",{class:"icon",badge:!0,name:null!==(i=null===(t=this.item.icon)||void 0===t?void 0:t.name)&&void 0!==i?i:"dot_circle",style:{color:`${null===(r=this.item.icon)||void 0===r?void 0:r.color}`,"background-color":`${null===(o=this.item.icon)||void 0===o?void 0:o.backgroundColor}`}})}renderContent(){return e("div",{class:"content"},e("div",{class:"body"},this.renderHeadline(),this.renderValue()),this.renderAuthorPicture())}renderHeadline(){if(this.item.heading)return e("div",{class:"headline"},this.renderHeading())}getAuthorLink(){if(!this.item.author)return;if("string"==typeof this.item.author.name)return this.item.author.name;const{href:t,text:i}=this.item.author.name;return`[${i}](${t})`}renderAuthorPicture(){var t;if(null===(t=this.item.author)||void 0===t?void 0:t.picture)return e("img",{class:"author-avatar",loading:"lazy",src:this.item.author.picture})}renderCaption(){if(this.item.caption)return e("h2",{class:"caption"},this.item.caption)}renderValue(){if(this.item.value)return e("limel-markdown",{class:"body-text",value:this.item.value})}renderUnpromotedActionsMenu(){var t,i;if(!(null===(t=this.item.unpromotedActions)||void 0===t?void 0:t.length))return;const r=this.item.unpromotedActions.map(this.createMenuItem);return e("limel-menu",{class:"unpromoted-actions-menu",items:r,openDirection:"bottom-end",onSelect:this.handleMenuItemSelect},e("limel-icon-button",{icon:"menu_2",slot:"trigger",label:null===(i=this.translator)||void 0===i?void 0:i.get("webclient.more-actions")}))}renderTimestamp(){const t=this.item.timestamp;if(t)return e("span",{class:"timestamp"},this.dateTimeFormatter.format(t,"timeofday"))}get dateTimeFormatter(){return this.platform.get(o.DateTimeFormatter)}get translator(){var t;return null===(t=this.platform)||void 0===t?void 0:t.get(o.Translate)}get commandbus(){var t;return null===(t=this.platform)||void 0===t?void 0:t.get(o.CommandBus)}};a.style='@charset "UTF-8";*{box-sizing:border-box}:host(limebb-notification-item){isolation:isolate;position:relative;box-sizing:border-box;display:flex;flex-direction:column;gap:0.25rem;margin-left:0.5rem;border-radius:0.75rem;border:1px solid rgb(var(--contrast-500))}:host(limebb-notification-item):before{content:"";display:block;position:absolute;left:-1rem;top:0.85rem;border-radius:50%;height:0.5rem;width:0.5rem;transition:background-color 0.2s ease, scale 0.2s cubic-bezier(0.82, 0.3, 0.14, 1.36);scale:var(--limebb-notification-item-unread-badge-scale, 0.6);background-color:var(--limebb-notification-item-unread-badge-color, transparent)}:host(limebb-notification-item:hover) .timestamp{color:rgb(var(--contrast-1100))}:host(limebb-notification-item:hover) .body-text{opacity:1}.header{display:flex;align-items:center;gap:0.25rem;min-height:2rem;padding:0 0 0 0.25rem;margin-bottom:0.25rem}.header:not(:has(.icon)){padding-left:0.75rem}.header:not(:has(.unpromoted-actions-menu)){padding-right:0.5rem}.caption,.timestamp{font-size:0.75rem}.caption{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin:0;flex-grow:1;font-weight:600;color:rgb(var(--contrast-900))}.timestamp{flex-shrink:0;margin-left:auto;transition:color 0.4s ease, opacity 0.2s ease;color:rgb(var(--contrast-900))}.headline{display:flex;gap:0.25rem;align-items:center}.content{display:flex;min-width:0;gap:0.5rem;padding:0 0.75rem 0.5rem 0.75rem}.heading{display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:2;max-height:2.5rem;font-size:0.875rem;--markdown-hyperlink-color:var(--mdc-theme-primary);--markdown-hyperlink-color--hovered:rgb(var(--color-teal-light))}.body{display:flex;flex-direction:column;gap:0.5rem}.body-text{display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:3;max-height:4.25rem;transition:opacity 0.2s ease;opacity:0.7}.icon{--icon-background-color:var(--limebb-feed-background-color);flex-shrink:0;width:1.5rem;padding:0.125rem}.author-avatar{border-radius:50%;width:2rem;height:2rem;object-fit:cover;margin-top:auto;margin-right:-0.25rem;margin-left:auto;box-shadow:0 0 0 1px rgb(var(--contrast-600))}.author{font-weight:bold;text-decoration:none;white-space:nowrap}a.author{position:relative;cursor:pointer;transition:color 0.2s ease;color:var(--mdc-theme-primary)}a.author:before{transition:opacity 0.2s ease, transform 0.3s ease-out;content:"";position:absolute;inset:auto 0 0 0;width:calc(100% - 0.5rem);margin:auto;height:0.125rem;border-radius:1rem;background-color:currentColor;opacity:0;transform:scale(0.6)}a.author:hover{color:rgb(var(--color-teal-light))}a.author:hover:before{opacity:0.3;transform:scale(1)}limel-chip-set{--button-shadow-normal:none;margin-left:-1rem;margin-bottom:-0.5rem}';export{a as limebb_notification_item}
1
+ import{r as t,c as i,h as e,H as r}from"./p-1556b545.js";import{c as o}from"./p-1fba0ade.js";const a=class{constructor(r){t(this,r),this.interact=i(this,"interact",7),this.handleClick=()=>{this.isItemClickable()&&this.handleNotificationListItemClick()},this.handleKeyDown=t=>{this.isItemClickable()&&"Enter"===t.key&&this.handleNotificationListItemClick()},this.renderHeading=()=>{if(!this.item.heading)return;if(!this.item.author)return e("limel-markdown",{value:this.translator.get(this.item.heading)});const t=this.getAuthorLink(),i=this.translator.get(this.item.heading,{author:t});return e("limel-markdown",{class:"heading",value:i})},this.createMenuItem=t=>{var i,e;return"separator"in t?t:{value:t,text:null!==(i=t.label)&&void 0!==i?i:"",secondaryText:t.description,disabled:t.disabled,icon:null!==(e=t.icon)&&void 0!==e?e:""}},this.handleMenuItemSelect=t=>{var i;t.stopPropagation();const e=null===(i=t.detail.value)||void 0===i?void 0:i.command;e&&this.commandbus.handle(e)},this.handleNotificationListItemClick=()=>{this.interact.emit(this.item)}}render(){var t,i;return e(r,{key:"db6570da8224ed4be6e67b0c876f67a74dd226b7",id:this.item.id,class:{"is-clickable":this.isItemClickable(),"is-read":!!(null===(t=this.item)||void 0===t?void 0:t.read),"is-selected":!!(null===(i=this.item)||void 0===i?void 0:i.selected)},onClick:this.handleClick,onKeyDown:this.handleKeyDown,tabindex:0},this.renderSource(),this.renderContent())}isItemClickable(){var t;return!!(null===(t=this.item)||void 0===t?void 0:t.clickable)}renderSource(){return e("div",{class:"header"},this.renderIcon(),this.renderCaption(),this.renderTimestamp(),this.renderUnpromotedActionsMenu())}renderIcon(){var t,i,r,o;if(this.item.icon)return e("limel-icon",{class:"icon",badge:!0,name:null!==(i=null===(t=this.item.icon)||void 0===t?void 0:t.name)&&void 0!==i?i:"dot_circle",style:{color:`${null===(r=this.item.icon)||void 0===r?void 0:r.color}`,"background-color":`${null===(o=this.item.icon)||void 0===o?void 0:o.backgroundColor}`}})}renderContent(){return e("div",{class:"content"},e("div",{class:"body"},this.renderHeadline(),this.renderValue()),this.renderAuthorPicture())}renderHeadline(){if(this.item.heading)return e("div",{class:"headline"},this.renderHeading())}getAuthorLink(){if(!this.item.author)return;if("string"==typeof this.item.author.name)return this.item.author.name;const{href:t,text:i}=this.item.author.name;return`[${i}](${t})`}renderAuthorPicture(){var t;if(null===(t=this.item.author)||void 0===t?void 0:t.picture)return e("img",{class:"author-avatar",loading:"lazy",src:this.item.author.picture})}renderCaption(){if(this.item.caption)return e("h2",{class:"caption"},this.item.caption)}renderValue(){if(this.item.value)return e("limel-markdown",{class:"body-text",value:this.item.value})}renderUnpromotedActionsMenu(){var t,i;if(!(null===(t=this.item.unpromotedActions)||void 0===t?void 0:t.length))return;const r=this.item.unpromotedActions.map(this.createMenuItem);return e("limel-menu",{class:"unpromoted-actions-menu",items:r,openDirection:"bottom-end",onSelect:this.handleMenuItemSelect},e("limel-icon-button",{icon:"menu_2",slot:"trigger",label:null===(i=this.translator)||void 0===i?void 0:i.get("webclient.more-actions")}))}renderTimestamp(){const t=this.item.timestamp;if(t)return e("span",{class:"timestamp"},this.dateTimeFormatter.format(t,"timeofday"))}get dateTimeFormatter(){return this.platform.get(o.DateTimeFormatter)}get translator(){var t;return null===(t=this.platform)||void 0===t?void 0:t.get(o.Translate)}get commandbus(){var t;return null===(t=this.platform)||void 0===t?void 0:t.get(o.CommandBus)}};a.style='@charset "UTF-8";*{box-sizing:border-box}:host(limebb-notification-item){isolation:isolate;position:relative;box-sizing:border-box;display:flex;flex-direction:column;gap:0.25rem;margin-left:0.5rem;border-radius:0.75rem;border:1px solid rgb(var(--contrast-500))}:host(limebb-notification-item):before{content:"";display:block;position:absolute;left:-1rem;top:0.85rem;border-radius:50%;height:0.5rem;width:0.5rem;transition:background-color 0.2s ease, scale 0.2s cubic-bezier(0.82, 0.3, 0.14, 1.36);scale:var(--limebb-notification-item-unread-badge-scale, 0.6);background-color:var(--limebb-notification-item-unread-badge-color, transparent)}:host(limebb-notification-item:hover) .timestamp{color:rgb(var(--contrast-1100))}:host(limebb-notification-item:hover) .body-text{opacity:1}.header{display:flex;align-items:center;gap:0.25rem;min-height:2rem;padding:0 0 0 0.25rem;margin-bottom:0.25rem}.header:not(:has(.icon)){padding-left:0.75rem}.header:not(:has(.unpromoted-actions-menu)){padding-right:0.5rem}.caption,.timestamp{font-size:0.75rem}.caption{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin:0;flex-grow:1;font-weight:600;color:rgb(var(--contrast-900))}.timestamp{flex-shrink:0;margin-left:auto;transition:color 0.4s ease, opacity 0.2s ease;color:rgb(var(--contrast-900))}.headline{display:flex;gap:0.25rem;align-items:center}.content{display:flex;min-width:0;gap:0.5rem;padding:0 0.75rem 0.5rem 0.75rem}.heading{display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:2;max-height:2.5rem;font-size:0.875rem;--markdown-hyperlink-color:var(--mdc-theme-primary);--markdown-hyperlink-color--hovered:rgb(var(--color-teal-light))}.body{display:flex;flex-direction:column;gap:0.5rem}.body-text{display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:3;max-height:4.25rem;transition:opacity 0.2s ease;opacity:0.7}.icon{--icon-background-color:var(--limebb-feed-background-color);flex-shrink:0;width:1.5rem;padding:0.125rem}.author-avatar{border-radius:50%;width:2rem;height:2rem;object-fit:cover;margin-top:auto;margin-right:-0.25rem;margin-left:auto;box-shadow:0 0 0 1px rgb(var(--contrast-600))}.author{font-weight:bold;text-decoration:none;white-space:nowrap}a.author{position:relative;cursor:pointer;transition:color 0.2s ease;color:var(--mdc-theme-primary)}a.author:before{transition:opacity 0.2s ease, transform 0.3s ease-out;content:"";position:absolute;inset:auto 0 0 0;width:calc(100% - 0.5rem);margin:auto;height:0.125rem;border-radius:1rem;background-color:currentColor;opacity:0;transform:scale(0.6)}a.author:hover{color:rgb(var(--color-teal-light))}a.author:hover:before{opacity:0.3;transform:scale(1)}limel-chip-set{--button-shadow-normal:none;margin-left:-1rem;margin-bottom:-0.5rem}';export{a as limebb_notification_item}
@@ -1 +1 @@
1
- import{r as t,c as i,h as e,g as r}from"./p-1556b545.js";import{D as s,M as n,c as o,W as a,H as h,T as c}from"./p-1fba0ade.js";import{A as u,a as f,b as d,E as l,T as v}from"./p-463d3174.js";import{d as b,b as p,k as m,c as g,s as y,a as j,e as w,U as O,S,g as k}from"./p-bcc23575.js";import{i as M,e as x}from"./p-c40a3f4b.js";import{d as I,r as T,S as A,a as C,i as E}from"./p-b31772c8.js";import{d as F,i as P,o as $,g as _,h as D,n as N,a as L}from"./p-5322fd19.js";import{i as R}from"./p-1484e300.js";var U=/\s/,z=/^\s+/;var G=NaN,W=/^[-+]0x[0-9a-f]+$/i,H=/^0b[01]+$/i,Q=/^0o[0-7]+$/i,q=parseInt;function B(t){if("number"==typeof t)return t;if(M(t))return G;if(I(t)){var i="function"==typeof t.valueOf?t.valueOf():t;t=I(i)?i+"":i}if("string"!=typeof t)return 0===t?t:+t;var e;t=(e=t)?e.slice(0,function(t){for(var i=t.length;i--&&U.test(t.charAt(i)););return i}(e)+1).replace(z,""):e;var r=H.test(t);return r||Q.test(t)?q(t.slice(2),r?2:8):W.test(t)?G:+t}var K=Object.create;const V=function(){function t(){}return function(i){if(!I(i))return{};if(K)return K(i);t.prototype=i;var e=new t;return t.prototype=void 0,e}}();function J(t,i,e){"__proto__"==i&&b?b(t,i,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[i]=e}var X=Object.prototype.hasOwnProperty;function Y(t,i,e){var r=t[i];X.call(t,i)&&x(r,e)&&(void 0!==e||i in t)||J(t,i,e)}function Z(t,i,e,r){var s=!e;e||(e={});for(var n=-1,o=i.length;++n<o;){var a=i[n],h=r?r(e[a],t[a],a,e,t):void 0;void 0===h&&(h=t[a]),s?J(e,a,h):Y(e,a,h)}return e}var tt=Object.prototype.hasOwnProperty;function it(t){return P(t)?p(t,!0):function(t){if(!I(t))return function(t){var i=[];if(null!=t)for(var e in Object(t))i.push(e);return i}(t);var i=F(t),e=[];for(var r in t)("constructor"!=r||!i&&tt.call(t,r))&&e.push(r);return e}(t)}const et=$(Object.getPrototypeOf,Object);var rt="object"==typeof exports&&exports&&!exports.nodeType&&exports,st=rt&&"object"==typeof module&&module&&!module.nodeType&&module,nt=st&&st.exports===rt?T.Buffer:void 0,ot=nt?nt.allocUnsafe:void 0;const at=Object.getOwnPropertySymbols?function(t){for(var i=[];t;)j(i,g(t)),t=et(t);return i}:y;function ht(t){return w(t,it,at)}var ct=Object.prototype.hasOwnProperty;function ut(t){var i=new t.constructor(t.byteLength);return new O(i).set(new O(t)),i}var ft=/\w*$/,dt=A?A.prototype:void 0,lt=dt?dt.valueOf:void 0,vt="[object Boolean]",bt="[object Date]",pt="[object Map]",mt="[object Number]",gt="[object RegExp]",yt="[object Set]",jt="[object String]",wt="[object Symbol]",Ot="[object ArrayBuffer]",St="[object DataView]",kt="[object Float32Array]",Mt="[object Float64Array]",xt="[object Int8Array]",It="[object Int16Array]",Tt="[object Int32Array]",At="[object Uint8Array]",Ct="[object Uint8ClampedArray]",Et="[object Uint16Array]",Ft="[object Uint32Array]";var Pt=N&&N.isMap;const $t=Pt?D(Pt):function(t){return C(t)&&"[object Map]"==_(t)};var _t=N&&N.isSet;const Dt=_t?D(_t):function(t){return C(t)&&"[object Set]"==_(t)};var Nt=1,Lt=2,Rt=4,Ut="[object Arguments]",zt="[object Function]",Gt="[object GeneratorFunction]",Wt="[object Object]",Ht={};function Qt(t,i,e,r,s,n){var o,a=i&Nt,h=i&Lt,c=i&Rt;if(e&&(o=s?e(t,r,s,n):e(t)),void 0!==o)return o;if(!I(t))return t;var u=E(t);if(u){if(o=function(t){var i=t.length,e=new t.constructor(i);return i&&"string"==typeof t[0]&&ct.call(t,"index")&&(e.index=t.index,e.input=t.input),e}(t),!a)return function(t,i){var e=-1,r=t.length;for(i||(i=Array(r));++e<r;)i[e]=t[e];return i}(t,o)}else{var f=_(t),d=f==zt||f==Gt;if(L(t))return function(t,i){if(i)return t.slice();var e=t.length,r=ot?ot(e):new t.constructor(e);return t.copy(r),r}(t,a);if(f==Wt||f==Ut||d&&!s){if(o=h||d?{}:function(t){return"function"!=typeof t.constructor||F(t)?{}:V(et(t))}(t),!a)return h?function(t,i){return Z(t,at(t),i)}(t,function(t,i){return t&&Z(i,it(i),t)}(o,t)):function(t,i){return Z(t,g(t),i)}(t,function(t,i){return t&&Z(i,m(i),t)}(o,t))}else{if(!Ht[f])return s?t:{};o=function(t,i,e){var r,s,n=t.constructor;switch(i){case Ot:return ut(t);case vt:case bt:return new n(+t);case St:return function(t,i){var e=i?ut(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.byteLength)}(t,e);case kt:case Mt:case xt:case It:case Tt:case At:case Ct:case Et:case Ft:return function(t,i){var e=i?ut(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.length)}(t,e);case pt:return new n;case mt:case jt:return new n(t);case gt:return(s=new(r=t).constructor(r.source,ft.exec(r))).lastIndex=r.lastIndex,s;case yt:return new n;case wt:return lt?Object(lt.call(t)):{}}}(t,f,a)}}n||(n=new S);var l=n.get(t);if(l)return l;n.set(t,o),Dt(t)?t.forEach((function(r){o.add(Qt(r,i,e,r,t,n))})):$t(t)&&t.forEach((function(r,s){o.set(s,Qt(r,i,e,s,t,n))}));var v=u?void 0:(c?h?ht:k:h?it:m)(t);return function(t,i){for(var e=-1,r=null==t?0:t.length;++e<r&&!1!==i(t[e],e););}(v||t,(function(r,s){v&&(r=t[s=r]),Y(o,s,Qt(r,i,e,s,t,n))})),o}Ht[Ut]=Ht["[object Array]"]=Ht["[object ArrayBuffer]"]=Ht["[object DataView]"]=Ht["[object Boolean]"]=Ht["[object Date]"]=Ht["[object Float32Array]"]=Ht["[object Float64Array]"]=Ht["[object Int8Array]"]=Ht["[object Int16Array]"]=Ht["[object Int32Array]"]=Ht["[object Map]"]=Ht["[object Number]"]=Ht[Wt]=Ht["[object RegExp]"]=Ht["[object Set]"]=Ht["[object String]"]=Ht["[object Symbol]"]=Ht["[object Uint8Array]"]=Ht["[object Uint8ClampedArray]"]=Ht["[object Uint16Array]"]=Ht["[object Uint32Array]"]=!0,Ht["[object Error]"]=Ht[zt]=Ht["[object WeakMap]"]=!1;const qt=function(){return T.Date.now()};var Bt=Math.max,Kt=Math.min;function Vt(t,i){return t.label===i}function Jt(t,i){return Object.values(t.properties).find((t=>t&&t.relation&&Vt(t.relation.getLimetype(),i)))}function Xt(t,i){const e=Jt(t,i);return!!e&&function(t){return s(t)&&!n(t)}(e)}class Yt{get limeObjectService(){return this.platform.get(o.LimeObjectRepository)}get queryService(){return this.platform.get(o.Query)}get viewFactoryRegistry(){return this.platform.get(o.ViewFactoryRegistry)}get translator(){var t;return null===(t=this.platform)||void 0===t?void 0:t.get(o.Translate)}get triggerCharacter(){return this._triggerCharacter}get triggerHandler(){return this._triggerHandler}constructor(t,i,e){this.platform=t,this.context=i,this.searchableLimetypes=e,this.groupCounts={},this._triggerCharacter="@",this._triggerHandler={searcher:t=>this.searcher(t),inserter:(t,i)=>this.inserter(t,i),emptySearchMessage:"Start typing a name...",noItemsFoundMessage:"No results for your search...",nodeDefinition:{customElement:{tagName:"limebb-mention",attributes:["limetype","objectid","href"]},mapAttributes:t=>({limetype:t.value.getLimetype().name,objectid:t.value.id,href:`object/${this.context.limetype}/${this.context.id}`})}},this.searcher=async t=>{if(!t)return[];const{objects:i}=await this.limeObjectService.search(t,this.searchableLimetypes,10);return this.createSearchListItems(i)},this.inserter=async(t,i)=>{var e;const r=this.triggerHandler.nodeDefinition;r&&t.insert({node:{tagName:r.customElement.tagName,attributes:r.mapAttributes(i)},children:[null===(e=i.value)||void 0===e?void 0:e.descriptive]})}}async initialize(){await this.loadGroupCounts()}async loadGroupCounts(){const t=this.searchableLimetypes.filter((t=>!Vt(t,"user")&&Xt(t,"user"))).map((t=>this.getGroupCounts(t)));for(const i of await Promise.all(t))Object.assign(this.groupCounts,i)}async getGroupCounts(t){var i;const e=Jt(t,"user"),r=t.name;try{const t=await this.queryService.execute({limetype:r,responseFormat:{object:{_id:null,[e.name]:{count:{aggregate:{op:a.Count}}}}}});if(!(null===(i=t.objects)||void 0===i?void 0:i.length))return{[r]:{}};const s=this.createGroupCount(t.objects,e.name);return{[r]:s}}catch(i){return console.error(`Error fetching group count for limetype: ${t.name}`,i),{[r]:{}}}}createGroupCount(t,i){const e={};for(const r of t){const{_id:t,[i]:s}=r;e[t]=s.count}return e}createSearchListItems(t=[]){return t.map((t=>this.createSearchListItem(t))).filter(R)}createSearchListItem(t){const i=this.viewFactoryRegistry.getFactory("search"),e=this.limeObjectService.getObject(t._limetype,t._id);if(!e)return null;const r=i(e,this.context),s=this.getGroupCountComponent(e);return Object.assign(Object.assign({},r),s?{primaryComponent:s}:{})}getGroupCountComponent(t){var i;const e=t.getLimetype(),r=null===(i=this.groupCounts[e.name])||void 0===i?void 0:i[t.id],s=Jt(e,"user");if(void 0!==r&&s)return{name:"limebb-mention-group-counter",props:{count:r,limetype:s.relation.getLimetype(),helperLabel:this.translator.get("webclient.notification-center.members-will-be-notified")}}}}class Zt{constructor(t,i){this.file=t,this.http=i,this.uploadCancelled=!1,this.getUrl=t=>`api/v1/file/${null!=t?t:""}`}async initialize(){this.uploadService=await this.http.createFileUpload(h.Post,this.getUrl(),this.file),this.progressCallback&&(this.uploadService.onProgress=this.progressCallback)}async upload(){return this.uploadService.upload()}getFileName(){return this.file.name}cancel(){this.uploadService.cancel(),this.uploadCancelled=!0}set onProgress(t){this.progressCallback=t,this.uploadService&&(this.uploadService.onProgress=t)}}class ti{constructor(t){this.platform=t}async handleImagePasted(t){const i=null==t?void 0:t.fileInfo;if(!i)return;if(!this.validateImageSize(i))return;t.insertThumbnail();const e=await this.createFileUpload(i),r=null==e?void 0:e.href;return r&&void 0!==(null==e?void 0:e.fileId)?t.insertImage(r):t.insertFailedThumbnail(),e}parseFileIdFromSrc(t){if(t){const i=/\/(\d+)\/contents\/?$/.exec(t);if(i&&i[1])return Number(i[1])}}validateImageSize(t){return!!t.fileContent&&t.fileContent.size<=52428800}async createFileUpload(t){var i;if(!t.fileContent)return;const e=new Zt(t.fileContent,this.http);await e.initialize();const r=Object.assign(Object.assign({},t),{progress:0,file:e,state:"added",fileId:void 0,href:void 0,id:t.id});e.onProgress=t=>{0===r.progress&&(r.state="uploading"),r.progress=t,100===t&&(r.state="finalizing")};const s=await e.upload();return r.fileId=s.id,r.filename=s.filename,r.extension=s.extension,r.contentType=s.contentType,r.size=s.size,r.state="done",r.href=null===(i=s._links)||void 0===i?void 0:i.contents.href,r}get http(){return this.platform.get(o.Http)}}const ii=class{watchOpen(){this.setupHandlers(),this.setPickerMessage()}watchQuery(){this.setPickerMessage()}constructor(e){var r;t(this,e),this.change=i(this,"change",7),this.metadataChange=i(this,"metadataChange",7),this.allowMentioning=!1,this.contentType="markdown",this.language="en",this.disabled=!1,this.readonly=!1,this.invalid=!1,this.required=!1,this.ui="standard",this.allowResize=!0,this.value="",this.triggerMap={},this.customElements=[],this.allowInlineImages=!1,this.items=[],this.highlightedItemIndex=0,this.isPickerOpen=!1,this.isSearching=!1,this.registeredTriggers=[],this.registeredTriggerMap=this.triggerMap,this.registeredCustomElements=this.customElements,this.activeTrigger=void 0,this.handleMouseClick=t=>{this.textEditorPickerElement&&(t.target===this.textEditorPickerElement||this.resetTriggerAndPicker())},this.handleKeyPress=t=>{if(!this.isPickerOpen||!this.activeTrigger)return;if(![f,d,u,l,v].includes(t.key))return;if(t.stopPropagation(),t.preventDefault(),"keyup"===t.type)return;const i={[f]:this.handleEscapeKey,[l]:this.handleEnterOrTabKey,[v]:this.handleEnterOrTabKey,[u]:this.handleArrowKeyPress,[d]:this.handleArrowKeyPress}[t.key];i&&i(t)},this.handleArrowKeyPress=t=>{this.highlightedItemIndex=this.findNonSeparatorIndex(t.key,this.highlightedItemIndex)},this.findNonSeparatorIndex=(t,i,e=0)=>{if(0===this.items.length||e>this.items.length)return i;const r=((t,i,e)=>(i+(t===u?1:-1)+e)%e)(t,i,this.items.length);return this.isListSeparator(this.items[r])?this.findNonSeparatorIndex(t,r,e+1):r},this.handleEscapeKey=()=>{var t;null===(t=this.triggerFunction)||void 0===t||t.stopTrigger(),this.resetTriggerAndPicker()},this.handleEnterOrTabKey=t=>{this.handleItemSelection(t)},this.handleMetadataChange=t=>{t.stopPropagation();const i=t.detail,e=this.getEnhancedImages(i.images||[]),r=Object.assign(Object.assign({},i),{images:e});this.metadataChange.emit(r)},this.handleImagePasted=t=>{t.stopPropagation(),this.allowInlineImages&&this.uploadHandler.handleImagePasted(t.detail)},this.handleTriggerStart=t=>{t.stopPropagation(),this.activeTrigger=t.detail.trigger,this.triggerFunction=t.detail.textEditor,this.isPickerOpen=!0},this.handleTriggerStop=t=>{t.stopPropagation(),this.resetTriggerAndPicker()},this.handleTriggerChange=t=>{var i;t.stopImmediatePropagation(),this.editorPickerQuery=t.detail.value;const e=null===(i=this.registeredTriggerMap[t.detail.trigger])||void 0===i?void 0:i.searcher;e&&(this.isSearching=!0,this.debouncedSearchFn(e,this.editorPickerQuery))},this.resetTriggerAndPicker=()=>{this.isPickerOpen=!1,this.activeTrigger=void 0,this.triggerFunction=void 0,this.isSearching=!1,this.highlightedItemIndex=0,this.items=[]},this.handleItemSelection=t=>{var i;let e;if(t instanceof CustomEvent)e=t.detail;else{if(!(t instanceof KeyboardEvent))return;{const t=this.items[this.highlightedItemIndex];if(this.isListSeparator(t))return;e=t}}if(!this.activeTrigger)return;const r=this.registeredTriggerMap[this.activeTrigger];try{r.inserter(this.triggerFunction,e)}catch(t){console.error("Error inserting",t)}this.resetTriggerAndPicker(),null===(i=this.textEditor)||void 0===i||i.focus()},this.handleVisibilityChange=()=>{"hidden"===document.visibilityState&&this.saveDraft()},this.handleBeforeUnload=()=>{this.saveDraft()},this.portalId="crypto"in window&&"function"==typeof(null===(r=window.crypto)||void 0===r?void 0:r.randomUUID)?"a_"+crypto.randomUUID():String.fromCodePoint(97+Math.floor(26*Math.random()))+Math.random().toString(36).slice(Math.max(0,2))+Math.random().toString(36).slice(Math.max(0,2)),this.debouncedSearchFn=function(t,i,e){var r,s,n,o,a,h,c=0,u=!1,f=!1,d=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function l(i){var e=r,n=s;return r=s=void 0,c=i,o=t.apply(n,e)}function v(t){var e=t-h;return void 0===h||e>=i||e<0||f&&t-c>=n}function b(){var t=qt();if(v(t))return p(t);a=setTimeout(b,function(t){var e=i-(t-h);return f?Kt(e,n-(t-c)):e}(t))}function p(t){return a=void 0,d&&r?l(t):(r=s=void 0,o)}function m(){var t=qt(),e=v(t);if(r=arguments,s=this,h=t,e){if(void 0===a)return function(t){return c=t,a=setTimeout(b,i),u?l(t):o}(h);if(f)return clearTimeout(a),a=setTimeout(b,i),l(h)}return void 0===a&&(a=setTimeout(b,i)),o}return i=B(i)||0,I(e)&&(u=!!e.leading,n=(f="maxWait"in e)?Bt(B(e.maxWait)||0,i):n,d="trailing"in e?!!e.trailing:d),m.cancel=function(){void 0!==a&&clearTimeout(a),c=0,r=h=s=a=void 0},m.flush=function(){return void 0===a?o:p(qt())},m}((async(t,i)=>{try{const e=await t(i);if(i!==this.editorPickerQuery||!this.activeTrigger)return;this.items=e}catch(t){console.error("Error searching",t)}finally{this.isSearching=!1}}),300)}connectedCallback(){var t,i,e,r;if(this.draftIdentifier){const s=null!==(i=null===(t=this.context)||void 0===t?void 0:t.id)&&void 0!==i?i:"no-limeobject",n=null!==(r=null===(e=this.context)||void 0===e?void 0:e.limetype)&&void 0!==r?r:"no-limetype";this.textEditorInnerId=["text-editor-draft",n,s,this.draftIdentifier].join("-")}this.textEditorInnerId&&(document.addEventListener("visibilitychange",this.handleVisibilityChange),window.addEventListener("beforeunload",this.handleBeforeUnload)),this.uploadHandler=new ti(this.platform)}componentWillLoad(){this.allowMentioning&&this.registerMentions(),this.registerTriggers(),this.loadDraft()}disconnectedCallback(){document.removeEventListener("visibilitychange",this.handleVisibilityChange),window.removeEventListener("beforeunload",this.handleBeforeUnload),document.removeEventListener("mousedown",this.handleMouseClick),this.saveDraft(),this.host&&(this.host.removeEventListener("keyup",this.handleKeyPress,{capture:!0}),this.host.removeEventListener("keydown",this.handleKeyPress,{capture:!0})),this.debouncedSearchFn&&this.debouncedSearchFn.cancel&&this.debouncedSearchFn.cancel()}registerMentions(){const t=new Yt(this.platform,this.context,this.searchableLimetypes),i=t.triggerHandler.nodeDefinition;i&&(this.registeredCustomElements.push(i.customElement),this.registeredTriggerMap[t.triggerCharacter]=t.triggerHandler,t.initialize())}registerTriggers(){this.registeredTriggers=Object.keys(this.registeredTriggerMap)}setPickerMessage(){var t;if(!this.activeTrigger)return;const i=this.registeredTriggerMap[this.activeTrigger];this.pickerMessage=(null===(t=this.editorPickerQuery)||void 0===t?void 0:t.length)>0?i.noItemsFoundMessage:i.emptySearchMessage}setupHandlers(){this.isPickerOpen?(this.host.addEventListener("keyup",this.handleKeyPress,{capture:!0}),this.host.addEventListener("keydown",this.handleKeyPress,{capture:!0}),document.addEventListener("mousedown",this.handleMouseClick)):(this.host.removeEventListener("keyup",this.handleKeyPress,{capture:!0}),this.host.removeEventListener("keydown",this.handleKeyPress,{capture:!0}),document.removeEventListener("mousedown",this.handleMouseClick))}isListSeparator(t){return"separator"in t&&!0===t.separator}render(){return[e("limel-text-editor",{key:"260e595d9d833230601d45dfade2dd101ad220d2",ref:t=>this.textEditor=t,tabindex:this.disabled?-1:0,value:this.value,contentType:this.contentType,customElements:this.registeredCustomElements,"aria-disabled":this.disabled,language:this.language,triggers:this.registeredTriggers,onTriggerStart:this.handleTriggerStart,onTriggerStop:this.handleTriggerStop,onTriggerChange:this.handleTriggerChange,onImagePasted:this.handleImagePasted,onMetadataChange:this.handleMetadataChange,ui:this.ui,allowResize:this.allowResize,required:this.required,disabled:this.disabled,readonly:this.readonly,helperText:this.helperText,placeholder:this.placeholder,label:this.label,invalid:this.invalid}),this.renderPicker()]}renderPicker(){if(this.isPickerOpen)return e("limel-portal",{containerId:this.portalId,visible:this.isPickerOpen,openDirection:"top",inheritParentWidth:!0,anchor:this.textEditor},e("limebb-text-editor-picker",{ref:t=>this.textEditorPickerElement=t,items:(t=this.items,i=this.highlightedItemIndex,t.map(((t,e)=>{const r=Qt(t,5);return Object.assign(Object.assign({},r),{selected:e===i})}))),onItemSelected:this.handleItemSelection,emptyMessage:this.pickerMessage,isSearching:this.isSearching}));var t,i}getEnhancedImages(t){return t.map((t=>{let i;return"success"===t.state&&(i=this.uploadHandler.parseFileIdFromSrc(t.src)),i?Object.assign(Object.assign({},t),{fileId:i}):t}))}loadDraft(){if(!this.userDataService||!this.textEditorInnerId)return;if(this.value)return;const t=this.userDataService.get(this.textEditorInnerId);t&&this.change.emit(t)}saveDraft(){var t,i,e,r;if(!this.textEditorInnerId)return;const s=null===(t=this.value)||void 0===t?void 0:t.trim(),n=null===(i=this.userDataService)||void 0===i?void 0:i.get(this.textEditorInnerId);s&&s!==n?null===(e=this.userDataService)||void 0===e||e.set(this.textEditorInnerId,s):!s&&n&&(null===(r=this.userDataService)||void 0===r||r.set(this.textEditorInnerId,void 0))}get userDataService(){return this.platform.get(o.UserDataRepository)}get host(){return r(this)}static get watchers(){return{isPickerOpen:["watchOpen"],editorPickerQuery:["watchQuery"]}}};!function(t,i,e,r){var s,n=arguments.length,o=n<3?i:null===r?r=Object.getOwnPropertyDescriptor(i,e):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,i,e,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(i,e,o):s(i,e))||o);n>3&&o&&Object.defineProperty(i,e,o)}([c({map:[function(t){return Object.values(t).filter((t=>Vt(t,"user")||Xt(t,"user")))}]})],ii.prototype,"searchableLimetypes",void 0);export{ii as limebb_text_editor}
1
+ import{r as t,c as i,h as e,g as r}from"./p-1556b545.js";import{D as s,M as n,c as o,W as a,H as h,T as c}from"./p-1fba0ade.js";import{A as u,a as f,b as l,E as d,T as v}from"./p-463d3174.js";import{d as b,b as p,k as m,c as g,s as y,a as j,e as w,U as O,S,g as k}from"./p-bcc23575.js";import{i as M,e as x}from"./p-c40a3f4b.js";import{d as I,r as T,S as A,a as C,i as E}from"./p-b31772c8.js";import{d as F,i as P,o as $,g as _,h as D,n as N,a as L}from"./p-5322fd19.js";import{i as R}from"./p-1484e300.js";var U=/\s/,z=/^\s+/;var G=NaN,W=/^[-+]0x[0-9a-f]+$/i,H=/^0b[01]+$/i,Q=/^0o[0-7]+$/i,q=parseInt;function B(t){if("number"==typeof t)return t;if(M(t))return G;if(I(t)){var i="function"==typeof t.valueOf?t.valueOf():t;t=I(i)?i+"":i}if("string"!=typeof t)return 0===t?t:+t;var e;t=(e=t)?e.slice(0,function(t){for(var i=t.length;i--&&U.test(t.charAt(i)););return i}(e)+1).replace(z,""):e;var r=H.test(t);return r||Q.test(t)?q(t.slice(2),r?2:8):W.test(t)?G:+t}var K=Object.create;const V=function(){function t(){}return function(i){if(!I(i))return{};if(K)return K(i);t.prototype=i;var e=new t;return t.prototype=void 0,e}}();function J(t,i,e){"__proto__"==i&&b?b(t,i,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[i]=e}var X=Object.prototype.hasOwnProperty;function Y(t,i,e){var r=t[i];X.call(t,i)&&x(r,e)&&(void 0!==e||i in t)||J(t,i,e)}function Z(t,i,e,r){var s=!e;e||(e={});for(var n=-1,o=i.length;++n<o;){var a=i[n],h=r?r(e[a],t[a],a,e,t):void 0;void 0===h&&(h=t[a]),s?J(e,a,h):Y(e,a,h)}return e}var tt=Object.prototype.hasOwnProperty;function it(t){return P(t)?p(t,!0):function(t){if(!I(t))return function(t){var i=[];if(null!=t)for(var e in Object(t))i.push(e);return i}(t);var i=F(t),e=[];for(var r in t)("constructor"!=r||!i&&tt.call(t,r))&&e.push(r);return e}(t)}const et=$(Object.getPrototypeOf,Object);var rt="object"==typeof exports&&exports&&!exports.nodeType&&exports,st=rt&&"object"==typeof module&&module&&!module.nodeType&&module,nt=st&&st.exports===rt?T.Buffer:void 0,ot=nt?nt.allocUnsafe:void 0;const at=Object.getOwnPropertySymbols?function(t){for(var i=[];t;)j(i,g(t)),t=et(t);return i}:y;function ht(t){return w(t,it,at)}var ct=Object.prototype.hasOwnProperty;function ut(t){var i=new t.constructor(t.byteLength);return new O(i).set(new O(t)),i}var ft=/\w*$/,lt=A?A.prototype:void 0,dt=lt?lt.valueOf:void 0,vt="[object Boolean]",bt="[object Date]",pt="[object Map]",mt="[object Number]",gt="[object RegExp]",yt="[object Set]",jt="[object String]",wt="[object Symbol]",Ot="[object ArrayBuffer]",St="[object DataView]",kt="[object Float32Array]",Mt="[object Float64Array]",xt="[object Int8Array]",It="[object Int16Array]",Tt="[object Int32Array]",At="[object Uint8Array]",Ct="[object Uint8ClampedArray]",Et="[object Uint16Array]",Ft="[object Uint32Array]";var Pt=N&&N.isMap;const $t=Pt?D(Pt):function(t){return C(t)&&"[object Map]"==_(t)};var _t=N&&N.isSet;const Dt=_t?D(_t):function(t){return C(t)&&"[object Set]"==_(t)};var Nt=1,Lt=2,Rt=4,Ut="[object Arguments]",zt="[object Function]",Gt="[object GeneratorFunction]",Wt="[object Object]",Ht={};function Qt(t,i,e,r,s,n){var o,a=i&Nt,h=i&Lt,c=i&Rt;if(e&&(o=s?e(t,r,s,n):e(t)),void 0!==o)return o;if(!I(t))return t;var u=E(t);if(u){if(o=function(t){var i=t.length,e=new t.constructor(i);return i&&"string"==typeof t[0]&&ct.call(t,"index")&&(e.index=t.index,e.input=t.input),e}(t),!a)return function(t,i){var e=-1,r=t.length;for(i||(i=Array(r));++e<r;)i[e]=t[e];return i}(t,o)}else{var f=_(t),l=f==zt||f==Gt;if(L(t))return function(t,i){if(i)return t.slice();var e=t.length,r=ot?ot(e):new t.constructor(e);return t.copy(r),r}(t,a);if(f==Wt||f==Ut||l&&!s){if(o=h||l?{}:function(t){return"function"!=typeof t.constructor||F(t)?{}:V(et(t))}(t),!a)return h?function(t,i){return Z(t,at(t),i)}(t,function(t,i){return t&&Z(i,it(i),t)}(o,t)):function(t,i){return Z(t,g(t),i)}(t,function(t,i){return t&&Z(i,m(i),t)}(o,t))}else{if(!Ht[f])return s?t:{};o=function(t,i,e){var r,s,n=t.constructor;switch(i){case Ot:return ut(t);case vt:case bt:return new n(+t);case St:return function(t,i){var e=i?ut(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.byteLength)}(t,e);case kt:case Mt:case xt:case It:case Tt:case At:case Ct:case Et:case Ft:return function(t,i){var e=i?ut(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.length)}(t,e);case pt:return new n;case mt:case jt:return new n(t);case gt:return(s=new(r=t).constructor(r.source,ft.exec(r))).lastIndex=r.lastIndex,s;case yt:return new n;case wt:return dt?Object(dt.call(t)):{}}}(t,f,a)}}n||(n=new S);var d=n.get(t);if(d)return d;n.set(t,o),Dt(t)?t.forEach((function(r){o.add(Qt(r,i,e,r,t,n))})):$t(t)&&t.forEach((function(r,s){o.set(s,Qt(r,i,e,s,t,n))}));var v=u?void 0:(c?h?ht:k:h?it:m)(t);return function(t,i){for(var e=-1,r=null==t?0:t.length;++e<r&&!1!==i(t[e],e););}(v||t,(function(r,s){v&&(r=t[s=r]),Y(o,s,Qt(r,i,e,s,t,n))})),o}Ht[Ut]=Ht["[object Array]"]=Ht["[object ArrayBuffer]"]=Ht["[object DataView]"]=Ht["[object Boolean]"]=Ht["[object Date]"]=Ht["[object Float32Array]"]=Ht["[object Float64Array]"]=Ht["[object Int8Array]"]=Ht["[object Int16Array]"]=Ht["[object Int32Array]"]=Ht["[object Map]"]=Ht["[object Number]"]=Ht[Wt]=Ht["[object RegExp]"]=Ht["[object Set]"]=Ht["[object String]"]=Ht["[object Symbol]"]=Ht["[object Uint8Array]"]=Ht["[object Uint8ClampedArray]"]=Ht["[object Uint16Array]"]=Ht["[object Uint32Array]"]=!0,Ht["[object Error]"]=Ht[zt]=Ht["[object WeakMap]"]=!1;const qt=function(){return T.Date.now()};var Bt=Math.max,Kt=Math.min;function Vt(t,i){return t.label===i}function Jt(t,i){return Object.values(t.properties).find((t=>t&&t.relation&&Vt(t.relation.getLimetype(),i)))}function Xt(t,i){const e=Jt(t,i);return!!e&&function(t){return s(t)&&!n(t)}(e)}class Yt{get limeObjectService(){return this.platform.get(o.LimeObjectRepository)}get queryService(){return this.platform.get(o.Query)}get viewFactoryRegistry(){return this.platform.get(o.ViewFactoryRegistry)}get translator(){var t;return null===(t=this.platform)||void 0===t?void 0:t.get(o.Translate)}get triggerCharacter(){return this._triggerCharacter}get triggerHandler(){return this._triggerHandler}constructor(t,i,e){this.platform=t,this.context=i,this.searchableLimetypes=e,this.groupCounts={},this._triggerCharacter="@",this._triggerHandler={searcher:t=>this.searcher(t),inserter:(t,i)=>this.inserter(t,i),emptySearchMessage:"Start typing a name...",noItemsFoundMessage:"No results for your search...",nodeDefinition:{customElement:{tagName:"limebb-mention",attributes:["limetype","objectid","href"]},mapAttributes:t=>({limetype:t.value.getLimetype().name,objectid:t.value.id,href:`object/${this.context.limetype}/${this.context.id}`})}},this.searcher=async t=>{if(!t)return[];const{objects:i}=await this.limeObjectService.search(t,this.searchableLimetypes,10);return this.createSearchListItems(i)},this.inserter=async(t,i)=>{var e;const r=this.triggerHandler.nodeDefinition;r&&t.insert({node:{tagName:r.customElement.tagName,attributes:r.mapAttributes(i)},children:[null===(e=i.value)||void 0===e?void 0:e.descriptive]})}}async initialize(){await this.loadGroupCounts()}async loadGroupCounts(){const t=this.searchableLimetypes.filter((t=>!Vt(t,"user")&&Xt(t,"user"))).map((t=>this.getGroupCounts(t)));for(const i of await Promise.all(t))Object.assign(this.groupCounts,i)}async getGroupCounts(t){var i;const e=Jt(t,"user"),r=t.name;try{const t=await this.queryService.execute({limetype:r,responseFormat:{object:{_id:null,[e.name]:{count:{aggregate:{op:a.Count}}}}}});if(!(null===(i=t.objects)||void 0===i?void 0:i.length))return{[r]:{}};const s=this.createGroupCount(t.objects,e.name);return{[r]:s}}catch(i){return console.error(`Error fetching group count for limetype: ${t.name}`,i),{[r]:{}}}}createGroupCount(t,i){const e={};for(const r of t){const{_id:t,[i]:s}=r;e[t]=s.count}return e}createSearchListItems(t=[]){return t.map((t=>this.createSearchListItem(t))).filter(R)}createSearchListItem(t){const i=this.viewFactoryRegistry.getFactory("search"),e=this.limeObjectService.getObject(t._limetype,t._id);if(!e)return null;const r=i(e,this.context),s=this.getGroupCountComponent(e);return Object.assign(Object.assign({},r),s?{primaryComponent:s}:{})}getGroupCountComponent(t){var i;const e=t.getLimetype(),r=null===(i=this.groupCounts[e.name])||void 0===i?void 0:i[t.id],s=Jt(e,"user");if(void 0!==r&&s)return{name:"limebb-mention-group-counter",props:{count:r,limetype:s.relation.getLimetype(),helperLabel:this.translator.get("webclient.notification-center.members-will-be-notified")}}}}class Zt{constructor(t,i){this.file=t,this.http=i,this.uploadCancelled=!1,this.getUrl=t=>`api/v1/file/${null!=t?t:""}`}async initialize(){this.uploadService=await this.http.createFileUpload(h.Post,this.getUrl(),this.file),this.progressCallback&&(this.uploadService.onProgress=this.progressCallback)}async upload(){return this.uploadService.upload()}getFileName(){return this.file.name}cancel(){this.uploadService.cancel(),this.uploadCancelled=!0}set onProgress(t){this.progressCallback=t,this.uploadService&&(this.uploadService.onProgress=t)}}class ti{constructor(t){this.platform=t}async handleImagePasted(t){const i=null==t?void 0:t.fileInfo;if(!i)return;if(!this.validateImageSize(i))return;t.insertThumbnail();const e=await this.createFileUpload(i),r=null==e?void 0:e.href;return r&&void 0!==(null==e?void 0:e.fileId)?t.insertImage(r):t.insertFailedThumbnail(),e}parseFileIdFromSrc(t){if(t){const i=/\/(\d+)\/contents\/?$/.exec(t);if(i&&i[1])return Number(i[1])}}validateImageSize(t){return!!t.fileContent&&t.fileContent.size<=52428800}async createFileUpload(t){var i;if(!t.fileContent)return;const e=new Zt(t.fileContent,this.http);await e.initialize();const r=Object.assign(Object.assign({},t),{progress:0,file:e,state:"added",fileId:void 0,href:void 0,id:t.id});e.onProgress=t=>{0===r.progress&&(r.state="uploading"),r.progress=t,100===t&&(r.state="finalizing")};const s=await e.upload();return r.fileId=s.id,r.filename=s.filename,r.extension=s.extension,r.contentType=s.contentType,r.size=s.size,r.state="done",r.href=null===(i=s._links)||void 0===i?void 0:i.contents.href,r}get http(){return this.platform.get(o.Http)}}const ii=class{watchOpen(){this.setupHandlers(),this.setPickerMessage()}watchQuery(){this.setPickerMessage()}constructor(e){var r;t(this,e),this.change=i(this,"change",7),this.metadataChange=i(this,"metadataChange",7),this.allowMentioning=!1,this.contentType="markdown",this.language="en",this.disabled=!1,this.readonly=!1,this.invalid=!1,this.required=!1,this.ui="standard",this.allowResize=!0,this.value="",this.triggerMap={},this.customElements=[],this.allowInlineImages=!1,this.items=[],this.highlightedItemIndex=0,this.isPickerOpen=!1,this.isSearching=!1,this.registeredTriggers=[],this.registeredTriggerMap=this.triggerMap,this.registeredCustomElements=this.customElements,this.activeTrigger=void 0,this.handleMouseClick=t=>{this.textEditorPickerElement&&(t.target===this.textEditorPickerElement||this.resetTriggerAndPicker())},this.handleKeyPress=t=>{if(!this.isPickerOpen||!this.activeTrigger)return;if(![f,l,u,d,v].includes(t.key))return;if(t.stopPropagation(),t.preventDefault(),"keyup"===t.type)return;const i={[f]:this.handleEscapeKey,[d]:this.handleEnterOrTabKey,[v]:this.handleEnterOrTabKey,[u]:this.handleArrowKeyPress,[l]:this.handleArrowKeyPress}[t.key];i&&i(t)},this.handleArrowKeyPress=t=>{this.highlightedItemIndex=this.findNonSeparatorIndex(t.key,this.highlightedItemIndex)},this.findNonSeparatorIndex=(t,i,e=0)=>{if(0===this.items.length||e>this.items.length)return i;const r=((t,i,e)=>(i+(t===u?1:-1)+e)%e)(t,i,this.items.length);return this.isListSeparator(this.items[r])?this.findNonSeparatorIndex(t,r,e+1):r},this.handleEscapeKey=()=>{var t;null===(t=this.triggerFunction)||void 0===t||t.stopTrigger(),this.resetTriggerAndPicker()},this.handleEnterOrTabKey=t=>{this.handleItemSelection(t)},this.handleMetadataChange=t=>{t.stopPropagation();const i=t.detail,e=this.getEnhancedImages(i.images||[]),r=Object.assign(Object.assign({},i),{images:e});this.metadataChange.emit(r)},this.handleImagePasted=t=>{t.stopPropagation(),this.allowInlineImages&&this.uploadHandler.handleImagePasted(t.detail)},this.handleTriggerStart=t=>{t.stopPropagation(),this.activeTrigger=t.detail.trigger,this.triggerFunction=t.detail.textEditor,this.isPickerOpen=!0},this.handleTriggerStop=t=>{t.stopPropagation(),this.resetTriggerAndPicker()},this.handleTriggerChange=t=>{var i;t.stopImmediatePropagation(),this.editorPickerQuery=t.detail.value;const e=null===(i=this.registeredTriggerMap[t.detail.trigger])||void 0===i?void 0:i.searcher;e&&(this.isSearching=!0,this.debouncedSearchFn(e,this.editorPickerQuery))},this.resetTriggerAndPicker=()=>{this.isPickerOpen=!1,this.activeTrigger=void 0,this.triggerFunction=void 0,this.isSearching=!1,this.highlightedItemIndex=0,this.items=[]},this.handleItemSelection=t=>{var i;let e;if(t instanceof CustomEvent)e=t.detail;else{if(!(t instanceof KeyboardEvent))return;{const t=this.items[this.highlightedItemIndex];if(this.isListSeparator(t))return;e=t}}if(!this.activeTrigger)return;const r=this.registeredTriggerMap[this.activeTrigger];try{r.inserter(this.triggerFunction,e)}catch(t){console.error("Error inserting",t)}this.resetTriggerAndPicker(),null===(i=this.textEditor)||void 0===i||i.focus()},this.handleVisibilityChange=()=>{"hidden"===document.visibilityState&&this.saveDraft()},this.handleBeforeUnload=()=>{this.saveDraft()},this.portalId="crypto"in window&&"function"==typeof(null===(r=window.crypto)||void 0===r?void 0:r.randomUUID)?"a_"+crypto.randomUUID():String.fromCodePoint(97+Math.floor(26*Math.random()))+Math.random().toString(36).slice(Math.max(0,2))+Math.random().toString(36).slice(Math.max(0,2)),this.debouncedSearchFn=function(t,i,e){var r,s,n,o,a,h,c=0,u=!1,f=!1,l=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function d(i){var e=r,n=s;return r=s=void 0,c=i,o=t.apply(n,e)}function v(t){var e=t-h;return void 0===h||e>=i||e<0||f&&t-c>=n}function b(){var t=qt();if(v(t))return p(t);a=setTimeout(b,function(t){var e=i-(t-h);return f?Kt(e,n-(t-c)):e}(t))}function p(t){return a=void 0,l&&r?d(t):(r=s=void 0,o)}function m(){var t=qt(),e=v(t);if(r=arguments,s=this,h=t,e){if(void 0===a)return function(t){return c=t,a=setTimeout(b,i),u?d(t):o}(h);if(f)return clearTimeout(a),a=setTimeout(b,i),d(h)}return void 0===a&&(a=setTimeout(b,i)),o}return i=B(i)||0,I(e)&&(u=!!e.leading,n=(f="maxWait"in e)?Bt(B(e.maxWait)||0,i):n,l="trailing"in e?!!e.trailing:l),m.cancel=function(){void 0!==a&&clearTimeout(a),c=0,r=h=s=a=void 0},m.flush=function(){return void 0===a?o:p(qt())},m}((async(t,i)=>{try{const e=await t(i);if(i!==this.editorPickerQuery||!this.activeTrigger)return;this.items=e}catch(t){console.error("Error searching",t)}finally{this.isSearching=!1}}),300)}connectedCallback(){var t,i,e,r;if(this.draftIdentifier){const s=null!==(i=null===(t=this.context)||void 0===t?void 0:t.id)&&void 0!==i?i:"no-limeobject",n=null!==(r=null===(e=this.context)||void 0===e?void 0:e.limetype)&&void 0!==r?r:"no-limetype";this.textEditorInnerId=["text-editor-draft",n,s,this.draftIdentifier].join("-")}this.textEditorInnerId&&(document.addEventListener("visibilitychange",this.handleVisibilityChange),window.addEventListener("beforeunload",this.handleBeforeUnload)),this.uploadHandler=new ti(this.platform)}componentWillLoad(){this.allowMentioning&&this.registerMentions(),this.registerTriggers(),this.loadDraft()}disconnectedCallback(){document.removeEventListener("visibilitychange",this.handleVisibilityChange),window.removeEventListener("beforeunload",this.handleBeforeUnload),document.removeEventListener("mousedown",this.handleMouseClick),this.saveDraft(),this.host&&(this.host.removeEventListener("keyup",this.handleKeyPress,{capture:!0}),this.host.removeEventListener("keydown",this.handleKeyPress,{capture:!0})),this.debouncedSearchFn&&this.debouncedSearchFn.cancel&&this.debouncedSearchFn.cancel()}registerMentions(){const t=new Yt(this.platform,this.context,this.searchableLimetypes),i=t.triggerHandler.nodeDefinition;i&&(this.registeredCustomElements.push(i.customElement),this.registeredTriggerMap[t.triggerCharacter]=t.triggerHandler,t.initialize())}registerTriggers(){this.registeredTriggers=Object.keys(this.registeredTriggerMap)}setPickerMessage(){var t;if(!this.activeTrigger)return;const i=this.registeredTriggerMap[this.activeTrigger];this.pickerMessage=(null===(t=this.editorPickerQuery)||void 0===t?void 0:t.length)>0?i.noItemsFoundMessage:i.emptySearchMessage}setupHandlers(){this.isPickerOpen?(this.host.addEventListener("keyup",this.handleKeyPress,{capture:!0}),this.host.addEventListener("keydown",this.handleKeyPress,{capture:!0}),document.addEventListener("mousedown",this.handleMouseClick)):(this.host.removeEventListener("keyup",this.handleKeyPress,{capture:!0}),this.host.removeEventListener("keydown",this.handleKeyPress,{capture:!0}),document.removeEventListener("mousedown",this.handleMouseClick))}isListSeparator(t){return"separator"in t&&!0===t.separator}render(){return[e("limel-text-editor",{key:"f2f48910b31ecf37bc6e41245f3e6e6a70b87695",ref:t=>this.textEditor=t,tabindex:this.disabled?-1:0,value:this.value,contentType:this.contentType,customElements:this.registeredCustomElements,"aria-disabled":this.disabled,language:this.language,triggers:this.registeredTriggers,onTriggerStart:this.handleTriggerStart,onTriggerStop:this.handleTriggerStop,onTriggerChange:this.handleTriggerChange,onImagePasted:this.handleImagePasted,onMetadataChange:this.handleMetadataChange,ui:this.ui,allowResize:this.allowResize,required:this.required,disabled:this.disabled,readonly:this.readonly,helperText:this.helperText,placeholder:this.placeholder,label:this.label,invalid:this.invalid}),this.renderPicker()]}renderPicker(){if(this.isPickerOpen)return e("limel-portal",{containerId:this.portalId,visible:this.isPickerOpen,openDirection:"top",inheritParentWidth:!0,anchor:this.textEditor},e("limebb-text-editor-picker",{ref:t=>this.textEditorPickerElement=t,items:(t=this.items,i=this.highlightedItemIndex,t.map(((t,e)=>{const r=Qt(t,5);return Object.assign(Object.assign({},r),{selected:e===i})}))),onItemSelected:this.handleItemSelection,emptyMessage:this.pickerMessage,isSearching:this.isSearching}));var t,i}getEnhancedImages(t){return t.map((t=>{let i;return"success"===t.state&&(i=this.uploadHandler.parseFileIdFromSrc(t.src)),i?Object.assign(Object.assign({},t),{fileId:i}):t}))}loadDraft(){if(!this.userDataService||!this.textEditorInnerId)return;if(this.value)return;const t=this.userDataService.get(this.textEditorInnerId);t&&this.change.emit(t)}saveDraft(){var t,i,e,r;if(!this.textEditorInnerId)return;const s=null===(t=this.value)||void 0===t?void 0:t.trim(),n=null===(i=this.userDataService)||void 0===i?void 0:i.get(this.textEditorInnerId);s&&s!==n?null===(e=this.userDataService)||void 0===e||e.set(this.textEditorInnerId,s):!s&&n&&(null===(r=this.userDataService)||void 0===r||r.set(this.textEditorInnerId,void 0))}get userDataService(){return this.platform.get(o.UserDataRepository)}get host(){return r(this)}static get watchers(){return{isPickerOpen:["watchOpen"],editorPickerQuery:["watchQuery"]}}};!function(t,i,e,r){var s,n=arguments.length,o=n<3?i:null===r?r=Object.getOwnPropertyDescriptor(i,e):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,i,e,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(i,e,o):s(i,e))||o);n>3&&o&&Object.defineProperty(i,e,o)}([c({map:[function(t){return Object.values(t).filter((t=>Vt(t,"user")||Xt(t,"user")))}]})],ii.prototype,"searchableLimetypes",void 0);export{ii as limebb_text_editor}
@@ -0,0 +1 @@
1
+ import{r as e,c as r,h as t}from"./p-1556b545.js";import{T as i}from"./p-1fba0ade.js";function o(e){if(!(null==e?void 0:e.properties))return{};const r=Object.assign({},e.properties),t={id:"_id",timestamp:"_timestamp",descriptive:"_descriptive",createduser:"_createduser",createdtime:"_createdtime",updateduser:"_updateduser"};for(const[e,i]of Object.entries(t)){const t=r[e];t&&(r[i]=t,delete r[e])}return r}const n=[{value:"=",label:"Equals",icon:"equals"},{value:"!=",label:"Not Equals",icon:"not-equal"},{value:">",label:"Greater Than",icon:"greater-than",applicableTypes:["integer","decimal","date","time"]},{value:">=",label:"Greater or Equal",icon:"greater-or-equal",applicableTypes:["integer","decimal","date","time"]},{value:"<",label:"Less Than",icon:"less-than",applicableTypes:["integer","decimal","date","time"]},{value:"<=",label:"Less or Equal",icon:"less-or-equal",applicableTypes:["integer","decimal","date","time"]},{value:"IN",label:"In List",icon:"list"},{value:"?",label:"Contains",icon:"-lime-filter-contain",applicableTypes:["string","text"]},{value:"=?",label:"Begins With",icon:"-lime-filter-begin",applicableTypes:["string","text"]},{value:"=$",label:"Ends With",icon:"-lime-filter-end",applicableTypes:["string","text"]}];function l(e){return e?"key"in e?function(e){if(!("op"in e)||!("exp"in e))throw new Error("Invalid filter: comparison must have key, op, and exp properties");if(!n.map((e=>e.value)).includes(e.op))throw new Error(`Unsupported filter operator: ${e.op}`);const r=new Set(["key","op","exp","type"]),t=Object.keys(e).filter((e=>!r.has(e)));if(t.length>0)throw new Error(`Unexpected properties in filter comparison: ${t.join(", ")}`);return{filter_type:"comparison",property:e.key,operator:e.op,value:e.exp}}(e):function(e){if(!("op"in e))throw new Error("Invalid filter: filter group must have op property");if(!("exp"in e))throw new Error("Invalid filter: filter group must have exp property");const r=new Set(["op","exp"]),t=Object.keys(e).filter((e=>!r.has(e)));if(t.length>0)throw new Error(`Unexpected properties in filter group: ${t.join(", ")}`);if("!"===e.op){if(Array.isArray(e.exp))throw new TypeError("Invalid NOT filter: exp should be a single expression, not an array");return{filter_type:"NOT",expression:l(e.exp)}}if("AND"===e.op){if(!Array.isArray(e.exp))throw new TypeError("Invalid AND filter: exp must be an array");return{filter_type:"AND",expressions:e.exp.map(l)}}if("OR"===e.op){if(!Array.isArray(e.exp))throw new TypeError("Invalid OR filter: exp must be an array");return{filter_type:"OR",expressions:e.exp.map(l)}}throw new Error(`Unsupported filter operator: ${e.op}`)}(e):{filter_type:"AND",expressions:[]}}const a=new Set(["$yesterday","$now","$today","$tomorrow","$this_week","$this_month","$this_quarter","$this_year"]),s=/^\$(previous|next)_(day|week|month|quarter|year)\(\d+\)$/,d=/^\$me(\.\w+)*$/;function c(e,r,t=!0){const i=Object.keys(e),o=[];if(t){const e=i.filter((e=>e.startsWith("#")&&"#description"!==e));e.length>0&&o.push(`Property '${r}' contains # properties not supported in GUI: ${e.join(", ")}`)}return{keys:i.filter((e=>"_alias"!==e&&!e.startsWith("#"))),guiLimitations:o}}function u(e,r,t,i,o,n=!0){if(""===e){if(n&&null!==r)throw new Error("Empty property name must have null value");return[]}const l=t[e];if(!l)throw new Error(`Property '${e}' does not exist on limetype '${o}'`);return l.relation?function(e,r,t,i,o=!0){if(null===r)return[];if("object"!=typeof r)throw new TypeError(`Relation property '${e}' must be null or an object`);const n=r,{keys:l,guiLimitations:a}=c(n,e,o);if(0===l.length)return a;const s=i.relation.getLimetype();if(!s)throw new Error(`Could not determine related limetype for property '${e}'`);const d={};for(const e of l)d[e]=n[e];const u=p(d,t,s.name,o);return[...a,...u]}(e,r,i,l,n):function(e,r,t=!0){if(null===r)return[];if("object"==typeof r){const{keys:i,guiLimitations:o}=c(r,e,t);if(0===i.length)return o;throw new Error(`Non-relation property '${e}' cannot have nested properties other than _alias or # properties (got: ${i.join(", ")})`)}throw new Error(`Non-relation property '${e}' must be null or an object (got ${typeof r})`)}(e,r,n)}function p(e,r,t,i=!0){const n=r[t];if(!n)throw new Error(`Unknown limetype: ${t}`);const l=o(n),a=[];for(const[o,n]of Object.entries(e)){if(o.startsWith("#"))continue;const e=u(o,n,l,r,t,i);a.push(...e)}return a}function f(e,r,t,i=!0){if(e)if("key"in e){const i=function(e,r,t){if(function(e){return"string"==typeof e&&(a.has(e)||s.test(e)||d.test(e))}(e))return{valid:!0};if("string"!=typeof e||!e.startsWith("%activeObject%"))return{valid:!0};if(!r)return{valid:!0};const i=e.replace(/^%activeObject%\.?/,"");if(!i)return{valid:!0};try{const e=function(e,r,t){if(!t||!r||!e)return;const i=t.split(".");let n,l=e[r];for(const e of i){if(!l)return;if(n=o(l)[e],!n)return;n.relation&&(l=n.relation.getLimetype())}return n}(t,r,i);return e?{valid:!0}:{valid:!1,error:`Property path '${i}' does not exist on limetype '${r}'`}}catch(e){return{valid:!1,error:`Invalid placeholder path: ${e.message}`}}}(e.exp,r,t);if(!i.valid)throw new Error(`Invalid placeholder in filter '${e.key}': ${i.error}`)}else if("exp"in e)if("!"===e.op)f(e.exp,r,t,i);else if("AND"===e.op||"OR"===e.op){const o=e.exp;for(const e of o)f(e,r,t,i)}}const m=class{constructor(t){e(this,t),this.change=r(this,"change",7),this.mode="gui",this.codeValue="",this.switchToGui=()=>{this.mode="gui"},this.switchToCode=()=>{this.mode="code"},this.handleCodeChange=e=>{e.stopPropagation(),this.codeValue=e.detail;try{const e=JSON.parse(this.codeValue);this.change.emit(e)}catch(e){}}}get guiModeEnabled(){var e,r,t;return null!==(t=null===(r=null===(e=this.platform)||void 0===e?void 0:e.isFeatureEnabled)||void 0===r?void 0:r.call(e,"useLimeQueryBuilderGuiMode"))&&void 0!==t&&t}componentWillLoad(){this.codeValue=JSON.stringify(this.value||{},null,2),this.guiModeEnabled||(this.mode="code")}render(){const e=this.checkGuiSupport();return t("div",{key:"48ec80b81ffb7765b9965219bfd343be84fb1dd1",class:"lime-query-builder"},this.label&&t("h3",{key:"91034a7b8354b5e40858ededbbf9bcac76682a40",class:"lime-query-builder-label"},this.label),this.guiModeEnabled&&t("div",{key:"167fd8fb8673ba540e9bb1eec3518f0742cf7325",class:"mode-controls"},this.renderModeSwitch(e)),this.guiModeEnabled&&"code"!==this.mode?t("div",{class:"gui-mode"},t("div",{class:"placeholder-message"},t("h4",null,"GUI Mode Not Yet Supported"),t("p",null,"The visual query builder interface is not yet available. Please use Code mode to write queries in JSON format."))):t("div",{class:"code-mode"},this.renderCodeEditor(e)))}checkGuiSupport(){if(!this.limetypes||!this.codeValue)return{valid:!0,guiSupported:!1,validationErrors:[],guiLimitations:[]};let e;try{e=JSON.parse(this.codeValue)}catch(e){return{valid:!1,guiSupported:!1,validationErrors:["Invalid JSON"],guiLimitations:[]}}return function(e,r,t,i=!0){if(!e)return{valid:!0,guiSupported:!0,validationErrors:[],guiLimitations:[]};const o=[],n=[];if(e.limetype&&!r[e.limetype]&&o.push(`Unknown limetype: ${e.limetype}`),void 0===e.offset||e.orderBy||o.push("offset requires orderBy to be specified"),i&&(e.orderBy&&n.push("orderBy is not yet supported in GUI mode"),void 0!==e.offset&&n.push("offset is not yet supported in GUI mode")),e.filter){const n=function(e,r,t,i){const o=[];try{l(e),f(e,r,t,i)}catch(e){o.push(`Invalid filter: ${e.message}`)}return o}(e.filter,t,r,i);o.push(...n)}if(e.responseFormat){const{errors:t,limitations:l}=function(e,r,t,i){const o=[],n=[];try{const o=function(e,r,t,i=!0){const o=[];if(i&&e.aggregates&&o.push("responseFormat.aggregates is not yet supported in GUI mode"),e.object){const n=p(e.object,r,t,i);o.push(...n)}return o}(e,r,t,i);n.push(...o)}catch(e){o.push(`Invalid responseFormat: ${e.message}`)}return{errors:o,limitations:n}}(e.responseFormat,r,e.limetype,i);o.push(...t),n.push(...l)}return{valid:0===o.length,guiSupported:0===n.length,validationErrors:o,guiLimitations:n}}(e,this.limetypes,void 0,this.guiModeEnabled)}renderModeSwitch(e){return t("div",{class:"mode-switch"},t("limel-button",{label:"GUI",primary:"gui"===this.mode,disabled:!e.guiSupported,onClick:this.switchToGui}),t("limel-button",{label:"Code",primary:"code"===this.mode,onClick:this.switchToCode}))}renderCodeEditor(e){return t("div",{class:"code-editor-container"},t("limel-code-editor",{value:this.codeValue,language:"json",lineNumbers:!0,fold:!0,lint:!0,onChange:this.handleCodeChange}),!e.valid&&e.validationErrors.length>0&&t("div",{class:"validation-errors"},t("strong",null,"Invalid Lime Query:"),t("ul",null,e.validationErrors.map((e=>t("li",null,e))))),this.guiModeEnabled&&e.valid&&!e.guiSupported&&e.guiLimitations.length>0&&t("div",{class:"gui-limitations"},t("strong",null,"Cannot switch to GUI mode:"),t("ul",null,e.guiLimitations.map((e=>t("li",null,e))))))}};(function(e,r,t,i){var o,n=arguments.length,l=n<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,t):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,r,t,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(l=(n<3?o(l):n>3?o(r,t,l):o(r,t))||l);n>3&&l&&Object.defineProperty(r,t,l)})([i()],m.prototype,"limetypes",void 0),m.style=":host(limebb-lime-query-builder){display:block;width:100%}.lime-query-builder{display:flex;flex-direction:column;gap:2rem}.mode-controls{display:flex;align-items:center;gap:0.5rem;padding:0.5rem;background-color:rgb(var(--contrast-100));border-radius:var(--border-radius)}.mode-switch{display:flex;align-items:center;gap:0.5rem}.mode-switch limel-button{min-width:5rem}.mode-switch limel-helper-text{margin-left:1rem;color:rgb(var(--color-red-default))}.gui-mode,.code-mode{display:block}.code-editor-container{--code-editor-max-height:70vh;display:flex;flex-direction:column;gap:1rem}.code-editor-container .validation-errors{padding:0.75rem 1rem;color:rgb(var(--color-red-default));background-color:rgb(var(--color-red-lighter));border-left:0.25rem solid rgb(var(--color-red-default));border-radius:0.25rem;font-size:0.875rem}.code-editor-container .validation-errors strong{display:block;margin-bottom:0.5rem;font-weight:600}.code-editor-container .validation-errors ul{margin:0;padding-left:1.5rem}.code-editor-container .validation-errors li{margin:0.25rem 0}.code-editor-container .gui-limitations{padding:0.75rem 1rem;color:rgb(var(--color-blue-dark));background-color:rgb(var(--color-blue-lighter));border-left:0.25rem solid rgb(var(--color-blue-default));border-radius:0.25rem;font-size:0.875rem}.code-editor-container .gui-limitations strong{display:block;margin-bottom:0.5rem;font-weight:600}.code-editor-container .gui-limitations ul{margin:0;padding-left:1.5rem}.code-editor-container .gui-limitations li{margin:0.25rem 0}.lime-query-builder-label{margin:0;font-size:1.5rem;font-weight:600;color:rgb(var(--contrast-1100))}.placeholder-message{padding:2rem;text-align:center;background-color:rgb(var(--contrast-100));border-radius:var(--border-radius);border:1px solid rgb(var(--contrast-300))}.placeholder-message h4{margin:0 0 1rem 0;font-size:1.125rem;font-weight:600;color:rgb(var(--contrast-1100))}.placeholder-message p{margin:0;color:rgb(var(--contrast-900));line-height:1.5}";export{m as limebb_lime_query_builder}
@@ -1 +1 @@
1
- import{r as e,h as r}from"./p-1556b545.js";const o=class{constructor(r){e(this,r)}render(){return[r("div",{key:"c9f2a93f053062a3c3c02c2e3653f9d3240a1dd8",class:"header"},r("limel-icon",{key:"cee77268f6abf4dee77fdc6e3ba49477ad24d3a6",name:"not_showing_video_frames"}),r("h2",{key:"05034620f48cbeb2195238e4e63e20ef46d1ffb5"},"Viewing this file type requires ",r("em",{key:"b556aeb0136a0252682fb54af461d1e779ea6060"},"Live Docs"))),r("p",{key:"3833b1b024525c143a6c03619fcf37e308ac7409"},r("em",{key:"9cd6242503906d79305a03a67326c756697615cb"},"Live Docs")," not only enables you to view many file formats such as Microsoft Office documents, but it also empowers you to edit them right in the CRM. No need to download anything on your device!",r("a",{key:"8c95828f4b111d62c9629cfed54d099bc60eb159",target:"_blank",href:"https://www.lime-technologies.com/en/lime-crm/live-docs/"},"Learn more"))]}};o.style=":host(limebb-live-docs-info){padding:1rem 2rem;display:flex;flex-direction:column;gap:0.5rem;border-style:dashed;border-color:rgb(var(--contrast-700));border-radius:0 0 0.5rem 0.5rem;border-width:0 1px 1px 1px}.header{display:flex;align-items:center;gap:0.5rem}h2,p{margin:0;color:rgb(var(--contrast-1100))}h2{font-size:large;font-weight:300}limel-icon{color:rgb(var(--color-orange-default));width:2rem}a{all:unset;cursor:pointer;transition:color 0.2s ease;color:rgb(var(--color-sky-default));margin-left:0.5rem}a:hover{color:rgb(var(--color-sky-dark));text-decoration:underline}";export{o as limebb_live_docs_info}
1
+ import{r as e,h as r}from"./p-1556b545.js";const o=class{constructor(r){e(this,r)}render(){return[r("div",{key:"afca6783253565c24917f26fa037d47555cc79ee",class:"header"},r("limel-icon",{key:"e3119195e169a5c1b5534985d92537f4bd71036c",name:"not_showing_video_frames"}),r("h2",{key:"a00ac4d1cccf23e00975d0f95f423b3179170d1f"},"Viewing this file type requires ",r("em",{key:"cd66615d34d92b74943d0d87c796ac5d14f3f314"},"Live Docs"))),r("p",{key:"39d0f82f29ec687cfd209b9c32c36b3be08b23aa"},r("em",{key:"aea7387f90684dc1571434530708971800a09d49"},"Live Docs")," not only enables you to view many file formats such as Microsoft Office documents, but it also empowers you to edit them right in the CRM. No need to download anything on your device!",r("a",{key:"a254ad58b3d56386bae9e3ef4113b8d6c70a236e",target:"_blank",href:"https://www.lime-technologies.com/en/lime-crm/live-docs/"},"Learn more"))]}};o.style=":host(limebb-live-docs-info){padding:1rem 2rem;display:flex;flex-direction:column;gap:0.5rem;border-style:dashed;border-color:rgb(var(--contrast-700));border-radius:0 0 0.5rem 0.5rem;border-width:0 1px 1px 1px}.header{display:flex;align-items:center;gap:0.5rem}h2,p{margin:0;color:rgb(var(--contrast-1100))}h2{font-size:large;font-weight:300}limel-icon{color:rgb(var(--color-orange-default));width:2rem}a{all:unset;cursor:pointer;transition:color 0.2s ease;color:rgb(var(--color-sky-default));margin-left:0.5rem}a:hover{color:rgb(var(--color-sky-dark));text-decoration:underline}";export{o as limebb_live_docs_info}
@@ -1 +1 @@
1
- import{r,c as n,h as t}from"./p-1556b545.js";import{c as e}from"./p-1fba0ade.js";import{t as u,c as i,a as f,i as a,g as o,b as c,d as s}from"./p-8044ffbd.js";import{d as v,i as l,a as d,U as b,g as h,S as p,k as j}from"./p-bcc23575.js";import{d as m,i as y,S as g,a as _}from"./p-b31772c8.js";import{i as w,c as A,g as k,a as O,b as x,f as S,h as E}from"./p-5322fd19.js";import{e as D,M,i as R}from"./p-c40a3f4b.js";function U(r){return r}var B,q,C,I=Date.now,L=v?function(r,n){return v(r,"toString",{configurable:!0,enumerable:!1,value:(t=n,function(){return t}),writable:!0});var t}:U;const N=(B=L,q=0,C=0,function(){var r=I(),n=16-(r-C);if(C=r,n>0){if(++q>=800)return arguments[0]}else q=0;return B.apply(void 0,arguments)});var T=Math.max;function V(r,n,t){if(!m(t))return!1;var e=typeof n;return!!("number"==e?w(t)&&l(n,t.length):"string"==e&&n in t)&&D(t[n],r)}var W=g?g.isConcatSpreadable:void 0;function z(r){return y(r)||A(r)||!!(W&&r&&r[W])}function F(r,n,t,e,u){var i=-1,f=r.length;for(t||(t=z),u||(u=[]);++i<f;){var a=r[i];n>0&&t(a)?n>1?F(a,n-1,t,e,u):d(u,a):e||(u[u.length]=a)}return u}var G=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function H(r){return G.test(r)}var J="\\ud800-\\udfff",K="["+J+"]",P="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Q="\\ud83c[\\udffb-\\udfff]",X="[^"+J+"]",Y="(?:\\ud83c[\\udde6-\\uddff]){2}",Z="[\\ud800-\\udbff][\\udc00-\\udfff]",$="(?:"+P+"|"+Q+")?",rr="[\\ufe0e\\ufe0f]?",nr=rr+$+"(?:\\u200d(?:"+[X,Y,Z].join("|")+")"+rr+$+")*",tr="(?:"+[X+P+"?",P,Y,Z,K].join("|")+")",er=RegExp(Q+"(?="+Q+")|"+tr+nr,"g");const ur=function(r){var n,t,e,i,f=H(r=u(r))?function(r){return H(r)?function(r){return r.match(er)||[]}(r):function(r){return r.split("")}(r)}(r):void 0,a=f?f[0]:r.charAt(0),o=f?(n=f,t=1,i=n.length,e=void 0===e?i:e,!t&&e>=i?n:function(r,n,t){var e=-1,u=r.length;n<0&&(n=-n>u?0:u+n),(t=t>u?u:t)<0&&(t+=u),u=n>t?0:t-n>>>0,n>>>=0;for(var i=Array(u);++e<u;)i[e]=r[e+n];return i}(n,t,e)).join(""):r.slice(1);return a.toUpperCase()+o};function ir(r){var n=-1,t=null==r?0:r.length;for(this.__data__=new M;++n<t;)this.add(r[n])}function fr(r,n){for(var t=-1,e=null==r?0:r.length;++t<e;)if(n(r[t],t,r))return!0;return!1}ir.prototype.add=ir.prototype.push=function(r){return this.__data__.set(r,"__lodash_hash_undefined__"),this},ir.prototype.has=function(r){return this.__data__.has(r)};var ar=1,or=2;function cr(r,n,t,e,u,i){var f=t&ar,a=r.length,o=n.length;if(a!=o&&!(f&&o>a))return!1;var c=i.get(r),s=i.get(n);if(c&&s)return c==n&&s==r;var v=-1,l=!0,d=t&or?new ir:void 0;for(i.set(r,n),i.set(n,r);++v<a;){var b=r[v],h=n[v];if(e)var p=f?e(h,b,v,n,r,i):e(b,h,v,r,n,i);if(void 0!==p){if(p)continue;l=!1;break}if(d){if(!fr(n,(function(r,n){if(!d.has(n)&&(b===r||u(b,r,t,e,i)))return d.push(n)}))){l=!1;break}}else if(b!==h&&!u(b,h,t,e,i)){l=!1;break}}return i.delete(r),i.delete(n),l}function sr(r){var n=-1,t=Array(r.size);return r.forEach((function(r,e){t[++n]=[e,r]})),t}function vr(r){var n=-1,t=Array(r.size);return r.forEach((function(r){t[++n]=r})),t}var lr=1,dr=2,br="[object Boolean]",hr="[object Date]",pr="[object Error]",jr="[object Map]",mr="[object Number]",yr="[object RegExp]",gr="[object Set]",_r="[object String]",wr="[object Symbol]",Ar="[object ArrayBuffer]",kr="[object DataView]",Or=g?g.prototype:void 0,xr=Or?Or.valueOf:void 0,Sr=1,Er=Object.prototype.hasOwnProperty,Dr=1,Mr="[object Arguments]",Rr="[object Array]",Ur="[object Object]",Br=Object.prototype.hasOwnProperty;function qr(r,n,t,e,u){return r===n||(null==r||null==n||!_(r)&&!_(n)?r!=r&&n!=n:function(r,n,t,e,u,i){var f=y(r),a=y(n),o=f?Rr:k(r),c=a?Rr:k(n),s=(o=o==Mr?Ur:o)==Ur,v=(c=c==Mr?Ur:c)==Ur,l=o==c;if(l&&O(r)){if(!O(n))return!1;f=!0,s=!1}if(l&&!s)return i||(i=new p),f||x(r)?cr(r,n,t,e,u,i):function(r,n,t,e,u,i,f){switch(t){case kr:if(r.byteLength!=n.byteLength||r.byteOffset!=n.byteOffset)return!1;r=r.buffer,n=n.buffer;case Ar:return!(r.byteLength!=n.byteLength||!i(new b(r),new b(n)));case br:case hr:case mr:return D(+r,+n);case pr:return r.name==n.name&&r.message==n.message;case yr:case _r:return r==n+"";case jr:var a=sr;case gr:if(a||(a=vr),r.size!=n.size&&!(e&lr))return!1;var o=f.get(r);if(o)return o==n;e|=dr,f.set(r,n);var c=cr(a(r),a(n),e,u,i,f);return f.delete(r),c;case wr:if(xr)return xr.call(r)==xr.call(n)}return!1}(r,n,o,t,e,u,i);if(!(t&Dr)){var d=s&&Br.call(r,"__wrapped__"),j=v&&Br.call(n,"__wrapped__");if(d||j){var m=d?r.value():r,g=j?n.value():n;return i||(i=new p),u(m,g,t,e,i)}}return!!l&&(i||(i=new p),function(r,n,t,e,u,i){var f=t&Sr,a=h(r),o=a.length;if(o!=h(n).length&&!f)return!1;for(var c=o;c--;){var s=a[c];if(!(f?s in n:Er.call(n,s)))return!1}var v=i.get(r),l=i.get(n);if(v&&l)return v==n&&l==r;var d=!0;i.set(r,n),i.set(n,r);for(var b=f;++c<o;){var p=r[s=a[c]],j=n[s];if(e)var m=f?e(j,p,s,n,r,i):e(p,j,s,r,n,i);if(!(void 0===m?p===j||u(p,j,t,e,i):m)){d=!1;break}b||(b="constructor"==s)}if(d&&!b){var y=r.constructor,g=n.constructor;y==g||!("constructor"in r)||!("constructor"in n)||"function"==typeof y&&y instanceof y&&"function"==typeof g&&g instanceof g||(d=!1)}return i.delete(r),i.delete(n),d}(r,n,t,e,u,i))}(r,n,t,e,qr,u))}var Cr=1,Ir=2;function Lr(r){return r==r&&!m(r)}function Nr(r,n){return function(t){return null!=t&&t[r]===n&&(void 0!==n||r in Object(t))}}function Tr(r,n){return null!=r&&n in Object(r)}var Vr=1,Wr=2;function zr(r){return"function"==typeof r?r:null==r?U:"object"==typeof r?y(r)?(u=r[1],a(e=r[0])&&Lr(u)?Nr(f(e),u):function(r){var n=o(r,e);return void 0===n&&n===u?function(r,n){return null!=r&&function(r,n,t){for(var e=-1,u=(n=i(n,r)).length,a=!1;++e<u;){var o=f(n[e]);if(!(a=null!=r&&t(r,o)))break;r=r[o]}return a||++e!=u?a:!!(u=null==r?0:r.length)&&S(u)&&l(o,u)&&(y(r)||A(r))}(r,n,Tr)}(r,e):qr(u,n,Vr|Wr)}):(t=function(r){for(var n=j(r),t=n.length;t--;){var e=n[t],u=r[e];n[t]=[e,u,Lr(u)]}return n}(n=r),1==t.length&&t[0][2]?Nr(t[0][0],t[0][1]):function(r){return r===n||function(r,n,t,e){var u=t.length,i=u;if(null==r)return!i;for(r=Object(r);u--;){var f=t[u];if(f[2]?f[1]!==r[f[0]]:!(f[0]in r))return!1}for(;++u<i;){var a=(f=t[u])[0],o=r[a],c=f[1];if(f[2]){if(void 0===o&&!(a in r))return!1}else{var s,v=new p;if(!(void 0===s?qr(c,o,Cr|Ir,e,v):s))return!1}}return!0}(r,0,t)}):function(r){return a(r)?(n=f(r),function(r){return null==r?void 0:r[n]}):function(r){return function(n){return c(n,r)}}(r);var n}(r);var n,t,e,u}const Fr=function(r,n,t){for(var e=-1,u=Object(r),i=t(r),f=i.length;f--;){var a=i[++e];if(!1===n(u[a],a,u))break}return r};const Gr=function(r,n){if(null==r)return r;if(!w(r))return function(r,n){return r&&Fr(r,n,j)}(r,n);for(var t=r.length,e=-1,u=Object(r);++e<t&&!1!==n(u[e],e,u););return r};function Hr(r,n){if(r!==n){var t=void 0!==r,e=null===r,u=r==r,i=R(r),f=void 0!==n,a=null===n,o=n==n,c=R(n);if(!a&&!c&&!i&&r>n||i&&f&&o&&!a&&!c||e&&f&&o||!t&&o||!u)return 1;if(!e&&!i&&!c&&r<n||c&&t&&u&&!e&&!i||a&&t&&u||!f&&u||!o)return-1}return 0}function Jr(r,n,t){n=n.length?s(n,(function(r){return y(r)?function(n){return c(n,1===r.length?r[0]:r)}:r})):[U];var e=-1;n=s(n,E(zr));var u=function(r,n){var t=-1,e=w(r)?Array(r.length):[];return Gr(r,(function(r){e[++t]=n(r)})),e}(r,(function(r){return{criteria:s(n,(function(n){return n(r)})),index:++e,value:r}}));return function(r){var n=r.length;for(r.sort((function(r,n){return function(r,n,t){for(var e=-1,u=r.criteria,i=n.criteria,f=u.length,a=t.length;++e<f;){var o=Hr(u[e],i[e]);if(o)return e>=a?o:o*("desc"==t[e]?-1:1)}return r.index-n.index}(r,n,t)}));n--;)r[n]=r[n].value;return r}(u)}var Kr=function(r){return N(function(r,n,t){return n=T(void 0===n?r.length-1:n,0),function(){for(var e=arguments,u=-1,i=T(e.length-n,0),f=Array(i);++u<i;)f[u]=e[n+u];u=-1;for(var a=Array(n+1);++u<n;)a[u]=e[u];return a[n]=t(f),function(r,n,t){switch(t.length){case 0:return r.call(n);case 1:return r.call(n,t[0]);case 2:return r.call(n,t[0],t[1]);case 3:return r.call(n,t[0],t[1],t[2])}return r.apply(n,t)}(r,this,a)}}(r,void 0,U),r+"")}((function(r,n){if(null==r)return[];var t=n.length;return t>1&&V(r,n[0],n[1])?n=[]:t>2&&V(n[0],n[1],n[2])&&(n=[n[0]]),Jr(r,F(n,1),[])}));const Pr=Kr;function Qr(r,n){if(0===r.length||0===n.length)return"";r="en_us"===r?"en-US":r,n="en_us"===n?"en-US":n;const t=(new Intl.DisplayNames(n,{type:"language"}).of(r)||"").split(" ");return t[0]=ur(u(t[0]).toLowerCase()),t.join(" ")}const Xr=class{constructor(t){r(this,t),this.change=n(this,"change",7),this.context={limetype:null,id:null},this.handleChange=r=>{r.stopPropagation(),this.change.emit(this.multipleChoice?r.detail.map((r=>r.value)):r.detail.value)}}async componentWillLoad(){try{this.http=this.platform.get(e.Http),this.allLanguages=await async function(r){const n=await r.get("api/v1/admin/settings/languages"),t=[];return(null==n?void 0:n.active)&&t.push(...n.active),(null==n?void 0:n.inactive)&&t.push(...n.inactive),t}(this.http)}catch(r){console.error(r)}}getOptions(){return this.allLanguages.map((r=>({value:r,text:Qr(r,r)})))}render(){const r=this.getOptions();let n;if(Array.isArray(this.value)){const t=this.value;n=r.filter((r=>t.includes(r.value)))}else{const t=this.value;n=r.find((r=>r.value===t))}return t("limel-select",{key:"8796010a6c1c7413d6e7ea8b6db963d82717c1c6",value:n,options:Pr(r,"text"),helperText:this.helperText,label:this.label,required:this.required,disabled:this.disabled,readonly:this.readonly,onChange:this.handleChange,multiple:this.multipleChoice})}};export{Xr as limebb_locale_picker}
1
+ import{r,c as n,h as t}from"./p-1556b545.js";import{c as e}from"./p-1fba0ade.js";import{t as u,c as i,a as f,i as a,g as o,b as c,d as s}from"./p-8044ffbd.js";import{d as v,i as l,a as d,U as b,g as h,S as p,k as j}from"./p-bcc23575.js";import{d as m,i as y,S as g,a as _}from"./p-b31772c8.js";import{i as w,c as A,g as k,a as O,b as x,f as S,h as E}from"./p-5322fd19.js";import{e as D,M,i as R}from"./p-c40a3f4b.js";function U(r){return r}var B,q,C,I=Date.now,L=v?function(r,n){return v(r,"toString",{configurable:!0,enumerable:!1,value:(t=n,function(){return t}),writable:!0});var t}:U;const N=(B=L,q=0,C=0,function(){var r=I(),n=16-(r-C);if(C=r,n>0){if(++q>=800)return arguments[0]}else q=0;return B.apply(void 0,arguments)});var T=Math.max;function V(r,n,t){if(!m(t))return!1;var e=typeof n;return!!("number"==e?w(t)&&l(n,t.length):"string"==e&&n in t)&&D(t[n],r)}var W=g?g.isConcatSpreadable:void 0;function z(r){return y(r)||A(r)||!!(W&&r&&r[W])}function F(r,n,t,e,u){var i=-1,f=r.length;for(t||(t=z),u||(u=[]);++i<f;){var a=r[i];n>0&&t(a)?n>1?F(a,n-1,t,e,u):d(u,a):e||(u[u.length]=a)}return u}var G=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function H(r){return G.test(r)}var J="\\ud800-\\udfff",K="["+J+"]",P="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Q="\\ud83c[\\udffb-\\udfff]",X="[^"+J+"]",Y="(?:\\ud83c[\\udde6-\\uddff]){2}",Z="[\\ud800-\\udbff][\\udc00-\\udfff]",$="(?:"+P+"|"+Q+")?",rr="[\\ufe0e\\ufe0f]?",nr=rr+$+"(?:\\u200d(?:"+[X,Y,Z].join("|")+")"+rr+$+")*",tr="(?:"+[X+P+"?",P,Y,Z,K].join("|")+")",er=RegExp(Q+"(?="+Q+")|"+tr+nr,"g");const ur=function(r){var n,t,e,i,f=H(r=u(r))?function(r){return H(r)?function(r){return r.match(er)||[]}(r):function(r){return r.split("")}(r)}(r):void 0,a=f?f[0]:r.charAt(0),o=f?(n=f,t=1,i=n.length,e=void 0===e?i:e,!t&&e>=i?n:function(r,n,t){var e=-1,u=r.length;n<0&&(n=-n>u?0:u+n),(t=t>u?u:t)<0&&(t+=u),u=n>t?0:t-n>>>0,n>>>=0;for(var i=Array(u);++e<u;)i[e]=r[e+n];return i}(n,t,e)).join(""):r.slice(1);return a.toUpperCase()+o};function ir(r){var n=-1,t=null==r?0:r.length;for(this.__data__=new M;++n<t;)this.add(r[n])}function fr(r,n){for(var t=-1,e=null==r?0:r.length;++t<e;)if(n(r[t],t,r))return!0;return!1}ir.prototype.add=ir.prototype.push=function(r){return this.__data__.set(r,"__lodash_hash_undefined__"),this},ir.prototype.has=function(r){return this.__data__.has(r)};var ar=1,or=2;function cr(r,n,t,e,u,i){var f=t&ar,a=r.length,o=n.length;if(a!=o&&!(f&&o>a))return!1;var c=i.get(r),s=i.get(n);if(c&&s)return c==n&&s==r;var v=-1,l=!0,d=t&or?new ir:void 0;for(i.set(r,n),i.set(n,r);++v<a;){var b=r[v],h=n[v];if(e)var p=f?e(h,b,v,n,r,i):e(b,h,v,r,n,i);if(void 0!==p){if(p)continue;l=!1;break}if(d){if(!fr(n,(function(r,n){if(!d.has(n)&&(b===r||u(b,r,t,e,i)))return d.push(n)}))){l=!1;break}}else if(b!==h&&!u(b,h,t,e,i)){l=!1;break}}return i.delete(r),i.delete(n),l}function sr(r){var n=-1,t=Array(r.size);return r.forEach((function(r,e){t[++n]=[e,r]})),t}function vr(r){var n=-1,t=Array(r.size);return r.forEach((function(r){t[++n]=r})),t}var lr=1,dr=2,br="[object Boolean]",hr="[object Date]",pr="[object Error]",jr="[object Map]",mr="[object Number]",yr="[object RegExp]",gr="[object Set]",_r="[object String]",wr="[object Symbol]",Ar="[object ArrayBuffer]",kr="[object DataView]",Or=g?g.prototype:void 0,xr=Or?Or.valueOf:void 0,Sr=1,Er=Object.prototype.hasOwnProperty,Dr=1,Mr="[object Arguments]",Rr="[object Array]",Ur="[object Object]",Br=Object.prototype.hasOwnProperty;function qr(r,n,t,e,u){return r===n||(null==r||null==n||!_(r)&&!_(n)?r!=r&&n!=n:function(r,n,t,e,u,i){var f=y(r),a=y(n),o=f?Rr:k(r),c=a?Rr:k(n),s=(o=o==Mr?Ur:o)==Ur,v=(c=c==Mr?Ur:c)==Ur,l=o==c;if(l&&O(r)){if(!O(n))return!1;f=!0,s=!1}if(l&&!s)return i||(i=new p),f||x(r)?cr(r,n,t,e,u,i):function(r,n,t,e,u,i,f){switch(t){case kr:if(r.byteLength!=n.byteLength||r.byteOffset!=n.byteOffset)return!1;r=r.buffer,n=n.buffer;case Ar:return!(r.byteLength!=n.byteLength||!i(new b(r),new b(n)));case br:case hr:case mr:return D(+r,+n);case pr:return r.name==n.name&&r.message==n.message;case yr:case _r:return r==n+"";case jr:var a=sr;case gr:if(a||(a=vr),r.size!=n.size&&!(e&lr))return!1;var o=f.get(r);if(o)return o==n;e|=dr,f.set(r,n);var c=cr(a(r),a(n),e,u,i,f);return f.delete(r),c;case wr:if(xr)return xr.call(r)==xr.call(n)}return!1}(r,n,o,t,e,u,i);if(!(t&Dr)){var d=s&&Br.call(r,"__wrapped__"),j=v&&Br.call(n,"__wrapped__");if(d||j){var m=d?r.value():r,g=j?n.value():n;return i||(i=new p),u(m,g,t,e,i)}}return!!l&&(i||(i=new p),function(r,n,t,e,u,i){var f=t&Sr,a=h(r),o=a.length;if(o!=h(n).length&&!f)return!1;for(var c=o;c--;){var s=a[c];if(!(f?s in n:Er.call(n,s)))return!1}var v=i.get(r),l=i.get(n);if(v&&l)return v==n&&l==r;var d=!0;i.set(r,n),i.set(n,r);for(var b=f;++c<o;){var p=r[s=a[c]],j=n[s];if(e)var m=f?e(j,p,s,n,r,i):e(p,j,s,r,n,i);if(!(void 0===m?p===j||u(p,j,t,e,i):m)){d=!1;break}b||(b="constructor"==s)}if(d&&!b){var y=r.constructor,g=n.constructor;y==g||!("constructor"in r)||!("constructor"in n)||"function"==typeof y&&y instanceof y&&"function"==typeof g&&g instanceof g||(d=!1)}return i.delete(r),i.delete(n),d}(r,n,t,e,u,i))}(r,n,t,e,qr,u))}var Cr=1,Ir=2;function Lr(r){return r==r&&!m(r)}function Nr(r,n){return function(t){return null!=t&&t[r]===n&&(void 0!==n||r in Object(t))}}function Tr(r,n){return null!=r&&n in Object(r)}var Vr=1,Wr=2;function zr(r){return"function"==typeof r?r:null==r?U:"object"==typeof r?y(r)?(u=r[1],a(e=r[0])&&Lr(u)?Nr(f(e),u):function(r){var n=o(r,e);return void 0===n&&n===u?function(r,n){return null!=r&&function(r,n,t){for(var e=-1,u=(n=i(n,r)).length,a=!1;++e<u;){var o=f(n[e]);if(!(a=null!=r&&t(r,o)))break;r=r[o]}return a||++e!=u?a:!!(u=null==r?0:r.length)&&S(u)&&l(o,u)&&(y(r)||A(r))}(r,n,Tr)}(r,e):qr(u,n,Vr|Wr)}):(t=function(r){for(var n=j(r),t=n.length;t--;){var e=n[t],u=r[e];n[t]=[e,u,Lr(u)]}return n}(n=r),1==t.length&&t[0][2]?Nr(t[0][0],t[0][1]):function(r){return r===n||function(r,n,t,e){var u=t.length,i=u;if(null==r)return!i;for(r=Object(r);u--;){var f=t[u];if(f[2]?f[1]!==r[f[0]]:!(f[0]in r))return!1}for(;++u<i;){var a=(f=t[u])[0],o=r[a],c=f[1];if(f[2]){if(void 0===o&&!(a in r))return!1}else{var s,v=new p;if(!(void 0===s?qr(c,o,Cr|Ir,e,v):s))return!1}}return!0}(r,0,t)}):function(r){return a(r)?(n=f(r),function(r){return null==r?void 0:r[n]}):function(r){return function(n){return c(n,r)}}(r);var n}(r);var n,t,e,u}const Fr=function(r,n,t){for(var e=-1,u=Object(r),i=t(r),f=i.length;f--;){var a=i[++e];if(!1===n(u[a],a,u))break}return r};const Gr=function(r,n){if(null==r)return r;if(!w(r))return function(r,n){return r&&Fr(r,n,j)}(r,n);for(var t=r.length,e=-1,u=Object(r);++e<t&&!1!==n(u[e],e,u););return r};function Hr(r,n){if(r!==n){var t=void 0!==r,e=null===r,u=r==r,i=R(r),f=void 0!==n,a=null===n,o=n==n,c=R(n);if(!a&&!c&&!i&&r>n||i&&f&&o&&!a&&!c||e&&f&&o||!t&&o||!u)return 1;if(!e&&!i&&!c&&r<n||c&&t&&u&&!e&&!i||a&&t&&u||!f&&u||!o)return-1}return 0}function Jr(r,n,t){n=n.length?s(n,(function(r){return y(r)?function(n){return c(n,1===r.length?r[0]:r)}:r})):[U];var e=-1;n=s(n,E(zr));var u=function(r,n){var t=-1,e=w(r)?Array(r.length):[];return Gr(r,(function(r){e[++t]=n(r)})),e}(r,(function(r){return{criteria:s(n,(function(n){return n(r)})),index:++e,value:r}}));return function(r){var n=r.length;for(r.sort((function(r,n){return function(r,n,t){for(var e=-1,u=r.criteria,i=n.criteria,f=u.length,a=t.length;++e<f;){var o=Hr(u[e],i[e]);if(o)return e>=a?o:o*("desc"==t[e]?-1:1)}return r.index-n.index}(r,n,t)}));n--;)r[n]=r[n].value;return r}(u)}var Kr=function(r){return N(function(r,n,t){return n=T(void 0===n?r.length-1:n,0),function(){for(var e=arguments,u=-1,i=T(e.length-n,0),f=Array(i);++u<i;)f[u]=e[n+u];u=-1;for(var a=Array(n+1);++u<n;)a[u]=e[u];return a[n]=t(f),function(r,n,t){switch(t.length){case 0:return r.call(n);case 1:return r.call(n,t[0]);case 2:return r.call(n,t[0],t[1]);case 3:return r.call(n,t[0],t[1],t[2])}return r.apply(n,t)}(r,this,a)}}(r,void 0,U),r+"")}((function(r,n){if(null==r)return[];var t=n.length;return t>1&&V(r,n[0],n[1])?n=[]:t>2&&V(n[0],n[1],n[2])&&(n=[n[0]]),Jr(r,F(n,1),[])}));const Pr=Kr;function Qr(r,n){if(0===r.length||0===n.length)return"";r="en_us"===r?"en-US":r,n="en_us"===n?"en-US":n;const t=(new Intl.DisplayNames(n,{type:"language"}).of(r)||"").split(" ");return t[0]=ur(u(t[0]).toLowerCase()),t.join(" ")}const Xr=class{constructor(t){r(this,t),this.change=n(this,"change",7),this.context={limetype:null,id:null},this.handleChange=r=>{r.stopPropagation(),this.change.emit(this.multipleChoice?r.detail.map((r=>r.value)):r.detail.value)}}async componentWillLoad(){try{this.http=this.platform.get(e.Http),this.allLanguages=await async function(r){const n=await r.get("api/v1/admin/settings/languages"),t=[];return(null==n?void 0:n.active)&&t.push(...n.active),(null==n?void 0:n.inactive)&&t.push(...n.inactive),t}(this.http)}catch(r){console.error(r)}}getOptions(){return this.allLanguages.map((r=>({value:r,text:Qr(r,r)})))}render(){const r=this.getOptions();let n;if(Array.isArray(this.value)){const t=this.value;n=r.filter((r=>t.includes(r.value)))}else{const t=this.value;n=r.find((r=>r.value===t))}return t("limel-select",{key:"54389312bd8cae7d92626c67a45bd2455f2a956f",value:n,options:Pr(r,"text"),helperText:this.helperText,label:this.label,required:this.required,disabled:this.disabled,readonly:this.readonly,onChange:this.handleChange,multiple:this.multipleChoice})}};export{Xr as limebb_locale_picker}
@@ -1 +1 @@
1
- import{r as e,h as o,c as t}from"./p-1556b545.js";const r={expand:"expand",minimize:"minus_math",maximize:"minus_math",newTab:"up_right_arrow",back:"left_arrow",close:"multiply",shrink:"compress",float:"rectangle"},i=class{constructor(t){e(this,t),this.renderAsLink=()=>o("a",{class:this.getContainerClassList(),id:"tooltipId","aria-label":this.tooltipLabel&&this.tooltipHelperLabel,href:this.href,target:"newTab"===this.type?"_blank":void 0},this.renderType(),this.renderTooltip()),this.renderAsButton=()=>o("button",{class:this.getContainerClassList(),id:"tooltipId","aria-label":this.tooltipLabel&&this.tooltipHelperLabel},this.renderType(),this.renderTooltip()),this.getContainerClassList=()=>({"navigation-button":!0,[this.type]:!0})}render(){return this.href?this.renderAsLink():this.renderAsButton()}renderType(){return this.renderIcon(r[this.type])}renderTooltip(){if(this.tooltipLabel)return o("limel-tooltip",{label:this.tooltipLabel,helperLabel:this.tooltipHelperLabel,elementId:"tooltipId"})}renderIcon(e){return o("limel-icon",{name:e})}static get delegatesFocus(){return!0}};i.style='@charset "UTF-8";.navigation-button{all:unset;isolation:isolate;position:relative;display:flex;justify-content:center;align-items:center;height:1.875rem;width:1.875rem;border-radius:50%;transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:var(--navigation-button-background-color, var(--lime-elevated-surface-background-color))}.navigation-button:hover,.navigation-button:focus,.navigation-button:focus-visible{will-change:color, background-color, box-shadow, transform}.navigation-button:hover,.navigation-button:focus-visible{transform:translate3d(0, 0.01rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}.navigation-button:hover{box-shadow:var(--button-shadow-hovered)}.navigation-button:active{--limel-clickable-transform-timing-function:cubic-bezier(\n 0.83,\n -0.15,\n 0.49,\n 1.16\n );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}.navigation-button:hover,.navigation-button:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}.navigation-button:focus{outline:none}.navigation-button:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}.navigation-button limel-icon{transition:color 0.2s ease, transform 0.2s cubic-bezier(0.84, 0.15, 0.52, 1.42);color:var(--header-menu-icon-color);width:1.25rem}.newTab limel-icon{transition:transform 0.2s ease;transform:scale(0.8);z-index:3}.newTab:before{z-index:2}.newTab::after{z-index:1}.newTab:before,.newTab:after{content:"";transition:transform 0.2s ease, border-color 0.2s ease;position:absolute;width:0.875rem;height:0.875rem;outline:1.5px solid rgb(var(--contrast-900));border-radius:1px;background-color:var(--navigation-button-background-color, rgb(var(--contrast-100)))}.newTab:hover limel-icon{color:var(--mdc-theme-primary);transform:translate3d(-0.1rem, 0.1rem, 0) scale(1)}.newTab:hover:before{transform:translate3d(0.125rem, -0.125rem, 0);border-color:rgb(var(--contrast-1000));box-shadow:var(--shadow-depth-8)}.newTab:hover:after{transform:translate3d(-0.15rem, 0.15rem, 0) scale(0.9);border-color:rgb(var(--contrast-700))}.expand:after{transition:transform 0.2s ease;content:"";position:absolute;z-index:1;background-color:var(--navigation-button-background-color, rgb(var(--contrast-100)));width:0.75rem;height:0.75rem}.expand:hover limel-icon{color:var(--mdc-theme-primary)}.expand:hover:after{transform:scale(0.5)}.expand:hover limel-icon{transform:scale(1.18)}.minimize:before,.minimize:after,.maximize:before,.maximize:after{content:"";transition:transform 0.3s ease-out 0.15s, background-color 0.1s ease}.minimize limel-icon,.maximize limel-icon{transition:transform 0.2s ease 0.1s}.minimize:before,.maximize:after,.maximize:hover:before{transform:scaleY(1) scaleX(1);z-index:-1;box-sizing:border-box;position:absolute;width:70%;height:60%;border-radius:0.25rem;transform-origin:bottom}.minimize:hover:before,.maximize:before{transition:transform 0.3s ease-out 0.15s, background-color 0.1s ease;transform:scaleY(0.3) scaleX(0.7);background-color:rgb(var(--contrast-500))}.minimize:hover limel-icon,.maximize limel-icon{transform:scaleX(0.8) translate3d(0, 0.4rem, 0)}.maximize limel-icon{color:rgb(var(--contrast-900))}.maximize:hover limel-icon{color:currentColor;transform:scaleX(1.1) translate3d(0, -0.1rem, 0)}.maximize:after{z-index:-2;border:1px dashed rgb(var(--contrast-800))}.close limel-icon{transition:transform 0.2s ease, color 0.2s ease}.close:before,.close:after{transition-delay:0.1s;content:"";position:absolute;inset:0;border-radius:50%;opacity:0}.close:before{transition:transform 0.3s ease, opacity 0.3s ease;background-color:rgb(var(--color-orange-dark))}.close:after{transition:transform 0.6s ease, opacity 0.6s ease;background-color:rgb(var(--color-orange-light))}.close:hover limel-icon{color:rgb(var(--color-white));transform:scale(0.7) rotate(90deg)}.close:hover:before{opacity:1;transform:scale(0.4)}.close:hover:after{opacity:0.4;transform:scale(0.6)}.float:after{transition:width 0.2s ease-out, opacity 0.2s ease;content:"";position:absolute;inset:0 0.5rem 0 auto;border-radius:1px;opacity:0.8;transform:translate3d(0, 0, 0);background-color:rgb(var(--contrast-800));width:0.125rem;height:0.6rem;margin:auto}.float:hover:after{width:0.4rem;opacity:1;transform:translate3d(0, 0, 0)}';const a=class{constructor(o){e(this,o),this.actionSelected=t(this,"actionSelected",7),this.triggerDelay=600,this.openDirection="top",this.popoverMaxWidth="20rem",this.popoverMaxHeight="min(35rem, calc(100vh - 2rem))",this.actions=[],this.isPopoverOpen=!1,this.openPopoverWithDelay=e=>{e.stopPropagation(),clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout((()=>{a.currentOpenPopover&&a.currentOpenPopover!==this&&(a.currentOpenPopover.isPopoverOpen=!1),a.currentOpenPopover=this,this.isPopoverOpen=!0}),this.triggerDelay)},this.resetTimeout=()=>{this.isPopoverOpen||clearTimeout(this.hoverTimeout)},this.onPopoverClose=e=>{e.stopPropagation(),this.isPopoverOpen=!1,a.currentOpenPopover===this&&(a.currentOpenPopover=null)},this.handleCloseClick=e=>{e.stopPropagation(),this.isPopoverOpen=!1},this.handleSelected=e=>{this.actionSelected.emit(e.detail)}}render(){return o("limel-popover",{key:"126d39c5b55b3b0c363d0f8ef832c77928815a1b",style:{"--limebb-summary-popover-timeout":`${this.triggerDelay}ms`},open:this.isPopoverOpen,onClose:this.onPopoverClose,openDirection:this.openDirection},o("div",{key:"45ce61d635aed881f3e1cd3a59f3b224820030f1",slot:"trigger",tabIndex:0,onMouseEnter:this.openPopoverWithDelay,onMouseLeave:this.resetTimeout,onFocus:this.openPopoverWithDelay},o("slot",{key:"750536b95b4e44f7e05fd2e418d52928c6a4b7c3",name:"trigger"}),o("div",{key:"8eb3a32ec5a03a145b1b1b447a9d8d4a35b44572",class:"opening-countdown-indicator"})),o("limel-card",{key:"5011cf53fd7e41f3401a7de5271b9a988bf6368d",style:{"max-width":this.popoverMaxWidth,"max-height":this.popoverMaxHeight,"min-width":"7rem","min-height":"3rem"},orientation:"landscape",heading:this.heading,subheading:this.subheading,icon:this.icon,value:this.value,image:this.image,actions:this.actions,onActionSelected:this.handleSelected},o("limebb-navigation-button",{key:"35cd8a0d34214cccb5ca2bb722e23c72c78fa7b9",slot:"component",type:"close",style:{"--navigation-button-background-color":"rgb(var(--contrast-100), 0.8)",position:"absolute",top:"0.125rem",right:"0.125rem"},tooltipLabel:"Close",tooltipHelperLabel:"Esc",onClick:this.handleCloseClick})))}};a.currentOpenPopover=null,a.style="limel-popover{--popover-border-radius:0.95rem;--popover-body-background-color:transparent;--popover-box-shadow:var(--shadow-depth-8)}div[slot=trigger]{position:relative;display:flex;align-items:center;justify-content:center}div[slot=trigger] *{min-width:0;min-height:0}.opening-countdown-indicator{position:absolute;inset:auto 0 -0.25rem 0;margin:0 auto;height:0.125rem;border-radius:1rem;transition:width ease-out, opacity ease;transition-duration:120ms;opacity:0;width:0%;background-color:var(--mdc-theme-primary)}div[slot=trigger]:not([aria-expanded=true]):hover .opening-countdown-indicator{transition-duration:var(--limebb-summary-popover-timeout);opacity:1;width:100%}";export{i as limebb_navigation_button,a as limebb_summary_popover}
1
+ import{r as e,h as o,c as t}from"./p-1556b545.js";const r={expand:"expand",minimize:"minus_math",maximize:"minus_math",newTab:"up_right_arrow",back:"left_arrow",close:"multiply",shrink:"compress",float:"rectangle"},i=class{constructor(t){e(this,t),this.renderAsLink=()=>o("a",{class:this.getContainerClassList(),id:"tooltipId","aria-label":this.tooltipLabel&&this.tooltipHelperLabel,href:this.href,target:"newTab"===this.type?"_blank":void 0},this.renderType(),this.renderTooltip()),this.renderAsButton=()=>o("button",{class:this.getContainerClassList(),id:"tooltipId","aria-label":this.tooltipLabel&&this.tooltipHelperLabel},this.renderType(),this.renderTooltip()),this.getContainerClassList=()=>({"navigation-button":!0,[this.type]:!0})}render(){return this.href?this.renderAsLink():this.renderAsButton()}renderType(){return this.renderIcon(r[this.type])}renderTooltip(){if(this.tooltipLabel)return o("limel-tooltip",{label:this.tooltipLabel,helperLabel:this.tooltipHelperLabel,elementId:"tooltipId"})}renderIcon(e){return o("limel-icon",{name:e})}static get delegatesFocus(){return!0}};i.style='@charset "UTF-8";.navigation-button{all:unset;isolation:isolate;position:relative;display:flex;justify-content:center;align-items:center;height:1.875rem;width:1.875rem;border-radius:50%;transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:var(--navigation-button-background-color, var(--lime-elevated-surface-background-color))}.navigation-button:hover,.navigation-button:focus,.navigation-button:focus-visible{will-change:color, background-color, box-shadow, transform}.navigation-button:hover,.navigation-button:focus-visible{transform:translate3d(0, 0.01rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}.navigation-button:hover{box-shadow:var(--button-shadow-hovered)}.navigation-button:active{--limel-clickable-transform-timing-function:cubic-bezier(\n 0.83,\n -0.15,\n 0.49,\n 1.16\n );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}.navigation-button:hover,.navigation-button:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}.navigation-button:focus{outline:none}.navigation-button:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}.navigation-button limel-icon{transition:color 0.2s ease, transform 0.2s cubic-bezier(0.84, 0.15, 0.52, 1.42);color:var(--header-menu-icon-color);width:1.25rem}.newTab limel-icon{transition:transform 0.2s ease;transform:scale(0.8);z-index:3}.newTab:before{z-index:2}.newTab::after{z-index:1}.newTab:before,.newTab:after{content:"";transition:transform 0.2s ease, border-color 0.2s ease;position:absolute;width:0.875rem;height:0.875rem;outline:1.5px solid rgb(var(--contrast-900));border-radius:1px;background-color:var(--navigation-button-background-color, rgb(var(--contrast-100)))}.newTab:hover limel-icon{color:var(--mdc-theme-primary);transform:translate3d(-0.1rem, 0.1rem, 0) scale(1)}.newTab:hover:before{transform:translate3d(0.125rem, -0.125rem, 0);border-color:rgb(var(--contrast-1000));box-shadow:var(--shadow-depth-8)}.newTab:hover:after{transform:translate3d(-0.15rem, 0.15rem, 0) scale(0.9);border-color:rgb(var(--contrast-700))}.expand:after{transition:transform 0.2s ease;content:"";position:absolute;z-index:1;background-color:var(--navigation-button-background-color, rgb(var(--contrast-100)));width:0.75rem;height:0.75rem}.expand:hover limel-icon{color:var(--mdc-theme-primary)}.expand:hover:after{transform:scale(0.5)}.expand:hover limel-icon{transform:scale(1.18)}.minimize:before,.minimize:after,.maximize:before,.maximize:after{content:"";transition:transform 0.3s ease-out 0.15s, background-color 0.1s ease}.minimize limel-icon,.maximize limel-icon{transition:transform 0.2s ease 0.1s}.minimize:before,.maximize:after,.maximize:hover:before{transform:scaleY(1) scaleX(1);z-index:-1;box-sizing:border-box;position:absolute;width:70%;height:60%;border-radius:0.25rem;transform-origin:bottom}.minimize:hover:before,.maximize:before{transition:transform 0.3s ease-out 0.15s, background-color 0.1s ease;transform:scaleY(0.3) scaleX(0.7);background-color:rgb(var(--contrast-500))}.minimize:hover limel-icon,.maximize limel-icon{transform:scaleX(0.8) translate3d(0, 0.4rem, 0)}.maximize limel-icon{color:rgb(var(--contrast-900))}.maximize:hover limel-icon{color:currentColor;transform:scaleX(1.1) translate3d(0, -0.1rem, 0)}.maximize:after{z-index:-2;border:1px dashed rgb(var(--contrast-800))}.close limel-icon{transition:transform 0.2s ease, color 0.2s ease}.close:before,.close:after{transition-delay:0.1s;content:"";position:absolute;inset:0;border-radius:50%;opacity:0}.close:before{transition:transform 0.3s ease, opacity 0.3s ease;background-color:rgb(var(--color-orange-dark))}.close:after{transition:transform 0.6s ease, opacity 0.6s ease;background-color:rgb(var(--color-orange-light))}.close:hover limel-icon{color:rgb(var(--color-white));transform:scale(0.7) rotate(90deg)}.close:hover:before{opacity:1;transform:scale(0.4)}.close:hover:after{opacity:0.4;transform:scale(0.6)}.float:after{transition:width 0.2s ease-out, opacity 0.2s ease;content:"";position:absolute;inset:0 0.5rem 0 auto;border-radius:1px;opacity:0.8;transform:translate3d(0, 0, 0);background-color:rgb(var(--contrast-800));width:0.125rem;height:0.6rem;margin:auto}.float:hover:after{width:0.4rem;opacity:1;transform:translate3d(0, 0, 0)}';const a=class{constructor(o){e(this,o),this.actionSelected=t(this,"actionSelected",7),this.triggerDelay=600,this.openDirection="top",this.popoverMaxWidth="20rem",this.popoverMaxHeight="min(35rem, calc(100vh - 2rem))",this.actions=[],this.isPopoverOpen=!1,this.openPopoverWithDelay=e=>{e.stopPropagation(),clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout((()=>{a.currentOpenPopover&&a.currentOpenPopover!==this&&(a.currentOpenPopover.isPopoverOpen=!1),a.currentOpenPopover=this,this.isPopoverOpen=!0}),this.triggerDelay)},this.resetTimeout=()=>{this.isPopoverOpen||clearTimeout(this.hoverTimeout)},this.onPopoverClose=e=>{e.stopPropagation(),this.isPopoverOpen=!1,a.currentOpenPopover===this&&(a.currentOpenPopover=null)},this.handleCloseClick=e=>{e.stopPropagation(),this.isPopoverOpen=!1},this.handleSelected=e=>{this.actionSelected.emit(e.detail)}}render(){return o("limel-popover",{key:"61b0f5899c7d7a72f924bdfeb029ecce66e7cc9b",style:{"--limebb-summary-popover-timeout":`${this.triggerDelay}ms`},open:this.isPopoverOpen,onClose:this.onPopoverClose,openDirection:this.openDirection},o("div",{key:"3f21df09b18083e568eab2e77f5ea5c58bcbfcad",slot:"trigger",tabIndex:0,onMouseEnter:this.openPopoverWithDelay,onMouseLeave:this.resetTimeout,onFocus:this.openPopoverWithDelay},o("slot",{key:"4f51bda5be27a848a69b57c9798865668cec6a44",name:"trigger"}),o("div",{key:"2b801e9ad42a9823efd7736b062a0fd70a7d6698",class:"opening-countdown-indicator"})),o("limel-card",{key:"c964d35c5671c73a42f5202f51226ccac634eff8",style:{"max-width":this.popoverMaxWidth,"max-height":this.popoverMaxHeight,"min-width":"7rem","min-height":"3rem"},orientation:"landscape",heading:this.heading,subheading:this.subheading,icon:this.icon,value:this.value,image:this.image,actions:this.actions,onActionSelected:this.handleSelected},o("limebb-navigation-button",{key:"3a55e6e6d8bf15284fe826d7065ebd61304d8248",slot:"component",type:"close",style:{"--navigation-button-background-color":"rgb(var(--contrast-100), 0.8)",position:"absolute",top:"0.125rem",right:"0.125rem"},tooltipLabel:"Close",tooltipHelperLabel:"Esc",onClick:this.handleCloseClick})))}};a.currentOpenPopover=null,a.style="limel-popover{--popover-border-radius:0.95rem;--popover-body-background-color:transparent;--popover-box-shadow:var(--shadow-depth-8)}div[slot=trigger]{position:relative;display:flex;align-items:center;justify-content:center}div[slot=trigger] *{min-width:0;min-height:0}.opening-countdown-indicator{position:absolute;inset:auto 0 -0.25rem 0;margin:0 auto;height:0.125rem;border-radius:1rem;transition:width ease-out, opacity ease;transition-duration:120ms;opacity:0;width:0%;background-color:var(--mdc-theme-primary)}div[slot=trigger]:not([aria-expanded=true]):hover .opening-countdown-indicator{transition-duration:var(--limebb-summary-popover-timeout);opacity:1;width:100%}";export{i as limebb_navigation_button,a as limebb_summary_popover}
@@ -1 +1 @@
1
- import{r as e,h as r,H as a}from"./p-1556b545.js";import{g as l}from"./p-10e16feb.js";const t=1e-4,o=class{valueChanged(e){this.numValue=this.parseValue(e)}constructor(a){e(this,a),this.rangeMax=100,this.rangeMin=0,this.multiplier=1,this.reducePresence=!0,this.displayPercentageColors=!1,this.labelId="label-"+crypto.randomUUID(),this.helperTextId="helper-text-"+crypto.randomUUID(),this.zeroPointId="zero-point-"+crypto.randomUUID(),this.renderHelperLine=()=>{if(this.hasHelperText())return r("limel-helper-line",{helperTextId:this.helperTextId,helperText:this.helperText,invalid:this.invalid})},this.hasHelperText=()=>null!=this.helperText,this.numValue=this.parseValue(this.value)}componentDidLoad(){this.triggerRangeWarning()}componentWillUpdate(){this.triggerRangeWarning()}triggerRangeWarning(){this.rangeMin>=this.rangeMax&&console.warn(`[limebb-percentage-visualizer] Invalid range: rangeMin (${this.rangeMin}) must be less than rangeMax (${this.rangeMax}). Visualization may not appear as expected.`)}render(){const e=this.getNormalizedValue(),l=this.getZeroPointPosition();return r(a,{key:"ad5e9cdb104ade1dfa71497ff3b6aac94d91c2f6",class:this.getContainerClassList(),style:{"--limebb-percentage-visualizer-zero-point-position":`${l}%`,"--limebb-percentage-visualizer-width":`${Math.abs(e)}%`,"--limebb-percentage-visualizer-rotate":e>=0?"0deg":"180deg"}},r("limel-notched-outline",{key:"68e10eee563dff4c4142906820b041f3f42f41e9",tabIndex:0,role:"meter","aria-valuemin":this.rangeMin,"aria-valuemax":this.rangeMax,"aria-valuenow":this.numValue,"aria-labelledby":this.labelId,"aria-describedby":this.helperTextId,label:this.label,labelId:this.labelId,invalid:this.invalid,required:this.required,hasValue:!0,hasFloatingLabel:!0,"aria-controls":this.helperTextId},r("div",{key:"ecb1cfbd1b90442fe0aa34cf727ab7666a6908e6",slot:"content"},this.renderVisualization())),this.renderHelperLine())}renderVisualization(){if(!this.reducePresence||0!==this.numValue&&this.hasValue())return this.hasValue()?[r("div",{class:"percentage-bar"},r("div",{class:"percentage-fill"}),this.renderZeroPoint()),r("span",{class:"percentage-text"},this.formatValue(this.numValue),r("span",{class:"percent-sign"},"%"))]:r("span",{class:"no-value"},"–")}renderZeroPoint(){if(!(this.rangeMin>=0||this.rangeMax<=0))return[r("div",{id:this.zeroPointId,class:"zero-point"}),r("limel-tooltip",{elementId:this.zeroPointId,openDirection:"top",label:"0"})]}hasValue(){return null!=this.value&&""!==this.value}getContainerClassList(){if(!this.hasValue())return;const e=this.roundValue(this.multiplyByMultiplier(this.numValue)),r=l(e);return Object.assign({},r&&{[r]:!0})}getZeroPointPosition(){const e=this.rangeMax-this.rangeMin;return e<=0?0:(0-this.rangeMin)/e*100}getNormalizedValue(){const e=this.roundValue(this.multiplyByMultiplier(this.numValue)),r=this.rangeMax-this.rangeMin;if(r<=0)return 0;const a=(0-this.rangeMin)/r*100;return e>=0?e/Math.max(this.rangeMax,t)*(100-a):e/Math.max(Math.abs(this.rangeMin),t)*a}multiplyByMultiplier(e){return e*this.multiplier}roundValue(e){return Math.round(10*e)/10}unifyMinusSign(e){return e.replaceAll("−","-")}convertToUnicodeMinus(e){return e.replaceAll("-","−")}parseValue(e){return"string"==typeof e?Number.parseFloat(this.unifyMinusSign(e)):e}formatValue(e){const r=this.roundValue(this.multiplyByMultiplier(e)),a=`${r}`;return r<0?this.convertToUnicodeMinus(a):a}static get watchers(){return{value:["valueChanged"]}}};o.style='@charset "UTF-8";*,::before,::after{box-sizing:border-box}:host(limebb-percentage-visualizer){width:100%}limel-notched-outline:not([invalid]:not([invalid=false])) .limel-notched-outline--outlines{--limel-notched-outline-border-color:transparent}div[slot=content]{display:flex;align-items:center;gap:0.5rem;border-radius:inherit;background-color:transparent !important}div[slot=content]:focus{outline:none}div[slot=content]:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}:host(limebb-percentage-visualizer[invalid]:not([invalid=false])) div[slot=content]{border-color:rgb(var(--color-red-default))}:host(limebb-percentage-visualizer):has(label) div[slot=content]{min-height:2.5rem;padding:0 0.375rem 0 1rem}.percentage-text{flex-shrink:0;min-width:2.5rem}:host([range-min^="-"]) .percentage-text{min-width:3.75rem}.percent-sign{opacity:0.4}.zero-point{content:"";position:absolute;transform:translateX(-50%);left:var(--limebb-percentage-visualizer-zero-point-position);height:0.25rem;width:0.25rem;border-radius:50%;box-shadow:0 0 0 0.125rem var(--limebb-percentage-visualizer-zero-point-color, rgb(var(--contrast-1200), 0.3));background-color:var(--limebb-percentage-visualizer-zero-point-color, rgb(var(--contrast-200), 0.9))}.percentage-bar{overflow:hidden;flex-grow:1;position:relative;display:flex;align-items:center;height:0.5rem;min-width:2rem;border-radius:0.5rem;background-color:rgb(var(--contrast-800), 0.6)}.percentage-fill{transition:width 0.2s ease;position:absolute;margin:auto;left:var(--limebb-percentage-visualizer-zero-point-position, 0);rotate:var(--limebb-percentage-visualizer-rotate, 0deg);transform-origin:left center;width:var(--limebb-percentage-visualizer-width);height:100%;border-radius:0.5rem}:host(limebb-percentage-visualizer:focus),:host(limebb-percentage-visualizer:focus-visible),:host(limebb-percentage-visualizer:focus-within){--limel-h-l-grid-template-rows-transition-speed:0.46s;--limel-h-l-grid-template-rows:1fr}:host(limebb-percentage-visualizer){--limel-h-l-grid-template-rows-transition-speed:0.3s;--limel-h-l-grid-template-rows:0fr}:host(limebb-percentage-visualizer:focus) limel-helper-line,:host(limebb-percentage-visualizer:focus-visible) limel-helper-line,:host(limebb-percentage-visualizer:focus-within) limel-helper-line,:host(limebb-percentage-visualizer:hover) limel-helper-line{will-change:grid-template-rows}.percentage-fill{background-color:var(--percentage-visualizer-color, var(--limebb-percentage-visualizer-color, var(--mdc-theme-primary)))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-200or-larger-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-darker))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-200to100-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-100to90-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-90to80-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-80to70-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-70to60-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-60to50-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-coral-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-50to40-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-coral-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-40to30-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-orange-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-30to20-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-orange-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-20to10-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-amber-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-10to0-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-amber-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-0) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--contrast-800))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-0to10-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-yellow-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-10to20-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-yellow-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-20to30-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-grass-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-30to40-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-grass-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-40to50-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-lime-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-50to60-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-lime-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-60to70-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-70to80-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-80to90-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-90to100-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-100to200-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-200or-larger-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-darker))}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-0) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--contrast-800))}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-0to10-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--0to10)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-10to20-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--10to20)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-20to30-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--20to30)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-30to40-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--30to40)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-40to50-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--40to50)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-50to60-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--50to60)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-60to70-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--60to70)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-70to80-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--70to80)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-80to90-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--80to90)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-90to100-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--90to100)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-100to200-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-dark))}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-200or-larger-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-darker))}';export{o as limebb_percentage_visualizer}
1
+ import{r as e,h as r,H as a}from"./p-1556b545.js";import{g as l}from"./p-10e16feb.js";const t=1e-4,o=class{valueChanged(e){this.numValue=this.parseValue(e)}constructor(a){e(this,a),this.rangeMax=100,this.rangeMin=0,this.multiplier=1,this.reducePresence=!0,this.displayPercentageColors=!1,this.labelId="label-"+crypto.randomUUID(),this.helperTextId="helper-text-"+crypto.randomUUID(),this.zeroPointId="zero-point-"+crypto.randomUUID(),this.renderHelperLine=()=>{if(this.hasHelperText())return r("limel-helper-line",{helperTextId:this.helperTextId,helperText:this.helperText,invalid:this.invalid})},this.hasHelperText=()=>null!=this.helperText,this.numValue=this.parseValue(this.value)}componentDidLoad(){this.triggerRangeWarning()}componentWillUpdate(){this.triggerRangeWarning()}triggerRangeWarning(){this.rangeMin>=this.rangeMax&&console.warn(`[limebb-percentage-visualizer] Invalid range: rangeMin (${this.rangeMin}) must be less than rangeMax (${this.rangeMax}). Visualization may not appear as expected.`)}render(){const e=this.getNormalizedValue(),l=this.getZeroPointPosition();return r(a,{key:"b9876aea271ead3ed18a7fdc59d652b541aed30a",class:this.getContainerClassList(),style:{"--limebb-percentage-visualizer-zero-point-position":`${l}%`,"--limebb-percentage-visualizer-width":`${Math.abs(e)}%`,"--limebb-percentage-visualizer-rotate":e>=0?"0deg":"180deg"}},r("limel-notched-outline",{key:"64bea0a1e95c001494e8ecee42b6061c6d6c007c",tabIndex:0,role:"meter","aria-valuemin":this.rangeMin,"aria-valuemax":this.rangeMax,"aria-valuenow":this.numValue,"aria-labelledby":this.labelId,"aria-describedby":this.helperTextId,label:this.label,labelId:this.labelId,invalid:this.invalid,required:this.required,hasValue:!0,hasFloatingLabel:!0,"aria-controls":this.helperTextId},r("div",{key:"d1dc81b554828d9998ad6c1567c49c56a005b547",slot:"content"},this.renderVisualization())),this.renderHelperLine())}renderVisualization(){if(!this.reducePresence||0!==this.numValue&&this.hasValue())return this.hasValue()?[r("div",{class:"percentage-bar"},r("div",{class:"percentage-fill"}),this.renderZeroPoint()),r("span",{class:"percentage-text"},this.formatValue(this.numValue),r("span",{class:"percent-sign"},"%"))]:r("span",{class:"no-value"},"–")}renderZeroPoint(){if(!(this.rangeMin>=0||this.rangeMax<=0))return[r("div",{id:this.zeroPointId,class:"zero-point"}),r("limel-tooltip",{elementId:this.zeroPointId,openDirection:"top",label:"0"})]}hasValue(){return null!=this.value&&""!==this.value}getContainerClassList(){if(!this.hasValue())return;const e=this.roundValue(this.multiplyByMultiplier(this.numValue)),r=l(e);return Object.assign({},r&&{[r]:!0})}getZeroPointPosition(){const e=this.rangeMax-this.rangeMin;return e<=0?0:(0-this.rangeMin)/e*100}getNormalizedValue(){const e=this.roundValue(this.multiplyByMultiplier(this.numValue)),r=this.rangeMax-this.rangeMin;if(r<=0)return 0;const a=(0-this.rangeMin)/r*100;return e>=0?e/Math.max(this.rangeMax,t)*(100-a):e/Math.max(Math.abs(this.rangeMin),t)*a}multiplyByMultiplier(e){return e*this.multiplier}roundValue(e){return Math.round(10*e)/10}unifyMinusSign(e){return e.replaceAll("−","-")}convertToUnicodeMinus(e){return e.replaceAll("-","−")}parseValue(e){return"string"==typeof e?Number.parseFloat(this.unifyMinusSign(e)):e}formatValue(e){const r=this.roundValue(this.multiplyByMultiplier(e)),a=`${r}`;return r<0?this.convertToUnicodeMinus(a):a}static get watchers(){return{value:["valueChanged"]}}};o.style='@charset "UTF-8";*,::before,::after{box-sizing:border-box}:host(limebb-percentage-visualizer){width:100%}limel-notched-outline:not([invalid]:not([invalid=false])) .limel-notched-outline--outlines{--limel-notched-outline-border-color:transparent}div[slot=content]{display:flex;align-items:center;gap:0.5rem;border-radius:inherit;background-color:transparent !important}div[slot=content]:focus{outline:none}div[slot=content]:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}:host(limebb-percentage-visualizer[invalid]:not([invalid=false])) div[slot=content]{border-color:rgb(var(--color-red-default))}:host(limebb-percentage-visualizer):has(label) div[slot=content]{min-height:2.5rem;padding:0 0.375rem 0 1rem}.percentage-text{flex-shrink:0;min-width:2.5rem}:host([range-min^="-"]) .percentage-text{min-width:3.75rem}.percent-sign{opacity:0.4}.zero-point{content:"";position:absolute;transform:translateX(-50%);left:var(--limebb-percentage-visualizer-zero-point-position);height:0.25rem;width:0.25rem;border-radius:50%;box-shadow:0 0 0 0.125rem var(--limebb-percentage-visualizer-zero-point-color, rgb(var(--contrast-1200), 0.3));background-color:var(--limebb-percentage-visualizer-zero-point-color, rgb(var(--contrast-200), 0.9))}.percentage-bar{overflow:hidden;flex-grow:1;position:relative;display:flex;align-items:center;height:0.5rem;min-width:2rem;border-radius:0.5rem;background-color:rgb(var(--contrast-800), 0.6)}.percentage-fill{transition:width 0.2s ease;position:absolute;margin:auto;left:var(--limebb-percentage-visualizer-zero-point-position, 0);rotate:var(--limebb-percentage-visualizer-rotate, 0deg);transform-origin:left center;width:var(--limebb-percentage-visualizer-width);height:100%;border-radius:0.5rem}:host(limebb-percentage-visualizer:focus),:host(limebb-percentage-visualizer:focus-visible),:host(limebb-percentage-visualizer:focus-within){--limel-h-l-grid-template-rows-transition-speed:0.46s;--limel-h-l-grid-template-rows:1fr}:host(limebb-percentage-visualizer){--limel-h-l-grid-template-rows-transition-speed:0.3s;--limel-h-l-grid-template-rows:0fr}:host(limebb-percentage-visualizer:focus) limel-helper-line,:host(limebb-percentage-visualizer:focus-visible) limel-helper-line,:host(limebb-percentage-visualizer:focus-within) limel-helper-line,:host(limebb-percentage-visualizer:hover) limel-helper-line{will-change:grid-template-rows}.percentage-fill{background-color:var(--percentage-visualizer-color, var(--limebb-percentage-visualizer-color, var(--mdc-theme-primary)))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-200or-larger-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-darker))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-200to100-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-100to90-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-90to80-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-80to70-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-70to60-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-60to50-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-coral-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-50to40-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-coral-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-40to30-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-orange-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-30to20-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-orange-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-20to10-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-amber-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-10to0-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-amber-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-0) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--contrast-800))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-0to10-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-yellow-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-10to20-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-yellow-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-20to30-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-grass-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-30to40-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-grass-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-40to50-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-lime-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-50to60-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-lime-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-60to70-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-70to80-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-80to90-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-90to100-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-100to200-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-200or-larger-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-darker))}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-0) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--contrast-800))}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-0to10-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--0to10)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-10to20-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--10to20)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-20to30-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--20to30)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-30to40-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--30to40)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-40to50-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--40to50)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-50to60-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--50to60)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-60to70-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--60to70)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-70to80-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--70to80)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-80to90-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--80to90)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-90to100-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--90to100)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-100to200-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-dark))}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-200or-larger-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-darker))}';export{o as limebb_percentage_visualizer}