@microsoft/sp-adaptive-card-extension-base 1.22.2 → 1.23.0-beta.2
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.
- package/dist/eeec822e-c28a-46b4-affc-7058e4c1aa80.manifest.json +141 -141
- package/dist/index-internal.d.ts +191 -22
- package/dist/sp-adaptive-card-extension-base_default_2eae1cad3868e5e484e7.js +1 -0
- package/dist/sp-adaptive-card-extension-base_en-us_a9ac5d5a025f91d82a58.js +1 -0
- package/dist/sp-adaptive-card-extension-base_qps-ploc_18ca433a82b5b1147ca1.js +1 -0
- package/dist/sp-adaptive-card-extension-base_qps-ploca_bfdddf0760669d097ead.js +1 -0
- package/dist/tsdoc-metadata.json +1 -1
- package/lib/AdaptiveCardExtensionLoader.d.ts.map +1 -1
- package/lib/AdaptiveCardExtensionLoader.js +11 -1
- package/lib/common/Killswitches.d.ts +1 -0
- package/lib/common/Killswitches.d.ts.map +1 -1
- package/lib/common/Killswitches.js +6 -0
- package/lib-commonjs/AdaptiveCardExtensionLoader.js +10 -0
- package/lib-commonjs/common/Killswitches.js +8 -1
- package/package.json +23 -22
- package/dist/sp-adaptive-card-extension-base_default_f1728b9b6901be1eda9e.js +0 -1
- package/dist/sp-adaptive-card-extension-base_en-us_0dde24b9bb26f02a453b.js +0 -1
- package/dist/sp-adaptive-card-extension-base_qps-ploc_acafe80ca7875d675033.js +0 -1
- package/dist/sp-adaptive-card-extension-base_qps-ploca_ac28e830255beb22045f.js +0 -1
package/dist/index-internal.d.ts
CHANGED
|
@@ -79,7 +79,11 @@ export declare class AdaptiveCardExtensionContext extends BaseComponentContext {
|
|
|
79
79
|
* Provides a sdk that gets current context of device. See {@link IPartialSDKs}
|
|
80
80
|
*/
|
|
81
81
|
get sdks(): IPartialSDKs | undefined;
|
|
82
|
-
|
|
82
|
+
/**
|
|
83
|
+
* @beta
|
|
84
|
+
* Provides a promise that gets current location of the device
|
|
85
|
+
*/
|
|
86
|
+
get location(): Promise<ILocation>;
|
|
83
87
|
/* Excluded from this release type: _logEditCustomerPromiseFailure */
|
|
84
88
|
}
|
|
85
89
|
|
|
@@ -248,7 +252,17 @@ export declare class BaseAdaptiveCardExtension<TProperties extends {} = {}, TSta
|
|
|
248
252
|
* @virtual
|
|
249
253
|
*/
|
|
250
254
|
protected get propertiesMetadata(): IAdaptiveCardExtensionPropertiesMetadata | undefined;
|
|
251
|
-
|
|
255
|
+
/**
|
|
256
|
+
* Indicates whether the ACE is rendering in async mode.
|
|
257
|
+
*
|
|
258
|
+
* @remarks
|
|
259
|
+
* If the ACE overrides this field to return true, then it needs to call renderCompleted API after the ACE finishes initializing.
|
|
260
|
+
*
|
|
261
|
+
* The default value is false.
|
|
262
|
+
*
|
|
263
|
+
* @beta
|
|
264
|
+
*/
|
|
265
|
+
protected get isRenderAsync(): boolean;
|
|
252
266
|
/**
|
|
253
267
|
* Gets the custom state of the Adaptive Card Extension.
|
|
254
268
|
*
|
|
@@ -303,9 +317,41 @@ export declare class BaseAdaptiveCardExtension<TProperties extends {} = {}, TSta
|
|
|
303
317
|
* @virtual
|
|
304
318
|
*/
|
|
305
319
|
protected loadPropertyPaneResources(): Promise<void>;
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
320
|
+
/**
|
|
321
|
+
* Override the default cache settings.
|
|
322
|
+
*
|
|
323
|
+
* @beta
|
|
324
|
+
* @virtual
|
|
325
|
+
*/
|
|
326
|
+
protected getCacheSettings(): Partial<ICacheSettings>;
|
|
327
|
+
/**
|
|
328
|
+
* This virtual method returns a subset of the state object that will be cached by the client.
|
|
329
|
+
*
|
|
330
|
+
* @remarks If not overriden, this will return an empty object.
|
|
331
|
+
* @param state - A shallow clone of the AdaptiveCardExtension state object.
|
|
332
|
+
*
|
|
333
|
+
* @beta
|
|
334
|
+
* @virtual
|
|
335
|
+
*/
|
|
336
|
+
protected getCachedState(state: TState): Partial<TState>;
|
|
337
|
+
/**
|
|
338
|
+
* Lifecycle method called when a notification is received for this Adaptive Card Extension.
|
|
339
|
+
*
|
|
340
|
+
* @remarks If the notification should be handled by this Adaptive Card Extension then a registered quick view id
|
|
341
|
+
* should be returned. Otherwise, returning undefined will result in the next, if any, Adaptive Card Extension
|
|
342
|
+
* to potentially handle the notification event.
|
|
343
|
+
*
|
|
344
|
+
* @remarks Only one Adaptive Card Extension can handle a notification event. If the event is handled,
|
|
345
|
+
* then propagation is finished.
|
|
346
|
+
*
|
|
347
|
+
* @param notificationArguments - The {@link INotificationArguments} for the current notification event.
|
|
348
|
+
*
|
|
349
|
+
* @returns A registered quick view id to open or undefined.
|
|
350
|
+
*
|
|
351
|
+
* @beta
|
|
352
|
+
* @virtual
|
|
353
|
+
*/
|
|
354
|
+
onNotificationReceived(notificationArguments: Readonly<INotificationArguments<{}>>): INotificationResponse | undefined;
|
|
309
355
|
/**
|
|
310
356
|
* Lifecycle method called before Action is passed to {@link IAdaptiveCardExtensionActionView.onAction}.
|
|
311
357
|
*
|
|
@@ -386,7 +432,19 @@ export declare class BaseAdaptiveCardExtension<TProperties extends {} = {}, TSta
|
|
|
386
432
|
* @virtual
|
|
387
433
|
*/
|
|
388
434
|
onInit(): Promise<void>;
|
|
389
|
-
|
|
435
|
+
/**
|
|
436
|
+
* Lifecycle method called during initialization.
|
|
437
|
+
*
|
|
438
|
+
* @remarks Asynchronous data fetches should be started during this lifecycle. Rendering can either be dependent on the result
|
|
439
|
+
* or, if resolved immediately, a fetching data state can be rendered.
|
|
440
|
+
*
|
|
441
|
+
* @param cachedLoadParameters - Parameters containing the cached state object (see {@link BaseAdaptiveCardExtension.getCachedState}), which can be used to rehydrate the AdaptiveCardExtension.
|
|
442
|
+
* If undefined, the AdaptiveCardExtension was not cached or the cache expired.
|
|
443
|
+
*
|
|
444
|
+
* @beta
|
|
445
|
+
* @virtual
|
|
446
|
+
*/
|
|
447
|
+
onInit(cachedLoadParameters?: ICachedLoadParameters): Promise<void>;
|
|
390
448
|
/* Excluded from this release type: _initializeCardNavigator */
|
|
391
449
|
/* Excluded from this release type: _initializeQuickViewNavigator */
|
|
392
450
|
/**
|
|
@@ -435,7 +493,19 @@ export declare class BaseAdaptiveCardExtension<TProperties extends {} = {}, TSta
|
|
|
435
493
|
*/
|
|
436
494
|
get isVisible(): boolean;
|
|
437
495
|
set isVisible(value: boolean);
|
|
438
|
-
|
|
496
|
+
/**
|
|
497
|
+
* Lifecycle method that signifies ACE has finished loading.
|
|
498
|
+
* When this API is called, performance data will be generated.
|
|
499
|
+
* Depending on `didUpdate` parameter, end marker for the rendering lifecycle can change.
|
|
500
|
+
* If an ACE received LKG data and does NOT need to update, render is completed when LKG is used.
|
|
501
|
+
* If an ACE received LKG data and DOES need to update, render is completed when new render arguments are used.
|
|
502
|
+
* If an ACE does not receive LKG data, render is completed when new render arguments are used.
|
|
503
|
+
*
|
|
504
|
+
* @param didUpdate - boolean value indicating if ACE has updated.
|
|
505
|
+
*
|
|
506
|
+
* @beta
|
|
507
|
+
*/
|
|
508
|
+
renderCompleted(didUpdate: boolean): void;
|
|
439
509
|
private _endMarkForRenderComplete;
|
|
440
510
|
private _resolveRenderCompleted;
|
|
441
511
|
/**
|
|
@@ -568,7 +638,16 @@ export declare abstract class BaseAdaptiveCardQuickView<TProperties extends {} =
|
|
|
568
638
|
* @virtual
|
|
569
639
|
*/
|
|
570
640
|
onAction(action: IActionArguments): void;
|
|
571
|
-
|
|
641
|
+
/**
|
|
642
|
+
* @beta
|
|
643
|
+
*
|
|
644
|
+
* Error handler for Adaptive Card Actions.
|
|
645
|
+
*
|
|
646
|
+
* @param error - The {@link IActionErrorArguments} for the current event.
|
|
647
|
+
*
|
|
648
|
+
* @virtual
|
|
649
|
+
*/
|
|
650
|
+
onActionError(error: IActionErrorArguments): void;
|
|
572
651
|
}
|
|
573
652
|
|
|
574
653
|
/**
|
|
@@ -648,7 +727,16 @@ export declare abstract class BaseCardView<TProperties extends {} = {}, TState e
|
|
|
648
727
|
* @virtual
|
|
649
728
|
*/
|
|
650
729
|
onAction(action: IActionArguments): void;
|
|
651
|
-
|
|
730
|
+
/**
|
|
731
|
+
* @beta
|
|
732
|
+
*
|
|
733
|
+
* Error handler for Adaptive Card Actions.
|
|
734
|
+
*
|
|
735
|
+
* @param error - The {@link IActionErrorArguments} for the current event.
|
|
736
|
+
*
|
|
737
|
+
* @virtual
|
|
738
|
+
*/
|
|
739
|
+
onActionError(error: IActionErrorArguments): void;
|
|
652
740
|
}
|
|
653
741
|
|
|
654
742
|
/**
|
|
@@ -880,7 +968,13 @@ export declare function BasicCardView(configuration: IBasicTextCardViewConfigura
|
|
|
880
968
|
|
|
881
969
|
/* Excluded from this release type: _BODY_SECONDARY_TEXT */
|
|
882
970
|
|
|
883
|
-
|
|
971
|
+
/**
|
|
972
|
+
* Predefined action ID for card view select action.
|
|
973
|
+
* @remarks This ID is set for {@link IBaseOnBeforeActionArguments.id} when a card view select action is executed.
|
|
974
|
+
*
|
|
975
|
+
* @beta
|
|
976
|
+
*/
|
|
977
|
+
export declare const CARD_VIEW_SELECT_ACTION_ID: string;
|
|
884
978
|
|
|
885
979
|
/* Excluded from this release type: _CardActionType */
|
|
886
980
|
|
|
@@ -1016,7 +1110,12 @@ export declare type GenericCardViewFooterParameters = CardViewActionsFooterParam
|
|
|
1016
1110
|
*/
|
|
1017
1111
|
export declare type IActionArguments = ISubmitActionArguments | IShowCardActionArguments | ISelectMediaActionArguments | IGetLocationActionArguments | IExecuteActionArguments;
|
|
1018
1112
|
|
|
1019
|
-
|
|
1113
|
+
/**
|
|
1114
|
+
* @beta
|
|
1115
|
+
*/
|
|
1116
|
+
export declare interface IActionError {
|
|
1117
|
+
code: string;
|
|
1118
|
+
}
|
|
1020
1119
|
|
|
1021
1120
|
/**
|
|
1022
1121
|
* The object passed to {@link IAdaptiveCardExtensionActionView.onActionError} when an error occured while executing Adaptive Card Action.
|
|
@@ -1043,7 +1142,14 @@ export declare interface IAdaptiveCardExtensionActionView extends BaseView {
|
|
|
1043
1142
|
* @param action - The {@link IActionArguments} for the current event.
|
|
1044
1143
|
*/
|
|
1045
1144
|
onAction: (action: IActionArguments) => void;
|
|
1046
|
-
|
|
1145
|
+
/**
|
|
1146
|
+
* @beta
|
|
1147
|
+
*
|
|
1148
|
+
* Error handler for Adaptive Card Extension Actions.
|
|
1149
|
+
*
|
|
1150
|
+
* @param error - The {@link IActionErrorArguments} for the current event.
|
|
1151
|
+
*/
|
|
1152
|
+
onActionError: (error: IActionErrorArguments) => void;
|
|
1047
1153
|
}
|
|
1048
1154
|
|
|
1049
1155
|
/* Excluded from this release type: _IAdaptiveCardExtensionCache */
|
|
@@ -1098,8 +1204,6 @@ export declare interface IAdaptiveCardExtensionImage {
|
|
|
1098
1204
|
|
|
1099
1205
|
/* Excluded from this release type: _IAdaptiveCardExtensionLoadContext */
|
|
1100
1206
|
|
|
1101
|
-
/* Excluded from this release type: IAdaptiveCardExtensionManifest */
|
|
1102
|
-
|
|
1103
1207
|
/**
|
|
1104
1208
|
* This structure is used to define metadata for Adaptive Card Extension properties as a map of string to `IAdaptiveCardExtensionPropertiesMetadata`
|
|
1105
1209
|
*
|
|
@@ -1229,9 +1333,21 @@ export declare interface IBaseActionArguments {
|
|
|
1229
1333
|
* @public
|
|
1230
1334
|
*/
|
|
1231
1335
|
export declare interface IBaseActionErrorArguments {
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1336
|
+
/**
|
|
1337
|
+
* The type of Adaptive Card Action thsat caused the error.
|
|
1338
|
+
* @beta
|
|
1339
|
+
*/
|
|
1340
|
+
type: 'Submit' | 'ShowCard' | 'Execute' | 'VivaAction.SelectMedia' | 'VivaAction.GetLocation' | 'VivaAction.ShowLocation';
|
|
1341
|
+
/**
|
|
1342
|
+
* The id specified in the Adaptive Card template
|
|
1343
|
+
* @beta
|
|
1344
|
+
*/
|
|
1345
|
+
id?: string;
|
|
1346
|
+
/**
|
|
1347
|
+
* The error thrown by the action
|
|
1348
|
+
* @beta
|
|
1349
|
+
*/
|
|
1350
|
+
error: IActionError;
|
|
1235
1351
|
}
|
|
1236
1352
|
|
|
1237
1353
|
/**
|
|
@@ -1309,7 +1425,17 @@ export declare interface IBaseCardParameters {
|
|
|
1309
1425
|
* @privateRemarks - Each type that is not included in IActionArguments and used in IOnBeforeActionArguments must extend this interface.
|
|
1310
1426
|
*/
|
|
1311
1427
|
export declare interface IBaseOnBeforeActionArguments {
|
|
1312
|
-
|
|
1428
|
+
/**
|
|
1429
|
+
* The id specified in the card view action or Adaptive Card template
|
|
1430
|
+
*
|
|
1431
|
+
* @remarks This ID is automatically set to
|
|
1432
|
+
* - {@link ICardButtonBase.id} if an action is triggered by card view button
|
|
1433
|
+
* - {@link CARD_VIEW_SELECT_ACTION_ID} if an action is triggered by card view select action
|
|
1434
|
+
* - Action id if an action is triggered by Quick View
|
|
1435
|
+
*
|
|
1436
|
+
* @beta
|
|
1437
|
+
*/
|
|
1438
|
+
id?: string;
|
|
1313
1439
|
}
|
|
1314
1440
|
|
|
1315
1441
|
/* Excluded from this release type: _IBaseQuickViewRenderParameters */
|
|
@@ -1364,9 +1490,35 @@ export declare interface IBasicTextCardViewConfiguration extends Omit<ICardViewC
|
|
|
1364
1490
|
|
|
1365
1491
|
/* Excluded from this release type: _IBot */
|
|
1366
1492
|
|
|
1367
|
-
|
|
1493
|
+
/**
|
|
1494
|
+
* Parameters used to rehydrate the AdaptiveCardExtension during a cached load
|
|
1495
|
+
*
|
|
1496
|
+
* @beta
|
|
1497
|
+
* @remarks API under active development and not ready for use.
|
|
1498
|
+
*/
|
|
1499
|
+
export declare interface ICachedLoadParameters {
|
|
1500
|
+
state: any;
|
|
1501
|
+
cardNavigatorState: string[];
|
|
1502
|
+
}
|
|
1368
1503
|
|
|
1369
|
-
|
|
1504
|
+
/**
|
|
1505
|
+
* @beta
|
|
1506
|
+
*/
|
|
1507
|
+
export declare interface ICacheSettings {
|
|
1508
|
+
/**
|
|
1509
|
+
* Whether cache is enabled. Default: true
|
|
1510
|
+
*/
|
|
1511
|
+
isEnabled: boolean;
|
|
1512
|
+
/**
|
|
1513
|
+
* Expiry time in seconds. Default: 86400 seconds (24 hours)
|
|
1514
|
+
*/
|
|
1515
|
+
expiryTimeInSeconds: number;
|
|
1516
|
+
/**
|
|
1517
|
+
* Returns the Card View used to generate the cached card.
|
|
1518
|
+
* By default, the currently rendered Card View will be used to cache the card.
|
|
1519
|
+
*/
|
|
1520
|
+
cachedCardView?: () => BaseCardView;
|
|
1521
|
+
}
|
|
1370
1522
|
|
|
1371
1523
|
/**
|
|
1372
1524
|
* Type of handler for when a button is pressed.
|
|
@@ -2374,9 +2526,26 @@ export declare function ImageCardView(configuration: IImageCardViewConfiguration
|
|
|
2374
2526
|
|
|
2375
2527
|
/* Excluded from this release type: _INavigationBarProperties */
|
|
2376
2528
|
|
|
2377
|
-
|
|
2529
|
+
/**
|
|
2530
|
+
* The object passed to {@link BaseAdaptiveCardExtension.onNotificationReceived} when a notification is received.
|
|
2531
|
+
*
|
|
2532
|
+
* @beta
|
|
2533
|
+
*/
|
|
2534
|
+
export declare interface INotificationArguments<T extends {}> {
|
|
2535
|
+
version: Version;
|
|
2536
|
+
data: T;
|
|
2537
|
+
}
|
|
2378
2538
|
|
|
2379
|
-
|
|
2539
|
+
/**
|
|
2540
|
+
* The object returned from {@link BaseAdaptiveCardExtension.onNotificationReceived} if it has handled the notification.
|
|
2541
|
+
*
|
|
2542
|
+
* @remarks ACE should return the registered quickViewId which it wants to display for the notification.
|
|
2543
|
+
*
|
|
2544
|
+
* @beta
|
|
2545
|
+
*/
|
|
2546
|
+
export declare interface INotificationResponse {
|
|
2547
|
+
quickViewId: string;
|
|
2548
|
+
}
|
|
2380
2549
|
|
|
2381
2550
|
/**
|
|
2382
2551
|
* The object passed to {@link BaseAdaptiveCardExtension.onBeforeAction} when an Adaptive Card Action is executed.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
define("eeec822e-c28a-46b4-affc-7058e4c1aa80_1.23.0",["@microsoft/sp-diagnostics","@microsoft/sp-core-library","tslib","@microsoft/sp-component-base","@microsoft/sp-loader","@microsoft/sp-http-base","@msinternal/sp-telemetry","@microsoft/sp-lodash-subset","@microsoft/sp-page-context"],(e,t,n,a,i,r,o,s,c)=>(()=>{"use strict";var d={962(e){e.exports=a},676(e){e.exports=t},207(t){t.exports=e},737(e){e.exports=r},414(e){e.exports=i},529(e){e.exports=s},408(e){e.exports=c},519(e){e.exports=o},280(e){e.exports=n}},l={};function u(e){var t=l[e];if(void 0!==t)return t.exports;var n=l[e]={exports:{}};return d[e](n,n.exports,u),n.exports}u.d=(e,t)=>{for(var n in t)u.o(t,n)&&!u.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),u.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var f={};return(()=>{u.r(f),u.d(f,{AdaptiveCardExtensionContext:()=>y,BarChartCardView:()=>Ze,BaseAdaptiveCardExtension:()=>Oe,BaseAdaptiveCardQuickView:()=>_e,BaseAdaptiveCardView:()=>he,BaseBasicCardView:()=>fe,BaseCardView:()=>F,BaseComponentsCardView:()=>tt,BaseImageCardView:()=>ke,BasePrimaryTextCardView:()=>Me,BaseQuickView:()=>me,BaseTemplateCardView:()=>N,BaseView:()=>U,BaseWebQuickView:()=>Te,BasicCardView:()=>oe,CARD_VIEW_SELECT_ACTION_ID:()=>M,ImageCardView:()=>ce,LineChartCardView:()=>Je,MediaType:()=>Ce,PieChartCardView:()=>Xe,PrimaryTextCardView:()=>se,QuickViewNavigator:()=>Se,SearchCardView:()=>Ne,TextInputCardView:()=>de,TextInputImageCardView:()=>le,ViewNavigator:()=>ye,_ACEMySiteCacheManager:()=>Pe,_AdaptiveCardExtensionActionShim:()=>g,_AdaptiveCardExtensionHost:()=>S,_AdaptiveCardExtensionLoader:()=>E,_BODY_PRIMARY_TEXT:()=>G,_BODY_SECONDARY_TEXT:()=>z,_BaseAdaptiveCardExtensionCache:()=>De,_CardViewParametersProcessors:()=>Ge,_CopilotCardView:()=>Be,_EmptyQuickView:()=>ve,_IsolatedAdaptiveCardExtensionService:()=>Le,_LocalStorageACECache:()=>Ie,_PRIMARY_TEXT:()=>V,_TITLE_TEXT:()=>K,_ViewRegistry:()=>ge,_cardViewBarConfigurationToParameters:()=>ae,_createAction:()=>T,_footerConfigurationToFooterParameters:()=>ue,_generateComponentId:()=>B,_getOnBeforeActionArguments:()=>b,_getRenderArgumentsForMessaging:()=>at,_isSupportActionExecuteKSActivated:()=>d,_isSurfaceOnBeforeActionKSActivated:()=>o,_isUpdateSelectActionIdKSActivated:()=>_,_prepareRenderArgumentsForMessaging:()=>nt});var e=u(207),t=u(676);function n(){return t._SPKillSwitch.isActivated("9cb880d2-c8c3-4fde-96a0-b29c84ef6edd")}function a(){return t._SPKillSwitch.isActivated("63a9cba3-4d6e-44a7-bdfb-3464aeb6a4a4")}function i(){return t._SPKillSwitch.isActivated("080770ac-5b8a-4f68-97b3-abf37230c2ce")}function r(){return t._SPKillSwitch.isActivated("c761d258-674d-4c2c-91ca-37cd43dd78a5")}function o(){return t._SPKillSwitch.isActivated("96512177-c963-43cb-b876-87ee06253a2c")}function s(){return t._SPKillSwitch.isActivated("06dfa773-bc74-41ca-9496-5ebb4afdfd5e")}function c(){return t._SPKillSwitch.isActivated("4bd7e0a9-c17a-411b-bda8-1e130c7346ec")}function d(){return t._SPKillSwitch.isActivated("9050e5ae-5e51-4939-9394-7be770d5de93")}function l(){return t._SPKillSwitch.isActivated("01795526-5047-424b-ab23-026e44862189")}function p(){return t._SPKillSwitch.isActivated("7d5a70e7-3ebd-42e9-8f8b-b237c2d7f439")}function m(){return t._SPKillSwitch.isActivated("cfadd6c3-e59f-438d-ac58-b61e73a979e3")}function _(){return t._SPKillSwitch.isActivated("38aebed7-6c3c-4e31-a147-b1b867960fd0")}var h=u(280);function b(e,t,n){var a;if("Action.OpenUrl"===e)return{type:"ExternalLink",id:t.id,url:t.url};if("Action.Submit"===e){var i=t.data;return i&&i._internalQuickViewId?{type:"QuickView",id:t.id,viewId:i._internalQuickViewId,data:n}:{id:t.id,data:(0,h.__assign)((0,h.__assign)({},t.data),n),type:"Submit"}}if("Action.Execute"===e)return{id:t.id,data:(0,h.__assign)((0,h.__assign)({},t.data),n),verb:t.verb,type:"Execute"};if("Action.ShowCard"===e)return{id:t.id,type:"ShowCard"};if("VivaAction.ShowLocation"===e){var r={locationCoordinates:null===(a=t.parameters)||void 0===a?void 0:a.locationCoordinates};return{type:"VivaAction.ShowLocation",id:t.id,parameters:r}}}var g=function(){function t(e,t,n){var a=this;this.handleAction=function(e){var t=e,n=t.getJsonTypeName(),i=b(n,e);switch(!o()&&i&&a._ace._onBeforeAction(i,a._location),n){case"Action.OpenUrl":a._handleOpenUrl(t);break;case"Action.ShowCard":a._handleShowCard(t);break;case"Action.Submit":a._handleSubmit(t);break;case"Action.Execute":a._handleExecute(t);break;case"VivaAction.GetLocation":a._handleGetLocation(t);break;case"VivaAction.SelectMedia":a._handleSelectMedia(t);break;case"VivaAction.ShowLocation":a._handleShowLocation(t)}},this._ace=e,this._provider=t,this._location=n}return t.prototype._handleGetLocation=function(t){var n,a=new e._QosMonitor("AdaptiveCardExtension._onExecuteAction.GetLocation",!0);try{var i={chooseLocationOnMap:null===(n=t.parameters)||void 0===n?void 0:n.chooseLocationOnMap};this._provider.getLocation(this._ace).getLocation(i),a.writeSuccess(),this._provider.log(this._ace,"VivaAction.GetLocation")}catch(e){a.writeUnexpectedFailure(void 0,e)}},t.prototype._handleOpenUrl=function(e){var t=e.url;t&&(this._provider.openUrl(this._ace,t),this._provider.log(this._ace,"OpenUrl"))},t.prototype._handleSelectMedia=function(e){this._provider.selectMedia(this._ace,e).getMedia(e),this._provider.log(this._ace,"VivaAction.SelectMedia")},t.prototype._handleShowCard=function(e){var t={id:e.id,type:"ShowCard"};this._provider.aceActionHandler(this._ace,t),this._provider.log(this._ace,"ShowCard")},t.prototype._handleShowLocation=function(t){var n,a=new e._QosMonitor("AdaptiveCardExtension._onExecuteAction.ShowLocation",!0);try{var i={locationCoordinates:null===(n=t.parameters)||void 0===n?void 0:n.locationCoordinates};this._provider.showLocation(this._ace).showLocation(i),a.writeSuccess(),this._provider.log(this._ace,"VivaAction.ShowLocation")}catch(e){a.writeUnexpectedFailure(void 0,e)}},t.prototype._handleSubmit=function(t){var n,a=this,i=new e._QosMonitor("AdaptiveCardExtension._onExecuteAction.handleConfirmationDialog",!0),r=null===(n=t.data)||void 0===n?void 0:n._internalQuickViewId;if(r)this._provider.quickView(r);else{var o={data:t.data,id:t.id,type:"Submit"};this._provider.confirmationDialog(o).then(function(e){i.writeSuccess(),e||(a._provider.aceActionHandler(a._ace,o),a._provider.log(a._ace,"Submit"))}).catch(function(){i.writeUnexpectedFailure()})}},t.prototype._handleExecute=function(e){if(!d()){var t={id:e.id,verb:e.verb,data:e.data,type:"Execute"};this._provider.aceActionHandler(this._ace,t),this._provider.log(this._ace,"Execute")}},t}(),v=u(962),y=function(e){function t(t){var n=e.call(this,t)||this;return n._aceHost=t.host,n.manifest=t.manifest,n._deviceContext=t.deviceContext,n._location=t.location,n._logACEEditCustomerPromiseFailure=t.logEditCustomerPromiseFailure,n._getPositionOnPage=t.getPositionOnPage,n._hostContext=t.hostContext,n._sdks=t.sdks,n}return(0,h.__extends)(t,e),Object.defineProperty(t.prototype,"_host",{get:function(){return this._aceHost},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propertyPane",{get:function(){return this._host.propertyPane},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"deviceContext",{get:function(){return this._deviceContext},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hostContext",{get:function(){return this._hostContext},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sdks",{get:function(){return this._sdks},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"location",{get:function(){return this._location()},enumerable:!1,configurable:!0}),t.prototype._logEditCustomerPromiseFailure=function(e,t,n){this._logACEEditCustomerPromiseFailure&&this._logACEEditCustomerPromiseFailure(e,t,n)},t}(v.BaseComponentContext),S=function(){function e(e){this._onBeforeInitializedCallback=e.onBeforeInitializedCallback,this._onUpdateCallback=e.onUpdateCallback,this._onErrorCallback=e.onError,this._onRequestRenderTypeCallback=e.onRequestRenderTypeCallback,this._onVisibilityChanged=e.onVisibilityChanged,this._onRenderCompleted=e.onRenderCompleted,this._cache=e.cache,this.propertyPane=e.propertyPane}return e.prototype.update=function(e){this._onUpdateCallback(e)},e.prototype.onBeforeInitialized=function(e){this._onBeforeInitializedCallback&&this._onBeforeInitializedCallback(e)},e.prototype.onError=function(e){this._onErrorCallback&&this._onErrorCallback(e)},e.prototype.requestRenderTypeChange=function(e,t){this._onRequestRenderTypeCallback(e,t)},Object.defineProperty(e.prototype,"cache",{get:function(){return this._cache},enumerable:!1,configurable:!0}),e.prototype.onVisibilityChanged=function(e){this._onVisibilityChanged(e)},e.prototype.onRenderCompleted=function(e,t){this._onRenderCompleted&&this._onRenderCompleted(e,t)},e}(),D=u(414),I=u(737),x=u(519),C="AdaptiveCardExtensionInitializationFailed",O="AdaptiveCardExtensionLoadFailed",w="Adaptive Card Extension Failure",E=function(){function n(){}return n._createQosExtraData=function(e,n){var a,i=e.aceData,r=e.deviceContext,o=e.initialDisplayMode,c=e.manifest,d=e.getPositionOnPage,l=e.workloadName,u={alias:c.alias,deviceContext:r,displayMode:o,isInternal:c.isInternal,instanceId:i.instanceIdForLogs?i.instanceIdForLogs:i.instanceId,manifestId:c.id,mpnId:c.mpnId,scenarioId:x._PerformanceLogger.getScenarioId(),storeAppId:c.storeAppId,teamsHosted:t._BrowserUtilities.isTeamsHosted(),isIntentional:!0,cardSize:i.cardSize,workLoad:l};if(d){var f=d();f&&(u.cardPosition=f.componentOrder,u.NumberOfCardsAudienceTargeted=f.numberOfSectionComponents)}return s()||(u.appHostType=n),p()||(u.botId=null===(a=c.properties)||void 0===a?void 0:a.botId,u.connectedTeamsAppId=c.connectedTeamsAppId),u},n.prototype.load=function(a){var i,r,o=this,d=t._BrowserUtilities.getTeamsAppType(),u=new e._QosMonitor("AdaptiveCardExtension.Load",!0,!0),f=n._createQosExtraData(a,d),p="WebPart.ACE_".concat(a.manifest.alias,".").concat(a.manifest.isInternal?"internal":"external",".").concat(a.instanceId);return x._PerformanceLogger.startMarkForComponent(p),D.SPComponentLoader.loadComponent(a.manifest).then(function(e){return e.default&&(e=e.default),x._PerformanceLogger.markComponentModuleLoaded(p),new e}).catch(function(e){throw a.manifest.isInternal&&a.initialDisplayMode===t.DisplayMode.Edit&&a.logEditCustomerPromiseFailure&&a.logEditCustomerPromiseFailure(a.manifest.alias,e.message,O),x._PerformanceLogger.endFailureForComponent(p,O,e,void 0,l()?void 0:w),u.writeUnexpectedFailure(O,e,f),i=e,e}).then(function(n){var i,c=a.cacheObject?{state:(i=a.cacheObject).cachedState,cardNavigatorState:i.cardNavigatorState}:void 0;if((r=n)._internalInitialize(o._getContext(a),a.addedFromPersistedData,a.initialDisplayMode,p,!!c,s()?void 0:d),r._internalDeserialize(a.aceData),a.host.onBeforeInitialized(r),!t._SPKillSwitch.isActivated("c76f25a9-9d5a-4860-8883-fcacc64a0b19"))try{I.HttpClient.startTrackingWindow(a.manifest.id,a.aceData.instanceId)}catch(t){new e._QosMonitor("StartTrackingWindowForACEInit").writeUnexpectedFailure("StartTrackingWindowForACEInit",t)}return r.onInit(c)}).then(function(){x._PerformanceLogger.markComponent(p,"init");var e=c()?f:(0,h.__assign)((0,h.__assign)({},f),r._aceLoadExtraData);return u.writeSuccess(e),r._internalOnAfterInit(),r}).catch(function(e){if(!i){a.manifest.isInternal&&a.initialDisplayMode===t.DisplayMode.Edit&&a.logEditCustomerPromiseFailure&&a.logEditCustomerPromiseFailure(a.manifest.alias,e.message,C),x._PerformanceLogger.endFailureForComponent(p,C,e,void 0,l()?void 0:w);var n=c()?f:(0,h.__assign)((0,h.__assign)({},f),null==r?void 0:r._aceLoadExtraData);"SchemaError"===e.name?u.writeExpectedFailure(C,e,n):u.writeUnexpectedFailure(C,e,n)}throw e})},n.prototype._getContext=function(e){return new y({host:e.host,manifest:e.manifest,instanceId:e.instanceId,parentServiceScope:e.serviceScope,loggingTag:"",deviceContext:e.deviceContext,location:e.location,hostContext:e.hostContext,sdks:e.sdks,logEditCustomerPromiseFailure:e.logEditCustomerPromiseFailure,getPositionOnPage:e.getPositionOnPage})},n}(),A=u(529);const L=JSON.parse('{"SA":"TargetUrlIsUndefinedOrEmpty","V":"DefaultIconAltText","BA":"IconAltText","nA":"ImageAltText","Sj":"Search","dv":"ActionUndefined"}');var k={Medium:1,Large:2},M="card-view-select-action";function P(e,n,a,i){var r=function(e,t,n){if(("Image"!==t||"Medium"!==n)&&void 0!==e){for(var a=[],i=Math.min(k[n],e.length),r=0;r<i;r++)d()&&"Execute"===e[r].action.type||a.push(e[r]);return a}}(e,n,a);if(r)return r.map(function(e,n){var a=e.id?e.id:t._SPKillSwitch.isActivated("aebbeddc-284c-470d-8bd2-98a4d200cb86")?"ac-button-".concat(n):"ac-button-".concat(i,"-").concat(n);return T(e.action,a,e.title,e.style)})}function T(e,n,a,i,r){var o,s;if(!e)throw new Error(t.Text.format(L.dv,n));if("Submit"===e.type)(s=e).confirmationDialog&&(s.parameters||(s.parameters={}),s.parameters.__MSConfirmationDialog__=s.confirmationDialog),o={id:n,type:"Action.Submit",style:i,title:a,data:e.parameters||void 0};else if("Execute"===e.type)o={id:n,type:"Action.Execute",style:i,title:a,verb:e.verb,data:e.parameters||void 0};else if("ExternalLink"===e.type){var c=e.parameters.target;if(!c||""===c)throw new Error(t.Text.format(L.SA,n));o={id:n,type:"Action.OpenUrl",style:i,title:a,url:c}}else"QuickView"===e.type?o={id:n,type:"Action.Submit",style:i,title:a,data:{_internalQuickViewId:e.parameters.view,_target:r}}:"VivaAction.SelectMedia"===e.type?o={id:n,type:"VivaAction.SelectMedia",style:i,title:a,parameters:e.parameters}:"VivaAction.GetLocation"===e.type?o={id:n,type:"VivaAction.GetLocation",style:i,title:a,parameters:e.parameters}:"VivaAction.ShowLocation"===e.type&&(o={id:n,type:"VivaAction.ShowLocation",style:i,title:a,parameters:e.parameters});return o}var U=function(){function e(){}return Object.defineProperty(e.prototype,"cardNavigator",{get:function(){return this._ace.cardNavigator},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"quickViewNavigator",{get:function(){return this._ace.quickViewNavigator},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"properties",{get:function(){return this._properties},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"context",{get:function(){return this._context},enumerable:!1,configurable:!0}),e.prototype.setState=function(e){this._ace.setState(e)},e}(),F=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,h.__extends)(t,e),Object.defineProperty(t.prototype,"cardSize",{get:function(){return this._getCardSize()},enumerable:!1,configurable:!0}),t.prototype.setVisibility=function(e){this._ace.isVisible=e},Object.defineProperty(t.prototype,"onCardSelection",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isCacheEnabled",{get:function(){return!0},enumerable:!1,configurable:!0}),t.prototype.onAction=function(e){},t.prototype.onActionError=function(e){},t}(U);function H(e){return(0,h.__assign)((0,h.__assign)({},e),{componentName:"cardButton"})}function R(e){return{componentName:"cardButton",title:e.title,action:e.action,style:"destructive"===e.style?void 0:e.style,id:e.id}}var N=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,h.__extends)(t,e),Object.defineProperty(t.prototype,"cardButtons",{get:function(){},enumerable:!1,configurable:!0}),t.prototype._getTemplate=function(e,t){return(0,A.cloneDeep)(this.onCardSelection?t:e)},t.prototype._getGenericCardViewFooterConfiguration=function(){var e=this.cardButtons;if(e)return 1===e.length?R(e[0]):e.length>2?e.splice(0,2).map(function(e){return R(e)}):e.map(function(e){return R(e)})},t.prototype._getCardBarConfiguration=function(){var e=this.data,t=e.title,n=e.iconProperty,a=e.iconAltText,i=e._iconPropertyFallback;return{componentName:"cardBar",title:t||this._ace.title,icon:{url:n||this._ace.iconProperty,altText:a,_urlFallback:i}}},t}(F);function B(e,t,n,a){return n.id||"".concat(e,"-").concat(t,"-").concat(a,"-").concat(n.componentName)}var j="auto",V={type:"TextBlock",subType:"Primary",text:"${primaryText}",weight:"Bolder",maxLines:1,spacing:"none"},z={type:"TextBlock",subType:"BodySecondary",text:"${description}",spacing:"none",wrap:!0},G={type:"TextBlock",subType:"BodyPrimary",text:"${primaryText}",spacing:"none",wrap:!0},K={type:"TextBlock",subType:"Title",text:"${title}",wrap:!1,maxLines:1,spacing:"none"},W=function(e,t){var n={type:"ColumnSet",columns:[]};if(e.iconBefore&&n.columns.push({type:"Column",width:16,spacing:"none",items:[{type:"Icon",iconProperty:"${iconBeforeProperty}",altText:"${iconBeforeAltText}"}]}),n.columns.push({type:"Column",width:"stretch",spacing:"none",items:[{type:"Input.Text",placeholder:e.placeholder,value:e.defaultValue,id:"".concat(t,"-input")}]}),e.iconAfter&&n.columns.push({type:"Column",width:"16px",spacing:"none",items:[{type:"Icon",iconProperty:"${iconAfterProperty}",altText:"${iconAfterAltText}"}]}),e.button){var a=e.button;if(null==a?void 0:a.icon)n.columns.push({type:"Column",width:24,spacing:"small",items:[{type:"Icon",iconProperty:"${buttonIconProperty}",altText:"${buttonIconAltText}"}],selectAction:T(a.action,a.id||"".concat(t,"-input-button"))});else{var i=a;n.columns.push({type:"Column",width:"auto",spacing:"small",items:[{type:"ActionSet",actions:[T(i.action,i.id||"".concat(t,"-input-button"),i.title,"positive")]}]})}}return n},q={$schema:"http://adaptivecards.io/schemas/adaptive-card.json",type:"AdaptiveCard",version:"1.2",body:[{type:"Container",items:[{type:"ColumnSet",columns:[{type:"Column",spacing:"none",items:[{type:"Icon",iconProperty:"${iconProperty}",altText:"${iconAltText}"}],width:j},{type:"Column",spacing:"none",items:[K],width:"stretch"}]},G]}]},Q={$schema:"http://adaptivecards.io/schemas/adaptive-card.json",type:"AdaptiveCard",version:"1.2",body:[{type:"Container",items:[{type:"Image",url:"${imageUrl}",altText:"${imageAltText}"},{type:"ColumnSet",spacing:"none",columns:[{type:"Column",items:[{type:"Icon",iconProperty:"${iconProperty}",altText:"${iconAltText}"}],width:j},{type:"Column",spacing:"none",items:[K],width:"stretch"}]},G]}]},Y={$schema:"http://adaptivecards.io/schemas/adaptive-card.json",type:"AdaptiveCard",version:"1.2",body:[{type:"Container",items:[{type:"ColumnSet",columns:[{type:"Column",spacing:"none",items:[{type:"Icon",iconProperty:"${iconProperty}",altText:"${iconAltText}"}],width:j},{type:"Column",spacing:"none",items:[K],width:"stretch"}]},{type:"Container",spacing:"none",items:[V,z]}]}]},J={$schema:"http://adaptivecards.io/schemas/adaptive-card.json",type:"AdaptiveCard",version:"1.2",body:[{type:"Container",selectAction:"${selectAction}",items:[{type:"Image",url:"${imageUrl}",altText:"${imageAltText}"},{type:"ColumnSet",spacing:"none",columns:[{type:"Column",items:[{type:"Icon",iconProperty:"${iconProperty}",altText:"${iconAltText}"}],width:j},{type:"Column",spacing:"none",items:[K],width:"stretch"}]},G]}]},X={$schema:"http://adaptivecards.io/schemas/adaptive-card.json",type:"AdaptiveCard",version:"1.2",body:[{type:"Container",selectAction:"${selectAction}",items:[{type:"ColumnSet",columns:[{type:"Column",spacing:"none",items:[{type:"Icon",iconProperty:"${iconProperty}",altText:"${iconAltText}"}],width:j},{type:"Column",spacing:"none",items:[K],width:"stretch"}]},{type:"Container",spacing:"none",items:[V,z]}]}]},Z={$schema:"http://adaptivecards.io/schemas/adaptive-card.json",type:"AdaptiveCard",version:"1.2",body:[{type:"Container",selectAction:"${selectAction}",items:[{type:"ColumnSet",columns:[{type:"Column",spacing:"none",items:[{type:"Icon",iconProperty:"${iconProperty}",altText:"${iconAltText}"}],width:j},{type:"Column",spacing:"none",items:[K],width:"stretch"}]},G]}]};function $(e,i,r,o,s,c,l,u,f){var p,m,b,g,v,y,S=e.onCardSelection,D=t._SPKillSwitch.isActivated("d2cb3786-200c-408f-a646-6d091eadc1be")?e._getCardViewParameters():function(e,t){return ee(e,"cardBar",t.cardBar),ee(e,"header",t.header),ee(e,"body",t.body),ee(e,"footer",t.footer),t}(u,e._getCardViewParameters()),I="Basic";if(e instanceof N?(b=e.cardButtons,g=e.data,v=e.template,I=e._templateType):("Mobile"===r||sessionStorage.getItem("spfx-debug"))&&(I=D.image?"Image":"Basic",D.footer&&D.footer.length&&"cardButton"===D.footer[0].componentName&&(b=D.footer.map(function(e){return{title:(t=e).title,action:t.action,style:t.style,id:t.id};var t})),g=function(e){var t,n,a,i,r,o,s=e.cardBar,c=e.image,d=e.header,l=e.body,u=e.footer,f={title:s[0].title,iconProperty:null===(t=s[0].icon)||void 0===t?void 0:t.url,iconAltText:null===(n=s[0].icon)||void 0===n?void 0:n.altText,_iconPropertyFallback:null===(a=s[0].icon)||void 0===a?void 0:a._urlFallback};if(d&&d.length&&(f.primaryText=d[0].text),c){var p=f;p.imageUrl=c.url,p.imageAltText=c.altText,p._imageUrlFallback=c._urlFallback}if(l&&l.length)switch(l[0].componentName){case"text":var m=l[0];f.description=m.text;break;case"searchBox":f=(0,h.__assign)((0,h.__assign)({},f),{placeholder:(i=l[0]).placeholder||"",defaultValue:i.defaultValue||""});break;default:f=(0,h.__assign)((0,h.__assign)({},f),te(l[0]))}if(u&&u.length)switch(u[0].componentName){case"searchFooter":f=(0,h.__assign)((0,h.__assign)({},f),(o=(r=u[0]).title,{footerImageUrl:r.imageUrl||"",footerTitle:o,footerText:r.text}));break;case"textInput":f=(0,h.__assign)((0,h.__assign)({},f),te(u[0]))}return f}(D),o||(v=function(e,t,a,i){var r=e.body,o=e.footer,s=e.image;if(r&&r.length)switch(r[0].componentName){case"textInput":return function(e,t,n,a){var i=(0,A.cloneDeep)(e.image?Q:q),r=e.body[0];return t&&(i.body[0].selectAction="${selectAction}"),e.image&&"Medium"===n||i.body[0].items.push(W(r,B(a,"body",r,0))),i}(e,t,a,i);case"searchBox":return function(e,t,n){var a=(0,A.cloneDeep)(q),i=e.body[0],r=e.footer&&e.footer[0];return t&&(a.body[0].selectAction="${selectAction}"),a.body[0].items.push(function(e,t){var n={type:"ColumnSet",columns:[]};n.columns.push({type:"Column",width:"stretch",spacing:"none",items:[{type:"Input.Text",placeholder:e.placeholder,value:e.defaultValue,id:"".concat(t,"-searchbox")}]});var a=e.button;return n.columns.push({type:"Column",width:"auto",spacing:"small",items:[{type:"ActionSet",actions:[T(a.action,a.id||"".concat(t,"-searchbox-button"),L.Sj,"positive")]}]}),n}(i,i.id||"".concat(i.componentName,"-").concat(n,"-body-0"))),r&&a.body[0].items.push(function(e,t){var n={type:"ColumnSet",columns:[],selectAction:e.onSelection?T(e.onSelection,t):void 0};n.columns.push({type:"Column",width:"auto",items:[{type:"Image",style:"Person",url:"${footerImageUrl}",height:"24px",width:"24px"}]}),n.columns.push({type:"Column",width:"stretch",items:[{type:"TextBlock",weight:"Bolder",text:"${footerText}",wrap:!1}]});var a={type:"Container",items:[]};return a.items.push({type:"TextBlock",text:"${footerTitle}",wrap:!1,size:"Small",isSubtle:!0}),a.items.push(n),a}(r,B(n,"footer",r,0))),a}(e,t,i)}if(o&&1===o.length&&"textInput"===o[0].componentName)return function(e,t,n){var a=void 0;a=e.image?(0,A.cloneDeep)(Q):e.body?(0,A.cloneDeep)(Y):(0,A.cloneDeep)(q),t&&(a.body[0].selectAction="${selectAction}");var i=e.footer[0];return a.body[0].items.push(W(i,B(n,"footer",i,0))),a}(e,t,i);if(s){var c=t?J:Q;return n()?c:(0,A.cloneDeep)(c)}if(r&&r.length){var d=t?X:Y;return n()?d:(0,A.cloneDeep)(d)}var l=t?Z:q;return n()?l:(0,A.cloneDeep)(l)}(D,!!S,i,u))),o||(o=v),o&&function(e,t,n,a,i){var r=t&&P(t,a,n,i);r&&(e.actions=r)}(o,b,i,I,u),S){var x=T(S,_()?"select-action":M);(!d()&&"Action.Execute"===x.type||"Action.OpenUrl"===x.type||"Action.Submit"===x.type||"VivaAction.GetLocation"===x.type||"VivaAction.ShowLocation"===x.type||"VivaAction.SelectMedia"===x.type)&&(y=x)}"Image"===e._templateType&&void 0===g.imageAltText&&(g.imageAltText=a()?"":t.Text.format(L.nA,l.alias));var C=(null==g?void 0:g.title)||c;!t._SPKillSwitch.isActivated("40ca522b-81d0-4c01-a04c-8513f3a444a9")&&(null===(p=null==D?void 0:D.cardBar[0])||void 0===p?void 0:p.title)&&(C=null===(m=null==D?void 0:D.cardBar[0])||void 0===m?void 0:m.title);var O=(0,h.__assign)((0,h.__assign)({selectAction:y,iconProperty:s,title:C,actionButtons:"Mobile"!==r?P(b,I,i,u):void 0},g),{iconAltText:a()?(null==g?void 0:g.iconAltText)||L.V:(null==g?void 0:g.iconAltText)||t.Text.format(L.BA,l.alias)}),w={iconProperty:(null==g?void 0:g.iconProperty)||s,size:i,title:C,templateType:I,cardViewId:t._SPKillSwitch.isActivated("f34f1dc6-aefd-4c08-8530-f4ad7e7ad0d4")?void 0:f};return w.defaultIconAltText=t.Text.format(L.BA,l.alias),w.selectAction=y,w.defaultImageAltText=D.image?t.Text.format(L.nA,l.alias):void 0,{data:O,template:o,cardViewParameters:D,cardProperties:w}}function ee(e,t,n){n&&n.forEach(function(n,a){if(n.id=B(e,t,n,a),"searchBox"===n.componentName||"textInput"===n.componentName){var i=n.button;i&&!i.id&&(i.id="".concat(n.id,"-button"))}})}function te(e){var t,n={placeholder:e.placeholder||"",defaultValue:e.defaultValue||""};if(e.iconBefore&&(n.iconBeforeProperty=e.iconBefore.url,n.iconBeforeAltText=e.iconBefore.altText,n._iconBeforeUrlFallback=e.iconBefore._urlFallback),e.iconAfter&&(n.iconAfterProperty=e.iconAfter.url,n.iconAfterAltText=e.iconAfter.altText,n._iconAfterUrlFallback=e.iconAfter._urlFallback),e.button&&(null===(t=e.button)||void 0===t?void 0:t.icon)){var a=e.button;n.buttonIconProperty=a.icon.url,n.buttonIconAltText=a.icon.altText,n._buttonIconUrlFallback=a.icon._urlFallback}return n}var ne=function(){function e(e,t,n,a,i,r){this._context=e,this._getCardSize=t,this._getIconProperty=n,this._getTitle=a,this._handleInitializeCallback=i,this._settings=(0,h.__assign)((0,h.__assign)({},this._defaultCacheSettings()),r)}return e.prototype.save=function(e,t,n,a,i,r,o,s){var c,d;if(this._settings.isEnabled){var l=this._initializeCustomCardView();if(l&&l.isCacheEnabled||!l&&n.isCacheEnabled){var u=l?$(l,this._getCardSize(),this._context.deviceContext,void 0,this._getIconProperty(),this._getTitle(),o,t,s):a.card;d=this._createCacheObject(a,u,i,r),null===(c=this._context._host.cache)||void 0===c||c.save(e,t,d)}}return d},e.prototype._createCacheObject=function(e,t,n,a){return{cachedCard:t,cardNavigatorState:n,isVisible:e.isVisible,cachedState:a,expirationTime:(new Date).getTime()+1e3*this._settings.expiryTimeInSeconds}},e.prototype._initializeCustomCardView=function(){if(this._settings.cachedCardView){var e=this._settings.cachedCardView();return this._handleInitializeCallback(e),e}},e.prototype._defaultCacheSettings=function(){return{isEnabled:!0,expiryTimeInSeconds:e.CACHE_EXPIRATION_TIME,cachedCardView:void 0}},e.CACHE_EXPIRATION_TIME=864e3,e}();function ae(e){return(0,h.__assign)((0,h.__assign)({},e),{componentName:"cardBar"})}function ie(e){return(0,h.__assign)((0,h.__assign)({},e),{componentName:"text"})}function re(e){return(0,h.__assign)((0,h.__assign)({},e),{componentName:"textInput"})}function oe(e){var t=e.cardBar,n=e.header,a=e.footer;return{cardViewType:"text",image:void 0,body:void 0,cardBar:[ae(t)],header:[ie(n)],footer:ue(a)}}function se(e){var t=e.cardBar,n=e.header,a=e.body,i=e.footer;return{cardViewType:"text",image:void 0,cardBar:[ae(t)],header:[ie(n)],body:[ie(a)],footer:ue(i)}}function ce(e){var t=e.image,n=e.cardBar,a=e.header,i=e.footer;return{cardViewType:"text",image:t,cardBar:[ae(n)],header:[ie(a)],body:void 0,footer:ue(i)}}function de(e){var t=e.cardBar,n=e.header,a=e.body,i=e.footer;return{cardViewType:"textInput",image:void 0,cardBar:[ae(t)],header:[ie(n)],body:[re(a)],footer:ue(i)}}function le(e){var t=e.cardBar,n=e.header,a=e.body,i=e.footer;return{cardViewType:"textInput",image:e.image,cardBar:[ae(t)],header:[ie(n)],body:[re(a)],footer:ue(i)}}function ue(e){if(e)return Array.isArray(e)?e.map(function(e){return H(e)}):"textInput"===e.componentName?[re(e)]:[H(e)]}var fe=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._templateType="Basic",t}return(0,h.__extends)(t,e),t.prototype._getCardViewParameters=function(){var e=this.data,t=oe({cardBar:this._getCardBarConfiguration(),header:{componentName:"text",text:e.primaryText},footer:this._getGenericCardViewFooterConfiguration()});return t.cardViewType="basic-template",t},Object.defineProperty(t.prototype,"template",{get:function(){return this._getTemplate(q,Z)},enumerable:!1,configurable:!0}),t}(N),pe=function(e){function t(t){var n=e.call(this)||this;return n._templateType="Basic",n._primaryText=t,n}return(0,h.__extends)(t,e),Object.defineProperty(t.prototype,"data",{get:function(){return{primaryText:this._primaryText}},enumerable:!1,configurable:!0}),t}(fe),me=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,h.__extends)(t,e),Object.defineProperty(t.prototype,"externalLink",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"title",{get:function(){return""},enumerable:!1,configurable:!0}),t}(U),_e=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._viewType="AdaptiveCardQuickView",t}return(0,h.__extends)(t,e),Object.defineProperty(t.prototype,"data",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"focusParameters",{get:function(){},enumerable:!1,configurable:!0}),t.prototype.onAction=function(e){},t.prototype.onActionError=function(e){},t}(me),he=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,h.__extends)(t,e),t}(_e),be=/\{(\d+)\}/g,ge=function(){function e(){this._registeredCallbacks=new Map}return e.prototype.register=function(e,t){this._registeredCallbacks.has(e)||this._registeredCallbacks.set(e,t)},e.prototype.consume=function(e){var t=this._registeredCallbacks.get(e);if(!t)throw new Error(function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return e.replace(be,function(e,n){return null===t[n]?"":""+t[n]})}("View with id {0} must be registered before being used",e));return this._registeredCallbacks.delete(e),t},Object.defineProperty(e.prototype,"size",{get:function(){return this._registeredCallbacks.size},enumerable:!1,configurable:!0}),e}(),ve=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,h.__extends)(t,e),Object.defineProperty(t.prototype,"data",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"template",{get:function(){return{}},enumerable:!1,configurable:!0}),t}(_e),ye=function(){function e(e,t){this._handleStackChangedCallback=e,this._handleInitializeCallback=t,this._viewStack=(m(),new Array),this._viewCache=new Map,this._viewRegistry=new ge}return e.prototype.register=function(e,t){this._viewRegistry.register(e,t)},e.prototype.push=function(e,t){void 0===t&&(t=!1),this._push(e),this._handleStackChangedCallback(t)},e.prototype.replace=function(e,t){void 0===t&&(t=!1),this._pop(),this._push(e),this._handleStackChangedCallback(t)},e.prototype.pop=function(e){void 0===e&&(e=!1),this.size>1&&(this._pop(),this._handleStackChangedCallback(e))},Object.defineProperty(e.prototype,"size",{get:function(){return this._viewStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentId",{get:function(){var e=this.size;return e&&m()?this._viewStack[e-1]:e?this._viewStack[e-1].id:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_currentView",{get:function(){var e=this.size;return m()?this._viewCache.get(this._viewStack[e-1]):(0,h.__assign)((0,h.__assign)({},this._viewStack[e-1]),{view:this._viewCache.get(this._viewStack[e-1].id)})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"viewStack",{get:function(){return this._viewStack},enumerable:!1,configurable:!0}),e.prototype._clear=function(){this._viewStack=[]},e.prototype._forEach=function(e){this._viewCache.forEach(e)},e.prototype._getRegistrySize=function(){return this._viewRegistry.size},e.prototype._push=function(e){var t,n=this;if(void 0===this._viewCache.get(e)){var a=this._viewRegistry.consume(e)();a instanceof Promise?(a.then(function(t){n._handleInitializeCallback(t),n._viewCache.set(e,t),n._handleStackChangedCallback(!1)}).catch(function(e){console.error("could not load quickview",e)}),a=new ve):a=a,this._handleInitializeCallback(a),this._viewCache.set(e,a)}m()?this._viewStack.push(e):(this.size>0&&(this._viewStack[this.size-1].focusElement=null!==(t=document.activeElement)&&void 0!==t?t:void 0),this._viewStack.push({id:e}))},e.prototype._pop=function(){this._viewStack.pop()},e}(),Se=function(e){function t(t,n,a){var i=e.call(this,t,n)||this;return i._closeQuickViewCallback=a,i}return(0,h.__extends)(t,e),t.prototype.close=function(){this._closeQuickViewCallback()},t}(ye),De=function(){function n(){}return n.prototype.get=function(n,a){return this.getFromSource(n,a).then(function(n){if(t._SPKillSwitch.isActivated("63a9cba3-4d6e-44a7-bdfb-3464aeb6a4a4"))return n&&(new Date).getTime()<n.expirationTime?n:void 0;var a=new e._QosMonitor("ACECache.Get");return n&&(new Date).getTime()<n.expirationTime?(a.writeSuccess(),n):void a.writeExpectedFailure(n?"CacheExpired":"CacheMiss")})},n}(),Ie=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e._cachedMap=new Map,e}return(0,h.__extends)(n,t),n.getKey=function(e,t){return"AdaptiveCardExtension_LKG_".concat(e,"_").concat(t)},Object.defineProperty(n,"instance",{get:function(){return void 0===this._instance&&(this._instance=new n),this._instance},enumerable:!1,configurable:!0}),n.prototype.save=function(t,n,a){var i=new e._QosMonitor("ACE.LocalStorage.save");try{var r=this._getLocalStorageEntry(t);r.set(n,a);var o=Array.from(r.entries());localStorage.setItem(t,JSON.stringify(o)),i.writeSuccess()}catch(e){var s=a.cachedCard.cardProperties.title||"";i.writeUnexpectedFailure("",e,{alias:s,instanceId:n})}},n.prototype.getFromSource=function(t,n){var a=new e._QosMonitor("ACE.LocalStorage.get");try{var i=this._getLocalStorageEntry(t).get(n);return i?a.writeSuccess():a.writeExpectedFailure("cacheMiss",void 0,{instanceId:n}),Promise.resolve(i)}catch(e){return a.writeUnexpectedFailure("",e,{instanceId:n}),Promise.resolve(void 0)}},n.prototype._getLocalStorageEntry=function(e){var t=this._cachedMap.get(e);if(t)return t;var n=localStorage.getItem(e),a=n?new Map(JSON.parse(n)):new Map;return this._cachedMap.set(e,a),a},n}(De);const xe="AdaptiveCardExtension.CardAction";new Set(["AppChrome.PageOpenedInTeamsVivaConnections1PAppContext","TeamsSiteHeader.RefreshButtonClicked","TeamsSiteHeader.CopyLinkButtonClicked.successful","TeamsSiteHeader.GoToBrowserButtonClicked","SPO.DashboardWebPart.Load",xe,"TeamsNavigation.Navigation.ClickedInTeamsviva1pAppContext"]);var Ce,Oe=function(n){function a(){var t=n.call(this)||this;return t._isLoggedRenderPerf=!1,t._isInitialized=!1,t._isInitializedWithLKG=!1,t._isUpdating=!1,t._getCard=function(e){try{return $(t.cardNavigator._currentView instanceof F?t.cardNavigator._currentView:t.cardNavigator._currentView.view,t.cardSize,t.context.deviceContext,e?t._ACRenderArgs.card.template:void 0,t.iconProperty,t.title,t.manifest,t.instanceId,t.cardNavigator.currentId)}catch(e){throw t.context._host.onError(e.toString()),e}},t._assignAndRenderWebQuickView=function(n){var a,i=t.quickViewNavigator._currentView instanceof me?t.quickViewNavigator._currentView:null===(a=t.quickViewNavigator._currentView)||void 0===a?void 0:a.view,r=new e._QosMonitor("ACE.WebQuickView.Render");try{if(void 0===i||"AdaptiveCardQuickView"===i._viewType)return void r.writeExpectedFailure("IncorrectQVType",void 0,{viewType:i._viewType});i._setDomElement(n),i.render(),r.writeSuccess()}catch(e){r.writeUnexpectedFailure("FailedToRender",e)}},t._disposeWebQuickView=function(t){var n=new e._QosMonitor("ACE.WebQuickView.Dispose");try{if(void 0===t||"AdaptiveCardQuickView"===t._viewType)return void n.writeExpectedFailure("IncorrectQVType",void 0,{viewType:t._viewType});t.dispose(),t._setDomElement(void 0),n.writeSuccess()}catch(e){n.writeUnexpectedFailure("FailedToDispose",e)}},t._onViewInitialized=function(e){t._initializeCardView(e)},t._onQuickViewInitialized=function(e){t._initializeBaseView(e)},t._navigatorCallback=function(e){e||t.update(t._renderType)},t._closeQuickViewCallback=function(){t.context._host.requestRenderTypeChange("Card",t.instanceId)},t._cardSize="Medium",t._renderType="Card",t._isVisible=!0,t._urlParams=new URLSearchParams(window.location.search),t}return(0,h.__extends)(a,n),Object.defineProperty(a.prototype,"cardNavigator",{get:function(){return this._cardNavigator||(this._cardNavigator=this._initializeCardNavigator()),this._cardNavigator},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"cardSize",{get:function(){return this._cardSize},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"dataVersion",{get:function(){return t.Version.parse("1.0")},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"description",{get:function(){return this._description},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"displayMode",{get:function(){return this._displayMode},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"properties",{get:function(){return this._properties},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"siteId",{get:function(){return this.context.pageContext.site.id.toString()},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"itemId",{get:function(){var e;return null===(e=this.context.pageContext.listItem)||void 0===e?void 0:e.uniqueId},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"mySiteCacheEnabled",{get:function(){return(t._SPFlight.isEnabled(60399)||1===t._SPExperiment.getVariantAndLogExposure(90148))&&(t._SPKillSwitch.isActivated("5c806b76-07fd-4ea8-afce-10c676a1739e")||!t._BrowserUtilities.isVivaHome())},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"quickViewNavigator",{get:function(){return this._quickViewNavigator||(this._quickViewNavigator=this._initializeQuickViewNavigator()),this._quickViewNavigator},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"renderedFromPersistedData",{get:function(){return this._renderedFromPersistedData},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"renderedOnce",{get:function(){return this._renderedOnce},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"renderType",{get:function(){return this._renderType},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"propertiesMetadata",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"isRenderAsync",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"state",{get:function(){return this._state},set:function(e){if(this._state)throw new Error("state can only be initialized once");this._state=e},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"title",{get:function(){return this._title},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"_aceLoadExtraData",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"_cardActionEngagementExtraData",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"iconProperty",{get:function(){return this._iconProperty},enumerable:!1,configurable:!0}),a.prototype.getPropertyPaneConfiguration=function(){return{pages:[]}},a.prototype.loadPropertyPaneResources=function(){return Promise.resolve()},a.prototype.getCacheSettings=function(){return{}},a.prototype.getCachedState=function(e){return{}},a.prototype.onNotificationReceived=function(e){},a.prototype.onBeforeAction=function(e){},a.prototype._onBeforeAction=function(e,t,n,a,i){if(!d()||"Execute"!==e.type){this._logCardActionEngagement(e.type,t,n,a,i),this._beginUpdate();try{this.onBeforeAction(e)}finally{this._endUpdate()}}},a.prototype._internalOnAction=function(e){var t=this.navigator._currentView instanceof U?this.navigator._currentView:this.navigator._currentView.view;if(!t||!t.onAction){var n=new Error("_internalOnAction is called for non-actionable ACE view");throw this._logInternalOnActionError(n,"internalOnActionFailure"),n}d()&&"Execute"===e.type||t.onAction(e)},a.prototype._internalOnActionError=function(e){var t=this.navigator._currentView instanceof U?this.navigator._currentView:this.navigator._currentView.view;if(!t||!t.onActionError){var n=new Error("_internalOnActionError is called for non-actionable ACE view");throw this._logInternalOnActionError(n,"internalOnActionErrorFailure"),n}t.onActionError(e)},a.prototype.onBeforeSerialize=function(){},a.prototype.onAfterPropertiesUpdatedExternally=function(e){},a.prototype.onAfterDeserialize=function(e,t){return e},a.prototype.onDisplayModeChanged=function(e){},a.prototype.onDispose=function(){},a.prototype.onInit=function(e){return Promise.resolve()},a.prototype._initializeCardNavigator=function(){return new ye(this._navigatorCallback,this._onViewInitialized)},a.prototype._initializeQuickViewNavigator=function(){return new Se(this._navigatorCallback,this._onQuickViewInitialized,this._closeQuickViewCallback)},a.prototype.onPropertyPaneFieldChanged=function(e,t,n){},a.prototype.onRenderTypeChanged=function(e){},a.prototype.renderCard=function(){},a.prototype._getPreFrameworkPropertyPaneConfiguration=function(){return[]},Object.defineProperty(a.prototype,"_isFrameworkPropertyPaneEnabled",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"isVisible",{get:function(){return this._isVisible},set:function(e){this._isVisible=e,this._isInitialized&&(this.cardNavigator._getRegistrySize()>0||this.cardNavigator._currentView instanceof F?this.cardNavigator._currentView:this.cardNavigator._currentView.view)&&this.context._host.onVisibilityChanged(this._getRenderArguments(this.renderType))},enumerable:!1,configurable:!0}),a.prototype.renderCompleted=function(e){this._renderCompletedPromiseResolver&&this._renderCompletedPromiseResolver(e)},a.prototype._endMarkForRenderComplete=function(t,n){var a=new e._QosMonitor("AdaptiveCardExtension.RenderCompleted");this._isLoggedRenderPerf||(t?n?x._PerformanceLogger.endFailureForComponent(this._perfTagName,"TimeOut",void 0,void 0,l()?void 0:w):x._PerformanceLogger.endMarkForComponent(this._perfTagName):x._PerformanceLogger.endMarkForComponentWithTimestamp(this._perfTagName,this._lkgRenderTime),this._isLoggedRenderPerf=!0);var i=v._WebPartLoadDataCollector.collect(this.context.manifest,this._perfTagName,this.context.pageContext),r=(0,h.__assign)((0,h.__assign)({},i),{isInternal:this.manifest.isInternal||!1,isInitializedWithLKG:this._isInitializedWithLKG,didTimeOut:n,didUpdate:t,displayMode:this.displayMode});n?a.writeUnexpectedFailure("",void 0,r):a.writeSuccess(r),this.context._host.onRenderCompleted(this.instanceId,t),this._clearRenderCompletedGuardTimer()},a.prototype._resolveRenderCompleted=function(){var e=this;this._renderCompletedPromise.then(function(t){e._endMarkForRenderComplete(t,!1)}).catch(function(){e._endMarkForRenderComplete(!0,!0)})},a.prototype.setState=function(e){this._internalSetState(e,!0)},a.prototype._internalSetState=function(e,t){if(void 0===t&&(t=!0),!this._state)throw new Error("state must be initialized before calling setState");e&&(this._state=(0,h.__assign)((0,h.__assign)({},this.state),(0,A.cloneDeep)(e)),this.cardNavigator._forEach(this._onViewInitialized),this.quickViewNavigator._forEach(this._onQuickViewInitialized)),this._isInitialized&&!this._isUpdating&&t&&this.context._host.update(this._getRenderArguments(this._renderType))},a.prototype.update=function(e,t){void 0===t&&(t=!1);var n=this._getRenderArguments(e,t);this.context._host.update(n)},a.prototype._getRenderArguments=function(n,a,i){var r,o=this;void 0===a&&(a=!1);var s=new e._QosMonitor("AdaptiveCardExtension.GetRenderArguments.".concat(n));try{if(!this._isInitialized)throw s.writeUnexpectedFailure("ACE is not initialized"),new Error("".concat(this.context.manifest.alias," is not initialized"));if(this._setRenderType(n,i),"Card"===n&&0===this.cardNavigator.size){var c=this.renderCard();c||(c="_InternalDefaultCardView",this.cardNavigator.register(c,function(){return new pe(o.description)})),this.cardNavigator.push(c,!0)}if(void 0===this._ACRenderArgs?this._ACRenderArgs={card:"Card"===n?this._getCard(a):void 0,isVisible:this._isVisible,instanceId:this.instanceId,lastUpdatedType:n,quickLook:"QuickView"===n?this._getQuickView(a):void 0}:this._updateRenderArgs(n,a),(!t._SPKillSwitch.isActivated("b8c50ded-d048-4eb9-bc41-21190d9d3bbb")&&this.context.manifest.isolatedDomain||this.displayMode===t.DisplayMode.Read)&&"Card"===n){var d=null===(r=this._cacheManager)||void 0===r?void 0:r.save(this._cacheKey,this.instanceId,this.cardNavigator._currentView instanceof F?this.cardNavigator._currentView:this.cardNavigator._currentView.view,this._ACRenderArgs,this.cardNavigator.viewStack.map(function(e){return"string"==typeof e?e:e.id}),this.getCachedState((0,h.__assign)({},this._state)),this.manifest,this.cardNavigator.currentId);this._ACRenderArgs.cacheObject=d}var u=void 0;this._isLoggedRenderPerf||this.isRenderAsync||(x._PerformanceLogger.endMarkForComponent(this._perfTagName),u=v._WebPartLoadDataCollector.collect(this.context.manifest,this._perfTagName,this.context.pageContext),this._isLoggedRenderPerf=!0,this.context._host.onRenderCompleted(this.instanceId,!0)),u=(0,h.__assign)((0,h.__assign)({},u),{isInternal:this.manifest.isInternal||!1,displayMode:this.displayMode}),s.writeSuccess(u)}catch(e){throw u=void 0,this._isLoggedRenderPerf||(x._PerformanceLogger.endFailureForComponent(this._perfTagName,"Render",e,void 0,l()?void 0:w),u=v._WebPartLoadDataCollector.collect(this.context.manifest,this._perfTagName,this.context.pageContext),this._isLoggedRenderPerf=!0,this.context._host.onRenderCompleted(this.instanceId,!0)),s.writeUnexpectedFailure("failedGetRenderArguments",e,(0,h.__assign)((0,h.__assign)({},u),{alias:this.context.manifest.alias,deviceContext:this.context.deviceContext,instanceId:this.instanceId,isInternal:this.manifest.isInternal||!1,manifestId:this.context.manifest.id,displayMode:this.displayMode})),this.manifest.isInternal&&this.displayMode===t.DisplayMode.Edit&&this.context._logEditCustomerPromiseFailure(this.manifest.alias,e.message,"AdaptiveCardExtensionGetRenderArgumentsFailed"),e}return this._ACRenderArgs},a.prototype._propertiesMetadata=function(){return this.propertiesMetadata},a.prototype._getPropertyPaneConfiguration=function(){return this.getPropertyPaneConfiguration()},Object.defineProperty(a.prototype,"navigator",{get:function(){return"Card"===this.renderType?this.cardNavigator:this.quickViewNavigator},enumerable:!1,configurable:!0}),a.prototype._internalDeserialize=function(e){e.title&&(this._title=e.title),e.iconProperty&&(this._iconProperty=e.iconProperty),e.description&&(this._description=e.description),e.cardSize&&(this._cardSize=e.cardSize);var n=e.properties;this.renderedFromPersistedData&&(v._PropertyMetadataProcessor.reInstateServerProcessedData(this.propertiesMetadata,n,e.serverProcessedContent),e.serverProcessedContent=void 0),this._properties?Object.assign(this._properties,n):this._properties=this.onAfterDeserialize(n,e.dataVersion?t.Version.parse(e.dataVersion):this.dataVersion),this.isRenderAsync&&this._startRenderCompletedGuardTimer(),this._cacheKey=this._generateCacheKey(e.dashboardWebPartInstanceId),this._instanceIdForLogs=e.instanceIdForLogs?e.instanceIdForLogs:e.instanceId,this._dashboardUniqueId=e.dashboardUniqueId},a.prototype._internalInitialize=function(e,t,a,i,r,o){var c=this;n.prototype._initializeContext.call(this,e),this._displayMode=a,this._renderedOnce=!1,this._renderedFromPersistedData=t,this._cacheManager=new ne(this.context,function(){return c.cardSize},function(){return c.iconProperty},function(){return c.title},this._onViewInitialized,this.getCacheSettings()),this._perfTagName=i,this._isInitializedWithLKG=r,s()||(this._appHostType=o)},a.prototype._internalSetDisplayMode=function(e){if(this._displayMode!==e){var t=this._displayMode;this._displayMode=e,this.onDisplayModeChanged(t)}},a.prototype._loadPropertyPaneResources=function(){return this.loadPropertyPaneResources()},a.prototype._onPropertyPaneFieldChanged=function(e,t,n){(0,A.isEqual)(t,n)||(this._updateProperty(e,n),this.onPropertyPaneFieldChanged(e,t,n))},a.prototype._renderCompleted=function(){this._renderedOnce=!0},a.prototype._internalOnAfterInit=function(){this._isInitialized=!0,this.isRenderAsync&&(this._lkgRenderTime=x._PerformanceLogger.now())},a.prototype._internalSerialize=function(){this.onBeforeSerialize();var e={dataVersion:this.dataVersion.toString(),id:this.componentId,instanceId:this.instanceId,properties:this.properties,title:this.title,description:this._description,iconProperty:this.iconProperty,cardSize:this._cardSize};return t._SPKillSwitch.isActivated("6fd170d1-644d-432e-bc91-84c44bdca5b5")||(e.connectedTeamsAppId=this.manifest.connectedTeamsAppId),e},a.prototype._setRenderType=function(e,t){if(this._renderType!==e){var n=this._renderType;"QuickView"===n&&this.quickViewNavigator._clear(),"Card"===n&&(this.quickViewNavigator._clear(),void 0!==t&&this.quickViewNavigator.push(t,!0)),this._renderType=e,this.onRenderTypeChanged(n)}},a.prototype._updateConfigurableFields=function(e,t){"cardSize"===e&&(this._cardSize=t)},a.prototype._logCardActionEngagement=function(e,n,a,i,r){var s=this._getBaseEngagementData(n,o()&&"QuickView"===e?"Card":this.renderType,a,i);s.name=xe,s.isIntentional=!0;var c=e;"ExternalLink"===e?c="OpenUrl":t._SPKillSwitch.isActivated("70037b45-a192-4a0b-a3a3-4390498abd19")||"Execute"!==e||(c="Submit"),s.extraData.actionType=c,s.extraData.componentName=r,this._logEngagement(s)},a.prototype._logCardComponentEventEngagement=function(e,t,n,a,i){var r,o,s,c,d=this._getBaseEngagementData(n,"Card",a,i);d.name="AdaptiveCardExtension.ComponentEvent",d.isIntentional=!0,d.extraData.componentName=e,d.extraData.eventName=t,d.extraData.isCurrentSiteAHomeSite=null===(o=null===(r=this.context.pageContext)||void 0===r?void 0:r.legacyPageContext)||void 0===o?void 0:o.isCurrentSiteAHomeSite,d.extraData.isCurrentSiteAVivaBackendSite=null===(c=null===(s=this.context.pageContext)||void 0===s?void 0:s.legacyPageContext)||void 0===c?void 0:c.isCurrentSiteAVivaBackendSite,this._logEngagement(d)},a.prototype._initializeCardView=function(e){var t=this;this._initializeBaseView(e),e._getCardSize=function(){return t.cardSize}},a.prototype._initializeBaseView=function(e){e._state=this.state,e._ace=this,e._properties=this.properties,e._context=this.context},Object.defineProperty(a.prototype,"_disableReactivePropertyChanges",{get:function(){return!1},enumerable:!1,configurable:!0}),a.prototype._onPropertyPaneChangesApplied=function(){return Promise.resolve()},a.prototype._onAfterPropertyPaneChangesApplied=function(){},a.prototype._getQuickView=function(t){var n,a,i,r,o,s,c,d,l,u,f,m;if(0!==this.quickViewNavigator.size){var _=this.quickViewNavigator._currentView instanceof me?this.quickViewNavigator._currentView:null===(n=this.quickViewNavigator._currentView)||void 0===n?void 0:n.view;if(void 0!==_){var b=_._viewType;this._previousQuickViewId!==this.quickViewNavigator.currentId&&e._EngagementLogger.log({name:"AdaptiveCardExtension.QuickView",isIntentional:!0,siteId:null===(i=null===(a=this.context.pageContext)||void 0===a?void 0:a.site)||void 0===i?void 0:i.id.toString(),webId:null===(o=null===(r=this.context.pageContext)||void 0===r?void 0:r.web)||void 0===o?void 0:o.id.toString(),extraData:(0,h.__assign)({alias:this.manifest.alias,appHostType:this._appHostType,correlationId:null===(d=null===(c=null===(s=this.context.pageContext)||void 0===s?void 0:s.site)||void 0===c?void 0:c.correlationId)||void 0===d?void 0:d.toString(),deviceContext:this.context.deviceContext,instanceId:this._instanceIdForLogs,quickViewType:b,tenantId:null===(f=null===(u=null===(l=this.context.pageContext)||void 0===l?void 0:l.aadInfo)||void 0===u?void 0:u.tenantId)||void 0===f?void 0:f.toString().toLowerCase()},p()?{}:{botId:null===(m=this.manifest.properties)||void 0===m?void 0:m.botId,connectedTeamsAppId:this.manifest.connectedTeamsAppId})}),this._previousQuickViewId=this.quickViewNavigator.currentId;var g={externalLink:_.externalLink,leftNavigationButtonType:this.quickViewNavigator.size>1?"Back":"Close",title:_.title};if("WebQuickView"===b)return{render:this._assignAndRenderWebQuickView,dispose:this._disposeWebQuickView.bind(this,_),pageBarProperties:g,viewId:this.quickViewNavigator.currentId,viewStackSize:this.quickViewNavigator.size,quickViewType:"WebQuickView"};var v=_,y=v.focusParameters;return this.quickViewNavigator._currentView instanceof me||(y=void 0!==v.focusParameters?(0,h.__assign)((0,h.__assign)({},v.focusParameters),{_lastFocusedElement:this.quickViewNavigator._currentView.focusElement}):{focusTarget:void 0,_lastFocusedElement:this.quickViewNavigator._currentView.focusElement}),{data:v.data,template:t?this._ACRenderArgs.quickLook.template:v.template,pageBarProperties:g,viewId:this.quickViewNavigator.currentId,viewStackSize:this.quickViewNavigator.size,focusParameters:y,quickViewType:"AdaptiveCardQuickView"}}}},a.prototype._updateRenderArgs=function(e,n){this._ACRenderArgs.lastUpdatedType=e,this._ACRenderArgs.isVisible=this._isVisible,t._SPKillSwitch.isActivated("1d6ff932-e7d5-4879-8d29-6e831d610437")||t._SPKillSwitch.isActivated("0f3f68e8-c28d-413a-82a3-be415af23fe0")?"Card"===e?this._ACRenderArgs.card=this._getCard(n):this._ACRenderArgs.quickLook=this._getQuickView(n):(this._ACRenderArgs.card=this._getCard(n),"QuickView"===e&&(this._ACRenderArgs.quickLook=this._getQuickView(n)))},a.prototype._updateProperty=function(e,t){(0,A.update)(this._properties,e,function(){return t})},a.prototype._startRenderCompletedGuardTimer=function(){var e=this;this._renderCompletedPromise=new Promise(function(t,n){e._renderCompletedPromiseResolver=t,e._renderCompletedPromiseRejector=n}),this._renderCompletedGuardTimer=window.setTimeout(function(){e._renderCompletedPromiseRejector()},t._SPKillSwitch.isActivated("8a4feb2f-ae4e-4174-9be1-0eb0b1371665")?15e3:1e4),this._resolveRenderCompleted()},a.prototype._clearRenderCompletedGuardTimer=function(){this._renderCompletedGuardTimer&&(window.clearTimeout(this._renderCompletedGuardTimer),this._renderCompletedGuardTimer=void 0,this._renderCompletedPromiseResolver=void 0,this._renderCompletedPromiseRejector=void 0,this._renderCompletedPromise=void 0)},a.prototype._generateCacheKey=function(e){return!this.mySiteCacheEnabled||"Mobile"===this.context.deviceContext||this.context.manifest.isolatedDomain?Ie.getKey(this.siteId,this.itemId):null!=e?e:this.instanceId},a.prototype._logInternalOnActionError=function(t,n){new e._QosMonitor("AdaptiveCardExtension._internalOnAction").writeUnexpectedFailure(n,t,{alias:this.context.manifest.alias,deviceContext:this.context.deviceContext,instanceId:this.instanceId,isInternal:this.manifest.isInternal||!1,manifestId:this.context.manifest.id,displayMode:this.displayMode})},a.prototype._beginUpdate=function(){this._isUpdating=!0},a.prototype._endUpdate=function(){this._isUpdating=!1},a.prototype._getBaseEngagementData=function(e,n,a,i){var r,o,s,d,l,u,f,m,_,b,g,v,y,S,D,I,x,C,O,w={};if(this.context._getPositionOnPage){var E=this.context._getPositionOnPage();E&&(w.cardPosition=E.componentOrder,w.NumberOfCardsAudienceTargeted=E.numberOfSectionComponents)}return O=t._SPFlight.isEnabled(60236)?this._dashboardUniqueId||(null===(o=this.context.pageContext.listItem)||void 0===o?void 0:o.uniqueId)||"":this._urlParams.get("id")?this._urlParams.get("id"):null===(r=this.context.pageContext.listItem)||void 0===r?void 0:r.id,{siteId:null===(d=null===(s=this.context.pageContext)||void 0===s?void 0:s.site)||void 0===d?void 0:d.id.toString(),webId:null===(u=null===(l=this.context.pageContext)||void 0===l?void 0:l.web)||void 0===u?void 0:u.id.toString(),extraData:(0,h.__assign)((0,h.__assign)((0,h.__assign)({alias:this.manifest.alias,appHostType:this._appHostType,cardSize:this.cardSize,componentDeveloperName:this.manifest.componentDeveloperName,correlationId:null===(_=null===(m=null===(f=this.context.pageContext)||void 0===f?void 0:f.site)||void 0===m?void 0:m.correlationId)||void 0===_?void 0:_.toString(),deviceContext:this.context.deviceContext,eventSchemaVersion:10,isInternal:this.manifest.isInternal||!1,instanceId:this._instanceIdForLogs,listId:this._urlParams.get("dashboardListID")?this._urlParams.get("dashboardListID"):null===(b=this.context.pageContext.list)||void 0===b?void 0:b.id.toString(),listItemUniqueId:O,manifestId:this.manifest.id,mobileSessionId:a,mobileBootType:i,mpnId:this.manifest.mpnId,renderType:n,tenantId:null===(y=null===(v=null===(g=this.context.pageContext)||void 0===g?void 0:g.aadInfo)||void 0===v?void 0:v.tenantId)||void 0===y?void 0:y.toString().toLowerCase(),vivaConnectionsAppId:"d2c6f111-ffad-42a0-b65e-ee00425598aa",vivaConnectionsName:"MEE",workLoad:e,isCurrentSiteAHomeSite:null===(D=null===(S=this.context.pageContext)||void 0===S?void 0:S.legacyPageContext)||void 0===D?void 0:D.isCurrentSiteAHomeSite,isCurrentSiteAVivaBackendSite:null===(x=null===(I=this.context.pageContext)||void 0===I?void 0:I.legacyPageContext)||void 0===x?void 0:x.isCurrentSiteAVivaBackendSite,templateType:this.cardNavigator._currentView instanceof F?this.cardNavigator._currentView._templateType:this.cardNavigator._currentView.view._templateType},w),c()?{}:this._cardActionEngagementExtraData),p()?{}:{botId:null===(C=this.manifest.properties)||void 0===C?void 0:C.botId,connectedTeamsAppId:this.manifest.connectedTeamsAppId})}},a.prototype._logEngagement=function(t){e._EngagementLogger.log(t)},a}(v.BaseComponent);!function(e){e[e.Image=1]="Image",e[e.Audio=4]="Audio",e[e.Document=8]="Document"}(Ce||(Ce={}));var we,Ee=u(408),Ae="embedded-page-container",Le=function(){function n(e){var t=this;this._callbackCache=new Map,this._isolatedFrames=new Map,this._isolatedListeners=new Map,this._handleIframeTimeout=function(e,n){var a=t._isolatedFrames.get(e),i=a.frameMonitor,r=a.retryMonitor,o=a.tokenMonitor;if(a.retryCount<1)return a.retryCount+=1,a.retryMonitor=t._createRetryMonitor(),void(a.timeoutId=setTimeout(function(){return t._handleIframeTimeout(e,n)},14500));if(r&&r.writeUnexpectedFailure("reloadFailed"),i&&!i.hasEnded)try{o?(i.writeUnexpectedFailure("tokenTimeout"),o.hasEnded||o.writeUnexpectedFailure("timeout")):n?i.writeUnexpectedFailure("authorizeTimeout"):i.writeExpectedFailure("authorizeTimeout")}catch(e){i.writeUnexpectedFailure("unexpectedFailure",e)}},this._handleIsolatedApplicationMessage=function(e){var n=e.data;if("applicationMessage"===n.messageType){var a=n.instanceId,i=n.kind;switch(i){case"Card":t._invokeCallback(a,{aceData:n.aceData,card:n.card,cacheObject:n.cacheObject,type:i});break;case"CloseQuickView":var r=t._isolatedFrames.get(new URL(e.origin).hostname);r&&(r.iframe.hidden=!0);break;case"Error":t._invokeCallback(a,{error:n.error,type:i});break;case"OpenQuickView":var o=t._isolatedFrames.get(new URL(e.origin).hostname);o&&(o.iframe.hidden=!1);break;case"OpenUrl":t._invokeCallback(a,{type:i,url:n.url});break;case"LocationRequest":t._invokeCallback(a,{type:i});break;case"RenderCompleted":t._invokeCallback(a,{type:i,didUpdate:n.didUpdate});break;case"Ready":var s=t._isolatedFrames.get(new URL(e.origin).hostname);if(s){s.retryMonitor&&s.retryMonitor.writeSuccess(),clearTimeout(s.timeoutId),s.frameMonitor.writeSuccess(),s.isReady=!0;for(var c=0,d=s.messageQueue;c<d.length;c++){var l=d[c],u=l[0],f=l[1];t._sendMessage(t._getIsolatedFrame(u),u,f)}s.messageQueue=[]}break;case"OBOTokenRequest":var p=n.applicationId,m=n.claims;t._getAuthToken(p,m,e.origin);break;case"PropertyPaneConfiguration":t._invokeCallback(a,{propertyPaneConfiguration:n.propertyPaneConfiguration,type:i});break;default:t._logError("Unexpected message: ".concat(JSON.stringify(e.data)))}}else if("bridgeMessage"===n.messageType&&"onTokenRequested"===n.bridgeAction){var _=t._createTokenRequestMonitor(),h=(p=n.applicationId,m=n.claims,t._isolatedFrames.get(new URL(e.origin).hostname));if(!h)return void _.writeUnexpectedFailure("missingIsolatedFrame");h.tokenMonitor=_;var b=I._AadTokenProviders.configurable;if(!b._oboThirdPartyTokenCallback)return void _.writeUnexpectedFailure("missingThirdPartyTokenCallback");try{b._oboThirdPartyTokenCallback(p,m).then(function(e){if(!h.iframe.contentWindow)throw new Error("missingContentWindow");h.iframe.contentWindow.postMessage({token:e,messageType:"dashboardMessage",kind:"Token"},"*"),_.writeSuccess()}).catch(function(e){_.writeUnexpectedFailure("oboThirdPartyTokenCallbackError",e)})}catch(e){_.writeUnexpectedFailure("unexpectedException",e)}}},this._serviceScope=e,window.addEventListener("message",this._handleIsolatedApplicationMessage)}return Object.defineProperty(n.prototype,"_pageContext",{get:function(){return this._pContext||(this._pContext=this._serviceScope.consume(Ee.PageContext.serviceKey)),this._pContext},enumerable:!1,configurable:!0}),n.prototype.disposeEntry=function(e,t){if(this._isolatedListeners.delete(e),!i()){this._callbackCache.delete(e);var n=this._isolatedFrames.get(t);n&&(n.childInstanceIds.delete(e),0===n.childInstanceIds.size&&(document.body.removeChild(n.iframe),this._isolatedFrames.delete(t)))}},n.prototype.load=function(e){var n=this,a=e.callback,r=e.instanceId,o=e.listenerId,s=e.isolatedDomain.toLowerCase(),c=this._isolatedFrames.get(s);if(!c){var d=this._createLoadMonitor(),l=document.createElement("iframe");t._SPKillSwitch.isActivated("1c48a38c-d3a7-4440-9c3e-58a56a92f5be")||window.name!==Ae||(l.name=Ae);var u=t._BrowserUtilities.isTeams1PVivaDesktopHosted();l.src=this._configureIframeSrc(s,e,u),l.hidden=!0,l.scrolling="no",l.style.overflow="hidden",l.style.height="100%",l.style.width="100%",l.style.top="0",l.style.left="0",l.style.position="fixed",l.style.zIndex="99999",l.style.border="none",l.setAttribute("allow","geolocation"),l.setAttribute("data-automation-id","isolated_ACE_iframe"),document.body.appendChild(l);var f=s.toLowerCase();(c={iframe:l,frameMonitor:d,isReady:!1,messageQueue:[],retryCount:0,childInstanceIds:new Set}).timeoutId=setTimeout(function(){n._handleIframeTimeout(f,u)},15e3),this._isolatedFrames.set(f,c)}i()||c.childInstanceIds.add(r);var p=this._isolatedListeners.get(r);if(p)p.listeners.get(o)||p.listeners.set(o,{callback:a});else{var m=this._createIsolatedListenerEntry(s,c.iframe,e);this._isolatedListeners.set(r,m)}e.isRenderedFromPersistedData?this._handleRenderingFromPersistedData(e):this.sendInitialize(e);var _=this._callbackCache.get(r);_&&this._invokeCallback(r,_,o)},n.prototype.renderQuickView=function(e){var t=e.instanceId,n=e.isSelectAction,a=e.listenerId,i=e.pageTheme,r=e.targetRect,o=e.theme,s=e.viewId;this._sendMessage(this._getIsolatedFrame(t),t,{serviceAction:"Action",action:{action:{type:"QuickView",isSelectAction:n,pageTheme:i,targetRect:r,theme:o,viewId:s},instanceId:t,listenerId:a}})},n.prototype.setDisplayMode=function(e){},n.prototype.setRenderType=function(e){},n.prototype.sendAction=function(e){var t=e.instanceId;this._sendMessage(this._getIsolatedFrame(t),t,{serviceAction:"Action",action:e})},n.prototype.sendOnBeforeAction=function(e){var t=e.instanceId;this._sendMessage(this._getIsolatedFrame(t),t,{serviceAction:"OnBeforeAction",action:e})},n.prototype.sendInitialize=function(e){var t=e.instanceId,n=e.manifestId;this._sendMessage(this._getIsolatedFrame(t),t,{serviceAction:"Initialize",instanceId:t,manifestId:n})},n.prototype.updateACEData=function(e,t){this._isolatedListeners.has(e)&&this._sendMessage(this._getIsolatedFrame(e),e,{aceData:t,instanceId:e,serviceAction:"UpdateACEData"})},n.prototype.handleLocationRequest=function(e,t,n){this._sendMessage(this._getIsolatedFrame(e),e,{location:t,locationError:n,instanceId:e,serviceAction:"LocationResponse"})},n.prototype._createLoadMonitor=function(){return new e._QosMonitor("IsolatedAdaptiveCardExtensionService.load")},n.prototype._createRetryMonitor=function(){return new e._QosMonitor("IsolatedAdaptiveCardExtension.iframeReload")},n.prototype._createTokenRequestMonitor=function(){return new e._QosMonitor("IsolatedAdaptiveCardExtensionService.onTokenRequested")},n.prototype._createGetAuthTokenMonitor=function(){return new e._QosMonitor("IsolatedAdaptiveCardExtensionService._getAuthToken")},n.prototype._configureDestUrlParams=function(e){var n=e.dashboardListId,a=e.itemId,i=new URLSearchParams(window.location.search);return i.append("dashboardListID",n),i.append("id",a),1===x._SPPerfExperiment.getVariantAndTrackExperiment(x._PerformanceExperiment.WEXOOPIF)&&i.append("OOPIF","1"),i.append("deviceContext",t._BrowserUtilities.isTeams1PVivaDesktopHosted()?"TeamsDesktop":"WebView"),i.append("parentWindowOrigin",window.location.origin),i},n.prototype._configureIframeSrc=function(e,n,a){var i=this._pageContext.site.serverRelativeUrl,r="/"===i?"":i,o=(0,v._ensureIsolatedDomainUrl)(e,this._pageContext.web.absoluteUrl),s=this._configureDestUrlParams(n),c=n.serviceDestinationEndpoint,d=t._SPKillSwitch.isActivated("e8daf7db-132e-4225-93a4-70cc5fc06bb9")||void 0===c?"adaptivecardextensions.aspx":c,l="/_layouts/15/".concat(d,"?").concat(s.toString());return t._BrowserUtilities.isUsingSecureBroker()?"".concat(o,"/_layouts/15/brokerlogon.aspx?spfx=true&").concat(t._BROKER_IN_USE_KEY,"=true&dest=").concat(encodeURIComponent(o+l)):a&&t._SPFlight.isEnabled(60128)?"".concat(o,"/_layouts/15/framedteamslogon.aspx?spfx=true&dest=").concat(encodeURIComponent(r+l)):o+l},n.prototype._createIsolatedListenerEntry=function(e,t,n){var a=n.listenerId,i=n.callback,r=n.manifestId;return{isolatedDomain:e,iframe:t,listeners:new Map([[a,{callback:i}]]),manifestId:r}},n.prototype._handleRenderingFromPersistedData=function(e){},n.prototype._getIsolatedFrame=function(e){var t=this._isolatedListeners.get(e);return t?this._isolatedFrames.get(t.isolatedDomain):void 0},n.prototype._sendMessage=function(e,t,n){e?this._postOrQueueMessage(e,n,t):this._logError("No entry for ".concat(t))},n.prototype._invokeCallback=function(e,t,n){var a,i=this._isolatedListeners.get(e);this._callbackCache.set(e,t),i?n?null===(a=i.listeners.get(n))||void 0===a||a.callback(t):i.listeners.forEach(function(e){return e.callback(t)}):this._logError("No entry for ".concat(e))},n.prototype._logError=function(t){e._TraceLogger.logError(n._logSource,new Error(t))},n.prototype._getAuthToken=function(e,t,n){var a=this,i=this._createGetAuthTokenMonitor(),r=I._AadTokenProviders.configurable;if(!r._oboThirdPartyTokenCallback)return i.writeUnexpectedFailure("oboThirdPartTokenCallbackUndefined"),void this._logError("Unexpected message: oboThirdPartyTokenCallback is not defined.");r._oboThirdPartyTokenCallback(e,t).then(function(t){var r=new URL(n),o=a._isolatedFrames.get(r.hostname);a._sendMessage(o,"",{token:t,applicationId:e,serviceAction:"OBOToken"}),i.writeSuccess()}).catch(function(e){i.writeUnexpectedFailure("oboThirdPartTokenCallbackFailure"),a._logError("Unexpected message: ".concat(JSON.stringify(e)))})},n.prototype._postOrQueueMessage=function(e,t,n){e.isReady?(t.messageType="serviceMessage",e.iframe.contentWindow.postMessage(t,"*")):e.messageQueue.push([n,t])},n.serviceKey=t.ServiceKey.create("sp-adaptive-card-extension-base::IsolatedAdaptiveCardExtensionService",n),n._logSource={id:"IsolatedAdaptiveCardExtensionService"},n}(),ke=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._templateType="Image",t}return(0,h.__extends)(t,e),t.prototype._getCardViewParameters=function(){var e=this.data,t=ce({image:{url:e.imageUrl,altText:e.iconAltText,_urlFallback:e._imageUrlFallback},cardBar:this._getCardBarConfiguration(),header:{componentName:"text",text:e.primaryText},footer:this._getGenericCardViewFooterConfiguration()});return t.cardViewType="image-template",t},Object.defineProperty(t.prototype,"template",{get:function(){return this._getTemplate(Q,J)},enumerable:!1,configurable:!0}),t}(N),Me=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._templateType="PrimaryText",t}return(0,h.__extends)(t,e),t.prototype._getCardViewParameters=function(){var e=this.data,t=se({cardBar:this._getCardBarConfiguration(),header:{componentName:"text",text:e.primaryText},body:{componentName:"text",text:e.description},footer:this._getGenericCardViewFooterConfiguration()});return t.cardViewType="primaryText-template",t},Object.defineProperty(t.prototype,"template",{get:function(){return this._getTemplate(Y,X)},enumerable:!1,configurable:!0}),t}(N);!function(e){e[e.CacheMissError=100001]="CacheMissError"}(we||(we={}));var Pe=function(t){function n(e){var n=t.call(this)||this;return n._serviceScope=e,n._cacheEntries={},n._cacheProvider=n._serviceScope.consume((0,I._getCacheDataProviderServiceKey)())._provider,n._providerPromises=new Map,n}return(0,h.__extends)(n,t),n.instance=function(e){return n._instance||(n._instance=new n(e)),n._instance},n.prototype.save=function(t,n,a){var i,o,s=t!==n?"DashboardWebPart":"DashboardPage",c=new e._QosMonitor("ACEMySiteCache.save.".concat(s)),d={key:t};if(r()||this._cacheProvider){if(!this._cacheEntries[t]){var l=((i={})[n]=a,i);this._cacheEntries[t]=l}this._cacheEntries[t][n]=a,null===(o=this._cacheProvider)||void 0===o||o.setData(d,this._cacheEntries[t],this._getCacheConfig(t)).then(function(e){if(e)return c.writeSuccess({isDataSaved:e}),Promise.resolve();c.writeUnexpectedFailure("dataIsNotSaved")}).catch(function(e){c.writeUnexpectedFailure("mySiteCacheSetDataFailed",e)})}else c.writeExpectedFailure("cacheProvider is undefined")},n.prototype.get=function(e,n){return t.prototype.get.call(this,e,n)},n.prototype.getFromSource=function(t,n){var a=this,i=t!==n?"DashboardWebPart":"DashboardPage",o=new e._QosMonitor("ACEMySiteCache.getFromSource.".concat(i)),s={key:t},c=this._providerPromises.get(t);return r()||this._cacheProvider?(c||(c=this._cacheProvider.getData(s,this._getCacheConfig(t)).then(function(e){return o.writeSuccess(),e.data}).then(function(e){a._populateLocalCache(t,e)}).catch(function(e){a._providerPromises.delete(t);var i={instanceId:n};return e.errorCode===we.CacheMissError?o.writeExpectedFailure("cacheMiss",e,i):o.writeUnexpectedFailure("unexpectedError",e,i),Promise.reject(e)}),this._providerPromises.set(t,c)),c.then(function(){return a._cacheEntries[t]?a._cacheEntries[t][n]:void 0})):(o.writeExpectedFailure("cacheProvider is undefined"),Promise.resolve(void 0))},n.prototype._populateLocalCache=function(e,t){var n=Object.keys(t),a={};n.forEach(function(e){a[e]=t[e]}),this._cacheEntries[e]=a},n.prototype._getCacheConfig=function(e){return{cacheStrategy:I._CacheStrategy.CacheAndNetwork,expirationDuration:void 0,id:e,alias:"ACEMySiteCacheManager",extraProps:n._cacheExtraProps}},n._cacheExtraProps=new Map([["onlyMySiteCache",!0]]),n}(De),Te=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._viewType="WebQuickView",t}return(0,h.__extends)(t,e),t.prototype._setDomElement=function(e){this._domElement=e},t.prototype.setState=function(e){this._ace._internalSetState(e,!1)},t.prototype.dispose=function(){},Object.defineProperty(t.prototype,"domElement",{get:function(){if(!this._domElement)throw new Error("Accessing DOM before initialized");return this._domElement},enumerable:!1,configurable:!0}),t}(me);function Ue(e){return(0,h.__assign)((0,h.__assign)({},e),{componentName:"poweredBy"})}function Fe(e){return(0,h.__assign)((0,h.__assign)({},e),{componentName:"searchBox"})}function He(e){return(0,h.__assign)((0,h.__assign)({},e),{componentName:"searchFooter"})}function Re(e){return(0,h.__assign)((0,h.__assign)({},e),{componentName:"promptsSet"})}function Ne(e){var t=e.cardBar,n=e.header,a=e.body,i=e.footer;return{cardViewType:"search",image:void 0,cardBar:[ae(t)],header:[ie(n)],body:[Fe(a)],footer:i?[He(i)]:void 0}}function Be(e){var t=e.cardBar,n=e.header,a=e.body,i=e.footer;return{cardViewType:"copilot",cardBar:[ae(t)],image:void 0,header:[ie(n)],body:"promptsSet"===a.componentName?[Re(a)]:[ie(a)],footer:[Ue(i)]}}function je(e,t,n){return e&&n||t&&(e||n)?"fixed":"body"}function Ve(e,t,n,a,i){var r=je(t,n,a),o="fixed"===r||"Medium"===i,s=(t||a||n)&&!o;return{isMediumSizedChart:o,isPartialHeightChart:s,showLegend:!o&&!s&&e.series.length>1&&e.series.some(function(e){return"name"in e}),position:r}}function ze(e){return e}var Ge=function(){function e(){}return e.register=function(e,t){this._processors.set(e,t)},e.execute=function(e,t,n){return this._processors.has(e)?this._processors.get(e)(t,n):t},e._processors=new Map,e}();function Ke(e){return e}function We(e,t,n,a){var i=e.data.reduce(function(e,t){return e+t.y},0),r=0,o=e.data.map(function(e){return r<n&&e.showLabel===a?(r++,(0,h.__assign)((0,h.__assign)({},e),{_dataLabel:"fixed"===t||"medium"===t?"".concat((e.y/i*100).toFixed(0),"%"):"".concat(e.x.substring(0,3),":").concat((e.y/i*100).toFixed(0),"%")})):e});return(0,h.__assign)((0,h.__assign)({},e),{data:o})}function qe(e){return e}function Qe(e){return e instanceof Date?e.getTime():e}function Ye(e,t,n,a){return!0===e.showDataLabels&&!t&&!n&&1===e.series.length&&"Large"===a}function Je(e){return $e(e,ze)}function Xe(e){return $e(e,Ke)}function Ze(e){return $e(e,qe)}function $e(e,t){var n,a=e.cardBar,i=e.header,r=e.body,o=e.footer;return n=Array.isArray(r)?1===r.length?[t(r[0])]:[ie(r[0]),t(r[1])]:[t(r)],{cardViewType:"dataVisualization",image:void 0,cardBar:[ae(a)],header:i&&[ie(i)],body:n,footer:o&&ue(o)}}function et(e,t,n,a,i){switch(e.dataVisualizationKind){case"line":return function(e,t,n,a,i){var r=(0,h.__assign)({},e),o=r.series.some(function(e){return e.data.some(function(e){return e.x instanceof Date})})?"date":"number",s=Ve(r,t,n,a,i),c=s.isMediumSizedChart,d=s.isPartialHeightChart,l=s.showLegend,u=s.position;return c&&r.series.length>1&&(r.series=r.series.slice(0,1)),r._metadata={type:o,xLabelsCount:c?3:6,yLabelsCount:d?3:4,showLegend:l,position:u},r}(e,t,n,a,i);case"pie":return function(e,t,n,a,i){var r=je(t,n,a),o=function(e,t,n){return"fixed"===t?{pieChartSize:"fixed",maxCategories:8,maxLabels:4}:n?{pieChartSize:"partial",maxCategories:6,maxLabels:2}:"Medium"===e?{pieChartSize:"medium",maxCategories:6,maxLabels:2}:{pieChartSize:"full",maxCategories:10,maxLabels:6}}(i,r,"body"===r&&(t||n||a)),s=e.series.map(function(e){var t=function(e,t){if(e.data.length<=t)return e;var n=e.data.slice(0,t-1),a={x:"Others",y:e.data.slice(t-1).reduce(function(e,t){return e+t.y},0),color:"#EDEDED",showLabel:!1};return(0,h.__assign)((0,h.__assign)({},e),{data:(0,h.__spreadArray)((0,h.__spreadArray)([],n,!0),[a],!1)})}((0,h.__assign)((0,h.__assign)({},e),{data:(0,h.__spreadArray)([],e.data,!0).sort(function(e,t){return t.y-e.y}).map(function(e){return(0,h.__assign)({},e)})}),o.maxCategories);return function(e,t,n){return e.data.some(function(e){return e.showLabel})?We(e,n,t,!0):We(e,n,t,void 0)}(t,o.maxLabels,o.pieChartSize)});return(0,h.__assign)((0,h.__assign)({},e),{series:[s[0]],_metadata:{position:je(t,n,a),pieChartSize:o.pieChartSize}})}(e,t,n,a,i);case"bar":return function(e,t,n,a,i){var r=(0,h.__assign)({},e),o=Ve(r,t,n,a,i),s=o.isMediumSizedChart,c=o.isPartialHeightChart,d=o.showLegend,l=o.position,u=function(e){for(var t=0,n=e;t<n.length;t++)for(var a=0,i=n[t].data;a<i.length;a++){var r=i[a];if(r.x instanceof Date)return"date";if("string"==typeof r.x)return"string";if("number"==typeof r.x)return"number"}return"number"}(r.series),f=s?r.series.length>1?2:3:5;return r.xAxis=function(e,t,n){var a,i,r=(0,h.__spreadArray)([],null!==(i=null===(a=e.xAxis)||void 0===a?void 0:a.labelValues)&&void 0!==i?i:[],!0);if(0===r.length){for(var o=function(e){for(var t=function(t){r.find(function(n){return Qe(n)===Qe(e.data[t].x)})||r.push(e.data[t].x)},n=e.data.length-1;n>=0;n--)t(n)},s=0,c=e.series;s<c.length;s++)o(c[s]);"date"===t?r.sort(function(e,t){return e.getTime()-t.getTime()}):"number"===t?r.sort(function(e,t){return e-t}):r.reverse()}return r.length>n&&(r=r.slice(r.length-n)),(0,h.__assign)((0,h.__assign)({},e.xAxis),{labelValues:r})}(r,u,f),r.series=function(e){var t,n,a=new Set(null===(n=null===(t=e.xAxis)||void 0===t?void 0:t.labelValues)||void 0===n?void 0:n.map(function(e){return Qe(e)}));return e.series.map(function(e){return(0,h.__assign)((0,h.__assign)({},e),{data:e.data.filter(function(e){return a.has(Qe(e.x))})})})}(r),r._metadata={type:u,xLabelsCount:f,yLabelsCount:c?3:4,showLegend:d,position:l,showDataLabels:Ye(r,c,s,i)},r}(e,t,n,a,i);default:return e}}Ge.register("dataVisualization",function(e,t){var n=(0,h.__assign)({},e);"Medium"===t.cardSize&&(n.header=void 0,n.footer=void 0,2===n.body.length&&(n.body=[n.body[1]]));var a=n.header,i=n.body,r=n.footer,o=!!(null==a?void 0:a.length),s=2===n.body.length,c=!!(null==r?void 0:r.length);return 1===i.length?n.body=[et(i[0],o,s,c,t.cardSize)]:n.body=[i[0],et(i[1],o,s,c,t.cardSize)],n});var tt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,h.__extends)(t,e),t.prototype._getCardViewParameters=function(){var e=this.cardViewParameters;return this.cardViewParameters.cardBar[0].title&&this.cardViewParameters.cardBar[0].icon||(e=(0,h.__assign)((0,h.__assign)({},e),{cardBar:[this._ensureCardBarParameters(e.cardBar[0])]})),Ge.execute(e.cardViewType,e,{cardSize:this.cardSize})},t.prototype._ensureCardBarParameters=function(e){var t,n,a;return(0,h.__assign)((0,h.__assign)({},e),{title:e.title||this._ace.title,icon:{url:(null===(t=e.icon)||void 0===t?void 0:t.url)||this._ace.iconProperty,altText:null===(n=e.icon)||void 0===n?void 0:n.altText,_urlFallback:null===(a=e.icon)||void 0===a?void 0:a._urlFallback}})},t}(F);function nt(n){var a,i,r,o,s=new e._QosMonitor("AdaptiveCardExtension.prepareRenderArgumentsForMessaging");if(t._SPKillSwitch.isActivated("62a9937a-b848-4cfc-b60a-4917cd67eeef")){if("QuickView"===n.lastUpdatedType&&(t._SPKillSwitch.isActivated("b764e8cc-79df-4487-a967-5ade7b428b61")||"AdaptiveCardQuickView"===(null===(i=n.quickLook)||void 0===i?void 0:i.quickViewType))||!(null===(r=n.card)||void 0===r?void 0:r.cardViewParameters))return p=n.quickLook,!m()&&(null===(o=p.focusParameters)||void 0===o?void 0:o._lastFocusedElement)?{renderArguments:(0,h.__assign)((0,h.__assign)({},n),{quickLook:(0,h.__assign)((0,h.__assign)({},p),{focusParameters:(0,h.__assign)((0,h.__assign)({},p.focusParameters),{_lastFocusedElement:void 0})})})}:{renderArguments:n};var c=void 0;if(f=void 0,"QuickView"===n.lastUpdatedType)n.quickLook=it(n.quickLook),c=n.quickLook.quickViewType;else{var d=rt(n.card.cardViewParameters,n.instanceId);b=d[0],g=d[1],n.card.cardViewParameters=b,f=g,c=b.cardViewType}return s.writeSuccess({viewType:c}),{renderArguments:n,eventComponents:f}}var l=n.quickLook,u=n.card,f=void 0;if(l)if("AdaptiveCardQuickView"===l.quickViewType){var p=l;!m()&&(null===(a=p.focusParameters)||void 0===a?void 0:a._lastFocusedElement)&&(l=(0,h.__assign)((0,h.__assign)({},p),{focusParameters:(0,h.__assign)((0,h.__assign)({},p.focusParameters),{_lastFocusedElement:void 0})}))}else l=it(l);if(u){var _=rt(u.cardViewParameters,n.instanceId),b=_[0],g=_[1];u.cardViewParameters=b,f=g}return s.writeSuccess({viewType:"QuickView"===n.lastUpdatedType?l.quickViewType:u.cardViewParameters.cardViewType}),{renderArguments:(0,h.__assign)((0,h.__assign)({},n),{quickLook:l,card:u}),eventComponents:f}}function at(e,t){var n,a=e._getRenderArguments(t);return"Card"===t&&(null===(n=a.card)||void 0===n?void 0:n.cardViewParameters)?nt(a):{renderArguments:a}}function it(e){var t=(0,A.cloneDeep)(e),n=t;return Object.keys(n).forEach(function(e){"function"==typeof n[e]&&delete n[e]}),t}function rt(e,t){var n=function(e){var t=st(e.body),n=st(e.footer);if(t||n)return{body:t,footer:n}}(e);if(!n)return[e,void 0];var a=(0,A.cloneDeep)(e),i=a.body,r=a.footer,o=new Map;return ot(t,"body",i,e.body,n.body,o),ot(t,"footer",r,e.footer,n.footer,o),[a,o]}function ot(e,t,n,a,i,r){n&&i&&n.forEach(function(n,o){var s=i[o];if(s){var c=B(e,t,n,o);n.id=c,n._events=s,s.forEach(function(e){delete n[e]}),r.set(c,a[o])}})}function st(e){if(e){var t=!1,n=e.map(function(e){var n,a=e;return Object.keys(e).forEach(function(e){"function"==typeof a[e]&&(n||(n=[]),n.push(e))}),t=t||!!n,n});if(t)return n}}})(),f})());
|