@veltdev/sdk-dev 6.0.0-beta.9 → 6.0.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 (94) hide show
  1. package/app/client/snippyly.model.d.ts +12 -3
  2. package/app/models/data/comment-events.data.model.d.ts +39 -0
  3. package/app/models/data/config.data.model.d.ts +154 -0
  4. package/app/models/data/notification.model.d.ts +14 -0
  5. package/app/models/data/reaction-resolver.data.model.d.ts +1 -0
  6. package/app/models/data/selection.model.d.ts +10 -8
  7. package/app/models/data/suggestion.data.model.d.ts +52 -2
  8. package/app/models/data/user-resolver.data.model.d.ts +11 -9
  9. package/app/models/data/user.data.model.d.ts +21 -18
  10. package/app/models/element/activity-element.model.d.ts +0 -1
  11. package/app/models/element/area-element.model.d.ts +0 -1
  12. package/app/models/element/arrow-element.model.d.ts +1 -2
  13. package/app/models/element/autocomplete-element.model.d.ts +0 -1
  14. package/app/models/element/comment-element.model.d.ts +103 -77
  15. package/app/models/element/contact-element.model.d.ts +1 -2
  16. package/app/models/element/crdt-element.model.d.ts +1 -1
  17. package/app/models/element/cursor-element.model.d.ts +1 -2
  18. package/app/models/element/huddle-element.model.d.ts +1 -2
  19. package/app/models/element/live-state-sync-element.model.d.ts +1 -1
  20. package/app/models/element/notification-element.model.d.ts +33 -2
  21. package/app/models/element/presence-element.model.d.ts +32 -11
  22. package/app/models/element/reaction-element.model.d.ts +1 -1
  23. package/app/models/element/recorder-element.model.d.ts +21 -2
  24. package/app/models/element/rewriter-element.model.d.ts +43 -1
  25. package/app/models/element/selection-element.model.d.ts +1 -1
  26. package/app/models/element/suggestion-element.model.d.ts +0 -1
  27. package/app/models/element/tag-element.model.d.ts +7 -8
  28. package/app/models/element/views-element.model.d.ts +1 -1
  29. package/app/utils/constants.d.ts +1 -0
  30. package/app/utils/enums.d.ts +97 -83
  31. package/{chunk-6SOP2T3L.js → chunk-42DJQDO6.js} +1 -1
  32. package/chunk-5YVVMUVJ.js +1 -0
  33. package/{chunk-Q7BPHHBS.js → chunk-6AXNP6ZG.js} +1 -1
  34. package/{chunk-N4SGYLNB.js → chunk-75DYYG3C.js} +1 -1
  35. package/{chunk-J6J7I3SW.js → chunk-AE6AKOBL.js} +1 -1
  36. package/chunk-AMJHKR2V.js +1 -0
  37. package/chunk-BEPIOHQN.js +2 -0
  38. package/chunk-C35UQYQG.js +93 -0
  39. package/{chunk-AOHSD4YE.js → chunk-CQEJBXFE.js} +6 -6
  40. package/{chunk-YBQBSGLX.js → chunk-EIIBHBQX.js} +1 -1
  41. package/chunk-FXK7BWOQ.js +167 -0
  42. package/{chunk-7ZOGXD6Z.js → chunk-IE3AYTRD.js} +1 -1
  43. package/{chunk-SKP3Z3DQ.js → chunk-MQ4DJFLV.js} +1 -1
  44. package/{chunk-SALUJBOS.js → chunk-ORUMIBZX.js} +1 -1
  45. package/{chunk-XMYVEF74.js → chunk-PPY3CGBN.js} +1 -1
  46. package/{chunk-Y6QKEGWK.js → chunk-PVOJRXAC.js} +1 -1
  47. package/{chunk-25GEE4UD.js → chunk-QD4B4F67.js} +1 -1
  48. package/{chunk-TXOYHDVN.js → chunk-QHN6UT4Z.js} +1 -1
  49. package/{chunk-UJMFCXYS.js → chunk-QX6IGTVL.js} +1 -1
  50. package/{chunk-USRSVPHC.js → chunk-S3KLTU2O.js} +1 -1
  51. package/{chunk-2KJNXU43.js → chunk-SETCXYML.js} +1 -1
  52. package/{chunk-ZVY2YW2G.js → chunk-SJBBKDML.js} +1 -1
  53. package/{chunk-2HGBJS2C.js → chunk-UGCJET7Y.js} +1 -1
  54. package/{chunk-IXZIBE27.js → chunk-UVG3AHTE.js} +1 -1
  55. package/{chunk-447SWJD2.js → chunk-W2L57DVK.js} +1 -1
  56. package/chunk-W5F6OQDK.js +13 -0
  57. package/{chunk-BG6MNCDK.js → chunk-WDKCOSEO.js} +1 -1
  58. package/chunk-WGB5PBWB.js +1 -0
  59. package/{chunk-QE2MK6NF.js → chunk-WOT7KXUQ.js} +1 -1
  60. package/{chunk-WANCOUQO.js → chunk-XW5I4TAG.js} +1 -1
  61. package/chunk-YPGITIUR.js +1 -0
  62. package/{chunk-JFRM6MNS.js → chunk-ZNQANIAC.js} +1 -1
  63. package/{chunk-7W553TUZ.js → chunk-ZOSRXWBP.js} +1 -1
  64. package/package.json +1 -1
  65. package/types.d.ts +22 -22
  66. package/velt-activity-log.js +1 -1
  67. package/velt-area.js +1 -1
  68. package/velt-arrow.js +2 -2
  69. package/velt-comment.js +8 -8
  70. package/velt-crdt.js +1 -1
  71. package/velt-cursor.js +2 -2
  72. package/velt-huddle.js +3 -3
  73. package/velt-live-state-sync.js +2 -2
  74. package/velt-notification.js +1 -1
  75. package/velt-presence.js +1 -1
  76. package/velt-reaction.js +1 -1
  77. package/velt-recorder.js +1 -1
  78. package/velt-rewriter.js +2 -2
  79. package/velt-selection.js +1 -1
  80. package/velt-tag.js +1 -1
  81. package/velt-user-invite.js +1 -1
  82. package/velt-user-request.js +1 -1
  83. package/velt-video-player.js +1 -1
  84. package/velt-views.js +3 -3
  85. package/velt.d.ts +2 -3
  86. package/velt.js +264 -20
  87. package/chunk-5B5CQEDX.js +0 -1
  88. package/chunk-5FKOPJVO.js +0 -93
  89. package/chunk-APIRNTKO.js +0 -1
  90. package/chunk-AVMLJMVU.js +0 -1
  91. package/chunk-BLIJMW4Z.js +0 -13
  92. package/chunk-BY627CV6.js +0 -1
  93. package/chunk-DX4SZFHQ.js +0 -1
  94. package/chunk-JWLHBAMV.js +0 -167
@@ -1,8 +1,8 @@
1
- // @ts-nocheck
2
1
  import { Observable } from "rxjs";
3
2
  import { PresenceUser } from "../data/presence-user.data.model";
4
3
  import { GetPresenceDataResponse, PresenceEventTypesMap } from "../data/presence-events.data.model";
5
4
  import { PresenceRequestQuery } from "../data/presence-actions.data.model";
5
+ import { FlockOptions } from "../data/flock-options.model";
6
6
 
7
7
  export declare class PresenceElement {
8
8
 
@@ -21,15 +21,27 @@ export declare class PresenceElement {
21
21
  setInactivityTime: (time: number) => void;
22
22
 
23
23
  /**
24
- * Enables follow along mode globally
25
- * @param options {FollowOptions: {useHistoryAPI: boolean, onNavigate: (url: PageInfo) => void}}}
24
+ * Enable flock mode globally
25
+ * @param options FlockOptions
26
26
  */
27
- enableFollowAlongMode: (useHistoryAPI: boolean) => any;
27
+ enableFlockMode: (options?: FlockOptions) => void;
28
28
 
29
29
  /**
30
- * To disable follow along mode
30
+ * Disable flock mode globally
31
31
  */
32
- disableFollowAlongMode: () => any;
32
+ disableFlockMode: () => void;
33
+
34
+ /**
35
+ * Start/join a flock session by following the given user
36
+ * @param userId The leader user ID
37
+ * @param name The leader user name
38
+ */
39
+ startFollowingUser: (userId: string, name: string) => void;
40
+
41
+ /**
42
+ * Exit the flock session / stop following
43
+ */
44
+ stopFollowingUser: () => void;
33
45
 
34
46
  /**
35
47
  * To enable adding self to the presence list
@@ -81,15 +93,24 @@ export declare class PresenceElement {
81
93
  private _setInactivityTime;
82
94
 
83
95
  /**
84
- * Enables follow along mode globally
85
- * @param options {FollowOptions: {useHistoryAPI: boolean, onNavigate: (url: PageInfo) => void}}}
96
+ * Enable flock mode globally
97
+ */
98
+ private _enableFlockMode;
99
+
100
+ /**
101
+ * Disable flock mode globally
102
+ */
103
+ private _disableFlockMode;
104
+
105
+ /**
106
+ * Start/join a flock session by following the given user
86
107
  */
87
- private _enableFollowAlongMode;
108
+ private _startFollowingUser;
88
109
 
89
110
  /**
90
- * To disable follow along mode
111
+ * Exit the flock session / stop following
91
112
  */
92
- private _disableFollowAlongMode;
113
+ private _stopFollowingUser;
93
114
 
94
115
  /**
95
116
  * To enable adding self to the presence list
@@ -1,4 +1,4 @@
1
- // @ts-nocheck
1
+ import { ReactionMap } from '../data/reaction-annotation.data.model';
2
2
  export { ReactionMap } from '../data/reaction-annotation.data.model';
3
3
 
4
4
  export declare class ReactionElement {
@@ -1,4 +1,3 @@
1
- // @ts-nocheck
2
1
  import { Observable } from "rxjs";
3
2
  import { RecorderData, RecorderRequestQuery, GetRecordingDataResponse, GetRecordingsResponse, DeleteRecordingsResponse } from "../data/recorder-annotation.data.model";
4
3
  import { RecorderEventTypesMap } from "../data/recorder-events.data.model";
@@ -6,13 +5,23 @@ import { RecordedData, RecorderQualityConstraints, RecorderEncodingOptions, Reco
6
5
 
7
6
  export declare class RecorderElement {
8
7
 
9
- initRecording: (type: string, panelId?: string) => any;
8
+ initRecording: (type: string, panelId?: string) => Promise<void>;
10
9
 
11
10
  /**
12
11
  * @deprecated Use on('recordingDone') method instead
13
12
  */
14
13
  onRecordedData: () => Observable<RecordedData | null>;
15
14
 
15
+ /**
16
+ * To enable dark mode in recording
17
+ */
18
+ enableDarkMode: () => void;
19
+
20
+ /**
21
+ * To disable dark mode in recording
22
+ */
23
+ disableDarkMode: () => void;
24
+
16
25
  /**
17
26
  * To enable recording countdown
18
27
  */
@@ -173,6 +182,16 @@ export declare class RecorderElement {
173
182
  */
174
183
  private _onRecordedData;
175
184
 
185
+ /**
186
+ * To enable dark mode in recording
187
+ */
188
+ private _enableDarkMode;
189
+
190
+ /**
191
+ * To disable dark mode in recording
192
+ */
193
+ private _disableDarkMode;
194
+
176
195
  /**
177
196
  * To enable dark mode in comments
178
197
  */
@@ -1,4 +1,6 @@
1
- // @ts-nocheck
1
+ import { Observable } from "rxjs";
2
+ import { RewriterAskAiRequest, RewriterAskAiResponse, RewriterReplaceTextRequest, RewriterReplaceTextResponse, RewriterAddCommentRequest, RewriterAddCommentResponse, RewriterEventTypesMap } from "../data/rewriter-events.data.model";
3
+
2
4
  export declare class RewriterElement {
3
5
  /**
4
6
  * To enable rewriter feature
@@ -19,6 +21,26 @@ export declare class RewriterElement {
19
21
  * To disable the default rewriter UI on text selection
20
22
  */
21
23
  disableDefaultUI: () => void;
24
+
25
+ /**
26
+ * Subscribe to rewriter events
27
+ */
28
+ on: <T extends keyof RewriterEventTypesMap>(action: T) => Observable<RewriterEventTypesMap[T]>;
29
+
30
+ /**
31
+ * Call AI with the currently selected text
32
+ */
33
+ askAi: (request: RewriterAskAiRequest) => Promise<RewriterAskAiResponse>;
34
+
35
+ /**
36
+ * Replace the selected text in the DOM with the given text
37
+ */
38
+ replaceText: (request: RewriterReplaceTextRequest) => Promise<RewriterReplaceTextResponse>;
39
+
40
+ /**
41
+ * Add a comment annotation on the selected text with the given text as comment body
42
+ */
43
+ addComment: (request: RewriterAddCommentRequest) => Promise<RewriterAddCommentResponse>;
22
44
  constructor();
23
45
 
24
46
  /**
@@ -40,4 +62,24 @@ export declare class RewriterElement {
40
62
  * To disable the default rewriter UI on text selection
41
63
  */
42
64
  private _disableDefaultUI;
65
+
66
+ /**
67
+ * Subscribe to rewriter events
68
+ */
69
+ private _on;
70
+
71
+ /**
72
+ * Call AI with the currently selected text
73
+ */
74
+ private _askAi;
75
+
76
+ /**
77
+ * Replace the selected text in the DOM with the given text
78
+ */
79
+ private _replaceText;
80
+
81
+ /**
82
+ * Add a comment annotation on the selected text with the given text as comment body
83
+ */
84
+ private _addComment;
43
85
  }
@@ -1,4 +1,4 @@
1
- // @ts-nocheck
1
+ import { Observable } from "rxjs";
2
2
  import { LiveSelectionData, UserIndicatorPosition, UserIndicatorType } from "../data/selection.model";
3
3
  export declare class SelectionElement {
4
4
  /**
@@ -1,4 +1,3 @@
1
- // @ts-nocheck
2
1
  import { Observable } from "rxjs";
3
2
  import { SuggestionEventType } from "../../utils/enums";
4
3
  import { SuggestionEventTypesMap } from "../data/suggestion-events.data.model";
@@ -1,31 +1,30 @@
1
- // @ts-nocheck
2
1
  import { Observable } from "rxjs";
3
- import { TagPinAnnotation } from "../data/tag-annotation.data.model";
2
+ import { TagAnnotation } from "../data/tag-annotation.data.model";
4
3
  export declare class TagElement {
5
4
  /**
6
5
  * Subscribe to tags on the current document.
7
6
  *
8
- * Returns Observable<TagPinAnnotation[] | null>.
7
+ * Returns Observable<TagAnnotation[] | null>.
9
8
  */
10
- getAllTagAnnotations: (documentId?: string, documentParams?: object) => Observable<TagPinAnnotation[] | null>;
9
+ getAllTagAnnotations: (documentId?: string, documentParams?: object) => Observable<TagAnnotation[] | null>;
11
10
 
12
11
  /**
13
12
  * To delete selected tags
14
13
  */
15
- deleteTag: () => any;
14
+ deleteTag: () => void;
16
15
 
17
16
  /**
18
17
  * To allow text selection in specific elements only
19
18
  * @param elementIds Element ids to be allowed
20
19
  */
21
- allowedElementIds: (elementIds: string[]) => any;
20
+ allowedElementIds: (elementIds: string[]) => void;
22
21
 
23
22
  /**
24
23
  * To add tags on specific elements
25
24
  *
26
25
  * @param elementId ID of html element
27
26
  */
28
- attachTag: (elementId: string) => any;
27
+ attachTag: (elementId: string) => void;
29
28
 
30
29
  /**
31
30
  * Subscribe to add tag mode change.
@@ -37,7 +36,7 @@ export declare class TagElement {
37
36
  /**
38
37
  * Subscribe to tags on the current document.
39
38
  *
40
- * Returns Observable<TagPinAnnotation[] | null>.
39
+ * Returns Observable<TagAnnotation[] | null>.
41
40
  */
42
41
  private _getAllTagAnnotations;
43
42
 
@@ -1,4 +1,4 @@
1
- // @ts-nocheck
1
+ import { Observable } from "rxjs";
2
2
  import { ViewsByUser, ViewsByDate } from "../data/views.data.model";
3
3
 
4
4
  export declare class ViewsElement {
@@ -12,6 +12,7 @@ export declare class Constants {
12
12
  static LISTENER_CONTEXT_BATCH_SIZE: number;
13
13
  static DEFAULT_VELT_CONTEXT: string;
14
14
  static VISIBILITY_SELF_PREFIX: string;
15
+ static VISIBILITY_ORG_PREFIX: string;
15
16
  static FIREBASE_PARTIAL_PATH_ORGANIZATIONS: string;
16
17
  static FIREBASE_PARTIAL_PATH_FOLDERS: string;
17
18
  static FIREBASE_PARTIAL_PATH_DOCS: string;
@@ -1,38 +1,40 @@
1
- export declare enum CommentStatus {
2
- NEWLY_ADDED = "newlyAdded",
3
- ADDED = "added",
4
- UPDATED = "updated",
5
- DELETED = "deleted",
6
- APPROVED = "approved",
7
- ASSIGNED = "assigned",
8
- STATUS_CHANGED = "statusChanged",
9
- PRIORITY_CHANGED = "priorityChanged",
10
- ACCESS_MODE_CHANGED = "accessModeChanged",
11
- CUSTOM_LIST_CHANGED = "customListChanged",
12
- ACCEPTED = "accepted",
13
- REJECTED = "rejected",
14
- REACTION_ADDED = "reactionAdded",
15
- REACTION_DELETED = "reactionDeleted",
16
- SUBSCRIBED = "subscribed",
17
- UNSUBSCRIBED = "unsubscribed",
18
- SUGGESTION_ACCEPTED = "suggestionAccepted",
19
- SUGGESTION_REJECTED = "suggestionRejected"
20
- }
21
- export declare enum ResolverActions {
22
- COMMENT_ANNOTATION_ADD = "comment_annotation.add",
23
- COMMENT_ANNOTATION_DELETE = "comment_annotation.delete",
24
- COMMENT_ADD = "comment.add",
25
- COMMENT_DELETE = "comment.delete",
26
- COMMENT_UPDATE = "comment.update",
27
- REACTION_ADD = "reaction.add",
28
- REACTION_DELETE = "reaction.delete",
29
- ATTACHMENT_ADD = "attachment.add",
30
- ATTACHMENT_DELETE = "attachment.delete",
31
- RECORDER_ANNOTATION_ADD = "recorder_annotation.add",
32
- RECORDER_ANNOTATION_UPDATE = "recorder_annotation.update",
33
- RECORDER_ANNOTATION_DELETE = "recorder_annotation.delete",
34
- ACTIVITY_SAVE = "activity.save"
35
- }
1
+ export declare const CommentStatus: {
2
+ readonly NEWLY_ADDED: "newlyAdded";
3
+ readonly ADDED: "added";
4
+ readonly UPDATED: "updated";
5
+ readonly DELETED: "deleted";
6
+ readonly APPROVED: "approved";
7
+ readonly ASSIGNED: "assigned";
8
+ readonly STATUS_CHANGED: "statusChanged";
9
+ readonly PRIORITY_CHANGED: "priorityChanged";
10
+ readonly ACCESS_MODE_CHANGED: "accessModeChanged";
11
+ readonly CUSTOM_LIST_CHANGED: "customListChanged";
12
+ readonly ACCEPTED: "accepted";
13
+ readonly REJECTED: "rejected";
14
+ readonly REACTION_ADDED: "reactionAdded";
15
+ readonly REACTION_DELETED: "reactionDeleted";
16
+ readonly SUBSCRIBED: "subscribed";
17
+ readonly UNSUBSCRIBED: "unsubscribed";
18
+ readonly SUGGESTION_ACCEPTED: "suggestionAccepted";
19
+ readonly SUGGESTION_REJECTED: "suggestionRejected";
20
+ };
21
+ export type CommentStatus = (typeof CommentStatus)[keyof typeof CommentStatus];
22
+ export declare const ResolverActions: {
23
+ readonly COMMENT_ANNOTATION_ADD: "comment_annotation.add";
24
+ readonly COMMENT_ANNOTATION_DELETE: "comment_annotation.delete";
25
+ readonly COMMENT_ADD: "comment.add";
26
+ readonly COMMENT_DELETE: "comment.delete";
27
+ readonly COMMENT_UPDATE: "comment.update";
28
+ readonly REACTION_ADD: "reaction.add";
29
+ readonly REACTION_DELETE: "reaction.delete";
30
+ readonly ATTACHMENT_ADD: "attachment.add";
31
+ readonly ATTACHMENT_DELETE: "attachment.delete";
32
+ readonly RECORDER_ANNOTATION_ADD: "recorder_annotation.add";
33
+ readonly RECORDER_ANNOTATION_UPDATE: "recorder_annotation.update";
34
+ readonly RECORDER_ANNOTATION_DELETE: "recorder_annotation.delete";
35
+ readonly ACTIVITY_SAVE: "activity.save";
36
+ };
37
+ export type ResolverActions = (typeof ResolverActions)[keyof typeof ResolverActions];
36
38
  /**
37
39
  * Opt-in additional (non-core) comment save events for the Comment Annotations Resolver
38
40
  * (specs/comment-resolver iteration-2). Values mirror the non-core `CommentActivityActionTypes`
@@ -42,22 +44,23 @@ export declare enum ResolverActions {
42
44
  * `ResolverActions`. Kept in enums.ts (a leaf module) to avoid a
43
45
  * resolver.data.model ↔ comment-resolver.data.model import cycle.
44
46
  */
45
- export declare enum CommentResolverSaveEvent {
46
- STATUS_CHANGE = "comment_annotation.status_change",
47
- PRIORITY_CHANGE = "comment_annotation.priority_change",
48
- ASSIGN = "comment_annotation.assign",
49
- ACCESS_MODE_CHANGE = "comment_annotation.access_mode_change",
50
- CUSTOM_LIST_CHANGE = "comment_annotation.custom_list_change",
51
- APPROVE = "comment_annotation.approve",
52
- ACCEPT = "comment.accept",
53
- REJECT = "comment.reject",
54
- SUGGESTION_ACCEPT = "comment_annotation.suggestion_accept",
55
- SUGGESTION_REJECT = "comment_annotation.suggestion_reject",
56
- REACTION_ADD = "comment.reaction_add",
57
- REACTION_DELETE = "comment.reaction_delete",
58
- SUBSCRIBE = "comment_annotation.subscribe",
59
- UNSUBSCRIBE = "comment_annotation.unsubscribe"
60
- }
47
+ export declare const CommentResolverSaveEvent: {
48
+ readonly STATUS_CHANGE: "comment_annotation.status_change";
49
+ readonly PRIORITY_CHANGE: "comment_annotation.priority_change";
50
+ readonly ASSIGN: "comment_annotation.assign";
51
+ readonly ACCESS_MODE_CHANGE: "comment_annotation.access_mode_change";
52
+ readonly CUSTOM_LIST_CHANGE: "comment_annotation.custom_list_change";
53
+ readonly APPROVE: "comment_annotation.approve";
54
+ readonly ACCEPT: "comment.accept";
55
+ readonly REJECT: "comment.reject";
56
+ readonly SUGGESTION_ACCEPT: "comment_annotation.suggestion_accept";
57
+ readonly SUGGESTION_REJECT: "comment_annotation.suggestion_reject";
58
+ readonly REACTION_ADD: "comment.reaction_add";
59
+ readonly REACTION_DELETE: "comment.reaction_delete";
60
+ readonly SUBSCRIBE: "comment_annotation.subscribe";
61
+ readonly UNSUBSCRIBE: "comment_annotation.unsubscribe";
62
+ };
63
+ export type CommentResolverSaveEvent = (typeof CommentResolverSaveEvent)[keyof typeof CommentResolverSaveEvent];
61
64
  export declare const CommentEventTypes: {
62
65
  readonly ADD_COMMENT_ANNOTATION: "addCommentAnnotation";
63
66
  readonly ADD_COMMENT_ANNOTATION_DRAFT: "addCommentAnnotationDraft";
@@ -95,6 +98,11 @@ export declare const CommentEventTypes: {
95
98
  readonly COMMENT_TOOL_CLICKED: "commentToolClicked";
96
99
  readonly SIDEBAR_BUTTON_CLICK: "sidebarButtonClick";
97
100
  readonly SIDEBAR_BUTTON_CLICKED: "sidebarButtonClicked";
101
+ readonly SIDEBAR_OPEN: "sidebarOpen";
102
+ readonly SIDEBAR_CLOSE: "sidebarClose";
103
+ readonly FULLSCREEN_CLICK: "fullscreenClick";
104
+ readonly COMMENT_CLICK: "commentClick";
105
+ readonly COMMENT_NAVIGATION_BUTTON_CLICK: "commentNavigationButtonClick";
98
106
  readonly ATTACHMENT_DOWNLOAD_CLICKED: "attachmentDownloadClicked";
99
107
  readonly COMMENT_SAVED: "commentSaved";
100
108
  readonly COMMENT_SAVE_TRIGGERED: "commentSaveTriggered";
@@ -200,11 +208,12 @@ export declare enum ArrowStatus {
200
208
  UPDATED = "updated",
201
209
  DELETED = "deleted"
202
210
  }
203
- export declare enum AreaStatus {
204
- ADDED = "added",
205
- UPDATED = "updated",
206
- DELETED = "deleted"
207
- }
211
+ export declare const AreaStatus: {
212
+ readonly ADDED: "added";
213
+ readonly UPDATED: "updated";
214
+ readonly DELETED: "deleted";
215
+ };
216
+ export type AreaStatus = (typeof AreaStatus)[keyof typeof AreaStatus];
208
217
  export declare enum DocumentViewsStatus {
209
218
  FIRST_VIEWED = "firstViewed"
210
219
  }
@@ -277,19 +286,21 @@ export declare enum Roles {
277
286
  ADMIN = "Admin",
278
287
  COMMENTER = "Commenter"
279
288
  }
280
- export declare enum DocumentAccessType {
281
- PUBLIC = "public",
282
- RESTRICTED = "restricted",
283
- ORGANIZATION_PRIVATE = "organizationPrivate"
284
- }
289
+ export declare const DocumentAccessType: {
290
+ readonly PUBLIC: "public";
291
+ readonly RESTRICTED: "restricted";
292
+ readonly ORGANIZATION_PRIVATE: "organizationPrivate";
293
+ };
294
+ export type DocumentAccessType = (typeof DocumentAccessType)[keyof typeof DocumentAccessType];
285
295
  export declare enum DetectionStrategy {
286
296
  DEFAULT = "default",
287
297
  DYNAMIC_ID = "dynamicId"
288
298
  }
289
- export declare enum CommentAccessMode {
290
- PUBLIC = "public",
291
- PRIVATE = "private"
292
- }
299
+ export declare const CommentAccessMode: {
300
+ readonly PUBLIC: "public";
301
+ readonly PRIVATE: "private";
302
+ };
303
+ export type CommentAccessMode = (typeof CommentAccessMode)[keyof typeof CommentAccessMode];
293
304
  export declare enum UnreadIndicatorMode {
294
305
  MINIMAL = "minimal",
295
306
  VERBOSE = "verbose"
@@ -302,25 +313,27 @@ export declare enum CommentCountType {
302
313
  TOTAL = "total",
303
314
  UNREAD = "unread"
304
315
  }
305
- export declare enum ServerConnectionState {
306
- ONLINE = "online",
307
- OFFLINE = "offline",
308
- PENDING_INIT = "pendingInit",
309
- PENDING_DATA = "pendingData"
310
- }
311
- export declare enum ContactListScopeForOrganizationUsers {
312
- ALL = "all",
313
- ORGANIZATION = "organization",
314
- ORGANIZATION_USER_GROUP = "organizationUserGroup",
315
- DOCUMENT = "document",
316
- FOLDER = "folder"
317
- }
316
+ export declare const ServerConnectionState: {
317
+ readonly ONLINE: "online";
318
+ readonly OFFLINE: "offline";
319
+ readonly PENDING_INIT: "pendingInit";
320
+ readonly PENDING_DATA: "pendingData";
321
+ };
322
+ export type ServerConnectionState = (typeof ServerConnectionState)[keyof typeof ServerConnectionState];
323
+ export declare const ContactListScopeForOrganizationUsers: {
324
+ readonly ALL: "all";
325
+ readonly ORGANIZATION: "organization";
326
+ readonly ORGANIZATION_USER_GROUP: "organizationUserGroup";
327
+ readonly DOCUMENT: "document";
328
+ readonly FOLDER: "folder";
329
+ };
330
+ export type ContactListScopeForOrganizationUsers = (typeof ContactListScopeForOrganizationUsers)[keyof typeof ContactListScopeForOrganizationUsers];
318
331
  export type RecorderMode = 'audio' | 'video' | 'screen' | 'all' | string;
319
332
  export type RecorderType = 'audio' | 'video' | 'screen';
320
333
  export type RecorderFileFormat = 'mp3' | 'mp4' | 'webm';
321
334
  export type RecorderLayoutMode = 'floating' | 'thread';
322
335
  export type SupportedMimeType = 'audio' | 'video';
323
- export type FirebaseRegion = 'usCentral1' | 'asiaSouthEast1' | 'europeWest1' | 'australiaSouthEast1';
336
+ export type FirebaseRegion = 'usCentral1' | 'asiaSouthEast1' | 'europeWest1' | 'australiaSouthEast1' | 'asiaNorthEast1';
324
337
  export type VideoEventType = 'play' | 'pause' | 'ratechange' | 'seeked' | 'timeupdate' | 'volumechange';
325
338
  export type RewriterType = 'copywriter' | 'generic';
326
339
  export type RecorderStatusType = 'started' | 'paused' | 'resumed' | 'stopped' | 'error' | null;
@@ -354,10 +367,11 @@ export type InlineSortingCriteria = 'createdFirst' | 'createdLast' | 'updatedFir
354
367
  export type NotificationPanelMode = 'popover' | 'sidebar';
355
368
  export type SidebarActionButtonType = 'default' | 'toggle';
356
369
  export type SidebarButtonCountType = 'default' | 'filter';
357
- export declare enum CommentSidebarSystemFiltersOperator {
358
- AND = "and",
359
- OR = "or"
360
- }
370
+ export declare const CommentSidebarSystemFiltersOperator: {
371
+ readonly AND: "and";
372
+ readonly OR: "or";
373
+ };
374
+ export type CommentSidebarSystemFiltersOperator = (typeof CommentSidebarSystemFiltersOperator)[keyof typeof CommentSidebarSystemFiltersOperator];
361
375
  /**
362
376
  * Type for notification settings accordion types
363
377
  */
@@ -1 +1 @@
1
- import{a as i,b as r,oi as e,pi as a}from"./chunk-JWLHBAMV.js";var h=class{constructor(t){this.injector=t,this.hideAnalytics=!1}ha(t){try{this.hideAnalytics=t}catch{}}getService(t){return this.injector.get(t)}trackEvent(t,c={},n=!0){try{this.hideAnalytics||(c||(c={}),c=r(i({},c),{source:"external"}),this.getService(e).trackAuthenticatedEvent(t,c,n))}catch(s){this.getService(a).catch("Error in _trackEvent: ",s);return}}};export{h as a};
1
+ import{a as i,b as r,ji as e,ki as a}from"./chunk-FXK7BWOQ.js";var h=class{constructor(t){this.injector=t,this.hideAnalytics=!1}ha(t){try{this.hideAnalytics=t}catch{}}getService(t){return this.injector.get(t)}trackEvent(t,c={},n=!0){try{this.hideAnalytics||(c||(c={}),c=r(i({},c),{source:"external"}),this.getService(e).trackAuthenticatedEvent(t,c,n))}catch(s){this.getService(a).catch("Error in _trackEvent: ",s);return}}};export{h as a};
@@ -0,0 +1 @@
1
+ import{b as x,c as R,d as f,e as F,f as k}from"./chunk-EIIBHBQX.js";import{$ as v,Ch as E,Di as N,Ee as I,Fe as C,Ve as S,Vf as w,Wd as u,Yd as y,be as A,ca as d,g,ki as L,li as O,qi as D,ri as P,ti as j}from"./chunk-FXK7BWOQ.js";var z=l=>{try{let n={USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_ATTR:["onerror","onload","onclick","onmouseover","onmouseout","onmouseenter","onmouseleave","onmousemove","onmousedown","onmouseup","onwheel","onscroll","onkeydown","onkeyup","onkeypress","onfocus","onblur","onchange","onsubmit","on*"],FORBID_TAGS:["script","style","iframe","object","embed","form"]};return P.sanitize(l,n)}catch(n){return u.catch("Error in File utils sanitizeSvg: ",n),""}},U=l=>{try{return l.name.split(".").slice(0,-1).join(".")}catch(n){u.catch("Error in File utils getFileName: ",n);return}},T=l=>{try{return/(?:\.([^.]+))?$/.exec(l?.name)[1]}catch(n){u.catch("Error in File utils getFileExtension: ",n);return}},M=(l,n)=>{try{let h=l.slice(0,-1,l.type);return new File([h],n+"."+T(l),{type:l.type})}catch(h){u.catch("Error in File utils updateFile: ",h);return}};var b={mp4:"video/mp4",mov:"video/quicktime",avi:"video/x-msvideo",wmv:"video/x-ms-wmv",flv:"video/x-flv",mp3:"audio/mpeg",wav:"audio/wav",ogg:"audio/ogg",webm:"video/webm",mkv:"video/x-matroska",m4v:"video/x-m4v",m4a:"audio/x-m4a",aac:"audio/aac","3gp":"video/3gpp","3g2":"video/3gpp2",jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",gif:"image/gif",bmp:"image/bmp",svg:"image/svg+xml",webp:"image/webp",pdf:"application/pdf",doc:"application/msword",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",xls:"application/vnd.ms-excel",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",ppt:"application/vnd.ms-powerpoint",pptx:"application/vnd.openxmlformats-officedocument.presentationml.presentation",odt:"application/vnd.oasis.opendocument.text",ods:"application/vnd.oasis.opendocument.spreadsheet",zip:"application/zip",rar:"application/x-rar-compressed",txt:"text/plain",rtf:"application/rtf",html:"text/html",htm:"text/html",csv:"text/csv",ics:"text/calendar",vcf:"text/x-vcard",js:"application/javascript",css:"text/css",json:"application/json",xml:"application/xml",swf:"application/x-shockwave-flash"};var _=(()=>{let n=class n{getStorageInstance(t){return t?f(void 0,t):f()}ref(t,e){return F(t,e)}uploadBytesResumable(t,e,o){return k(t,e,o)}getDownloadURL(t){return R(t)}deleteObject(t){return x(t)}};n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=v({token:n,factory:n.\u0275fac,providedIn:"root"});let l=n;return l})();var ae=(()=>{let n=class n{constructor(t,e,o,a,c,s){this.authService=t,this.configService=e,this.coreActionsService=o,this.loggingService=a,this.attachmentResolverService=c,this.storageAdapter=s,this.storage=this.storageAdapter.getStorageInstance();try{this.configService.getApiKey$().subscribe(r=>{this.apiKey=r}),this.authService.getFirebaseConfig$().subscribe(r=>{if(r&&r.firebaseOptions?.storageBucket){this.storage=this.storageAdapter.getStorageInstance(r?.firebaseOptions?.storageBucket);let i=this.configService.getProxyConfig();i?.storageHost&&(this.storage.host=i.storageHost)}},r=>{this.loggingService.catch("Error in StorageService constructor: ",r)})}catch(r){this.loggingService.catch("Error in StorageService constructor:",r)}}createAttachment({path:t,file:e}){try{let o=new C;o.name=e.name;let a=M(e,`${o.attachmentId}_${U(e)}`),c=`${this.apiKey}/${t}/${a?.name}`;return o.bucketPath=c,o.size=e.size,o.type=T(e),o?.type&&(o.mimeType=b[o?.type]),o}catch(o){return this.loggingService.catch("Error in StorageService createAttachment: ",o),null}}sanitizeSvgFile(t){return g(this,null,function*(){if(t.type===b.svg)try{let e=yield t.text(),o=z(e);return new File([o],t.name,{type:t.type})}catch(e){return this.loggingService.catch("Error in StorageService sanitizeSvgFile: ",e),t}return t})}uploadAttachmentToStorage(c){return g(this,arguments,function*({attachment:t,file:e,resolve:o,reject:a}){try{let s=this.storageAdapter.ref(this.storage,t.bucketPath),r=this.storageAdapter.uploadBytesResumable(s,e,{cacheControl:"public,max-age=3600"});r.on("state_changed",i=>{let m=i.bytesTransferred/i.totalBytes*100},i=>{a(i)},()=>{this.storageAdapter.getDownloadURL(r.snapshot.ref).then(i=>{t.url=i,o(t)})})}catch(s){this.loggingService.catch("Error in StorageService uploadAttachmentToStorage: ",s),a(s)}})}uploadToResolver(r){return g(this,arguments,function*({file:t,attachment:e,metadata:o,resolve:a,reject:c,scope:s}){try{o.attachmentId=e.attachmentId;let i={attachmentId:e.attachmentId,name:e.name,file:t,metadata:o,mimeType:e.mimeType},m=w();this.coreActionsService.triggerAction(A.ATTACHMENT_RESOLVER,{event:E.Events.Resolver.ATTACHMENT_SAVE_REQUEST_FORMED,timestamp:new Date().getTime(),uniqueId:m,methodName:S.UPLOAD_TO_RESOLVER,source:"internal",payload:{attachment:i,eventType:y.ATTACHMENT_ADD}});let p=yield this.attachmentResolverService.saveAttachment({attachment:i,eventType:y.ATTACHMENT_ADD},m,s);p&&p.data?.url?(e.url=p.data?.url,a(e)):c(new Error("Failed to upload attachment to resolver"))}catch(i){this.loggingService.catch("Error in StorageService uploadToResolver: ",i),c(i)}})}uploadFile({path:t,file:e,useAttachmentResolver:o,metadata:a,attachmentScope:c}){return new Promise((s,r)=>g(this,null,function*(){try{if(!this.apiKey)throw new Error("API key not configured");let i=yield this.sanitizeSvgFile(e),m=this.createAttachment({path:t,file:i});if(!m)throw new Error("Attachment not created");o?this.uploadToResolver({file:i,attachment:m,metadata:a,resolve:s,reject:r,scope:c}):this.uploadAttachmentToStorage({attachment:m,file:i,resolve:s,reject:r})}catch(i){this.loggingService.catch("Error in StorageService uploadFile:",i),r(i)}}))}uploadChunk(t,e,o,a){return new Promise((c,s)=>{try{if(a?.useAttachmentResolver){let r=this.createAttachment({path:t,file:e});if(!r){s(new Error("Attachment not created for chunk upload"));return}this.uploadToResolver({file:e,attachment:r,metadata:a.metadata,resolve:i=>c(i.url),reject:s,scope:a.attachmentScope});return}if(this.apiKey){let r=`${this.apiKey}/${t}/${e.name}`,i=this.storageAdapter.ref(this.storage,r),m=this.storageAdapter.uploadBytesResumable(i,e,{cacheControl:"public,max-age=3600"});m.on("state_changed",p=>{let H=p.bytesTransferred/p.totalBytes*100},p=>{s(p)},()=>{this.storageAdapter.getDownloadURL(m.snapshot.ref).then(p=>{c(p)}).catch(p=>{this.loggingService.catch(`[uploadChunk] Error getting download URL for chunk ${o}:`,p),s(p)})})}else{let r=new Error("API key not available");this.loggingService.catch("[uploadChunk] API key not available",r),s(r)}}catch(r){this.loggingService.catch(`[uploadChunk] Error in StorageService uploadChunk for chunk ${o}: `,r),s(r)}})}downloadAttachment(t){try{if(t.url){let e=new XMLHttpRequest;e.responseType="blob",e.onload=()=>{let o=e.response,a=document.createElement("a"),c=window.URL.createObjectURL(o);a.setAttribute("type","hidden"),a.setAttribute(I.ATTRIBUTES.VELT_DOWNLOAD_BUTTON,"true"),a.classList.add("snippyly-overlay-panel"),a.href=c,t?.name&&(a.download=t?.name),document.body.appendChild(a);let s=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});a.dispatchEvent(s),window.URL.revokeObjectURL(c),a.remove()},e.onerror=()=>{window.open(t.url,"_blank")},e.open("GET",t.url),e.send()}}catch(e){this.loggingService.catch("Error in StorageService downloadAttachment: ",e)}}deleteAttachment({attachment:t,metadata:e,useAttachmentResolver:o,attachmentScope:a}){return new Promise((c,s)=>{if(o){let r=w();this.coreActionsService.triggerAction(A.ATTACHMENT_RESOLVER,{event:E.Events.Resolver.ATTACHMENT_DELETE_REQUEST_FORMED,timestamp:new Date().getTime(),uniqueId:r,methodName:S.DELETE_ATTACHMENT,source:"internal",payload:{attachmentId:t.attachmentId,metadata:e}}),this.attachmentResolverService.deleteAttachment({attachmentId:t.attachmentId,metadata:e},r,a).then(()=>{c(null)}).catch(i=>{s(i)})}else{let r=this.storageAdapter.ref(this.storage,t.bucketPath);this.storageAdapter.deleteObject(r).then(()=>{c(null)}).catch(i=>{c(null)})}})}deleteFileFromPath(t){return new Promise((e,o)=>{let a=this.storageAdapter.ref(this.storage,t);this.storageAdapter.deleteObject(a).then(()=>{e(null)}).catch(c=>{o(c)})})}};n.\u0275fac=function(e){return new(e||n)(d(j),d(O),d(D),d(L),d(N),d(_))},n.\u0275prov=v({token:n,factory:n.\u0275fac,providedIn:"root"});let l=n;return l})();export{ae as a};
@@ -1,2 +1,2 @@
1
- import{C as F,R as b,S as f,T as H,U as j,V as N,u as R,v as E,w as O,x as I}from"./chunk-AOHSD4YE.js";import{$ as y,D as v,E as l,Ga as k,J as h,Kb as A,Ua as C,Va as B,Ya as w,_a as M,a as c,aa as S,b as _,ba as p,da as r,db as D,ge as L,he as s,k as g,la as x,xb as T}from"./chunk-JWLHBAMV.js";function X(i,m){}var z="_mat-bottom-sheet-enter",P="_mat-bottom-sheet-exit",G=(()=>{class i extends H{_breakpointSubscription;_animationsDisabled=b();_animationState="void";_animationStateChanged=new k;_destroyed;constructor(){super();let e=r(L);this._breakpointSubscription=e.observe([s.Medium,s.Large,s.XLarge]).subscribe(()=>{let o=this._elementRef.nativeElement.classList;o.toggle("mat-bottom-sheet-container-medium",e.isMatched(s.Medium)),o.toggle("mat-bottom-sheet-container-large",e.isMatched(s.Large)),o.toggle("mat-bottom-sheet-container-xlarge",e.isMatched(s.XLarge))})}enter(){this._destroyed||(this._animationState="visible",this._changeDetectorRef.markForCheck(),this._changeDetectorRef.detectChanges(),this._animationsDisabled&&this._simulateAnimation(z))}exit(){this._destroyed||(this._elementRef.nativeElement.setAttribute("mat-exit",""),this._animationState="hidden",this._changeDetectorRef.markForCheck(),this._animationsDisabled&&this._simulateAnimation(P))}ngOnDestroy(){super.ngOnDestroy(),this._breakpointSubscription.unsubscribe(),this._destroyed=!0}_simulateAnimation(e){this._ngZone.run(()=>{this._handleAnimationEvent(!0,e),setTimeout(()=>this._handleAnimationEvent(!1,e))})}_trapFocus(){super._trapFocus({preventScroll:!0})}_handleAnimationEvent(e,o){let t=o===z;(t||o===P)&&this._animationStateChanged.emit({toState:t?"visible":"hidden",phase:e?"start":"done"})}static \u0275fac=function(o){return new(o||i)};static \u0275cmp=C({type:i,selectors:[["mat-bottom-sheet-container"]],hostAttrs:["tabindex","-1",1,"mat-bottom-sheet-container"],hostVars:9,hostBindings:function(o,t){o&1&&T("animationstart",function(a){return t._handleAnimationEvent(!0,a.animationName)})("animationend",function(a){return t._handleAnimationEvent(!1,a.animationName)})("animationcancel",function(a){return t._handleAnimationEvent(!1,a.animationName)}),o&2&&(D("role",t._config.role)("aria-modal",t._config.ariaModal)("aria-label",t._config.ariaLabel),A("mat-bottom-sheet-container-animations-enabled",!t._animationsDisabled)("mat-bottom-sheet-container-enter",t._animationState==="visible")("mat-bottom-sheet-container-exit",t._animationState==="hidden"))},features:[w],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(o,t){o&1&&M(0,X,0,0,"ng-template",0)},dependencies:[R],styles:[`@keyframes _mat-bottom-sheet-enter{from{transform:translateY(100%)}to{transform:none}}@keyframes _mat-bottom-sheet-exit{from{transform:none}to{transform:translateY(100%)}}.mat-bottom-sheet-container{box-shadow:0px 8px 10px -5px rgba(0, 0, 0, 0.2), 0px 16px 24px 2px rgba(0, 0, 0, 0.14), 0px 6px 30px 5px rgba(0, 0, 0, 0.12);padding:8px 16px;min-width:100vw;box-sizing:border-box;display:block;outline:0;max-height:80vh;overflow:auto;position:relative;background:var(--mat-bottom-sheet-container-background-color, var(--mat-sys-surface-container-low));color:var(--mat-bottom-sheet-container-text-color, var(--mat-sys-on-surface));font-family:var(--mat-bottom-sheet-container-text-font, var(--mat-sys-body-large-font));font-size:var(--mat-bottom-sheet-container-text-size, var(--mat-sys-body-large-size));line-height:var(--mat-bottom-sheet-container-text-line-height, var(--mat-sys-body-large-line-height));font-weight:var(--mat-bottom-sheet-container-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mat-bottom-sheet-container-text-tracking, var(--mat-sys-body-large-tracking))}@media(forced-colors: active){.mat-bottom-sheet-container{outline:1px solid}}.mat-bottom-sheet-container-animations-enabled{transform:translateY(100%)}.mat-bottom-sheet-container-animations-enabled.mat-bottom-sheet-container-enter{animation:_mat-bottom-sheet-enter 195ms cubic-bezier(0, 0, 0.2, 1) forwards}.mat-bottom-sheet-container-animations-enabled.mat-bottom-sheet-container-exit{animation:_mat-bottom-sheet-exit 375ms cubic-bezier(0.4, 0, 1, 1) backwards}.mat-bottom-sheet-container-xlarge,.mat-bottom-sheet-container-large,.mat-bottom-sheet-container-medium{border-top-left-radius:var(--mat-bottom-sheet-container-shape, 28px);border-top-right-radius:var(--mat-bottom-sheet-container-shape, 28px)}.mat-bottom-sheet-container-medium{min-width:384px;max-width:calc(100vw - 128px)}.mat-bottom-sheet-container-large{min-width:512px;max-width:calc(100vw - 256px)}.mat-bottom-sheet-container-xlarge{min-width:576px;max-width:calc(100vw - 384px)}
1
+ import{C as F,R as b,S as f,T as H,U as j,V as N,u as R,v as E,w as O,x as I}from"./chunk-CQEJBXFE.js";import{$ as y,D as v,E as l,Ga as k,J as h,Kb as A,Td as L,Ua as C,Ud as s,Va as B,Ya as w,_a as M,a as c,aa as S,b as _,ba as p,da as r,db as D,k as g,la as x,xb as T}from"./chunk-FXK7BWOQ.js";function X(i,m){}var z="_mat-bottom-sheet-enter",P="_mat-bottom-sheet-exit",G=(()=>{class i extends H{_breakpointSubscription;_animationsDisabled=b();_animationState="void";_animationStateChanged=new k;_destroyed;constructor(){super();let e=r(L);this._breakpointSubscription=e.observe([s.Medium,s.Large,s.XLarge]).subscribe(()=>{let o=this._elementRef.nativeElement.classList;o.toggle("mat-bottom-sheet-container-medium",e.isMatched(s.Medium)),o.toggle("mat-bottom-sheet-container-large",e.isMatched(s.Large)),o.toggle("mat-bottom-sheet-container-xlarge",e.isMatched(s.XLarge))})}enter(){this._destroyed||(this._animationState="visible",this._changeDetectorRef.markForCheck(),this._changeDetectorRef.detectChanges(),this._animationsDisabled&&this._simulateAnimation(z))}exit(){this._destroyed||(this._elementRef.nativeElement.setAttribute("mat-exit",""),this._animationState="hidden",this._changeDetectorRef.markForCheck(),this._animationsDisabled&&this._simulateAnimation(P))}ngOnDestroy(){super.ngOnDestroy(),this._breakpointSubscription.unsubscribe(),this._destroyed=!0}_simulateAnimation(e){this._ngZone.run(()=>{this._handleAnimationEvent(!0,e),setTimeout(()=>this._handleAnimationEvent(!1,e))})}_trapFocus(){super._trapFocus({preventScroll:!0})}_handleAnimationEvent(e,o){let t=o===z;(t||o===P)&&this._animationStateChanged.emit({toState:t?"visible":"hidden",phase:e?"start":"done"})}static \u0275fac=function(o){return new(o||i)};static \u0275cmp=C({type:i,selectors:[["mat-bottom-sheet-container"]],hostAttrs:["tabindex","-1",1,"mat-bottom-sheet-container"],hostVars:9,hostBindings:function(o,t){o&1&&T("animationstart",function(a){return t._handleAnimationEvent(!0,a.animationName)})("animationend",function(a){return t._handleAnimationEvent(!1,a.animationName)})("animationcancel",function(a){return t._handleAnimationEvent(!1,a.animationName)}),o&2&&(D("role",t._config.role)("aria-modal",t._config.ariaModal)("aria-label",t._config.ariaLabel),A("mat-bottom-sheet-container-animations-enabled",!t._animationsDisabled)("mat-bottom-sheet-container-enter",t._animationState==="visible")("mat-bottom-sheet-container-exit",t._animationState==="hidden"))},features:[w],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(o,t){o&1&&M(0,X,0,0,"ng-template",0)},dependencies:[R],styles:[`@keyframes _mat-bottom-sheet-enter{from{transform:translateY(100%)}to{transform:none}}@keyframes _mat-bottom-sheet-exit{from{transform:none}to{transform:translateY(100%)}}.mat-bottom-sheet-container{box-shadow:0px 8px 10px -5px rgba(0, 0, 0, 0.2), 0px 16px 24px 2px rgba(0, 0, 0, 0.14), 0px 6px 30px 5px rgba(0, 0, 0, 0.12);padding:8px 16px;min-width:100vw;box-sizing:border-box;display:block;outline:0;max-height:80vh;overflow:auto;position:relative;background:var(--mat-bottom-sheet-container-background-color, var(--mat-sys-surface-container-low));color:var(--mat-bottom-sheet-container-text-color, var(--mat-sys-on-surface));font-family:var(--mat-bottom-sheet-container-text-font, var(--mat-sys-body-large-font));font-size:var(--mat-bottom-sheet-container-text-size, var(--mat-sys-body-large-size));line-height:var(--mat-bottom-sheet-container-text-line-height, var(--mat-sys-body-large-line-height));font-weight:var(--mat-bottom-sheet-container-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mat-bottom-sheet-container-text-tracking, var(--mat-sys-body-large-tracking))}@media(forced-colors: active){.mat-bottom-sheet-container{outline:1px solid}}.mat-bottom-sheet-container-animations-enabled{transform:translateY(100%)}.mat-bottom-sheet-container-animations-enabled.mat-bottom-sheet-container-enter{animation:_mat-bottom-sheet-enter 195ms cubic-bezier(0, 0, 0.2, 1) forwards}.mat-bottom-sheet-container-animations-enabled.mat-bottom-sheet-container-exit{animation:_mat-bottom-sheet-exit 375ms cubic-bezier(0.4, 0, 1, 1) backwards}.mat-bottom-sheet-container-xlarge,.mat-bottom-sheet-container-large,.mat-bottom-sheet-container-medium{border-top-left-radius:var(--mat-bottom-sheet-container-shape, 28px);border-top-right-radius:var(--mat-bottom-sheet-container-shape, 28px)}.mat-bottom-sheet-container-medium{min-width:384px;max-width:calc(100vw - 128px)}.mat-bottom-sheet-container-large{min-width:512px;max-width:calc(100vw - 256px)}.mat-bottom-sheet-container-xlarge{min-width:576px;max-width:calc(100vw - 384px)}
2
2
  `],encapsulation:2})}return i})(),K=new p("MatBottomSheetData"),u=class{viewContainerRef;panelClass;direction;data=null;hasBackdrop=!0;backdropClass;disableClose=!1;ariaLabel=null;ariaModal=!1;closeOnNavigation=!0;autoFocus="first-tabbable";restoreFocus=!0;scrollStrategy;height="";minHeight;maxHeight},d=class{_ref;get instance(){return this._ref.componentInstance}get componentRef(){return this._ref.componentRef}containerInstance;disableClose;_afterOpened=new g;_result;_closeFallbackTimeout;constructor(m,e,o){this._ref=m,this.containerInstance=o,this.disableClose=e.disableClose,o._animationStateChanged.pipe(l(t=>t.phase==="done"&&t.toState==="visible"),h(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),o._animationStateChanged.pipe(l(t=>t.phase==="done"&&t.toState==="hidden"),h(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._ref.close(this._result)}),m.overlayRef.detachments().subscribe(()=>{this._ref.close(this._result)}),v(this.backdropClick(),this.keydownEvents().pipe(l(t=>t.keyCode===27))).subscribe(t=>{!this.disableClose&&(t.type!=="keydown"||!O(t))&&(t.preventDefault(),this.dismiss())})}dismiss(m){this.containerInstance&&(this.containerInstance._animationStateChanged.pipe(l(e=>e.phase==="start"),h(1)).subscribe(()=>{this._closeFallbackTimeout=setTimeout(()=>this._ref.close(this._result),500),this._ref.overlayRef.detachBackdrop()}),this._result=m,this.containerInstance.exit(),this.containerInstance=null)}afterDismissed(){return this._ref.closed}afterOpened(){return this._afterOpened}backdropClick(){return this._ref.backdropClick}keydownEvents(){return this._ref.keydownEvents}},U=new p("mat-bottom-sheet-default-options"),W=(()=>{class i{_injector=r(x);_parentBottomSheet=r(i,{optional:!0,skipSelf:!0});_animationsDisabled=b();_defaultOptions=r(U,{optional:!0});_bottomSheetRefAtThisLevel=null;_dialog=r(j);get _openedBottomSheetRef(){let e=this._parentBottomSheet;return e?e._openedBottomSheetRef:this._bottomSheetRefAtThisLevel}set _openedBottomSheetRef(e){this._parentBottomSheet?this._parentBottomSheet._openedBottomSheetRef=e:this._bottomSheetRefAtThisLevel=e}constructor(){}open(e,o){let t=c(c({},this._defaultOptions||new u),o),n;return this._dialog.open(e,_(c({},t),{disableClose:!0,closeOnOverlayDetachments:!1,maxWidth:"100%",container:G,scrollStrategy:t.scrollStrategy||I(this._injector),positionStrategy:F(this._injector).centerHorizontally().bottom("0"),disableAnimations:this._animationsDisabled,templateContext:()=>({bottomSheetRef:n}),providers:(a,Z,Y)=>(n=new d(a,t,Y),[{provide:d,useValue:n},{provide:K,useValue:t.data}])})),n.afterDismissed().subscribe(()=>{this._openedBottomSheetRef===n&&(this._openedBottomSheetRef=null)}),this._openedBottomSheetRef?(this._openedBottomSheetRef.afterDismissed().subscribe(()=>n.containerInstance?.enter()),this._openedBottomSheetRef.dismiss()):n.containerInstance.enter(),this._openedBottomSheetRef=n,n}dismiss(e){this._openedBottomSheetRef&&this._openedBottomSheetRef.dismiss(e)}ngOnDestroy(){this._bottomSheetRefAtThisLevel&&this._bottomSheetRefAtThisLevel.dismiss()}static \u0275fac=function(o){return new(o||i)};static \u0275prov=y({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),dt=(()=>{class i{static \u0275fac=function(o){return new(o||i)};static \u0275mod=B({type:i});static \u0275inj=S({providers:[W],imports:[N,f,E,f]})}return i})();export{K as a,d as b,W as c,dt as d};
@@ -1 +1 @@
1
- import{ca as F}from"./chunk-AOHSD4YE.js";import{$ as A,Ci as U,E as h,G as d,Hi as C,Ie as a,J as v,Je as m,L as l,Qf as g,Qi as w,T as n,Te as M,ca as s,je as $,l as p,lf as D,oi as E,pi as R,qi as y,r as u,v as c,vi as k,xh as I}from"./chunk-JWLHBAMV.js";var Z=(()=>{let o=class o{constructor(e,t,r,b,f,W,T,j){this.analyticsService=e,this.authService=t,this.contactService=r,this.databaseService=b,this.docService=f,this.configService=W,this.loggingService=T,this.commonDbService=j,this.documentIAM$=new p(null),this.workspaceIAM$=new p(null),this.roles$=new p([]),this.getDocumentIamSubscription=null,this.getOrganizationIamSubscription=null,this.getWorkspaceIamSubscription=null;try{this.authService.setIamService(this),this.databaseService.getDb().pipe(h(i=>!!i),v(1)).subscribe(i=>{i&&(this.getUser(),this.getDocumentPaths())},i=>{this.loggingService.catch("Error in CommentService getDb subscription: ",i)}),this.getRole$().pipe(v(1)).subscribe(i=>{this.authService?.getUser()&&!i&&this.analyticsService.trackEvent($.Events.Iam.USER_ACCESS_DENIED)}),this.documentIAM$.subscribe(i=>{i?.accessType&&this.contactService.setDocumentAccessType(i.accessType)})}catch(i){this.loggingService.catch("Error in IamService constructor: ",i)}}clearCache(){this.loggingService.log("%c[WB] Calling FUNCTION: clearCache in IamService","color: green;");try{this.documentIAM$.next(null),this.workspaceIAM$.next(null),this.roles$.next([]),this.documentPaths=null}catch(e){this.loggingService.catch("Error in IamService clearCache: ",e)}}getUser(){try{this.authService.getUser$().pipe(h(e=>!!e)).subscribe(e=>{this.user=e,this.user?this.getDocumentIam():(this.getDocumentIamSubscription?.unsubscribe(),this.getOrganizationIamSubscription?.unsubscribe(),this.getWorkspaceIamSubscription?.unsubscribe())},e=>{this.loggingService.catch("Error in IamService getUser$ subscription: ",e)})}catch(e){this.loggingService.catch("Error in IamService getUser: ",e)}}getDocumentPaths(){try{this.docService.getDocumentPaths$().pipe(h(e=>!!e)).subscribe(e=>{this.documentPaths=e,this.getDocumentIam(),this.getWorkspaceIam()},e=>{this.loggingService.catch("Error in IamService getDocumentPaths$ subscription: ",e)})}catch(e){this.loggingService.catch("Error in IamService getDocumentPaths: ",e)}}getDocumentIam(){try{this.getDocumentIamSubscription&&(this.getDocumentIamSubscription.unsubscribe(),this.getDocumentIamSubscription=null),this.user?this.getDocumentIamSubscription=this.docService.getDocumentIam$().subscribe(e=>{let t=e||new D;this.documentIAM$.next(t)},e=>{this.loggingService.catch("Error in IamService getDocumentIam$ subscription: ",e)}):this.documentIAM$.next(null)}catch(e){this.loggingService.catch("Error in IamService getDocumentIam: ",e)}}getWorkspaceIam(){try{this.getWorkspaceIamSubscription||(this.getWorkspaceIamSubscription=this.commonDbService.dbListener({feature:"workspaceIam",properties:{skipFirestore:!0}}).pipe(d(e=>u(null))).subscribe(e=>{this.workspaceIAM$.next(e?.data),this.roles$.next(e?.data?.roles||[])}))}catch(e){this.loggingService.catch("Error in IamService getWorkspaceIam: ",e)}}isUserAllowed$(){return this.getRole$().pipe(c(e=>!!e),l())}getDocumentIAM$(){return this.documentIAM$.asObservable()}getRoles$(){return this.roles$.asObservable().pipe(c(e=>e?.length?e:M.WorkspaceRoles))}getFeaturesAccessLevel$(){return this.documentIAM$.asObservable().pipe(c(e=>e?.features),n(e=>this.getRole$().pipe(c(t=>(t===a.ADMIN&&(e=e&&JSON.parse(JSON.stringify(e||{})),e?.all?.disabled&&(e.all.disabled=!1)),e)))))}hasRole(e){try{return e===this.getRole()}catch(t){return this.loggingService.catch("Error in IamService hasRole: ",t),!1}}hasRoleAny(e=[]){try{return e?.includes(this.getRole()||"")}catch(t){return this.loggingService.catch("Error in IamService hasRoleAny: ",t),!1}}hasRole$(e){try{return this.authService.getUser$().pipe(n(()=>this.documentIAM$.pipe(h(t=>!!t),n(()=>this.workspaceIAM$.pipe(c(()=>e===this.getRole()))))))}catch(t){return this.loggingService.catch("Error in IamService hasRole$: ",t),u(!1)}}getRole$(){try{return this.authService.getUser$().pipe(n(()=>this.configService.getSF$()),n(()=>this.configService.getSF()?this.contactService.isUserGlobalContact$():u(null)),n(()=>this.configService.getSF()?this.documentIAM$.pipe(h(e=>!!e),l(I)):u(null)),n(()=>this.workspaceIAM$.pipe(l(I))),c(()=>this.getRole()))}catch(e){return this.loggingService.catch("Error in IamService getRole$: ",e),u(null)}}getRole(){try{let e=this.configService.getSF();if(this.user?.isAdmin)return a.ADMIN;return a.COMMENTER;if(this.user)switch((this.documentIAM$.value?this.documentIAM$.value?.features?.all?.restricted:!1)?m.RESTRICTED:this.documentIAM$.value?this.documentIAM$.value?.documentAccessType||m.PUBLIC:null){case m.PUBLIC:r=this.getUserFromDocumentIAM(this.user?.email,this.user?.userId),r||(r=this.getUserFromWorkspaceIAM(this.user?.email,this.user?.userId)),t=r?.role?.name||a.COMMENTER;break;case m.RESTRICTED:r=this.getUserFromDocumentIAM(this.user?.email,this.user?.userId),r||(r=this.getUserFromWorkspaceIAM(this.user?.email,this.user?.userId)),t=r?.role?.name||null;break;default:break}}catch(e){this.loggingService.catch("Error in IamService getRole: ",e)}return null}isUserAdmin$(){return this.getRole$().pipe(c(e=>e===a.ADMIN),l())}isUserAdmin(){try{return this.getRole()===a.ADMIN}catch(e){return this.loggingService.catch("Error in IamService isUserAdmin: ",e),!1}}getUserFromDocumentIAM(e,t){try{if(e||t){let r;return e&&(r=this.documentIAM$.value?.users?.[g(e)]),!r&&t&&(r=this.documentIAM$.value?.users?.[g(t)]),r}else return}catch(r){this.loggingService.catch("Error in IamService getUserFromDocumentIAM: ",r)}}getUserFromWorkspaceIAM(e,t){try{if(e||t){let r;return e&&(r=this.workspaceIAM$.value?.users?.[g(e)]),!r&&t&&(r=this.workspaceIAM$.value?.users?.[g(t)]),r}else return}catch(r){this.loggingService.catch("Error in IamService getUserFromWorkspaceIAM: ",r)}}};o.\u0275fac=function(t){return new(t||o)(s(E),s(k),s(F),s(U),s(C),s(y),s(R),s(w))},o.\u0275prov=A({token:o,factory:o.\u0275fac,providedIn:"root"});let S=o;return S})();export{Z as a};
1
+ import{ca as F}from"./chunk-CQEJBXFE.js";import{$ as A,Ai as U,Cf as g,Ch as D,E as h,Ee as $,Fi as C,G as d,J as v,L as l,Pi as w,T as n,Xe as M,ca as s,ji as E,ki as R,l as p,li as y,qh as I,r as u,te as a,ti as k,ue as m,v as c}from"./chunk-FXK7BWOQ.js";var Z=(()=>{let o=class o{constructor(e,t,r,b,f,W,T,j){this.analyticsService=e,this.authService=t,this.contactService=r,this.databaseService=b,this.docService=f,this.configService=W,this.loggingService=T,this.commonDbService=j,this.documentIAM$=new p(null),this.workspaceIAM$=new p(null),this.roles$=new p([]),this.getDocumentIamSubscription=null,this.getOrganizationIamSubscription=null,this.getWorkspaceIamSubscription=null;try{this.authService.setIamService(this),this.databaseService.getDb().pipe(h(i=>!!i),v(1)).subscribe(i=>{i&&(this.getUser(),this.getDocumentPaths())},i=>{this.loggingService.catch("Error in CommentService getDb subscription: ",i)}),this.getRole$().pipe(v(1)).subscribe(i=>{this.authService?.getUser()&&!i&&this.analyticsService.trackEvent(D.Events.Iam.USER_ACCESS_DENIED)}),this.documentIAM$.subscribe(i=>{i?.accessType&&this.contactService.setDocumentAccessType(i.accessType)})}catch(i){this.loggingService.catch("Error in IamService constructor: ",i)}}clearCache(){this.loggingService.log("%c[WB] Calling FUNCTION: clearCache in IamService","color: green;");try{this.documentIAM$.next(null),this.workspaceIAM$.next(null),this.roles$.next([]),this.documentPaths=null}catch(e){this.loggingService.catch("Error in IamService clearCache: ",e)}}getUser(){try{this.authService.getUser$().pipe(h(e=>!!e)).subscribe(e=>{this.user=e,this.user?this.getDocumentIam():(this.getDocumentIamSubscription?.unsubscribe(),this.getOrganizationIamSubscription?.unsubscribe(),this.getWorkspaceIamSubscription?.unsubscribe())},e=>{this.loggingService.catch("Error in IamService getUser$ subscription: ",e)})}catch(e){this.loggingService.catch("Error in IamService getUser: ",e)}}getDocumentPaths(){try{this.docService.getDocumentPaths$().pipe(h(e=>!!e)).subscribe(e=>{this.documentPaths=e,this.getDocumentIam(),this.getWorkspaceIam()},e=>{this.loggingService.catch("Error in IamService getDocumentPaths$ subscription: ",e)})}catch(e){this.loggingService.catch("Error in IamService getDocumentPaths: ",e)}}getDocumentIam(){try{this.getDocumentIamSubscription&&(this.getDocumentIamSubscription.unsubscribe(),this.getDocumentIamSubscription=null),this.user?this.getDocumentIamSubscription=this.docService.getDocumentIam$().subscribe(e=>{let t=e||new M;this.documentIAM$.next(t)},e=>{this.loggingService.catch("Error in IamService getDocumentIam$ subscription: ",e)}):this.documentIAM$.next(null)}catch(e){this.loggingService.catch("Error in IamService getDocumentIam: ",e)}}getWorkspaceIam(){try{this.getWorkspaceIamSubscription||(this.getWorkspaceIamSubscription=this.commonDbService.dbListener({feature:"workspaceIam",properties:{skipFirestore:!0}}).pipe(d(e=>u(null))).subscribe(e=>{this.workspaceIAM$.next(e?.data),this.roles$.next(e?.data?.roles||[])}))}catch(e){this.loggingService.catch("Error in IamService getWorkspaceIam: ",e)}}isUserAllowed$(){return this.getRole$().pipe(c(e=>!!e),l())}getDocumentIAM$(){return this.documentIAM$.asObservable()}getRoles$(){return this.roles$.asObservable().pipe(c(e=>e?.length?e:$.WorkspaceRoles))}getFeaturesAccessLevel$(){return this.documentIAM$.asObservable().pipe(c(e=>e?.features),n(e=>this.getRole$().pipe(c(t=>(t===a.ADMIN&&(e=e&&JSON.parse(JSON.stringify(e||{})),e?.all?.disabled&&(e.all.disabled=!1)),e)))))}hasRole(e){try{return e===this.getRole()}catch(t){return this.loggingService.catch("Error in IamService hasRole: ",t),!1}}hasRoleAny(e=[]){try{return e?.includes(this.getRole()||"")}catch(t){return this.loggingService.catch("Error in IamService hasRoleAny: ",t),!1}}hasRole$(e){try{return this.authService.getUser$().pipe(n(()=>this.documentIAM$.pipe(h(t=>!!t),n(()=>this.workspaceIAM$.pipe(c(()=>e===this.getRole()))))))}catch(t){return this.loggingService.catch("Error in IamService hasRole$: ",t),u(!1)}}getRole$(){try{return this.authService.getUser$().pipe(n(()=>this.configService.getSF$()),n(()=>this.configService.getSF()?this.contactService.isUserGlobalContact$():u(null)),n(()=>this.configService.getSF()?this.documentIAM$.pipe(h(e=>!!e),l(I)):u(null)),n(()=>this.workspaceIAM$.pipe(l(I))),c(()=>this.getRole()))}catch(e){return this.loggingService.catch("Error in IamService getRole$: ",e),u(null)}}getRole(){try{let e=this.configService.getSF();if(this.user?.isAdmin)return a.ADMIN;return a.COMMENTER;if(this.user)switch((this.documentIAM$.value?this.documentIAM$.value?.features?.all?.restricted:!1)?m.RESTRICTED:this.documentIAM$.value?this.documentIAM$.value?.documentAccessType||m.PUBLIC:null){case m.PUBLIC:r=this.getUserFromDocumentIAM(this.user?.email,this.user?.userId),r||(r=this.getUserFromWorkspaceIAM(this.user?.email,this.user?.userId)),t=r?.role?.name||a.COMMENTER;break;case m.RESTRICTED:r=this.getUserFromDocumentIAM(this.user?.email,this.user?.userId),r||(r=this.getUserFromWorkspaceIAM(this.user?.email,this.user?.userId)),t=r?.role?.name||null;break;default:break}}catch(e){this.loggingService.catch("Error in IamService getRole: ",e)}return null}isUserAdmin$(){return this.getRole$().pipe(c(e=>e===a.ADMIN),l())}isUserAdmin(){try{return this.getRole()===a.ADMIN}catch(e){return this.loggingService.catch("Error in IamService isUserAdmin: ",e),!1}}getUserFromDocumentIAM(e,t){try{if(e||t){let r;return e&&(r=this.documentIAM$.value?.users?.[g(e)]),!r&&t&&(r=this.documentIAM$.value?.users?.[g(t)]),r}else return}catch(r){this.loggingService.catch("Error in IamService getUserFromDocumentIAM: ",r)}}getUserFromWorkspaceIAM(e,t){try{if(e||t){let r;return e&&(r=this.workspaceIAM$.value?.users?.[g(e)]),!r&&t&&(r=this.workspaceIAM$.value?.users?.[g(t)]),r}else return}catch(r){this.loggingService.catch("Error in IamService getUserFromWorkspaceIAM: ",r)}}};o.\u0275fac=function(t){return new(t||o)(s(E),s(k),s(F),s(U),s(C),s(y),s(R),s(w))},o.\u0275prov=A({token:o,factory:o.\u0275fac,providedIn:"root"});let S=o;return S})();export{Z as a};
@@ -1 +1 @@
1
- import{D as E,Ha as R,Ja as S,Ka as F,Ma as l,T as b,bb as V,i as g,la as I,m as y,ra as v}from"./chunk-JWLHBAMV.js";var Z={schedule(n,t){let e=setTimeout(n,t);return()=>clearTimeout(e)}};function D(n){return n.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function M(n){return!!n&&n.nodeType===Node.ELEMENT_NODE}var h;function T(n,t){if(!h){let e=Element.prototype;h=e.matches||e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector}return n.nodeType===Node.ELEMENT_NODE?h.call(n,t):!1}function C(n){let t={};return n.forEach(({propName:e,templateName:s,transform:r})=>{t[D(s)]=[e,r]}),t}function _(n,t){return t.get(l).resolveComponentFactory(n).inputs}function x(n,t){let e=n.childNodes,s=t.map(()=>[]),r=-1;t.some((c,u)=>c==="*"?(r=u,!0):!1);for(let c=0,u=e.length;c<u;++c){let o=e[c],i=O(o,t,r);i!==-1&&s[i].push(o)}return s}function O(n,t,e){let s=e;return M(n)&&t.some((r,c)=>r!=="*"&&T(n,r)?(s=c,!0):!1),s}var N=10,p=class{componentFactory;inputMap=new Map;constructor(t,e){this.componentFactory=e.get(l).resolveComponentFactory(t);for(let s of this.componentFactory.inputs)this.inputMap.set(s.propName,s.templateName)}create(t){return new m(this.componentFactory,t,this.inputMap)}},m=class{componentFactory;injector;inputMap;eventEmitters=new y(1);events=this.eventEmitters.pipe(b(t=>E(...t)));componentRef=null;scheduledDestroyFn=null;initialInputValues=new Map;ngZone;elementZone;appRef;cdScheduler;constructor(t,e,s){this.componentFactory=t,this.injector=e,this.inputMap=s,this.ngZone=this.injector.get(R),this.appRef=this.injector.get(V),this.cdScheduler=e.get(v),this.elementZone=typeof Zone>"u"?null:this.ngZone.run(()=>Zone.current)}connect(t){this.runInZone(()=>{if(this.scheduledDestroyFn!==null){this.scheduledDestroyFn(),this.scheduledDestroyFn=null;return}this.componentRef===null&&this.initializeComponent(t)})}disconnect(){this.runInZone(()=>{this.componentRef===null||this.scheduledDestroyFn!==null||(this.scheduledDestroyFn=Z.schedule(()=>{this.componentRef!==null&&(this.componentRef.destroy(),this.componentRef=null)},N))})}getInputValue(t){return this.runInZone(()=>this.componentRef===null?this.initialInputValues.get(t):this.componentRef.instance[t])}setInputValue(t,e){if(this.componentRef===null){this.initialInputValues.set(t,e);return}this.runInZone(()=>{this.componentRef.setInput(this.inputMap.get(t)??t,e),S(this.componentRef.hostView)&&(F(this.componentRef.changeDetectorRef),this.cdScheduler.notify(6))})}initializeComponent(t){let e=I.create({providers:[],parent:this.injector}),s=x(t,this.componentFactory.ngContentSelectors);this.componentRef=this.componentFactory.create(e,s,t),this.initializeInputs(),this.initializeOutputs(this.componentRef),this.appRef.attachView(this.componentRef.hostView),this.componentRef.hostView.detectChanges()}initializeInputs(){for(let[t,e]of this.initialInputValues)this.setInputValue(t,e);this.initialInputValues.clear()}initializeOutputs(t){let e=this.componentFactory.outputs.map(({propName:s,templateName:r})=>{let c=t.instance[s];return new g(u=>{let o=c.subscribe(i=>u.next({name:r,value:i}));return()=>o.unsubscribe()})});this.eventEmitters.next(e)}runInZone(t){return this.elementZone&&Zone.current!==this.elementZone?this.ngZone.run(t):t()}},f=class extends HTMLElement{ngElementEventsSubscription=null};function L(n,t){let e=_(n,t.injector),s=t.strategyFactory||new p(n,t.injector),r=C(e);class c extends f{injector;static observedAttributes=Object.keys(r);get ngElementStrategy(){if(!this._ngElementStrategy){let o=this._ngElementStrategy=s.create(this.injector||t.injector);e.forEach(({propName:i,transform:a})=>{if(!this.hasOwnProperty(i))return;let d=this[i];delete this[i],o.setInputValue(i,d,a)})}return this._ngElementStrategy}_ngElementStrategy;constructor(o){super(),this.injector=o}attributeChangedCallback(o,i,a,d){let[w,j]=r[o];this.ngElementStrategy.setInputValue(w,a,j)}connectedCallback(){let o=!1;this.ngElementStrategy.events&&(this.subscribeToEvents(),o=!0),this.ngElementStrategy.connect(this),o||this.subscribeToEvents()}disconnectedCallback(){this._ngElementStrategy&&this._ngElementStrategy.disconnect(),this.ngElementEventsSubscription&&(this.ngElementEventsSubscription.unsubscribe(),this.ngElementEventsSubscription=null)}subscribeToEvents(){this.ngElementEventsSubscription=this.ngElementStrategy.events.subscribe(o=>{let i=new CustomEvent(o.name,{detail:o.value});this.dispatchEvent(i)})}}return e.forEach(({propName:u,transform:o})=>{Object.defineProperty(c.prototype,u,{get(){return this.ngElementStrategy.getInputValue(u)},set(i){this.ngElementStrategy.setInputValue(u,i,o)},configurable:!0,enumerable:!0})}),c}export{L as a};
1
+ import{D as E,Ha as R,Ja as S,Ka as F,Ma as l,T as b,bb as V,i as g,la as I,m as y,ra as v}from"./chunk-FXK7BWOQ.js";var Z={schedule(n,t){let e=setTimeout(n,t);return()=>clearTimeout(e)}};function D(n){return n.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function M(n){return!!n&&n.nodeType===Node.ELEMENT_NODE}var h;function T(n,t){if(!h){let e=Element.prototype;h=e.matches||e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector}return n.nodeType===Node.ELEMENT_NODE?h.call(n,t):!1}function C(n){let t={};return n.forEach(({propName:e,templateName:s,transform:r})=>{t[D(s)]=[e,r]}),t}function _(n,t){return t.get(l).resolveComponentFactory(n).inputs}function x(n,t){let e=n.childNodes,s=t.map(()=>[]),r=-1;t.some((c,u)=>c==="*"?(r=u,!0):!1);for(let c=0,u=e.length;c<u;++c){let o=e[c],i=O(o,t,r);i!==-1&&s[i].push(o)}return s}function O(n,t,e){let s=e;return M(n)&&t.some((r,c)=>r!=="*"&&T(n,r)?(s=c,!0):!1),s}var N=10,p=class{componentFactory;inputMap=new Map;constructor(t,e){this.componentFactory=e.get(l).resolveComponentFactory(t);for(let s of this.componentFactory.inputs)this.inputMap.set(s.propName,s.templateName)}create(t){return new m(this.componentFactory,t,this.inputMap)}},m=class{componentFactory;injector;inputMap;eventEmitters=new y(1);events=this.eventEmitters.pipe(b(t=>E(...t)));componentRef=null;scheduledDestroyFn=null;initialInputValues=new Map;ngZone;elementZone;appRef;cdScheduler;constructor(t,e,s){this.componentFactory=t,this.injector=e,this.inputMap=s,this.ngZone=this.injector.get(R),this.appRef=this.injector.get(V),this.cdScheduler=e.get(v),this.elementZone=typeof Zone>"u"?null:this.ngZone.run(()=>Zone.current)}connect(t){this.runInZone(()=>{if(this.scheduledDestroyFn!==null){this.scheduledDestroyFn(),this.scheduledDestroyFn=null;return}this.componentRef===null&&this.initializeComponent(t)})}disconnect(){this.runInZone(()=>{this.componentRef===null||this.scheduledDestroyFn!==null||(this.scheduledDestroyFn=Z.schedule(()=>{this.componentRef!==null&&(this.componentRef.destroy(),this.componentRef=null)},N))})}getInputValue(t){return this.runInZone(()=>this.componentRef===null?this.initialInputValues.get(t):this.componentRef.instance[t])}setInputValue(t,e){if(this.componentRef===null){this.initialInputValues.set(t,e);return}this.runInZone(()=>{this.componentRef.setInput(this.inputMap.get(t)??t,e),S(this.componentRef.hostView)&&(F(this.componentRef.changeDetectorRef),this.cdScheduler.notify(6))})}initializeComponent(t){let e=I.create({providers:[],parent:this.injector}),s=x(t,this.componentFactory.ngContentSelectors);this.componentRef=this.componentFactory.create(e,s,t),this.initializeInputs(),this.initializeOutputs(this.componentRef),this.appRef.attachView(this.componentRef.hostView),this.componentRef.hostView.detectChanges()}initializeInputs(){for(let[t,e]of this.initialInputValues)this.setInputValue(t,e);this.initialInputValues.clear()}initializeOutputs(t){let e=this.componentFactory.outputs.map(({propName:s,templateName:r})=>{let c=t.instance[s];return new g(u=>{let o=c.subscribe(i=>u.next({name:r,value:i}));return()=>o.unsubscribe()})});this.eventEmitters.next(e)}runInZone(t){return this.elementZone&&Zone.current!==this.elementZone?this.ngZone.run(t):t()}},f=class extends HTMLElement{ngElementEventsSubscription=null};function L(n,t){let e=_(n,t.injector),s=t.strategyFactory||new p(n,t.injector),r=C(e);class c extends f{injector;static observedAttributes=Object.keys(r);get ngElementStrategy(){if(!this._ngElementStrategy){let o=this._ngElementStrategy=s.create(this.injector||t.injector);e.forEach(({propName:i,transform:a})=>{if(!this.hasOwnProperty(i))return;let d=this[i];delete this[i],o.setInputValue(i,d,a)})}return this._ngElementStrategy}_ngElementStrategy;constructor(o){super(),this.injector=o}attributeChangedCallback(o,i,a,d){let[w,j]=r[o];this.ngElementStrategy.setInputValue(w,a,j)}connectedCallback(){let o=!1;this.ngElementStrategy.events&&(this.subscribeToEvents(),o=!0),this.ngElementStrategy.connect(this),o||this.subscribeToEvents()}disconnectedCallback(){this._ngElementStrategy&&this._ngElementStrategy.disconnect(),this.ngElementEventsSubscription&&(this.ngElementEventsSubscription.unsubscribe(),this.ngElementEventsSubscription=null)}subscribeToEvents(){this.ngElementEventsSubscription=this.ngElementStrategy.events.subscribe(o=>{let i=new CustomEvent(o.name,{detail:o.value});this.dispatchEvent(i)})}}return e.forEach(({propName:u,transform:o})=>{Object.defineProperty(c.prototype,u,{get(){return this.ngElementStrategy.getInputValue(u)},set(i){this.ngElementStrategy.setInputValue(u,i,o)},configurable:!0,enumerable:!0})}),c}export{L as a};