@microsoft/teams-js 2.29.0-beta.3 → 2.29.1-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/dist/esm/packages/teams-js/src/artifactsForCDN/validDomains.json.js +1 -1
  2. package/dist/esm/packages/teams-js/src/internal/communication.js +1 -1
  3. package/dist/esm/packages/teams-js/src/internal/handlers.js +1 -1
  4. package/dist/esm/packages/teams-js/src/internal/marketplaceUtils.js +1 -1
  5. package/dist/esm/packages/teams-js/src/internal/messageObjects.js +1 -1
  6. package/dist/esm/packages/teams-js/src/internal/validOrigins.js +1 -1
  7. package/dist/esm/packages/teams-js/src/internal/videoEffectsUtils.js +1 -1
  8. package/dist/esm/packages/teams-js/src/private/externalAppAuthenticationForCEA.js +1 -1
  9. package/dist/esm/packages/teams-js/src/private/externalAppCardActionsForCEA.js +1 -1
  10. package/dist/esm/packages/teams-js/src/private/externalAppCommands.js +1 -1
  11. package/dist/esm/packages/teams-js/src/private/messageChannels.js +1 -1
  12. package/dist/esm/packages/teams-js/src/private/videoEffectsEx.js +1 -1
  13. package/dist/esm/packages/teams-js/src/public/clipboard.js +1 -1
  14. package/dist/esm/packages/teams-js/src/public/meeting.js +1 -1
  15. package/dist/esm/packages/teams-js/src/public/runtime.js +1 -1
  16. package/dist/esm/packages/teams-js/src/public/sharing.js +1 -1
  17. package/dist/esm/packages/teams-js/src/public/tasks.js +1 -1
  18. package/dist/esm/packages/teams-js/src/public/version.js +1 -1
  19. package/dist/esm/packages/teams-js/src/public/videoEffects.js +1 -1
  20. package/dist/esm/packages/teams-js/src/public/visualMedia.js +1 -1
  21. package/dist/esm/packages/teams-js/src/public/webStorage.js +1 -1
  22. package/dist/umd/MicrosoftTeams.d.ts +8 -4
  23. package/dist/umd/MicrosoftTeams.js +10 -6
  24. package/dist/umd/MicrosoftTeams.js.map +1 -1
  25. package/dist/umd/MicrosoftTeams.min.js +1 -1
  26. package/dist/umd/MicrosoftTeams.min.js.map +1 -1
  27. package/package.json +1 -1
  28. /package/dist/esm/node_modules/.pnpm/{@rollup_plugin-typescript@11.1.6_rollup@4.22.4_tslib@2.6.3_typescript@4.9.5 → @rollup_plugin-typescript@11.1.6_rollup@4.24.0_tslib@2.6.3_typescript@4.9.5}/node_modules/tslib/tslib.es6.js +0 -0
@@ -1 +1 @@
1
- var o=["teams.microsoft.com","teams.microsoft.us","gov.teams.microsoft.us","dod.teams.microsoft.us","int.teams.microsoft.com","outlook.office.com","outlook-sdf.office.com","outlook.office365.com","outlook-sdf.office365.com","outlook.live.com","outlook-sdf.live.com","teams.live.com","local.teams.live.com","local.teams.live.com:8080","local.teams.office.com","local.teams.office.com:8080","devspaces.skype.com","*.www.office.com","www.office.com","word.office.com","excel.office.com","powerpoint.office.com","www.officeppe.com","*.www.microsoft365.com","www.microsoft365.com","bing.com","edgeservices.bing.com","www.bing.com","www.staging-bing-int.com","*.cloud.microsoft","*.m365.cloud.microsoft","edgeapi.svc.cloud.microsoft","copilot.microsoft.com","windows.msn.com","fa000000125.resources.office.net","fa000000129.resources.office.net","fa000000124.resources.office.net","fa000000128.resources.office.net","fa000000136.resources.office.net"],c={validOrigins:o};export{c as default,o as validOrigins};
1
+ var o=["teams.microsoft.com","teams.microsoft.us","gov.teams.microsoft.us","dod.teams.microsoft.us","int.teams.microsoft.com","outlook.office.com","outlook-sdf.office.com","outlook.office365.com","outlook-sdf.office365.com","outlook.live.com","outlook-sdf.live.com","teams.live.com","local.teams.live.com","local.teams.live.com:8080","local.teams.office.com","local.teams.office.com:8080","devspaces.skype.com","*.www.office.com","www.office.com","word.office.com","excel.office.com","powerpoint.office.com","www.officeppe.com","*.www.microsoft365.com","www.microsoft365.com","bing.com","edgeservices.bing.com","work.bing.com","www.bing.com","www.staging-bing-int.com","*.cloud.microsoft","*.m365.cloud.microsoft","edgeapi.freya.svc.cloud.microsoft","copilot.microsoft.com","windows.msn.com","fa000000125.resources.office.net","fa000000129.resources.office.net","fa000000124.resources.office.net","fa000000128.resources.office.net","fa000000136.resources.office.net"],c={validOrigins:o};export{c as default,o as validOrigins};
@@ -1 +1 @@
1
- import{__awaiter as e}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.22.4_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{getLogger as n,isFollowingApiVersionTagFormat as i,getApiVersionTag as t}from"./telemetry.js";import{latestRuntimeApiVersion as o}from"../public/runtime.js";import{version as s}from"../public/version.js";import{GlobalVars as r}from"./globalVars.js";import{callHandler as a}from"./handlers.js";import{serializeMessageRequest as d,deserializeMessageResponse as c,deserializeMessageRequest as u,serializeMessageResponse as l}from"./messageObjects.js";import{tryPolyfillWithNestedAppAuthBridge as g}from"./nestedAppAuthUtils.js";import{ssrSafeWindow as p}from"./utils.js";import{UUID as f}from"./uuidObject.js";import{validateOrigin as w}from"./validOrigins.js";const m=n("communication");class h{}class W{}function v(n,i){if(W.messageListener=n=>function(n){return e(this,void 0,void 0,(function*(){if(!n||!n.data||"object"!=typeof n.data)return void C("Unrecognized message format received by app, message being ignored. Message: %o",n);const e=n.source||n.originalEvent&&n.originalEvent.source,i=n.origin||n.originalEvent&&n.originalEvent.origin;return N(e,i).then((o=>{o?(function(e,n){r.isFramelessWindow||h.parentWindow&&!h.parentWindow.closed&&e!==h.parentWindow?h.childWindow&&!h.childWindow.closed&&e!==h.childWindow||(h.childWindow=e,h.childOrigin=n):(h.parentWindow=e,h.parentOrigin=n);h.parentWindow&&h.parentWindow.closed&&(h.parentWindow=null,h.parentOrigin=null);h.childWindow&&h.childWindow.closed&&(h.childWindow=null,h.childOrigin=null);K(h.parentWindow),K(h.childWindow)}(e,i),e===h.parentWindow?_(n):e===h.childWindow&&function(e){if("id"in e.data&&"func"in e.data){const n=u(e.data),[i,o]=a(n.func,n.args);i&&void 0!==o?(z("Returning message %s from child back to child, action: %s.",Z(n),n.func),X(n.id,n.uuid,Array.isArray(o)?o:[o])):(z("Relaying message %s from child to parent, action: %s. Relayed message will have a new id.",Z(n),n.func),S(t("v2","tasks.startTask"),n.func,n.args,((...e)=>{if(h.childWindow){const i=e.pop();z("Message from parent being relayed to child, id: %s",Z(n)),X(n.id,n.uuid,e,i)}})))}}(n)):C("Message being ignored by app because it is either coming from the current window or a different window with an invalid origin, message: %o, source: %o, origin: %o",n,e,i)}))}))}(n),h.currentWindow=h.currentWindow||p(),h.parentWindow=h.currentWindow.parent!==h.currentWindow.self?h.currentWindow.parent:h.currentWindow.opener,h.topWindow=h.currentWindow.top,(h.parentWindow||n)&&h.currentWindow.addEventListener("message",W.messageListener,!1),!h.parentWindow){const e=h.currentWindow;if(!e.nativeInterface)return Promise.reject(new Error("Initialization Failed. No Parent window found."));r.isFramelessWindow=!0,e.onNativeMessage=_}try{return h.parentOrigin="*",T(i,"initialize",[s,o,n]).then((([e,n,i,t])=>(g(t,h.currentWindow,{onMessage:Q,sendPostMessage:R}),{context:e,clientType:n,runtimeConfig:i,clientSupportedSDKVersion:t})))}finally{h.parentOrigin=null}}function M(){h.currentWindow&&h.currentWindow.removeEventListener("message",W.messageListener,!1),h.currentWindow=null,h.parentWindow=null,h.parentOrigin=null,h.childWindow=null,h.childOrigin=null,W.parentMessageQueue=[],W.childMessageQueue=[],W.nextMessageId=0,W.callbacks.clear(),W.promiseCallbacks.clear(),W.portCallbacks.clear(),W.legacyMessageIdsToUuidMap={}}function b(e,n,...i){return T(e,n,i).then((([e])=>e))}function y(e,n,...i){return T(e,n,i).then((([e,n])=>{if(!e)throw new Error(n)}))}function k(e,n,i,...t){return T(e,n,t).then((([e,n])=>{if(!e)throw new Error(n||i)}))}function I(e,n,...i){return T(e,n,i).then((([e,n])=>{if(e)throw e;return n}))}function T(e,n,t=void 0){if(!i(e))throw Error(`apiVersionTag: ${e} passed in doesn't follow the pattern starting with 'v' followed by digits, then underscore with words, please check.`);return new Promise((i=>{const o=A(e,n,t);var s;i((s=o.uuid,new Promise((e=>{W.promiseCallbacks.set(s,e)}))))}))}function O(e,n,t=void 0){if(!i(e))throw Error(`apiVersionTag: ${e} passed in doesn't follow the pattern starting with 'v' followed by digits, then underscore with words, please check.`);const o=A(e,n,t);return s=o.uuid,new Promise(((e,n)=>{W.portCallbacks.set(s,((i,t)=>{i instanceof MessagePort?e(i):n(t&&t.length>0?t[0]:new Error("Host responded without port or error details."))}))}));var s}function S(e,n,t,o){let s;if(t instanceof Function?o=t:t instanceof Array&&(s=t),!i(e))throw Error(`apiVersionTag: ${e} passed in doesn't follow the pattern starting with 'v' followed by digits, then underscore with words, please check.`);const r=A(e,n,s);o&&W.callbacks.set(r.uuid,o)}W.parentMessageQueue=[],W.childMessageQueue=[],W.topMessageQueue=[],W.nextMessageId=0,W.callbacks=new Map,W.promiseCallbacks=new Map,W.portCallbacks=new Map,W.legacyMessageIdsToUuidMap={};const j=m.extend("sendNestedAuthRequestToTopWindow");function R(e){const n=j,i=h.topWindow,t=function(e){const n=W.nextMessageId++,i=new f;return W.legacyMessageIdsToUuidMap[n]=i,{id:n,uuid:i,func:"nestedAppAuth.execute",timestamp:Date.now(),args:[],data:e}}(e);return n("Message %s information: %o",Z(t),{actionName:t.func}),P(i,t)}const x=m.extend("sendRequestToTargetWindowHelper");function P(e,n){const i=x,t=J(e),o=d(n);if(r.isFramelessWindow)h.currentWindow&&h.currentWindow.nativeInterface&&(i("Sending message %s to %s via framelessPostMessage interface",Z(o),t),h.currentWindow.nativeInterface.framelessPostMessage(JSON.stringify(o)));else{const s=H(e);e&&s?(i("Sending message %s to %s via postMessage",Z(o),t),e.postMessage(o,s)):(i("Adding message %s to %s message queue",Z(o),t),D(e).push(n))}return n}const E=m.extend("sendMessageToParentHelper");function A(e,n,i){const t=E,o=h.parentWindow,s=function(e,n,i){const t=W.nextMessageId++,o=new f;return W.legacyMessageIdsToUuidMap[t]=o,{id:t,uuid:o,func:n,timestamp:Date.now(),args:i||[],apiVersionTag:e}}(e,n,i);return t("Message %s information: %o",Z(s),{actionName:n,args:i}),P(o,s)}const C=m.extend("processIncomingMessage");const U=m.extend("processAuthBridgeMessage");function Q(e,n){var i,t;const o=U;if(!e||!e.data||"object"!=typeof e.data)return void o("Unrecognized message format received by app, message being ignored. Message: %o",e);const{args:s}=e.data,[,r]=null!=s?s:[],a=(()=>{try{return JSON.parse(r)}catch(e){return null}})();if(!a||"object"!=typeof a||"NestedAppAuthResponse"!==a.messageType)return void o("Unrecognized data format received by app, message being ignored. Message: %o",e);const d=e.source||(null===(i=null==e?void 0:e.originalEvent)||void 0===i?void 0:i.source),c=e.origin||(null===(t=null==e?void 0:e.originalEvent)||void 0===t?void 0:t.origin);d?N(d,c)?(h.topWindow&&!h.topWindow.closed&&d!==h.topWindow||(h.topWindow=d,h.topOrigin=c),h.topWindow&&h.topWindow.closed&&(h.topWindow=null,h.topOrigin=null),K(h.topWindow),n(r)):o("Message being ignored by app because it is either coming from the current window or a different window with an invalid origin"):o("Message being ignored by app because it is coming for a target that is null")}const F=m.extend("shouldProcessIncomingMessage");function N(n,i){return e(this,void 0,void 0,(function*(){if(h.currentWindow&&n===h.currentWindow)return F("Should not process message because it is coming from the current window"),!1;if(h.currentWindow&&h.currentWindow.location&&i&&i===h.currentWindow.location.origin)return!0;{let e;try{e=new URL(i)}catch(e){return F("Message has an invalid origin of %s",i),!1}const n=yield w(e);return n||F("Message has an invalid origin of %s",i),n}}))}const $=m.extend("handleIncomingMessageFromParent");function L(e,n){if(n){const i=[...e].find((([e,i])=>e.toString()===n.toString()));if(i)return i[0]}}function V(e,n){const i=L(n,e.uuid);i&&n.delete(i),e.uuid?W.legacyMessageIdsToUuidMap={}:delete W.legacyMessageIdsToUuidMap[e.id]}function _(e){const n=$;if("id"in e.data&&"number"==typeof e.data.id){const i=e.data,t=c(i),o=function(e){const n=$;if(!e.uuid)return W.legacyMessageIdsToUuidMap[e.id];{const n=e.uuid,i=L(W.callbacks,n);if(i)return i;const t=L(W.promiseCallbacks,n);if(t)return t;const o=L(W.portCallbacks,n);if(o)return o}n("Received message %s that failed to produce a callbackId",Z(e))}(t);if(o){const i=W.callbacks.get(o);n("Received a response from parent for message %s",o.toString()),i&&(n("Invoking the registered callback for message %s with arguments %o",o.toString(),t.args),i.apply(null,[...t.args,t.isPartialResponse]),function(e){return!0===e.data.isPartialResponse}(e)||(n("Removing registered callback for message %s",o.toString()),V(t,W.callbacks)));const s=W.promiseCallbacks.get(o);s&&(n("Invoking the registered promise callback for message %s with arguments %o",o.toString(),t.args),s(t.args),n("Removing registered promise callback for message %s",o.toString()),V(t,W.promiseCallbacks));const r=W.portCallbacks.get(o);if(r){let i;n("Invoking the registered port callback for message %s with arguments %o",o.toString(),t.args),e.ports&&e.ports[0]instanceof MessagePort&&(i=e.ports[0]),r(i,t.args),n("Removing registered port callback for message %s",o.toString()),V(t,W.portCallbacks)}t.uuid&&(W.legacyMessageIdsToUuidMap={})}}else if("func"in e.data&&"string"==typeof e.data.func){const i=e.data;n('Received a message from parent %s, action: "%s"',Z(i),i.func),a(i.func,i.args)}else n("Received an unknown message: %O",e)}const z=m.extend("handleIncomingMessageFromChild");function q(){return h.topWindow!==h.parentWindow}function D(e){return e===h.topWindow&&q()?W.topMessageQueue:e===h.parentWindow?W.parentMessageQueue:e===h.childWindow?W.childMessageQueue:[]}function H(e){return e===h.topWindow&&q()?h.topOrigin:e===h.parentWindow?h.parentOrigin:e===h.childWindow?h.childOrigin:null}function J(e){return e===h.topWindow&&q()?"top":e===h.parentWindow?"parent":e===h.childWindow?"child":null}const B=m.extend("flushMessageQueue");function K(e){const n=H(e),i=D(e),t=J(e);for(;e&&n&&i.length>0;){const o=i.shift();if(o){const i=d(o);B("Flushing message %s from %s message queue via postMessage.",Z(i),t),e.postMessage(i,n)}}}function G(e,n){let i;i=h.currentWindow.setInterval((()=>{0===D(e).length&&(clearInterval(i),n())}),100)}function X(e,n,i,t){const o=h.childWindow,s=function(e,n,i,t){return{id:e,uuid:n,args:i||[],isPartialResponse:t}}(e,n,i,t),r=l(s),a=H(o);o&&a&&o.postMessage(r,a)}function Y(e,n){const i=h.childWindow,t=function(e,n){return{func:e,args:n||[]}}(e,n),o=H(i);i&&o?i.postMessage(t,o):D(i).push(t)}function Z(e){return"uuidAsString"in e?`${e.uuidAsString} (legacy id: ${e.id})`:"uuid"in e&&void 0!==e.uuid?`${e.uuid.toString()} (legacy id: ${e.id})`:`legacy id: ${e.id} (no uuid)`}export{h as Communication,v as initializeCommunication,O as requestPortFromParentWithVersion,I as sendAndHandleSdkError,y as sendAndHandleStatusAndReason,k as sendAndHandleStatusAndReasonWithDefaultError,b as sendAndUnwrap,Y as sendMessageEventToChild,S as sendMessageToParent,T as sendMessageToParentAsync,R as sendNestedAuthRequestToTopWindow,M as uninitializeCommunication,G as waitForMessageQueue};
1
+ import{__awaiter as e}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.24.0_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{getLogger as n,isFollowingApiVersionTagFormat as i,getApiVersionTag as t}from"./telemetry.js";import{latestRuntimeApiVersion as o}from"../public/runtime.js";import{version as s}from"../public/version.js";import{GlobalVars as r}from"./globalVars.js";import{callHandler as a}from"./handlers.js";import{serializeMessageRequest as d,deserializeMessageResponse as c,deserializeMessageRequest as u,serializeMessageResponse as l}from"./messageObjects.js";import{tryPolyfillWithNestedAppAuthBridge as g}from"./nestedAppAuthUtils.js";import{ssrSafeWindow as p}from"./utils.js";import{UUID as f}from"./uuidObject.js";import{validateOrigin as w}from"./validOrigins.js";const m=n("communication");class h{}class W{}function v(n,i){if(W.messageListener=n=>function(n){return e(this,void 0,void 0,(function*(){if(!n||!n.data||"object"!=typeof n.data)return void C("Unrecognized message format received by app, message being ignored. Message: %o",n);const e=n.source||n.originalEvent&&n.originalEvent.source,i=n.origin||n.originalEvent&&n.originalEvent.origin;return N(e,i).then((o=>{o?(function(e,n){r.isFramelessWindow||h.parentWindow&&!h.parentWindow.closed&&e!==h.parentWindow?h.childWindow&&!h.childWindow.closed&&e!==h.childWindow||(h.childWindow=e,h.childOrigin=n):(h.parentWindow=e,h.parentOrigin=n);h.parentWindow&&h.parentWindow.closed&&(h.parentWindow=null,h.parentOrigin=null);h.childWindow&&h.childWindow.closed&&(h.childWindow=null,h.childOrigin=null);K(h.parentWindow),K(h.childWindow)}(e,i),e===h.parentWindow?_(n):e===h.childWindow&&function(e){if("id"in e.data&&"func"in e.data){const n=u(e.data),[i,o]=a(n.func,n.args);i&&void 0!==o?(z("Returning message %s from child back to child, action: %s.",Z(n),n.func),X(n.id,n.uuid,Array.isArray(o)?o:[o])):(z("Relaying message %s from child to parent, action: %s. Relayed message will have a new id.",Z(n),n.func),S(t("v2","tasks.startTask"),n.func,n.args,((...e)=>{if(h.childWindow){const i=e.pop();z("Message from parent being relayed to child, id: %s",Z(n)),X(n.id,n.uuid,e,i)}})))}}(n)):C("Message being ignored by app because it is either coming from the current window or a different window with an invalid origin, message: %o, source: %o, origin: %o",n,e,i)}))}))}(n),h.currentWindow=h.currentWindow||p(),h.parentWindow=h.currentWindow.parent!==h.currentWindow.self?h.currentWindow.parent:h.currentWindow.opener,h.topWindow=h.currentWindow.top,(h.parentWindow||n)&&h.currentWindow.addEventListener("message",W.messageListener,!1),!h.parentWindow){const e=h.currentWindow;if(!e.nativeInterface)return Promise.reject(new Error("Initialization Failed. No Parent window found."));r.isFramelessWindow=!0,e.onNativeMessage=_}try{return h.parentOrigin="*",T(i,"initialize",[s,o,n]).then((([e,n,i,t])=>(g(t,h.currentWindow,{onMessage:Q,sendPostMessage:R}),{context:e,clientType:n,runtimeConfig:i,clientSupportedSDKVersion:t})))}finally{h.parentOrigin=null}}function M(){h.currentWindow&&h.currentWindow.removeEventListener("message",W.messageListener,!1),h.currentWindow=null,h.parentWindow=null,h.parentOrigin=null,h.childWindow=null,h.childOrigin=null,W.parentMessageQueue=[],W.childMessageQueue=[],W.nextMessageId=0,W.callbacks.clear(),W.promiseCallbacks.clear(),W.portCallbacks.clear(),W.legacyMessageIdsToUuidMap={}}function b(e,n,...i){return T(e,n,i).then((([e])=>e))}function y(e,n,...i){return T(e,n,i).then((([e,n])=>{if(!e)throw new Error(n)}))}function k(e,n,i,...t){return T(e,n,t).then((([e,n])=>{if(!e)throw new Error(n||i)}))}function I(e,n,...i){return T(e,n,i).then((([e,n])=>{if(e)throw e;return n}))}function T(e,n,t=void 0){if(!i(e))throw Error(`apiVersionTag: ${e} passed in doesn't follow the pattern starting with 'v' followed by digits, then underscore with words, please check.`);return new Promise((i=>{const o=A(e,n,t);var s;i((s=o.uuid,new Promise((e=>{W.promiseCallbacks.set(s,e)}))))}))}function O(e,n,t=void 0){if(!i(e))throw Error(`apiVersionTag: ${e} passed in doesn't follow the pattern starting with 'v' followed by digits, then underscore with words, please check.`);const o=A(e,n,t);return s=o.uuid,new Promise(((e,n)=>{W.portCallbacks.set(s,((i,t)=>{i instanceof MessagePort?e(i):n(t&&t.length>0?t[0]:new Error("Host responded without port or error details."))}))}));var s}function S(e,n,t,o){let s;if(t instanceof Function?o=t:t instanceof Array&&(s=t),!i(e))throw Error(`apiVersionTag: ${e} passed in doesn't follow the pattern starting with 'v' followed by digits, then underscore with words, please check.`);const r=A(e,n,s);o&&W.callbacks.set(r.uuid,o)}W.parentMessageQueue=[],W.childMessageQueue=[],W.topMessageQueue=[],W.nextMessageId=0,W.callbacks=new Map,W.promiseCallbacks=new Map,W.portCallbacks=new Map,W.legacyMessageIdsToUuidMap={};const j=m.extend("sendNestedAuthRequestToTopWindow");function R(e){const n=j,i=h.topWindow,t=function(e){const n=W.nextMessageId++,i=new f;return W.legacyMessageIdsToUuidMap[n]=i,{id:n,uuid:i,func:"nestedAppAuth.execute",timestamp:Date.now(),args:[],data:e}}(e);return n("Message %s information: %o",Z(t),{actionName:t.func}),P(i,t)}const x=m.extend("sendRequestToTargetWindowHelper");function P(e,n){const i=x,t=J(e),o=d(n);if(r.isFramelessWindow)h.currentWindow&&h.currentWindow.nativeInterface&&(i("Sending message %s to %s via framelessPostMessage interface",Z(o),t),h.currentWindow.nativeInterface.framelessPostMessage(JSON.stringify(o)));else{const s=H(e);e&&s?(i("Sending message %s to %s via postMessage",Z(o),t),e.postMessage(o,s)):(i("Adding message %s to %s message queue",Z(o),t),D(e).push(n))}return n}const E=m.extend("sendMessageToParentHelper");function A(e,n,i){const t=E,o=h.parentWindow,s=function(e,n,i){const t=W.nextMessageId++,o=new f;return W.legacyMessageIdsToUuidMap[t]=o,{id:t,uuid:o,func:n,timestamp:Date.now(),args:i||[],apiVersionTag:e}}(e,n,i);return t("Message %s information: %o",Z(s),{actionName:n,args:i}),P(o,s)}const C=m.extend("processIncomingMessage");const U=m.extend("processAuthBridgeMessage");function Q(e,n){var i,t;const o=U;if(!e||!e.data||"object"!=typeof e.data)return void o("Unrecognized message format received by app, message being ignored. Message: %o",e);const{args:s}=e.data,[,r]=null!=s?s:[],a=(()=>{try{return JSON.parse(r)}catch(e){return null}})();if(!a||"object"!=typeof a||"NestedAppAuthResponse"!==a.messageType)return void o("Unrecognized data format received by app, message being ignored. Message: %o",e);const d=e.source||(null===(i=null==e?void 0:e.originalEvent)||void 0===i?void 0:i.source),c=e.origin||(null===(t=null==e?void 0:e.originalEvent)||void 0===t?void 0:t.origin);d?N(d,c)?(h.topWindow&&!h.topWindow.closed&&d!==h.topWindow||(h.topWindow=d,h.topOrigin=c),h.topWindow&&h.topWindow.closed&&(h.topWindow=null,h.topOrigin=null),K(h.topWindow),n(r)):o("Message being ignored by app because it is either coming from the current window or a different window with an invalid origin"):o("Message being ignored by app because it is coming for a target that is null")}const F=m.extend("shouldProcessIncomingMessage");function N(n,i){return e(this,void 0,void 0,(function*(){if(h.currentWindow&&n===h.currentWindow)return F("Should not process message because it is coming from the current window"),!1;if(h.currentWindow&&h.currentWindow.location&&i&&i===h.currentWindow.location.origin)return!0;{let e;try{e=new URL(i)}catch(e){return F("Message has an invalid origin of %s",i),!1}const n=yield w(e);return n||F("Message has an invalid origin of %s",i),n}}))}const $=m.extend("handleIncomingMessageFromParent");function L(e,n){if(n){const i=[...e].find((([e,i])=>e.toString()===n.toString()));if(i)return i[0]}}function V(e,n){const i=L(n,e.uuid);i&&n.delete(i),e.uuid?W.legacyMessageIdsToUuidMap={}:delete W.legacyMessageIdsToUuidMap[e.id]}function _(e){const n=$;if("id"in e.data&&"number"==typeof e.data.id){const i=e.data,t=c(i),o=function(e){const n=$;if(!e.uuid)return W.legacyMessageIdsToUuidMap[e.id];{const n=e.uuid,i=L(W.callbacks,n);if(i)return i;const t=L(W.promiseCallbacks,n);if(t)return t;const o=L(W.portCallbacks,n);if(o)return o}n("Received message %s that failed to produce a callbackId",Z(e))}(t);if(o){const i=W.callbacks.get(o);n("Received a response from parent for message %s",o.toString()),i&&(n("Invoking the registered callback for message %s with arguments %o",o.toString(),t.args),i.apply(null,[...t.args,t.isPartialResponse]),function(e){return!0===e.data.isPartialResponse}(e)||(n("Removing registered callback for message %s",o.toString()),V(t,W.callbacks)));const s=W.promiseCallbacks.get(o);s&&(n("Invoking the registered promise callback for message %s with arguments %o",o.toString(),t.args),s(t.args),n("Removing registered promise callback for message %s",o.toString()),V(t,W.promiseCallbacks));const r=W.portCallbacks.get(o);if(r){let i;n("Invoking the registered port callback for message %s with arguments %o",o.toString(),t.args),e.ports&&e.ports[0]instanceof MessagePort&&(i=e.ports[0]),r(i,t.args),n("Removing registered port callback for message %s",o.toString()),V(t,W.portCallbacks)}t.uuid&&(W.legacyMessageIdsToUuidMap={})}}else if("func"in e.data&&"string"==typeof e.data.func){const i=e.data;n('Received a message from parent %s, action: "%s"',Z(i),i.func),a(i.func,i.args)}else n("Received an unknown message: %O",e)}const z=m.extend("handleIncomingMessageFromChild");function q(){return h.topWindow!==h.parentWindow}function D(e){return e===h.topWindow&&q()?W.topMessageQueue:e===h.parentWindow?W.parentMessageQueue:e===h.childWindow?W.childMessageQueue:[]}function H(e){return e===h.topWindow&&q()?h.topOrigin:e===h.parentWindow?h.parentOrigin:e===h.childWindow?h.childOrigin:null}function J(e){return e===h.topWindow&&q()?"top":e===h.parentWindow?"parent":e===h.childWindow?"child":null}const B=m.extend("flushMessageQueue");function K(e){const n=H(e),i=D(e),t=J(e);for(;e&&n&&i.length>0;){const o=i.shift();if(o){const i=d(o);B("Flushing message %s from %s message queue via postMessage.",Z(i),t),e.postMessage(i,n)}}}function G(e,n){let i;i=h.currentWindow.setInterval((()=>{0===D(e).length&&(clearInterval(i),n())}),100)}function X(e,n,i,t){const o=h.childWindow,s=function(e,n,i,t){return{id:e,uuid:n,args:i||[],isPartialResponse:t}}(e,n,i,t),r=l(s),a=H(o);o&&a&&o.postMessage(r,a)}function Y(e,n){const i=h.childWindow,t=function(e,n){return{func:e,args:n||[]}}(e,n),o=H(i);i&&o?i.postMessage(t,o):D(i).push(t)}function Z(e){return"uuidAsString"in e?`${e.uuidAsString} (legacy id: ${e.id})`:"uuid"in e&&void 0!==e.uuid?`${e.uuid.toString()} (legacy id: ${e.id})`:`legacy id: ${e.id} (no uuid)`}export{h as Communication,v as initializeCommunication,O as requestPortFromParentWithVersion,I as sendAndHandleSdkError,y as sendAndHandleStatusAndReason,k as sendAndHandleStatusAndReasonWithDefaultError,b as sendAndUnwrap,Y as sendMessageEventToChild,S as sendMessageToParent,T as sendMessageToParentAsync,R as sendNestedAuthRequestToTopWindow,M as uninitializeCommunication,G as waitForMessageQueue};
@@ -1 +1 @@
1
- import{__awaiter as e}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.22.4_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{getLogger as n,getApiVersionTag as r}from"./telemetry.js";import{pages as l}from"../public/pages.js";import{runtime as a}from"../public/runtime.js";import{sendMessageToParent as d,Communication as o,sendMessageEventToChild as i}from"./communication.js";import{ensureInitialized as t}from"./internalAPIs.js";import{isNullOrUndefined as s}from"./typeCheckUtilities.js";const u=n("handlers");class f{static initializeHandlers(){f.handlers.themeChange=y,f.handlers.load=w,f.handlers.beforeUnload=O,l.backStack._initialize()}static uninitializeHandlers(){f.handlers={},f.themeChangeHandler=null,f.loadHandler=null,f.beforeUnloadHandler=null,f.beforeSuspendOrTerminateHandler=null,f.resumeHandler=null}}function m(){f.initializeHandlers()}function c(){f.uninitializeHandlers()}f.handlers={},f.themeChangeHandler=null,f.loadHandler=null,f.beforeUnloadHandler=null,f.beforeSuspendOrTerminateHandler=null,f.resumeHandler=null;const h=u.extend("callHandler");function H(e,n){const r=f.handlers[e];if(r){h("Invoking the registered handler for message %s with arguments %o",e,n);return[!0,r.apply(this,n)]}return o.childWindow?(i(e,n),[!1,void 0]):(h("Handler for action message %s not found.",e),[!1,void 0])}function p(e,n,r,l=!0,a=[]){r?(f.handlers[n]=r,l&&d(e,"registerHandler",[n,...a])):delete f.handlers[n]}function g(e){delete f.handlers[e]}function b(e){return null!=f.handlers[e]}function U(e,n,r,l,d){r&&t(a,...l),d&&d(),p(e,n,r)}function v(e,n){f.themeChangeHandler=n,!s(n)&&d(e,"registerHandler",["themeChange"])}function y(e){f.themeChangeHandler&&f.themeChangeHandler(e),o.childWindow&&i("themeChange",[e])}function C(e,n){f.loadHandler=n,!s(n)&&d(e,"registerHandler",["load"])}function w(e){const n={entityId:(r=e).entityId,contentUrl:new URL(r.contentUrl)};var r;f.resumeHandler?(f.resumeHandler(n),o.childWindow&&i("load",[n])):f.loadHandler&&(f.loadHandler(e),o.childWindow&&i("load",[e]))}function j(e,n){f.beforeUnloadHandler=n,!s(n)&&d(e,"registerHandler",["beforeUnload"])}function O(){return e(this,void 0,void 0,(function*(){const e=()=>{d(r("v2","handleBeforeUnload"),"readyToUnload",[])};f.beforeSuspendOrTerminateHandler?(yield f.beforeSuspendOrTerminateHandler(),o.childWindow?i("beforeUnload"):e()):f.beforeUnloadHandler&&f.beforeUnloadHandler(e)||(o.childWindow?i("beforeUnload"):e())}))}function S(e){f.beforeSuspendOrTerminateHandler=e,!s(e)&&d(r("v2","registerBeforeSuspendOrTerminateHandler"),"registerHandler",["beforeUnload"])}function T(e){f.resumeHandler=e,!s(e)&&d(r("v2","registerOnResumeHandler"),"registerHandler",["load"])}export{H as callHandler,b as doesHandlerExist,y as handleThemeChange,m as initializeHandlers,S as registerBeforeSuspendOrTerminateHandler,j as registerBeforeUnloadHandler,p as registerHandler,U as registerHandlerHelper,C as registerOnLoadHandler,T as registerOnResumeHandler,v as registerOnThemeChangeHandler,g as removeHandler,c as uninitializeHandlers};
1
+ import{__awaiter as e}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.24.0_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{getLogger as n,getApiVersionTag as r}from"./telemetry.js";import{pages as l}from"../public/pages.js";import{runtime as a}from"../public/runtime.js";import{sendMessageToParent as d,Communication as o,sendMessageEventToChild as i}from"./communication.js";import{ensureInitialized as t}from"./internalAPIs.js";import{isNullOrUndefined as s}from"./typeCheckUtilities.js";const u=n("handlers");class f{static initializeHandlers(){f.handlers.themeChange=y,f.handlers.load=w,f.handlers.beforeUnload=O,l.backStack._initialize()}static uninitializeHandlers(){f.handlers={},f.themeChangeHandler=null,f.loadHandler=null,f.beforeUnloadHandler=null,f.beforeSuspendOrTerminateHandler=null,f.resumeHandler=null}}function m(){f.initializeHandlers()}function c(){f.uninitializeHandlers()}f.handlers={},f.themeChangeHandler=null,f.loadHandler=null,f.beforeUnloadHandler=null,f.beforeSuspendOrTerminateHandler=null,f.resumeHandler=null;const h=u.extend("callHandler");function H(e,n){const r=f.handlers[e];if(r){h("Invoking the registered handler for message %s with arguments %o",e,n);return[!0,r.apply(this,n)]}return o.childWindow?(i(e,n),[!1,void 0]):(h("Handler for action message %s not found.",e),[!1,void 0])}function p(e,n,r,l=!0,a=[]){r?(f.handlers[n]=r,l&&d(e,"registerHandler",[n,...a])):delete f.handlers[n]}function g(e){delete f.handlers[e]}function b(e){return null!=f.handlers[e]}function U(e,n,r,l,d){r&&t(a,...l),d&&d(),p(e,n,r)}function v(e,n){f.themeChangeHandler=n,!s(n)&&d(e,"registerHandler",["themeChange"])}function y(e){f.themeChangeHandler&&f.themeChangeHandler(e),o.childWindow&&i("themeChange",[e])}function C(e,n){f.loadHandler=n,!s(n)&&d(e,"registerHandler",["load"])}function w(e){const n={entityId:(r=e).entityId,contentUrl:new URL(r.contentUrl)};var r;f.resumeHandler?(f.resumeHandler(n),o.childWindow&&i("load",[n])):f.loadHandler&&(f.loadHandler(e),o.childWindow&&i("load",[e]))}function j(e,n){f.beforeUnloadHandler=n,!s(n)&&d(e,"registerHandler",["beforeUnload"])}function O(){return e(this,void 0,void 0,(function*(){const e=()=>{d(r("v2","handleBeforeUnload"),"readyToUnload",[])};f.beforeSuspendOrTerminateHandler?(yield f.beforeSuspendOrTerminateHandler(),o.childWindow?i("beforeUnload"):e()):f.beforeUnloadHandler&&f.beforeUnloadHandler(e)||(o.childWindow?i("beforeUnload"):e())}))}function S(e){f.beforeSuspendOrTerminateHandler=e,!s(e)&&d(r("v2","registerBeforeSuspendOrTerminateHandler"),"registerHandler",["beforeUnload"])}function T(e){f.resumeHandler=e,!s(e)&&d(r("v2","registerOnResumeHandler"),"registerHandler",["load"])}export{H as callHandler,b as doesHandlerExist,y as handleThemeChange,m as initializeHandlers,S as registerBeforeSuspendOrTerminateHandler,j as registerBeforeUnloadHandler,p as registerHandler,U as registerHandlerHelper,C as registerOnLoadHandler,T as registerOnResumeHandler,v as registerOnThemeChangeHandler,g as removeHandler,c as uninitializeHandlers};
@@ -1 +1 @@
1
- import{__rest as r}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.22.4_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{marketplace as e}from"../public/marketplace.js";import t from"../../../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-browser/validate.js";function o(r){try{return r.cartItems=s(r.cartItems),r}catch(r){throw new Error("Error deserializing cart")}}function s(r){return r.map((r=>{if(r.imageURL){const e=new URL(r.imageURL);r.imageURL=e}return r.accessories&&(r.accessories=s(r.accessories)),r}))}const i=e=>{try{return e.map((e=>{const{imageURL:t,accessories:o}=e,s=r(e,["imageURL","accessories"]),n=Object.assign({},s);return t&&(n.imageURL=t.href),o&&(n.accessories=i(o)),n}))}catch(r){throw new Error("Error serializing cart items")}};function n(r){if(!Array.isArray(r)||0===r.length)throw new Error("cartItems must be a non-empty array");for(const e of r)c(e),a(e.accessories)}function a(r){if(null!=r){if(!Array.isArray(r)||0===r.length)throw new Error("CartItem.accessories must be a non-empty array");for(const e of r){if(e.accessories)throw new Error("Item in CartItem.accessories cannot have accessories");c(e)}}}function c(r){if(!r.id)throw new Error("cartItem.id must not be empty");if(!r.name)throw new Error("cartItem.name must not be empty");u(r.price),f(r.quantity)}function m(r){if(null!=r){if(!r)throw new Error("id must not be empty");if(!1===t(r))throw new Error("id must be a valid UUID")}}function u(r){if("number"!=typeof r||r<0)throw new Error(`price ${r} must be a number not less than 0`);if(parseFloat(r.toFixed(3))!==r)throw new Error(`price ${r} must have at most 3 decimal places`)}function f(r){if("number"!=typeof r||r<=0||parseInt(r.toString())!==r)throw new Error(`quantity ${r} must be an integer greater than 0`)}function p(r){if(!Object.values(e.CartStatus).includes(r))throw new Error(`cartStatus ${r} is not valid`)}export{o as deserializeCart,s as deserializeCartItems,i as serializeCartItems,a as validateAccessoryItems,c as validateBasicCartItem,n as validateCartItems,p as validateCartStatus,u as validatePrice,f as validateQuantity,m as validateUuid};
1
+ import{__rest as r}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.24.0_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{marketplace as e}from"../public/marketplace.js";import t from"../../../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-browser/validate.js";function o(r){try{return r.cartItems=s(r.cartItems),r}catch(r){throw new Error("Error deserializing cart")}}function s(r){return r.map((r=>{if(r.imageURL){const e=new URL(r.imageURL);r.imageURL=e}return r.accessories&&(r.accessories=s(r.accessories)),r}))}const i=e=>{try{return e.map((e=>{const{imageURL:t,accessories:o}=e,s=r(e,["imageURL","accessories"]),n=Object.assign({},s);return t&&(n.imageURL=t.href),o&&(n.accessories=i(o)),n}))}catch(r){throw new Error("Error serializing cart items")}};function n(r){if(!Array.isArray(r)||0===r.length)throw new Error("cartItems must be a non-empty array");for(const e of r)c(e),a(e.accessories)}function a(r){if(null!=r){if(!Array.isArray(r)||0===r.length)throw new Error("CartItem.accessories must be a non-empty array");for(const e of r){if(e.accessories)throw new Error("Item in CartItem.accessories cannot have accessories");c(e)}}}function c(r){if(!r.id)throw new Error("cartItem.id must not be empty");if(!r.name)throw new Error("cartItem.name must not be empty");u(r.price),f(r.quantity)}function m(r){if(null!=r){if(!r)throw new Error("id must not be empty");if(!1===t(r))throw new Error("id must be a valid UUID")}}function u(r){if("number"!=typeof r||r<0)throw new Error(`price ${r} must be a number not less than 0`);if(parseFloat(r.toFixed(3))!==r)throw new Error(`price ${r} must have at most 3 decimal places`)}function f(r){if("number"!=typeof r||r<=0||parseInt(r.toString())!==r)throw new Error(`quantity ${r} must be an integer greater than 0`)}function p(r){if(!Object.values(e.CartStatus).includes(r))throw new Error(`cartStatus ${r} is not valid`)}export{o as deserializeCart,s as deserializeCartItems,i as serializeCartItems,a as validateAccessoryItems,c as validateBasicCartItem,n as validateCartItems,p as validateCartStatus,u as validatePrice,f as validateQuantity,m as validateUuid};
@@ -1 +1 @@
1
- import{__rest as i}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.22.4_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{UUID as t}from"./uuidObject.js";const s=t=>{const{uuid:s}=t,u=i(t,["uuid"]),n=null==s?void 0:s.toString();return Object.assign(Object.assign({},u),{uuidAsString:n})},u=s=>{const{uuidAsString:u}=s,n=i(s,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:u?new t(u):void 0})},n=s=>{const{uuidAsString:u}=s,n=i(s,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:u?new t(u):void 0})},r=t=>{const{uuid:s}=t,u=i(t,["uuid"]),n=null==s?void 0:s.toString();return Object.assign(Object.assign({},u),{uuidAsString:n})};export{u as deserializeMessageRequest,n as deserializeMessageResponse,s as serializeMessageRequest,r as serializeMessageResponse};
1
+ import{__rest as i}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.24.0_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{UUID as t}from"./uuidObject.js";const s=t=>{const{uuid:s}=t,u=i(t,["uuid"]),n=null==s?void 0:s.toString();return Object.assign(Object.assign({},u),{uuidAsString:n})},u=s=>{const{uuidAsString:u}=s,n=i(s,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:u?new t(u):void 0})},n=s=>{const{uuidAsString:u}=s,n=i(s,["uuidAsString"]);return Object.assign(Object.assign({},n),{uuid:u?new t(u):void 0})},r=t=>{const{uuid:s}=t,u=i(t,["uuid"]),n=null==s?void 0:s.toString();return Object.assign(Object.assign({},u),{uuidAsString:n})};export{u as deserializeMessageRequest,n as deserializeMessageResponse,s as serializeMessageRequest,r as serializeMessageResponse};
@@ -1 +1 @@
1
- import{__awaiter as i}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.22.4_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{validOriginsCdnEndpoint as t,validOriginsFallback as r}from"./constants.js";import{GlobalVars as n}from"./globalVars.js";import{getLogger as s}from"./telemetry.js";import{inServerSideRenderingEnvironment as o,isValidHttpsURL as e}from"./utils.js";let l=[];const a=s("validateOrigin");function u(){return i(this,void 0,void 0,(function*(){yield d()}))}function d(){return i(this,void 0,void 0,(function*(){return 0!==l.length?l:o()?(l=r,r):fetch(t).then((i=>{if(!i.ok)throw new Error("Invalid Response from Fetch Call");return i.json().then((i=>{if(function(i){let t=JSON.parse(i);try{t=JSON.parse(i)}catch(i){return!1}if(!t.validOrigins)return!1;for(const i of t.validOrigins)try{new URL("https://"+i)}catch(t){return a("isValidOriginsFromCDN call failed to validate origin: %s",i),!1}return!0}(JSON.stringify(i)))return l=i.validOrigins,l;throw new Error("Valid Origins List Is Invalid")}))})).catch((i=>(a("validOrigins fetch call to CDN failed with error: %s. Defaulting to fallback list",i),l=r,l)))}))}function c(i,t){if("*."===i.substring(0,2)){const r=i.substring(1);if(t.length>r.length&&t.split(".").length===r.split(".").length&&t.substring(t.length-r.length)===r)return!0}else if(i===t)return!0;return!1}function f(i){return d().then((t=>{if(!e(i))return a("Origin %s is invalid because it is not using https protocol. Protocol being used: %s",i,i.protocol),!1;const r=i.host;if(t.some((i=>c(i,r))))return!0;for(const i of n.additionalValidOrigins){if(c("https://"===i.substring(0,8)?i.substring(8):i,r))return!0}return a("Origin %s is invalid because it is not an origin approved by this library or included in the call to app.initialize.\nOrigins approved by this library: %o\nOrigins included in app.initialize: %o",i,t,n.additionalValidOrigins),!1}))}export{u as prefetchOriginsFromCDN,f as validateOrigin};
1
+ import{__awaiter as i}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.24.0_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{validOriginsCdnEndpoint as t,validOriginsFallback as r}from"./constants.js";import{GlobalVars as n}from"./globalVars.js";import{getLogger as s}from"./telemetry.js";import{inServerSideRenderingEnvironment as o,isValidHttpsURL as e}from"./utils.js";let l=[];const a=s("validateOrigin");function u(){return i(this,void 0,void 0,(function*(){yield d()}))}function d(){return i(this,void 0,void 0,(function*(){return 0!==l.length?l:o()?(l=r,r):fetch(t).then((i=>{if(!i.ok)throw new Error("Invalid Response from Fetch Call");return i.json().then((i=>{if(function(i){let t=JSON.parse(i);try{t=JSON.parse(i)}catch(i){return!1}if(!t.validOrigins)return!1;for(const i of t.validOrigins)try{new URL("https://"+i)}catch(t){return a("isValidOriginsFromCDN call failed to validate origin: %s",i),!1}return!0}(JSON.stringify(i)))return l=i.validOrigins,l;throw new Error("Valid Origins List Is Invalid")}))})).catch((i=>(a("validOrigins fetch call to CDN failed with error: %s. Defaulting to fallback list",i),l=r,l)))}))}function c(i,t){if("*."===i.substring(0,2)){const r=i.substring(1);if(t.length>r.length&&t.split(".").length===r.split(".").length&&t.substring(t.length-r.length)===r)return!0}else if(i===t)return!0;return!1}function f(i){return d().then((t=>{if(!e(i))return a("Origin %s is invalid because it is not using https protocol. Protocol being used: %s",i,i.protocol),!1;const r=i.host;if(t.some((i=>c(i,r))))return!0;for(const i of n.additionalValidOrigins){if(c("https://"===i.substring(0,8)?i.substring(8):i,r))return!0}return a("Origin %s is invalid because it is not an origin approved by this library or included in the call to app.initialize.\nOrigins approved by this library: %o\nOrigins included in app.initialize: %o",i,t,n.additionalValidOrigins),!1}))}export{u as prefetchOriginsFromCDN,f as validateOrigin};
@@ -1 +1 @@
1
- import{__awaiter as e}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.22.4_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{errorNotSupportedOnPlatform as t}from"../public/constants.js";import{videoEffects as r}from"../public/videoEffects.js";import{sendMessageToParent as i}from"./communication.js";import{registerHandler as o}from"./handlers.js";import{getApiVersionTag as a}from"./telemetry.js";import{inServerSideRenderingEnvironment as n,ssrSafeWindow as s}from"./utils.js";const d="v2";function h(t,r,i,o){var a,s;return e(this,void 0,void 0,(function*(){const e=u();!n()&&(null===(s=null===(a=window.chrome)||void 0===a?void 0:a.webview)||void 0===s||s.registerTextureStream(t,e)),l(yield f(t,i,o),new m(i,r),e.writable)}))}function c(t,r,i,o){var a,s;return e(this,void 0,void 0,(function*(){const e=u();!n()&&(null===(s=null===(a=window.chrome)||void 0===a?void 0:a.webview)||void 0===s||s.registerTextureStream(t,e)),l(yield f(t,i,o),new v(i,r),e.writable)}))}function f(r,i,o){return e(this,void 0,void 0,(function*(){if(n())throw t;const e=s().chrome;try{null==o||o.reportGettingTextureStream(r);const t=(yield e.webview.getTextureStream(r)).getVideoTracks();if(0===t.length)throw new Error(`No video track in stream ${r}`);return null==o||o.reportTextureStreamAcquired(),t[0]}catch(e){throw i(`Failed to get video track from stream ${r}, error: ${e}`),new Error(`Internal error: can't get video track from stream ${r}`)}}))}function u(){if(n())throw t;const e=window.MediaStreamTrackGenerator;if(!e)throw t;return new e({kind:"video"})}function l(e,t,r){new(0,s().MediaStreamTrackProcessor)({track:e}).readable.pipeThrough(new TransformStream(t)).pipeTo(r)}class m{constructor(t,r){this.notifyError=t,this.videoFrameHandler=r,this.transform=(t,r)=>e(this,void 0,void 0,(function*(){const e=t.timestamp;if(null!==e)try{const i=yield this.videoFrameHandler({videoFrame:t}),o=new VideoFrame(i,{timestamp:e});r.enqueue(o),t.close(),i.close()}catch(e){t.close(),this.notifyError(e)}else this.notifyError("timestamp of the original video frame is null")}))}}class w{constructor(e,t){if(this.headerBuffer=e,this.notifyError=t,this.ONE_TEXTURE_INPUT_ID=1869900081,this.INVALID_HEADER_ERROR="Invalid video frame header",this.UNSUPPORTED_LAYOUT_ERROR="Unsupported texture layout",this.headerDataView=new Uint32Array(e),this.headerDataView.length<8)throw this.notifyError(this.INVALID_HEADER_ERROR),new Error(this.INVALID_HEADER_ERROR);if(this.headerDataView[0]!==this.ONE_TEXTURE_INPUT_ID)throw this.notifyError(this.UNSUPPORTED_LAYOUT_ERROR),new Error(this.UNSUPPORTED_LAYOUT_ERROR)}get oneTextureLayoutId(){return this.headerDataView[0]}get version(){return this.headerDataView[1]}get frameRowOffset(){return this.headerDataView[2]}get frameFormat(){return this.headerDataView[3]}get frameWidth(){return this.headerDataView[4]}get frameHeight(){return this.headerDataView[5]}get multiStreamHeaderRowOffset(){return this.headerDataView[6]}get multiStreamCount(){return this.headerDataView[7]}}class E{constructor(e,t){this.metadataMap=new Map,this.AUDIO_INFERENCE_RESULT_STREAM_ID=828664161,this.ATTRIBUTE_ID_MAP_STREAM_ID=1296320833;const r=new Uint32Array(e);for(let i=0,o=0;i<t;i++){const t=r[o++],i=r[o++],a=r[o++],n=new Uint8Array(e,i,a);this.metadataMap.set(t,n)}}get audioInferenceResult(){return this.metadataMap.get(this.AUDIO_INFERENCE_RESULT_STREAM_ID)}get attributes(){const e=this.metadataMap.get(this.ATTRIBUTE_ID_MAP_STREAM_ID);if(void 0===e)return;const t=new Map,r=new TextDecoder("utf-8");let i=0;const o=e[i]+(e[++i]<<8)+(e[++i]<<16)+(e[++i]<<24);for(let a=0;a<o&&i<e.length-1;a++){const o=e[++i]+(e[++i]<<8)+(e[++i]<<16)+(e[++i]<<24),a=e.findIndex(((e,t,r)=>0==e&&t>i)),n=r.decode(e.slice(++i,a)),s=this.metadataMap.get(o);void 0!==s&&t.set(n,s);i=a+(4-(a-i)%4-1)}return t}}class v{constructor(r,i){this.notifyError=r,this.videoFrameHandler=i,this.shouldDiscardAudioInferenceResult=!1,this.transform=(t,r)=>e(this,void 0,void 0,(function*(){const e=t.timestamp;if(null!==e)try{const{videoFrame:i,metadata:{audioInferenceResult:o,attributes:a}={}}=yield this.extractVideoFrameAndMetadata(t),n=yield this.videoFrameHandler({videoFrame:i,audioInferenceResult:o,attributes:a}),s=new VideoFrame(n,{timestamp:e});r.enqueue(s),i.close(),t.close(),n.close()}catch(e){t.close(),this.notifyError(e)}else this.notifyError("timestamp of the original video frame is null")})),this.extractVideoFrameAndMetadata=r=>e(this,void 0,void 0,(function*(){if(n())throw t;if("NV12"!==r.format)throw this.notifyError("Unsupported video frame pixel format"),new Error("Unsupported video frame pixel format");const e={x:0,y:0,width:r.codedWidth,height:2},i=new ArrayBuffer(e.width*e.height*3/2);yield r.copyTo(i,{rect:e});const o=new w(i,this.notifyError),a={x:0,y:o.multiStreamHeaderRowOffset,width:r.codedWidth,height:r.codedHeight-o.multiStreamHeaderRowOffset},s=new ArrayBuffer(a.width*a.height*3/2);yield r.copyTo(s,{rect:a});const d=new E(s,o.multiStreamCount);return{videoFrame:new VideoFrame(r,{timestamp:r.timestamp,visibleRect:{x:0,y:o.frameRowOffset,width:o.frameWidth,height:o.frameHeight}}),metadata:{audioInferenceResult:this.shouldDiscardAudioInferenceResult?void 0:d.audioInferenceResult,attributes:d.attributes}}})),o(a(d,"videoEffectsUtils.transformerWithMetadata.constructor"),"video.mediaStream.audioInferenceDiscardStatusChange",(({discardAudioInferenceResult:e})=>{this.shouldDiscardAudioInferenceResult=e}))}}function p(e,t){return(o,n)=>{null==t||t.reportApplyingVideoEffect(o||"",n),e(o,n).then((()=>{null==t||t.reportVideoEffectChanged(o||"",n),i(a(d,"videoEffectsUtils.reportVideoEffectChanged"),"video.videoEffectReadiness",[!0,o,void 0,n])})).catch((e=>{const t=e in r.EffectFailureReason?e:r.EffectFailureReason.InitializationFailure;i(a(d,"videoEffectsUtils.effectFailure"),"video.videoEffectReadiness",[!1,o,t,n])}))}}export{p as createEffectParameterChangeCallback,h as processMediaStream,c as processMediaStreamWithMetadata};
1
+ import{__awaiter as e}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.24.0_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{errorNotSupportedOnPlatform as t}from"../public/constants.js";import{videoEffects as r}from"../public/videoEffects.js";import{sendMessageToParent as i}from"./communication.js";import{registerHandler as o}from"./handlers.js";import{getApiVersionTag as a}from"./telemetry.js";import{inServerSideRenderingEnvironment as n,ssrSafeWindow as s}from"./utils.js";const d="v2";function h(t,r,i,o){var a,s;return e(this,void 0,void 0,(function*(){const e=u();!n()&&(null===(s=null===(a=window.chrome)||void 0===a?void 0:a.webview)||void 0===s||s.registerTextureStream(t,e)),l(yield f(t,i,o),new m(i,r),e.writable)}))}function c(t,r,i,o){var a,s;return e(this,void 0,void 0,(function*(){const e=u();!n()&&(null===(s=null===(a=window.chrome)||void 0===a?void 0:a.webview)||void 0===s||s.registerTextureStream(t,e)),l(yield f(t,i,o),new v(i,r),e.writable)}))}function f(r,i,o){return e(this,void 0,void 0,(function*(){if(n())throw t;const e=s().chrome;try{null==o||o.reportGettingTextureStream(r);const t=(yield e.webview.getTextureStream(r)).getVideoTracks();if(0===t.length)throw new Error(`No video track in stream ${r}`);return null==o||o.reportTextureStreamAcquired(),t[0]}catch(e){throw i(`Failed to get video track from stream ${r}, error: ${e}`),new Error(`Internal error: can't get video track from stream ${r}`)}}))}function u(){if(n())throw t;const e=window.MediaStreamTrackGenerator;if(!e)throw t;return new e({kind:"video"})}function l(e,t,r){new(0,s().MediaStreamTrackProcessor)({track:e}).readable.pipeThrough(new TransformStream(t)).pipeTo(r)}class m{constructor(t,r){this.notifyError=t,this.videoFrameHandler=r,this.transform=(t,r)=>e(this,void 0,void 0,(function*(){const e=t.timestamp;if(null!==e)try{const i=yield this.videoFrameHandler({videoFrame:t}),o=new VideoFrame(i,{timestamp:e});r.enqueue(o),t.close(),i.close()}catch(e){t.close(),this.notifyError(e)}else this.notifyError("timestamp of the original video frame is null")}))}}class w{constructor(e,t){if(this.headerBuffer=e,this.notifyError=t,this.ONE_TEXTURE_INPUT_ID=1869900081,this.INVALID_HEADER_ERROR="Invalid video frame header",this.UNSUPPORTED_LAYOUT_ERROR="Unsupported texture layout",this.headerDataView=new Uint32Array(e),this.headerDataView.length<8)throw this.notifyError(this.INVALID_HEADER_ERROR),new Error(this.INVALID_HEADER_ERROR);if(this.headerDataView[0]!==this.ONE_TEXTURE_INPUT_ID)throw this.notifyError(this.UNSUPPORTED_LAYOUT_ERROR),new Error(this.UNSUPPORTED_LAYOUT_ERROR)}get oneTextureLayoutId(){return this.headerDataView[0]}get version(){return this.headerDataView[1]}get frameRowOffset(){return this.headerDataView[2]}get frameFormat(){return this.headerDataView[3]}get frameWidth(){return this.headerDataView[4]}get frameHeight(){return this.headerDataView[5]}get multiStreamHeaderRowOffset(){return this.headerDataView[6]}get multiStreamCount(){return this.headerDataView[7]}}class E{constructor(e,t){this.metadataMap=new Map,this.AUDIO_INFERENCE_RESULT_STREAM_ID=828664161,this.ATTRIBUTE_ID_MAP_STREAM_ID=1296320833;const r=new Uint32Array(e);for(let i=0,o=0;i<t;i++){const t=r[o++],i=r[o++],a=r[o++],n=new Uint8Array(e,i,a);this.metadataMap.set(t,n)}}get audioInferenceResult(){return this.metadataMap.get(this.AUDIO_INFERENCE_RESULT_STREAM_ID)}get attributes(){const e=this.metadataMap.get(this.ATTRIBUTE_ID_MAP_STREAM_ID);if(void 0===e)return;const t=new Map,r=new TextDecoder("utf-8");let i=0;const o=e[i]+(e[++i]<<8)+(e[++i]<<16)+(e[++i]<<24);for(let a=0;a<o&&i<e.length-1;a++){const o=e[++i]+(e[++i]<<8)+(e[++i]<<16)+(e[++i]<<24),a=e.findIndex(((e,t,r)=>0==e&&t>i)),n=r.decode(e.slice(++i,a)),s=this.metadataMap.get(o);void 0!==s&&t.set(n,s);i=a+(4-(a-i)%4-1)}return t}}class v{constructor(r,i){this.notifyError=r,this.videoFrameHandler=i,this.shouldDiscardAudioInferenceResult=!1,this.transform=(t,r)=>e(this,void 0,void 0,(function*(){const e=t.timestamp;if(null!==e)try{const{videoFrame:i,metadata:{audioInferenceResult:o,attributes:a}={}}=yield this.extractVideoFrameAndMetadata(t),n=yield this.videoFrameHandler({videoFrame:i,audioInferenceResult:o,attributes:a}),s=new VideoFrame(n,{timestamp:e});r.enqueue(s),i.close(),t.close(),n.close()}catch(e){t.close(),this.notifyError(e)}else this.notifyError("timestamp of the original video frame is null")})),this.extractVideoFrameAndMetadata=r=>e(this,void 0,void 0,(function*(){if(n())throw t;if("NV12"!==r.format)throw this.notifyError("Unsupported video frame pixel format"),new Error("Unsupported video frame pixel format");const e={x:0,y:0,width:r.codedWidth,height:2},i=new ArrayBuffer(e.width*e.height*3/2);yield r.copyTo(i,{rect:e});const o=new w(i,this.notifyError),a={x:0,y:o.multiStreamHeaderRowOffset,width:r.codedWidth,height:r.codedHeight-o.multiStreamHeaderRowOffset},s=new ArrayBuffer(a.width*a.height*3/2);yield r.copyTo(s,{rect:a});const d=new E(s,o.multiStreamCount);return{videoFrame:new VideoFrame(r,{timestamp:r.timestamp,visibleRect:{x:0,y:o.frameRowOffset,width:o.frameWidth,height:o.frameHeight}}),metadata:{audioInferenceResult:this.shouldDiscardAudioInferenceResult?void 0:d.audioInferenceResult,attributes:d.attributes}}})),o(a(d,"videoEffectsUtils.transformerWithMetadata.constructor"),"video.mediaStream.audioInferenceDiscardStatusChange",(({discardAudioInferenceResult:e})=>{this.shouldDiscardAudioInferenceResult=e}))}}function p(e,t){return(o,n)=>{null==t||t.reportApplyingVideoEffect(o||"",n),e(o,n).then((()=>{null==t||t.reportVideoEffectChanged(o||"",n),i(a(d,"videoEffectsUtils.reportVideoEffectChanged"),"video.videoEffectReadiness",[!0,o,void 0,n])})).catch((e=>{const t=e in r.EffectFailureReason?e:r.EffectFailureReason.InitializationFailure;i(a(d,"videoEffectsUtils.effectFailure"),"video.videoEffectReadiness",[!1,o,t,n])}))}}export{p as createEffectParameterChangeCallback,h as processMediaStream,c as processMediaStreamWithMetadata};
@@ -1 +1 @@
1
- import{__awaiter as t}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.22.4_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{sendAndUnwrap as e}from"../internal/communication.js";import{ensureInitialized as n}from"../internal/internalAPIs.js";import{getApiVersionTag as i}from"../internal/telemetry.js";import{validateId as o}from"../internal/utils.js";import{FrameContexts as r,errorNotSupportedOnPlatform as s}from"../public/constants.js";import{runtime as a}from"../public/runtime.js";import{externalAppAuthentication as u}from"./externalAppAuthentication.js";const c="v2";var h;!function(h){function p(){return!(!n(a)||!a.supports.externalAppAuthenticationForCEA)}function l(t){if(t.type!==u.ActionExecuteInvokeRequestType){throw{errorCode:u.InvokeErrorCode.INTERNAL_ERROR,message:`Invalid action type ${t.type}. Action type must be "${u.ActionExecuteInvokeRequestType}"`}}}h.authenticateWithSSO=function(u,h,l){return t(this,void 0,void 0,(function*(){if(n(a,r.content),!p())throw s;o(h,new Error("conversation id is not valid."));const t=yield e(i(c,"externalAppAuthenticationForCEA.authenticateWithSSO"),"externalAppAuthenticationForCEA.authenticateWithSSO",u.toString(),h,l.claims,l.silent);if(t)throw t}))},h.authenticateWithOauth=function(u,h,l){return t(this,void 0,void 0,(function*(){if(n(a,r.content),!p())throw s;o(h,new Error("conversation id is not valid."));const t=yield e(i(c,"externalAppAuthenticationForCEA.authenticateWithOauth"),"externalAppAuthenticationForCEA.authenticateWithOauth",u.toString(),h,l.url.href,l.width,l.height,l.isExternal);if(t)throw t}))},h.authenticateAndResendRequest=function(h,A,f,m){return t(this,void 0,void 0,(function*(){if(n(a,r.content),!p())throw s;o(A,new Error("conversation id is not valid.")),l(m);const t=yield e(i(c,"externalAppAuthenticationForCEA.authenticateAndResendRequest"),"externalAppAuthenticationForCEA.authenticateAndResendRequest",h.toString(),A,m,f.url.href,f.width,f.height,f.isExternal);if(u.isActionExecuteResponse(t))return t;throw u.isInvokeError(t)?t:d}))},h.authenticateWithSSOAndResendRequest=function(h,A,f,m){return t(this,void 0,void 0,(function*(){if(n(a,r.content),!p())throw s;o(A,new Error("conversation id is not valid.")),l(m);const t=yield e(i(c,"externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest"),"externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest",h.toString(),A,m,f.claims,f.silent);if(u.isActionExecuteResponse(t))return t;throw u.isInvokeError(t)?t:d}))},h.isSupported=p;const d={errorCode:u.InvokeErrorCode.INTERNAL_ERROR,message:"No valid response received"}}(h||(h={}));export{h as externalAppAuthenticationForCEA};
1
+ import{__awaiter as t}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.24.0_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{sendAndUnwrap as e}from"../internal/communication.js";import{ensureInitialized as n}from"../internal/internalAPIs.js";import{getApiVersionTag as i}from"../internal/telemetry.js";import{validateId as o}from"../internal/utils.js";import{FrameContexts as r,errorNotSupportedOnPlatform as s}from"../public/constants.js";import{runtime as a}from"../public/runtime.js";import{externalAppAuthentication as u}from"./externalAppAuthentication.js";const c="v2";var h;!function(h){function p(){return!(!n(a)||!a.supports.externalAppAuthenticationForCEA)}function l(t){if(t.type!==u.ActionExecuteInvokeRequestType){throw{errorCode:u.InvokeErrorCode.INTERNAL_ERROR,message:`Invalid action type ${t.type}. Action type must be "${u.ActionExecuteInvokeRequestType}"`}}}h.authenticateWithSSO=function(u,h,l){return t(this,void 0,void 0,(function*(){if(n(a,r.content),!p())throw s;o(h,new Error("conversation id is not valid."));const t=yield e(i(c,"externalAppAuthenticationForCEA.authenticateWithSSO"),"externalAppAuthenticationForCEA.authenticateWithSSO",u.toString(),h,l.claims,l.silent);if(t)throw t}))},h.authenticateWithOauth=function(u,h,l){return t(this,void 0,void 0,(function*(){if(n(a,r.content),!p())throw s;o(h,new Error("conversation id is not valid."));const t=yield e(i(c,"externalAppAuthenticationForCEA.authenticateWithOauth"),"externalAppAuthenticationForCEA.authenticateWithOauth",u.toString(),h,l.url.href,l.width,l.height,l.isExternal);if(t)throw t}))},h.authenticateAndResendRequest=function(h,A,f,m){return t(this,void 0,void 0,(function*(){if(n(a,r.content),!p())throw s;o(A,new Error("conversation id is not valid.")),l(m);const t=yield e(i(c,"externalAppAuthenticationForCEA.authenticateAndResendRequest"),"externalAppAuthenticationForCEA.authenticateAndResendRequest",h.toString(),A,m,f.url.href,f.width,f.height,f.isExternal);if(u.isActionExecuteResponse(t))return t;throw u.isInvokeError(t)?t:d}))},h.authenticateWithSSOAndResendRequest=function(h,A,f,m){return t(this,void 0,void 0,(function*(){if(n(a,r.content),!p())throw s;o(A,new Error("conversation id is not valid.")),l(m);const t=yield e(i(c,"externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest"),"externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest",h.toString(),A,m,f.claims,f.silent);if(u.isActionExecuteResponse(t))return t;throw u.isInvokeError(t)?t:d}))},h.isSupported=p;const d={errorCode:u.InvokeErrorCode.INTERNAL_ERROR,message:"No valid response received"}}(h||(h={}));export{h as externalAppAuthenticationForCEA};
@@ -1 +1 @@
1
- import{__awaiter as t}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.22.4_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{sendMessageToParentAsync as o,sendAndUnwrap as r}from"../internal/communication.js";import{ensureInitialized as n}from"../internal/internalAPIs.js";import{getApiVersionTag as i}from"../internal/telemetry.js";import{validateId as e}from"../internal/utils.js";import{FrameContexts as s,errorNotSupportedOnPlatform as p}from"../public/constants.js";import{runtime as c}from"../public/runtime.js";var l;!function(l){function u(){return!(!n(c)||!c.supports.externalAppCardActionsForCEA)}l.processActionOpenUrl=function(r,l,m){return t(this,void 0,void 0,(function*(){if(n(c,s.content),!u())throw p;e(l,new Error("conversation id is not valid."));const[t,a]=yield o(i("v2","externalAppCardActionsForCEA.processActionOpenUrl"),"externalAppCardActionsForCEA.processActionOpenUrl",[r.toString(),l,m.href]);if(t)throw t;return a}))},l.processActionSubmit=function(o,l,m){return t(this,void 0,void 0,(function*(){if(n(c,s.content),!u())throw p;e(l,new Error("conversation id is not valid."));const t=yield r(i("v2","externalAppCardActionsForCEA.processActionSubmit"),"externalAppCardActionsForCEA.processActionSubmit",o.toString(),l,m);if(t)throw t}))},l.isSupported=u}(l||(l={}));export{l as externalAppCardActionsForCEA};
1
+ import{__awaiter as t}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.24.0_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{sendMessageToParentAsync as o,sendAndUnwrap as r}from"../internal/communication.js";import{ensureInitialized as n}from"../internal/internalAPIs.js";import{getApiVersionTag as i}from"../internal/telemetry.js";import{validateId as e}from"../internal/utils.js";import{FrameContexts as s,errorNotSupportedOnPlatform as p}from"../public/constants.js";import{runtime as c}from"../public/runtime.js";var l;!function(l){function u(){return!(!n(c)||!c.supports.externalAppCardActionsForCEA)}l.processActionOpenUrl=function(r,l,m){return t(this,void 0,void 0,(function*(){if(n(c,s.content),!u())throw p;e(l,new Error("conversation id is not valid."));const[t,a]=yield o(i("v2","externalAppCardActionsForCEA.processActionOpenUrl"),"externalAppCardActionsForCEA.processActionOpenUrl",[r.toString(),l,m.href]);if(t)throw t;return a}))},l.processActionSubmit=function(o,l,m){return t(this,void 0,void 0,(function*(){if(n(c,s.content),!u())throw p;e(l,new Error("conversation id is not valid."));const t=yield r(i("v2","externalAppCardActionsForCEA.processActionSubmit"),"externalAppCardActionsForCEA.processActionSubmit",o.toString(),l,m);if(t)throw t}))},l.isSupported=u}(l||(l={}));export{l as externalAppCardActionsForCEA};
@@ -1 +1 @@
1
- import{__awaiter as o}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.22.4_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{sendMessageToParentAsync as t}from"../internal/communication.js";import{ensureInitialized as n}from"../internal/internalAPIs.js";import{getApiVersionTag as r}from"../internal/telemetry.js";import{FrameContexts as i,errorNotSupportedOnPlatform as p}from"../public/constants.js";import{runtime as m}from"../public/runtime.js";import{AppId as e}from"../public/appId.js";var s;!function(s){function l(){return!(!n(m)||!m.supports.externalAppCommands)}s.processActionCommand=function(s,c,u){return o(this,void 0,void 0,(function*(){if(n(m,i.content),!l())throw p;const o=new e(s),[a,d]=yield t(r("v2","externalAppCommands.processActionCommand"),"externalAppCommands.processActionCommand",[o.toString(),c,u]);if(a)throw a;return d}))},s.isSupported=l}(s||(s={}));export{s as externalAppCommands};
1
+ import{__awaiter as o}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.24.0_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{sendMessageToParentAsync as t}from"../internal/communication.js";import{ensureInitialized as n}from"../internal/internalAPIs.js";import{getApiVersionTag as r}from"../internal/telemetry.js";import{FrameContexts as i,errorNotSupportedOnPlatform as p}from"../public/constants.js";import{runtime as m}from"../public/runtime.js";import{AppId as e}from"../public/appId.js";var s;!function(s){function l(){return!(!n(m)||!m.supports.externalAppCommands)}s.processActionCommand=function(s,c,u){return o(this,void 0,void 0,(function*(){if(n(m,i.content),!l())throw p;const o=new e(s),[a,d]=yield t(r("v2","externalAppCommands.processActionCommand"),"externalAppCommands.processActionCommand",[o.toString(),c,u]);if(a)throw a;return d}))},s.isSupported=l}(s||(s={}));export{s as externalAppCommands};
@@ -1 +1 @@
1
- import{__awaiter as e}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.22.4_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{requestPortFromParentWithVersion as t}from"../internal/communication.js";import{ensureInitialized as r}from"../internal/internalAPIs.js";import{getLogger as n,getApiVersionTag as o}from"../internal/telemetry.js";import{errorNotSupportedOnPlatform as a}from"../public/constants.js";import{runtime as s}from"../public/runtime.js";var i;!function(i){!function(i){let l;const m=n("messageChannels.telemetry");function u(){var e;return!(!r(s)||!(null===(e=s.supports.messageChannels)||void 0===e?void 0:e.telemetry))}i.getTelemetryPort=function(){return e(this,void 0,void 0,(function*(){if(l)return m("Returning telemetry port from cache"),l;if(!u())throw a;return l=yield t(o("v1","messageChannels.telemetry.getTelemetryPort"),"messageChannels.telemetry.getTelemetryPort"),l}))},i.isSupported=u,i._clearTelemetryPort=function(){l=void 0}}(i.telemetry||(i.telemetry={})),function(i){let l;const m=n("messageChannels.dataLayer");function u(){var e;return!(!r(s)||!(null===(e=s.supports.messageChannels)||void 0===e?void 0:e.dataLayer))}i.getDataLayerPort=function(){return e(this,void 0,void 0,(function*(){if(l)return m("Returning dataLayer port from cache"),l;if(!u())throw a;return l=yield t(o("v1","messageChannels.dataLayer.getDataLayerPort"),"messageChannels.dataLayer.getDataLayerPort"),l}))},i.isSupported=u,i._clearDataLayerPort=function(){l=void 0}}(i.dataLayer||(i.dataLayer={})),i.isSupported=function(){return!(!r(s)||!s.supports.messageChannels)}}(i||(i={}));export{i as messageChannels};
1
+ import{__awaiter as e}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.24.0_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{requestPortFromParentWithVersion as t}from"../internal/communication.js";import{ensureInitialized as r}from"../internal/internalAPIs.js";import{getLogger as n,getApiVersionTag as o}from"../internal/telemetry.js";import{errorNotSupportedOnPlatform as a}from"../public/constants.js";import{runtime as s}from"../public/runtime.js";var i;!function(i){!function(i){let l;const m=n("messageChannels.telemetry");function u(){var e;return!(!r(s)||!(null===(e=s.supports.messageChannels)||void 0===e?void 0:e.telemetry))}i.getTelemetryPort=function(){return e(this,void 0,void 0,(function*(){if(l)return m("Returning telemetry port from cache"),l;if(!u())throw a;return l=yield t(o("v1","messageChannels.telemetry.getTelemetryPort"),"messageChannels.telemetry.getTelemetryPort"),l}))},i.isSupported=u,i._clearTelemetryPort=function(){l=void 0}}(i.telemetry||(i.telemetry={})),function(i){let l;const m=n("messageChannels.dataLayer");function u(){var e;return!(!r(s)||!(null===(e=s.supports.messageChannels)||void 0===e?void 0:e.dataLayer))}i.getDataLayerPort=function(){return e(this,void 0,void 0,(function*(){if(l)return m("Returning dataLayer port from cache"),l;if(!u())throw a;return l=yield t(o("v1","messageChannels.dataLayer.getDataLayerPort"),"messageChannels.dataLayer.getDataLayerPort"),l}))},i.isSupported=u,i._clearDataLayerPort=function(){l=void 0}}(i.dataLayer||(i.dataLayer={})),i.isSupported=function(){return!(!r(s)||!s.supports.messageChannels)}}(i||(i={}));export{i as messageChannels};
@@ -1 +1 @@
1
- import{__awaiter as e}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.22.4_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{sendMessageToParent as r}from"../internal/communication.js";import{registerHandler as i}from"../internal/handlers.js";import{ensureInitialized as o}from"../internal/internalAPIs.js";import{getApiVersionTag as t}from"../internal/telemetry.js";import{inServerSideRenderingEnvironment as n}from"../internal/utils.js";import{createEffectParameterChangeCallback as d,processMediaStreamWithMetadata as s,processMediaStream as a}from"../internal/videoEffectsUtils.js";import{VideoPerformanceMonitor as f}from"../internal/videoPerformanceMonitor.js";import{errorNotSupportedOnPlatform as m,FrameContexts as c}from"../public/constants.js";import{runtime as l}from"../public/runtime.js";import{videoEffects as u}from"../public/videoEffects.js";const v="v2";var p;!function(p){p.frameProcessingTimeoutInMs=2e3;const E=n()?void 0:new f(r);let F;function g(){const e=setTimeout((()=>{P(`Frame not processed in ${p.frameProcessingTimeoutInMs}ms`,F.Warn)}),p.frameProcessingTimeoutInMs);return function(){clearTimeout(e)}}function h(){return o(l),u.isSupported()}function P(e,i=F.Warn){r(t(v,"videoEffectsEx.notifyError"),"video.notifyError",[e,i])}!function(e){e.Fatal="fatal",e.Warn="warn"}(F=p.ErrorLevel||(p.ErrorLevel={})),p.registerForVideoFrame=function(n){var d,f;if(!h())throw m;if(!n.videoFrameHandler||!n.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(o(l,c.sidePanel)){if(i(t(v,"videoEffectsEX.registerSetFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==E?void 0:E.setFrameProcessTimeLimit(e)),!1),null===(d=l.supports.video)||void 0===d?void 0:d.mediaStream)i(t(v,"videoEffectsEX.registerStartVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(r=>e(this,void 0,void 0,(function*(){const{streamId:i,metadataInTexture:o}=r,t=E?function(r,i){return o=>e(this,void 0,void 0,(function*(){const e=o.videoFrame;i.reportStartFrameProcessing(e.codedWidth,e.codedHeight);const t=g(),n=yield r(o);return t(),i.reportFrameProcessed(),n}))}(n.videoFrameHandler,E):n.videoFrameHandler;o?yield s(i,t,P,E):yield a(i,t,P,E)}))),!1),r(t(v,"videoEffectsEX.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[n.config]);else{if(!(null===(f=l.supports.video)||void 0===f?void 0:f.sharedFrame))throw m;i(t(v,"videoEffectsEx.registerNewVideoFrameHandler"),"video.newVideoFrame",(e=>{if(e){null==E||E.reportStartFrameProcessing(e.width,e.height);const i=g(),o=e.timestamp;n.videoBufferHandler(function(e){return e.videoFrameBuffer=e.videoFrameBuffer||e.data,delete e.data,e}(e),(()=>{i(),null==E||E.reportFrameProcessed(),function(e){r(t(v,"videoEffectsEx.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}(o)}),P)}}),!1),r(t(v,"videoEffectsEx.registerForVideoFrame"),"video.registerForVideoFrame",[n.config])}null==E||E.startMonitorSlowFrameProcessing()}},p.notifySelectedVideoEffectChanged=function(e,i,n){if(o(l,c.sidePanel),!h())throw m;r(t(v,"videoEffectsEx.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,i,n])},p.registerForVideoEffect=function(e){if(o(l,c.sidePanel),!h())throw m;i(t(v,"videoEffectsEx.registerEffectParamterChangeHandler"),"video.effectParameterChange",d(e,E),!1),r(t(v,"videoEffectsEx.registerForVideoEffect"),"video.registerForVideoEffect")},p.updatePersonalizedEffects=function(e){if(o(l,c.sidePanel),!u.isSupported())throw m;r(t(v,"videoEffectsEx.updatePersonalizedEffects"),"video.personalizedEffectsChanged",[e])},p.isSupported=h,p.notifyFatalError=function(e){if(o(l),!u.isSupported())throw m;P(e,F.Fatal)}}(p||(p={}));export{p as videoEffectsEx};
1
+ import{__awaiter as e}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.24.0_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{sendMessageToParent as r}from"../internal/communication.js";import{registerHandler as i}from"../internal/handlers.js";import{ensureInitialized as o}from"../internal/internalAPIs.js";import{getApiVersionTag as t}from"../internal/telemetry.js";import{inServerSideRenderingEnvironment as n}from"../internal/utils.js";import{createEffectParameterChangeCallback as d,processMediaStreamWithMetadata as s,processMediaStream as a}from"../internal/videoEffectsUtils.js";import{VideoPerformanceMonitor as f}from"../internal/videoPerformanceMonitor.js";import{errorNotSupportedOnPlatform as m,FrameContexts as c}from"../public/constants.js";import{runtime as l}from"../public/runtime.js";import{videoEffects as u}from"../public/videoEffects.js";const v="v2";var p;!function(p){p.frameProcessingTimeoutInMs=2e3;const E=n()?void 0:new f(r);let F;function g(){const e=setTimeout((()=>{P(`Frame not processed in ${p.frameProcessingTimeoutInMs}ms`,F.Warn)}),p.frameProcessingTimeoutInMs);return function(){clearTimeout(e)}}function h(){return o(l),u.isSupported()}function P(e,i=F.Warn){r(t(v,"videoEffectsEx.notifyError"),"video.notifyError",[e,i])}!function(e){e.Fatal="fatal",e.Warn="warn"}(F=p.ErrorLevel||(p.ErrorLevel={})),p.registerForVideoFrame=function(n){var d,f;if(!h())throw m;if(!n.videoFrameHandler||!n.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(o(l,c.sidePanel)){if(i(t(v,"videoEffectsEX.registerSetFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==E?void 0:E.setFrameProcessTimeLimit(e)),!1),null===(d=l.supports.video)||void 0===d?void 0:d.mediaStream)i(t(v,"videoEffectsEX.registerStartVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(r=>e(this,void 0,void 0,(function*(){const{streamId:i,metadataInTexture:o}=r,t=E?function(r,i){return o=>e(this,void 0,void 0,(function*(){const e=o.videoFrame;i.reportStartFrameProcessing(e.codedWidth,e.codedHeight);const t=g(),n=yield r(o);return t(),i.reportFrameProcessed(),n}))}(n.videoFrameHandler,E):n.videoFrameHandler;o?yield s(i,t,P,E):yield a(i,t,P,E)}))),!1),r(t(v,"videoEffectsEX.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[n.config]);else{if(!(null===(f=l.supports.video)||void 0===f?void 0:f.sharedFrame))throw m;i(t(v,"videoEffectsEx.registerNewVideoFrameHandler"),"video.newVideoFrame",(e=>{if(e){null==E||E.reportStartFrameProcessing(e.width,e.height);const i=g(),o=e.timestamp;n.videoBufferHandler(function(e){return e.videoFrameBuffer=e.videoFrameBuffer||e.data,delete e.data,e}(e),(()=>{i(),null==E||E.reportFrameProcessed(),function(e){r(t(v,"videoEffectsEx.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}(o)}),P)}}),!1),r(t(v,"videoEffectsEx.registerForVideoFrame"),"video.registerForVideoFrame",[n.config])}null==E||E.startMonitorSlowFrameProcessing()}},p.notifySelectedVideoEffectChanged=function(e,i,n){if(o(l,c.sidePanel),!h())throw m;r(t(v,"videoEffectsEx.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,i,n])},p.registerForVideoEffect=function(e){if(o(l,c.sidePanel),!h())throw m;i(t(v,"videoEffectsEx.registerEffectParamterChangeHandler"),"video.effectParameterChange",d(e,E),!1),r(t(v,"videoEffectsEx.registerForVideoEffect"),"video.registerForVideoEffect")},p.updatePersonalizedEffects=function(e){if(o(l,c.sidePanel),!u.isSupported())throw m;r(t(v,"videoEffectsEx.updatePersonalizedEffects"),"video.personalizedEffectsChanged",[e])},p.isSupported=h,p.notifyFatalError=function(e){if(o(l),!u.isSupported())throw m;P(e,F.Fatal)}}(p||(p={}));export{p as videoEffectsEx};
@@ -1 +1 @@
1
- import{__awaiter as t}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.22.4_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{sendAndHandleSdkError as r}from"../internal/communication.js";import{GlobalVars as e}from"../internal/globalVars.js";import{ensureInitialized as o}from"../internal/internalAPIs.js";import{getApiVersionTag as i}from"../internal/telemetry.js";import{getBase64StringFromBlob as n,base64ToBlob as s}from"../internal/utils.js";import{FrameContexts as p,errorNotSupportedOnPlatform as a}from"./constants.js";import{ClipboardSupportedMimeType as l}from"./interfaces.js";import{runtime as m}from"./runtime.js";var c;!function(c){function d(){return e.isFramelessWindow?!(!o(m)||!m.supports.clipboard):!!(o(m)&&navigator&&navigator.clipboard&&m.supports.clipboard)}c.write=function(e){return t(this,void 0,void 0,(function*(){if(o(m,p.content,p.meetingStage,p.task,p.settings,p.stage,p.sidePanel),!d())throw a;if(!e.type||!Object.values(l).includes(e.type))throw new Error(`Blob type ${e.type} is not supported. Supported blob types are ${Object.values(l)}`);const t=yield n(e),s={mimeType:e.type,content:t};return r(i("v2","clipboard.write"),"clipboard.writeToClipboard",s)}))},c.read=function(){return t(this,void 0,void 0,(function*(){o(m,p.content,p.meetingStage,p.task,p.settings,p.stage,p.sidePanel);const t=i("v2","clipboard.read");if(!d())throw a;const e=yield r(t,"clipboard.readFromClipboard");if("string"==typeof e){const t=JSON.parse(e);return s(t.mimeType,t.content)}return e}))},c.isSupported=d}(c||(c={}));export{c as clipboard};
1
+ import{__awaiter as t}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.24.0_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{sendAndHandleSdkError as r}from"../internal/communication.js";import{GlobalVars as e}from"../internal/globalVars.js";import{ensureInitialized as o}from"../internal/internalAPIs.js";import{getApiVersionTag as i}from"../internal/telemetry.js";import{getBase64StringFromBlob as n,base64ToBlob as s}from"../internal/utils.js";import{FrameContexts as p,errorNotSupportedOnPlatform as a}from"./constants.js";import{ClipboardSupportedMimeType as l}from"./interfaces.js";import{runtime as m}from"./runtime.js";var c;!function(c){function d(){return e.isFramelessWindow?!(!o(m)||!m.supports.clipboard):!!(o(m)&&navigator&&navigator.clipboard&&m.supports.clipboard)}c.write=function(e){return t(this,void 0,void 0,(function*(){if(o(m,p.content,p.meetingStage,p.task,p.settings,p.stage,p.sidePanel),!d())throw a;if(!e.type||!Object.values(l).includes(e.type))throw new Error(`Blob type ${e.type} is not supported. Supported blob types are ${Object.values(l)}`);const t=yield n(e),s={mimeType:e.type,content:t};return r(i("v2","clipboard.write"),"clipboard.writeToClipboard",s)}))},c.read=function(){return t(this,void 0,void 0,(function*(){o(m,p.content,p.meetingStage,p.task,p.settings,p.stage,p.sidePanel);const t=i("v2","clipboard.read");if(!d())throw a;const e=yield r(t,"clipboard.readFromClipboard");if("string"==typeof e){const t=JSON.parse(e);return s(t.mimeType,t.content)}return e}))},c.isSupported=d}(c||(c={}));export{c as clipboard};
@@ -1 +1 @@
1
- import{__awaiter as e}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.22.4_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{sendMessageToParent as n,sendAndHandleSdkError as t}from"../internal/communication.js";import{registerHandler as i,doesHandlerExist as a,removeHandler as o}from"../internal/handlers.js";import{ensureInitialized as r}from"../internal/internalAPIs.js";import{getApiVersionTag as l}from"../internal/telemetry.js";import{FrameContexts as g}from"./constants.js";import{ErrorCode as s}from"./interfaces.js";import{runtime as d}from"./runtime.js";const c="v1";var u;!function(u){let p;var m,S;let h,C,A;function b(e,t){r(d,g.sidePanel,g.meetingStage),n(l(c,"meeting.setMicStateWithReason"),"meeting.updateMicState",[e,t])}!function(e){e[e.HostInitiated=0]="HostInitiated",e[e.AppInitiated=1]="AppInitiated",e[e.AppDeclinedToChange=2]="AppDeclinedToChange",e[e.AppFailedToChange=3]="AppFailedToChange"}(p||(p={})),(m=u.MeetingReactionType||(u.MeetingReactionType={})).like="like",m.heart="heart",m.laugh="laugh",m.surprised="surprised",m.applause="applause",(S=u.MeetingType||(u.MeetingType={})).Unknown="Unknown",S.Adhoc="Adhoc",S.Scheduled="Scheduled",S.Recurring="Recurring",S.Broadcast="Broadcast",S.MeetNow="MeetNow",function(e){e.OneOnOneCall="oneOnOneCall",e.GroupCall="groupCall"}(h=u.CallType||(u.CallType={})),function(e){e.Collaborative="Collaborative",e.ScreenShare="ScreenShare"}(C=u.SharingProtocol||(u.SharingProtocol={})),u.getIncomingClientAudioState=function(e){if(!e)throw new Error("[get incoming client audio state] Callback cannot be null");r(d,g.sidePanel,g.meetingStage),n(l(c,"meeting.getIncomingClientAudioState"),"getIncomingClientAudioState",e)},u.toggleIncomingClientAudio=function(e){if(!e)throw new Error("[toggle incoming client audio] Callback cannot be null");r(d,g.sidePanel,g.meetingStage),n(l(c,"meeting.toggleIncomingClientAudio"),"toggleIncomingClientAudio",e)},u.getMeetingDetails=function(e){if(!e)throw new Error("[get meeting details] Callback cannot be null");r(d,g.sidePanel,g.meetingStage,g.settings,g.content),n(l(c,"meeting.getMeetingDetails"),"meeting.getMeetingDetails",e)},u.getMeetingDetailsVerbose=function(){var n,i,a;return e(this,void 0,void 0,(function*(){let e;r(d,g.sidePanel,g.meetingStage,g.settings,g.content);try{const n=!0;e=yield t(l("v2","meeting.getMeetingDetailsVerbose"),"meeting.getMeetingDetails",n)}catch(e){throw new Error(null===(n=null==e?void 0:e.errorCode)||void 0===n?void 0:n.toString())}if(((null===(i=e.details)||void 0===i?void 0:i.type)==h.GroupCall||(null===(a=e.details)||void 0===a?void 0:a.type)==h.OneOnOneCall)&&!e.details.originalCallerInfo)throw new Error(s.NOT_SUPPORTED_ON_PLATFORM.toString());return e}))},u.getAuthenticationTokenForAnonymousUser=function(e){if(!e)throw new Error("[get Authentication Token For AnonymousUser] Callback cannot be null");r(d,g.sidePanel,g.meetingStage,g.task),n(l(c,"meeting.getAuthenticationTokenForAnonymousUser"),"meeting.getAuthenticationTokenForAnonymousUser",e)},u.getLiveStreamState=function(e){if(!e)throw new Error("[get live stream state] Callback cannot be null");r(d,g.sidePanel),n(l(c,"meeting.getLiveStreamState"),"meeting.getLiveStreamState",e)},u.requestStartLiveStreaming=function(e,t,i){if(!e)throw new Error("[request start live streaming] Callback cannot be null");r(d,g.sidePanel),n(l(c,"meeting.requestStartLiveStreaming"),"meeting.requestStartLiveStreaming",[t,i],e)},u.requestStopLiveStreaming=function(e){if(!e)throw new Error("[request stop live streaming] Callback cannot be null");r(d,g.sidePanel),n(l(c,"meeting.requestStopLiveStreaming"),"meeting.requestStopLiveStreaming",e)},u.registerLiveStreamChangedHandler=function(e){if(!e)throw new Error("[register live stream changed handler] Handler cannot be null");r(d,g.sidePanel),i(l(c,"meeting.registerLiveStreamChangedHandler"),"meeting.liveStreamChanged",e)},u.shareAppContentToStage=function(e,t,i={sharingProtocol:C.Collaborative}){if(!e)throw new Error("[share app content to stage] Callback cannot be null");r(d,g.sidePanel,g.meetingStage),n(l(c,"meeting.shareAppContentToStage"),"meeting.shareAppContentToStage",[t,i],e)},u.getAppContentStageSharingCapabilities=function(e){if(!e)throw new Error("[get app content stage sharing capabilities] Callback cannot be null");r(d,g.sidePanel,g.meetingStage),n(l(c,"meeting.getAppContentStageSharingCapabilities"),"meeting.getAppContentStageSharingCapabilities",e)},u.stopSharingAppContentToStage=function(e){if(!e)throw new Error("[stop sharing app content to stage] Callback cannot be null");r(d,g.sidePanel,g.meetingStage),n(l(c,"meeting.stopSharingAppContentToStage"),"meeting.stopSharingAppContentToStage",e)},u.getAppContentStageSharingState=function(e){if(!e)throw new Error("[get app content stage sharing state] Callback cannot be null");r(d,g.sidePanel,g.meetingStage),n(l(c,"meeting.getAppContentStageSharingState"),"meeting.getAppContentStageSharingState",e)},u.registerSpeakingStateChangeHandler=function(e){if(!e)throw new Error("[registerSpeakingStateChangeHandler] Handler cannot be null");r(d,g.sidePanel,g.meetingStage),i(l(c,"meeting.registerSpeakingStateChangeHandler"),"meeting.speakingStateChanged",e)},u.registerRaiseHandStateChangedHandler=function(e){if(!e)throw new Error("[registerRaiseHandStateChangedHandler] Handler cannot be null");r(d,g.sidePanel,g.meetingStage),i(l(c,"meeting.registerRaiseHandStateChangedHandler"),"meeting.raiseHandStateChanged",e)},u.registerMeetingReactionReceivedHandler=function(e){if(!e)throw new Error("[registerMeetingReactionReceivedHandler] Handler cannot be null");r(d,g.sidePanel,g.meetingStage),i(l(c,"meeting.registerMeetingReactionReceivedHandler"),"meeting.meetingReactionReceived",e)},u.joinMeeting=function(e){if(void 0===(null==e?void 0:e.joinWebUrl)||null===(null==e?void 0:e.joinWebUrl))return Promise.reject(new Error("Invalid joinMeetingParams"));r(d);const n={joinWebUrl:e.joinWebUrl.href,source:e.source||A.Other};return t(l("v2","meeting.joinMeeting"),"meeting.joinMeeting",n)},function(e){e.M365CalendarGridContextMenu="m365_calendar_grid_context_menu",e.M365CalendarGridPeek="m365_calendar_grid_peek",e.M365CalendarGridEventCardJoinButton="m365_calendar_grid_event_card_join_button",e.M365CalendarFormRibbonJoinButton="m365_calendar_form_ribbon_join_button",e.M365CalendarFormJoinTeamsMeetingButton="m365_calendar_form_join_teams_meeting_button",e.Other="other"}(A=u.EventActionSource||(u.EventActionSource={})),(u.appShareButton||(u.appShareButton={})).setOptions=function(e){r(d,g.sidePanel),e.contentUrl&&new URL(e.contentUrl),n(l(c,"meeting.appShareButton.setOptions"),"meeting.appShareButton.setOptions",[e])},u.requestAppAudioHandling=function(t,s){if(!s)throw new Error("[requestAppAudioHandling] Callback response cannot be null");if(!t.micMuteStateChangedCallback)throw new Error("[requestAppAudioHandling] Callback Mic mute state handler cannot be null");r(d,g.sidePanel,g.meetingStage),t.isAppHandlingAudio?function(t,a){const o=(n,o)=>{if(n&&null!=o)throw new Error("[requestAppAudioHandling] Callback response - both parameters cannot be set");if(n)throw new Error(`[requestAppAudioHandling] Callback response - SDK error ${n.errorCode} ${n.message}`);if("boolean"!=typeof o)throw new Error("[requestAppAudioHandling] Callback response - isHostAudioless must be a boolean");const r=n=>e(this,void 0,void 0,(function*(){try{const e=yield t.micMuteStateChangedCallback(n);b(e,e.isMicMuted===n.isMicMuted?p.HostInitiated:p.AppDeclinedToChange)}catch(e){b(n,p.AppFailedToChange)}}));i(l(c,"meeting.registerMicStateChangeHandler"),"meeting.micStateChanged",r);const g=e=>{var n;null===(n=t.audioDeviceSelectionChangedCallback)||void 0===n||n.call(t,e)};i(l(c,"meeting.registerAudioDeviceSelectionChangedHandler"),"meeting.audioDeviceSelectionChanged",g),a(o)};n(l(c,"meeting.requestAppAudioHandling"),"meeting.requestAppAudioHandling",[t.isAppHandlingAudio],o)}(t,s):function(e,t){const i=(e,n)=>{if(e&&null!=n)throw new Error("[requestAppAudioHandling] Callback response - both parameters cannot be set");if(e)throw new Error(`[requestAppAudioHandling] Callback response - SDK error ${e.errorCode} ${e.message}`);if("boolean"!=typeof n)throw new Error("[requestAppAudioHandling] Callback response - isHostAudioless must be a boolean");a("meeting.micStateChanged")&&o("meeting.micStateChanged"),a("meeting.audioDeviceSelectionChanged")&&o("meeting.audioDeviceSelectionChanged"),t(n)};n(l(c,"meeting.requestAppAudioHandling"),"meeting.requestAppAudioHandling",[e.isAppHandlingAudio],i)}(t,s)},u.updateMicState=function(e){b(e,p.AppInitiated)}}(u||(u={}));export{u as meeting};
1
+ import{__awaiter as e}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.24.0_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{sendMessageToParent as n,sendAndHandleSdkError as t}from"../internal/communication.js";import{registerHandler as i,doesHandlerExist as a,removeHandler as o}from"../internal/handlers.js";import{ensureInitialized as r}from"../internal/internalAPIs.js";import{getApiVersionTag as l}from"../internal/telemetry.js";import{FrameContexts as g}from"./constants.js";import{ErrorCode as s}from"./interfaces.js";import{runtime as d}from"./runtime.js";const c="v1";var u;!function(u){let p;var m,S;let h,C,A;function b(e,t){r(d,g.sidePanel,g.meetingStage),n(l(c,"meeting.setMicStateWithReason"),"meeting.updateMicState",[e,t])}!function(e){e[e.HostInitiated=0]="HostInitiated",e[e.AppInitiated=1]="AppInitiated",e[e.AppDeclinedToChange=2]="AppDeclinedToChange",e[e.AppFailedToChange=3]="AppFailedToChange"}(p||(p={})),(m=u.MeetingReactionType||(u.MeetingReactionType={})).like="like",m.heart="heart",m.laugh="laugh",m.surprised="surprised",m.applause="applause",(S=u.MeetingType||(u.MeetingType={})).Unknown="Unknown",S.Adhoc="Adhoc",S.Scheduled="Scheduled",S.Recurring="Recurring",S.Broadcast="Broadcast",S.MeetNow="MeetNow",function(e){e.OneOnOneCall="oneOnOneCall",e.GroupCall="groupCall"}(h=u.CallType||(u.CallType={})),function(e){e.Collaborative="Collaborative",e.ScreenShare="ScreenShare"}(C=u.SharingProtocol||(u.SharingProtocol={})),u.getIncomingClientAudioState=function(e){if(!e)throw new Error("[get incoming client audio state] Callback cannot be null");r(d,g.sidePanel,g.meetingStage),n(l(c,"meeting.getIncomingClientAudioState"),"getIncomingClientAudioState",e)},u.toggleIncomingClientAudio=function(e){if(!e)throw new Error("[toggle incoming client audio] Callback cannot be null");r(d,g.sidePanel,g.meetingStage),n(l(c,"meeting.toggleIncomingClientAudio"),"toggleIncomingClientAudio",e)},u.getMeetingDetails=function(e){if(!e)throw new Error("[get meeting details] Callback cannot be null");r(d,g.sidePanel,g.meetingStage,g.settings,g.content),n(l(c,"meeting.getMeetingDetails"),"meeting.getMeetingDetails",e)},u.getMeetingDetailsVerbose=function(){var n,i,a;return e(this,void 0,void 0,(function*(){let e;r(d,g.sidePanel,g.meetingStage,g.settings,g.content);try{const n=!0;e=yield t(l("v2","meeting.getMeetingDetailsVerbose"),"meeting.getMeetingDetails",n)}catch(e){throw new Error(null===(n=null==e?void 0:e.errorCode)||void 0===n?void 0:n.toString())}if(((null===(i=e.details)||void 0===i?void 0:i.type)==h.GroupCall||(null===(a=e.details)||void 0===a?void 0:a.type)==h.OneOnOneCall)&&!e.details.originalCallerInfo)throw new Error(s.NOT_SUPPORTED_ON_PLATFORM.toString());return e}))},u.getAuthenticationTokenForAnonymousUser=function(e){if(!e)throw new Error("[get Authentication Token For AnonymousUser] Callback cannot be null");r(d,g.sidePanel,g.meetingStage,g.task),n(l(c,"meeting.getAuthenticationTokenForAnonymousUser"),"meeting.getAuthenticationTokenForAnonymousUser",e)},u.getLiveStreamState=function(e){if(!e)throw new Error("[get live stream state] Callback cannot be null");r(d,g.sidePanel),n(l(c,"meeting.getLiveStreamState"),"meeting.getLiveStreamState",e)},u.requestStartLiveStreaming=function(e,t,i){if(!e)throw new Error("[request start live streaming] Callback cannot be null");r(d,g.sidePanel),n(l(c,"meeting.requestStartLiveStreaming"),"meeting.requestStartLiveStreaming",[t,i],e)},u.requestStopLiveStreaming=function(e){if(!e)throw new Error("[request stop live streaming] Callback cannot be null");r(d,g.sidePanel),n(l(c,"meeting.requestStopLiveStreaming"),"meeting.requestStopLiveStreaming",e)},u.registerLiveStreamChangedHandler=function(e){if(!e)throw new Error("[register live stream changed handler] Handler cannot be null");r(d,g.sidePanel),i(l(c,"meeting.registerLiveStreamChangedHandler"),"meeting.liveStreamChanged",e)},u.shareAppContentToStage=function(e,t,i={sharingProtocol:C.Collaborative}){if(!e)throw new Error("[share app content to stage] Callback cannot be null");r(d,g.sidePanel,g.meetingStage),n(l(c,"meeting.shareAppContentToStage"),"meeting.shareAppContentToStage",[t,i],e)},u.getAppContentStageSharingCapabilities=function(e){if(!e)throw new Error("[get app content stage sharing capabilities] Callback cannot be null");r(d,g.sidePanel,g.meetingStage),n(l(c,"meeting.getAppContentStageSharingCapabilities"),"meeting.getAppContentStageSharingCapabilities",e)},u.stopSharingAppContentToStage=function(e){if(!e)throw new Error("[stop sharing app content to stage] Callback cannot be null");r(d,g.sidePanel,g.meetingStage),n(l(c,"meeting.stopSharingAppContentToStage"),"meeting.stopSharingAppContentToStage",e)},u.getAppContentStageSharingState=function(e){if(!e)throw new Error("[get app content stage sharing state] Callback cannot be null");r(d,g.sidePanel,g.meetingStage),n(l(c,"meeting.getAppContentStageSharingState"),"meeting.getAppContentStageSharingState",e)},u.registerSpeakingStateChangeHandler=function(e){if(!e)throw new Error("[registerSpeakingStateChangeHandler] Handler cannot be null");r(d,g.sidePanel,g.meetingStage),i(l(c,"meeting.registerSpeakingStateChangeHandler"),"meeting.speakingStateChanged",e)},u.registerRaiseHandStateChangedHandler=function(e){if(!e)throw new Error("[registerRaiseHandStateChangedHandler] Handler cannot be null");r(d,g.sidePanel,g.meetingStage),i(l(c,"meeting.registerRaiseHandStateChangedHandler"),"meeting.raiseHandStateChanged",e)},u.registerMeetingReactionReceivedHandler=function(e){if(!e)throw new Error("[registerMeetingReactionReceivedHandler] Handler cannot be null");r(d,g.sidePanel,g.meetingStage),i(l(c,"meeting.registerMeetingReactionReceivedHandler"),"meeting.meetingReactionReceived",e)},u.joinMeeting=function(e){if(void 0===(null==e?void 0:e.joinWebUrl)||null===(null==e?void 0:e.joinWebUrl))return Promise.reject(new Error("Invalid joinMeetingParams"));r(d);const n={joinWebUrl:e.joinWebUrl.href,source:e.source||A.Other};return t(l("v2","meeting.joinMeeting"),"meeting.joinMeeting",n)},function(e){e.M365CalendarGridContextMenu="m365_calendar_grid_context_menu",e.M365CalendarGridPeek="m365_calendar_grid_peek",e.M365CalendarGridEventCardJoinButton="m365_calendar_grid_event_card_join_button",e.M365CalendarFormRibbonJoinButton="m365_calendar_form_ribbon_join_button",e.M365CalendarFormJoinTeamsMeetingButton="m365_calendar_form_join_teams_meeting_button",e.Other="other"}(A=u.EventActionSource||(u.EventActionSource={})),(u.appShareButton||(u.appShareButton={})).setOptions=function(e){r(d,g.sidePanel),e.contentUrl&&new URL(e.contentUrl),n(l(c,"meeting.appShareButton.setOptions"),"meeting.appShareButton.setOptions",[e])},u.requestAppAudioHandling=function(t,s){if(!s)throw new Error("[requestAppAudioHandling] Callback response cannot be null");if(!t.micMuteStateChangedCallback)throw new Error("[requestAppAudioHandling] Callback Mic mute state handler cannot be null");r(d,g.sidePanel,g.meetingStage),t.isAppHandlingAudio?function(t,a){const o=(n,o)=>{if(n&&null!=o)throw new Error("[requestAppAudioHandling] Callback response - both parameters cannot be set");if(n)throw new Error(`[requestAppAudioHandling] Callback response - SDK error ${n.errorCode} ${n.message}`);if("boolean"!=typeof o)throw new Error("[requestAppAudioHandling] Callback response - isHostAudioless must be a boolean");const r=n=>e(this,void 0,void 0,(function*(){try{const e=yield t.micMuteStateChangedCallback(n);b(e,e.isMicMuted===n.isMicMuted?p.HostInitiated:p.AppDeclinedToChange)}catch(e){b(n,p.AppFailedToChange)}}));i(l(c,"meeting.registerMicStateChangeHandler"),"meeting.micStateChanged",r);const g=e=>{var n;null===(n=t.audioDeviceSelectionChangedCallback)||void 0===n||n.call(t,e)};i(l(c,"meeting.registerAudioDeviceSelectionChangedHandler"),"meeting.audioDeviceSelectionChanged",g),a(o)};n(l(c,"meeting.requestAppAudioHandling"),"meeting.requestAppAudioHandling",[t.isAppHandlingAudio],o)}(t,s):function(e,t){const i=(e,n)=>{if(e&&null!=n)throw new Error("[requestAppAudioHandling] Callback response - both parameters cannot be set");if(e)throw new Error(`[requestAppAudioHandling] Callback response - SDK error ${e.errorCode} ${e.message}`);if("boolean"!=typeof n)throw new Error("[requestAppAudioHandling] Callback response - isHostAudioless must be a boolean");a("meeting.micStateChanged")&&o("meeting.micStateChanged"),a("meeting.audioDeviceSelectionChanged")&&o("meeting.audioDeviceSelectionChanged"),t(n)};n(l(c,"meeting.requestAppAudioHandling"),"meeting.requestAppAudioHandling",[e.isAppHandlingAudio],i)}(t,s)},u.updateMicState=function(e){b(e,p.AppInitiated)}}(u||(u={}));export{u as meeting};
@@ -1 +1 @@
1
- import{__rest as o}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.22.4_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{errorRuntimeNotInitialized as e,errorRuntimeNotSupported as s}from"../internal/constants.js";import{GlobalVars as i}from"../internal/globalVars.js";import{getLogger as t}from"../internal/telemetry.js";import{compareSDKVersions as n,deepFreeze as r}from"../internal/utils.js";import{HostClientType as a,teamsMinAdaptiveCardVersion as p}from"./constants.js";const l=t("runtime"),d=4;function u(o){return o.apiVersion===d}function c(o){if(u(o))return!0;throw-1===o.apiVersion?new Error(e):new Error(s)}let g={apiVersion:-1,supports:{}};const m={apiVersion:4,isNAAChannelRecommended:!1,hostVersionsInfo:p,isLegacyTeams:!0,supports:{appInstallDialog:{},appEntity:{},call:{},chat:{},conversations:{},dialog:{card:{bot:{}},url:{bot:{},parentCommunication:{}},update:{}},interactive:{},logs:{},meetingRoom:{},menus:{},monetization:{},notifications:{},pages:{config:{},backStack:{},fullTrust:{}},remoteCamera:{},teams:{fullTrust:{}},teamsCore:{},video:{sharedFrame:{}}}},b=[a.desktop,a.web,a.rigel,a.surfaceHub,a.teamsRoomsWindows,a.teamsRoomsAndroid,a.teamsPhones,a.teamsDisplays],y=[a.android,a.ios,a.ipados],f=[...b,...y];function h(o){let e=o;if(e.apiVersion<d&&v.forEach((o=>{e.apiVersion===o.versionToUpgradeFrom&&(e=o.upgradeToNextVersion(e))})),u(e))return e;throw new Error("Received a runtime that could not be upgraded to the latest version")}const v=[{versionToUpgradeFrom:1,upgradeToNextVersion:o=>{var e;return{apiVersion:2,hostVersionsInfo:void 0,isLegacyTeams:o.isLegacyTeams,supports:Object.assign(Object.assign({},o.supports),{dialog:o.supports.dialog?{card:void 0,url:o.supports.dialog,update:null===(e=o.supports.dialog)||void 0===e?void 0:e.update}:void 0})}}},{versionToUpgradeFrom:2,upgradeToNextVersion:e=>{const s=e.supports,i=o(s,["appNotification"]);return Object.assign(Object.assign({},e),{apiVersion:3,supports:i})}},{versionToUpgradeFrom:3,upgradeToNextVersion:o=>{var e,s,i,t,n;return{apiVersion:4,hostVersionsInfo:o.hostVersionsInfo,isNAAChannelRecommended:o.isNAAChannelRecommended,isLegacyTeams:o.isLegacyTeams,supports:Object.assign(Object.assign({},o.supports),{dialog:o.supports.dialog?{card:null===(e=o.supports.dialog)||void 0===e?void 0:e.card,url:{bot:null===(i=null===(s=o.supports.dialog)||void 0===s?void 0:s.url)||void 0===i?void 0:i.bot,parentCommunication:(null===(t=o.supports.dialog)||void 0===t?void 0:t.url)?{}:void 0},update:null===(n=o.supports.dialog)||void 0===n?void 0:n.update}:void 0})}}}],T={"1.0.0":[{capability:{pages:{appButton:{},tabs:{}},stageView:{}},hostClientTypes:b}],"1.9.0":[{capability:{location:{}},hostClientTypes:f}],"2.0.0":[{capability:{people:{}},hostClientTypes:f},{capability:{sharing:{}},hostClientTypes:[a.desktop,a.web]}],"2.0.1":[{capability:{teams:{fullTrust:{joinedTeams:{}}}},hostClientTypes:[a.android,a.desktop,a.ios,a.teamsRoomsAndroid,a.teamsPhones,a.teamsDisplays,a.web]},{capability:{webStorage:{}},hostClientTypes:[a.desktop]}],"2.0.5":[{capability:{webStorage:{}},hostClientTypes:[a.android,a.ios]}],"2.0.8":[{capability:{sharing:{}},hostClientTypes:[a.android,a.ios]}]},V=l.extend("generateBackCompatRuntimeConfig");function C(o,e){const s=Object.assign({},o);for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&("object"!=typeof e[i]||Array.isArray(e[i])?i in o||(s[i]=e[i]):s[i]=C(o[i]||{},e[i]));return s}function j(o,e,s){V("generating back compat runtime config for %s",o);let t=Object.assign({},e.supports);V("Supported capabilities in config before updating based on highestSupportedVersion: %o",t),Object.keys(s).forEach((e=>{n(o,e)>=0&&s[e].forEach((o=>{void 0!==i.hostClientType&&o.hostClientTypes.includes(i.hostClientType)&&(t=C(t,o.capability))}))}));const r={apiVersion:d,hostVersionsInfo:p,isLegacyTeams:!0,supports:t};return V("Runtime config after updating based on highestSupportedVersion: %o",r),r}const w=l.extend("applyRuntimeConfig");function O(o){"string"==typeof o.apiVersion&&(w("Trying to apply runtime with string apiVersion, processing as v1: %o",o),o=Object.assign(Object.assign({},o),{apiVersion:1})),w("Fast-forwarding runtime %o",o);const e=h(o);w("Applying runtime %o",e),g=r(e)}export{O as applyRuntimeConfig,h as fastForwardRuntime,j as generateVersionBasedTeamsRuntimeConfig,c as isRuntimeInitialized,d as latestRuntimeApiVersion,T as mapTeamsVersionToSupportedCapabilities,g as runtime,v as upgradeChain,f as v1HostClientTypes,y as v1MobileHostClientTypes,m as versionAndPlatformAgnosticTeamsRuntimeConfig};
1
+ import{__rest as o}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.24.0_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{errorRuntimeNotInitialized as e,errorRuntimeNotSupported as s}from"../internal/constants.js";import{GlobalVars as i}from"../internal/globalVars.js";import{getLogger as t}from"../internal/telemetry.js";import{compareSDKVersions as n,deepFreeze as r}from"../internal/utils.js";import{HostClientType as a,teamsMinAdaptiveCardVersion as p}from"./constants.js";const l=t("runtime"),d=4;function u(o){return o.apiVersion===d}function c(o){if(u(o))return!0;throw-1===o.apiVersion?new Error(e):new Error(s)}let g={apiVersion:-1,supports:{}};const m={apiVersion:4,isNAAChannelRecommended:!1,hostVersionsInfo:p,isLegacyTeams:!0,supports:{appInstallDialog:{},appEntity:{},call:{},chat:{},conversations:{},dialog:{card:{bot:{}},url:{bot:{},parentCommunication:{}},update:{}},interactive:{},logs:{},meetingRoom:{},menus:{},monetization:{},notifications:{},pages:{config:{},backStack:{},fullTrust:{}},remoteCamera:{},teams:{fullTrust:{}},teamsCore:{},video:{sharedFrame:{}}}},b=[a.desktop,a.web,a.rigel,a.surfaceHub,a.teamsRoomsWindows,a.teamsRoomsAndroid,a.teamsPhones,a.teamsDisplays],y=[a.android,a.ios,a.ipados],f=[...b,...y];function h(o){let e=o;if(e.apiVersion<d&&v.forEach((o=>{e.apiVersion===o.versionToUpgradeFrom&&(e=o.upgradeToNextVersion(e))})),u(e))return e;throw new Error("Received a runtime that could not be upgraded to the latest version")}const v=[{versionToUpgradeFrom:1,upgradeToNextVersion:o=>{var e;return{apiVersion:2,hostVersionsInfo:void 0,isLegacyTeams:o.isLegacyTeams,supports:Object.assign(Object.assign({},o.supports),{dialog:o.supports.dialog?{card:void 0,url:o.supports.dialog,update:null===(e=o.supports.dialog)||void 0===e?void 0:e.update}:void 0})}}},{versionToUpgradeFrom:2,upgradeToNextVersion:e=>{const s=e.supports,i=o(s,["appNotification"]);return Object.assign(Object.assign({},e),{apiVersion:3,supports:i})}},{versionToUpgradeFrom:3,upgradeToNextVersion:o=>{var e,s,i,t,n;return{apiVersion:4,hostVersionsInfo:o.hostVersionsInfo,isNAAChannelRecommended:o.isNAAChannelRecommended,isLegacyTeams:o.isLegacyTeams,supports:Object.assign(Object.assign({},o.supports),{dialog:o.supports.dialog?{card:null===(e=o.supports.dialog)||void 0===e?void 0:e.card,url:{bot:null===(i=null===(s=o.supports.dialog)||void 0===s?void 0:s.url)||void 0===i?void 0:i.bot,parentCommunication:(null===(t=o.supports.dialog)||void 0===t?void 0:t.url)?{}:void 0},update:null===(n=o.supports.dialog)||void 0===n?void 0:n.update}:void 0})}}}],T={"1.0.0":[{capability:{pages:{appButton:{},tabs:{}},stageView:{}},hostClientTypes:b}],"1.9.0":[{capability:{location:{}},hostClientTypes:f}],"2.0.0":[{capability:{people:{}},hostClientTypes:f},{capability:{sharing:{}},hostClientTypes:[a.desktop,a.web]}],"2.0.1":[{capability:{teams:{fullTrust:{joinedTeams:{}}}},hostClientTypes:[a.android,a.desktop,a.ios,a.teamsRoomsAndroid,a.teamsPhones,a.teamsDisplays,a.web]},{capability:{webStorage:{}},hostClientTypes:[a.desktop]}],"2.0.5":[{capability:{webStorage:{}},hostClientTypes:[a.android,a.ios]}],"2.0.8":[{capability:{sharing:{}},hostClientTypes:[a.android,a.ios]}]},V=l.extend("generateBackCompatRuntimeConfig");function C(o,e){const s=Object.assign({},o);for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&("object"!=typeof e[i]||Array.isArray(e[i])?i in o||(s[i]=e[i]):s[i]=C(o[i]||{},e[i]));return s}function j(o,e,s){V("generating back compat runtime config for %s",o);let t=Object.assign({},e.supports);V("Supported capabilities in config before updating based on highestSupportedVersion: %o",t),Object.keys(s).forEach((e=>{n(o,e)>=0&&s[e].forEach((o=>{void 0!==i.hostClientType&&o.hostClientTypes.includes(i.hostClientType)&&(t=C(t,o.capability))}))}));const r={apiVersion:d,hostVersionsInfo:p,isLegacyTeams:!0,supports:t};return V("Runtime config after updating based on highestSupportedVersion: %o",r),r}const w=l.extend("applyRuntimeConfig");function O(o){"string"==typeof o.apiVersion&&(w("Trying to apply runtime with string apiVersion, processing as v1: %o",o),o=Object.assign(Object.assign({},o),{apiVersion:1})),w("Fast-forwarding runtime %o",o);const e=h(o);w("Applying runtime %o",e),g=r(e)}export{O as applyRuntimeConfig,h as fastForwardRuntime,j as generateVersionBasedTeamsRuntimeConfig,c as isRuntimeInitialized,d as latestRuntimeApiVersion,T as mapTeamsVersionToSupportedCapabilities,g as runtime,v as upgradeChain,f as v1HostClientTypes,y as v1MobileHostClientTypes,m as versionAndPlatformAgnosticTeamsRuntimeConfig};
@@ -1 +1 @@
1
- import{__awaiter as t}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.22.4_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{sendAndHandleSdkError as e}from"../internal/communication.js";import{ensureInitialized as n}from"../internal/internalAPIs.js";import{getApiVersionTag as r}from"../internal/telemetry.js";import{callCallbackWithSdkErrorFromPromiseAndReturnPromise as o}from"../internal/utils.js";import{FrameContexts as s,errorNotSupportedOnPlatform as i}from"./constants.js";import{ErrorCode as a}from"./interfaces.js";import{runtime as m}from"./runtime.js";var u;!function(u){function p(t,n){return new Promise((r=>{if(!c())throw i;r(e(t,u.SharingAPIMessages.shareWebContent,n))}))}function c(){return!(!n(m)||!m.supports.sharing)}u.SharingAPIMessages={shareWebContent:"sharing.shareWebContent"},u.shareWebContent=function(t,e){try{!function(t){if(!(t&&t.content&&t.content.length)){throw{errorCode:a.INVALID_ARGUMENTS,message:"Shared content is missing"}}}(t),function(t){let e;if(t.content.some((t=>!t.type)))throw e={errorCode:a.INVALID_ARGUMENTS,message:"Shared content type cannot be undefined"},e;if(t.content.some((e=>e.type!==t.content[0].type)))throw e={errorCode:a.INVALID_ARGUMENTS,message:"Shared content must be of the same type"},e}(t),function(t){let e;if("URL"!==t.content[0].type)throw e={errorCode:a.INVALID_ARGUMENTS,message:"Content type is unsupported"},e;if(t.content.some((t=>!t.url)))throw e={errorCode:a.INVALID_ARGUMENTS,message:"URLs are required for URL content types"},e}(t)}catch(t){return o((()=>Promise.reject(t)),e)}n(m,s.content,s.sidePanel,s.task,s.stage,s.meetingStage);const i=r(e?"v1":"v2","sharing.shareWebContent");return o(p,e,i,t)},u.isSupported=c,function(o){function a(){var t;return n(m)&&void 0!==(null===(t=m.supports.sharing)||void 0===t?void 0:t.history)}o.getContent=function(){return t(this,void 0,void 0,(function*(){if(n(m,s.sidePanel,s.meetingStage),!a())throw i;return yield e(r("v2","sharing.history.getContent"),"sharing.history.getContent")}))},o.isSupported=a}(u.history||(u.history={}))}(u||(u={}));export{u as sharing};
1
+ import{__awaiter as t}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.24.0_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{sendAndHandleSdkError as e}from"../internal/communication.js";import{ensureInitialized as n}from"../internal/internalAPIs.js";import{getApiVersionTag as r}from"../internal/telemetry.js";import{callCallbackWithSdkErrorFromPromiseAndReturnPromise as o}from"../internal/utils.js";import{FrameContexts as s,errorNotSupportedOnPlatform as i}from"./constants.js";import{ErrorCode as a}from"./interfaces.js";import{runtime as m}from"./runtime.js";var u;!function(u){function p(t,n){return new Promise((r=>{if(!c())throw i;r(e(t,u.SharingAPIMessages.shareWebContent,n))}))}function c(){return!(!n(m)||!m.supports.sharing)}u.SharingAPIMessages={shareWebContent:"sharing.shareWebContent"},u.shareWebContent=function(t,e){try{!function(t){if(!(t&&t.content&&t.content.length)){throw{errorCode:a.INVALID_ARGUMENTS,message:"Shared content is missing"}}}(t),function(t){let e;if(t.content.some((t=>!t.type)))throw e={errorCode:a.INVALID_ARGUMENTS,message:"Shared content type cannot be undefined"},e;if(t.content.some((e=>e.type!==t.content[0].type)))throw e={errorCode:a.INVALID_ARGUMENTS,message:"Shared content must be of the same type"},e}(t),function(t){let e;if("URL"!==t.content[0].type)throw e={errorCode:a.INVALID_ARGUMENTS,message:"Content type is unsupported"},e;if(t.content.some((t=>!t.url)))throw e={errorCode:a.INVALID_ARGUMENTS,message:"URLs are required for URL content types"},e}(t)}catch(t){return o((()=>Promise.reject(t)),e)}n(m,s.content,s.sidePanel,s.task,s.stage,s.meetingStage);const i=r(e?"v1":"v2","sharing.shareWebContent");return o(p,e,i,t)},u.isSupported=c,function(o){function a(){var t;return n(m)&&void 0!==(null===(t=m.supports.sharing)||void 0===t?void 0:t.history)}o.getContent=function(){return t(this,void 0,void 0,(function*(){if(n(m,s.sidePanel,s.meetingStage),!a())throw i;return yield e(r("v2","sharing.history.getContent"),"sharing.history.getContent")}))},o.isSupported=a}(u.history||(u.history={}))}(u||(u={}));export{u as sharing};
@@ -1 +1 @@
1
- import{__rest as t}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.22.4_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{sendMessageToParent as i}from"../internal/communication.js";import{ensureInitialized as o}from"../internal/internalAPIs.js";import{getApiVersionTag as r}from"../internal/telemetry.js";import{ChildAppWindow as e}from"./appWindow.js";import{FrameContexts as n,TaskModuleDimension as l}from"./constants.js";import{botUrlOpenHelper as a,urlOpenHelper as s,updateResizeHelper as d,urlSubmitHelper as u}from"./dialog.js";import{runtime as m}from"./runtime.js";const h="v1";var c;!function(c){function f(t){return t.height=t.height?t.height:l.Small,t.width=t.width?t.width:l.Small,t}c.startTask=function(t,d){const u=r(h,"tasks.startTask"),c=d?t=>{var i,o;return d(null!==(i=t.err)&&void 0!==i?i:"",null!==(o=t.result)&&void 0!==o?o:"")}:void 0;return void 0===t.card&&void 0===t.url||t.card?(o(m,n.content,n.sidePanel,n.meetingStage),i(u,"tasks.startTask",[t],d)):void 0!==t.completionBotId?a(u,function(t){if(void 0===t.url||void 0===t.completionBotId)throw new Error(`Both url ${t.url} and completionBotId ${t.completionBotId} are required for bot url dialog. At least one is undefined.`);const i={url:t.url,size:{height:t.height?t.height:l.Small,width:t.width?t.width:l.Small},title:t.title,fallbackUrl:t.fallbackUrl,completionBotId:t.completionBotId};return i}(t),c):s(u,function(t){if(void 0===t.url)throw new Error("url property of taskInfo object can't be undefined");const i={url:t.url,size:{height:t.height?t.height:l.Small,width:t.width?t.width:l.Small},title:t.title,fallbackUrl:t.fallbackUrl};return i}(t),c),new e},c.updateTask=function(i){i=f(i);const o=t(i,["width","height"]);if(Object.keys(o).length)throw new Error("resize requires a TaskInfo argument containing only width and height");d(r(h,"tasks.updateTask"),i)},c.submitTask=function(t,i){u(r(h,"tasks.submitTask"),t,i)},c.getDefaultSizeIfNotProvided=f}(c||(c={}));export{c as tasks};
1
+ import{__rest as t}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.24.0_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{sendMessageToParent as i}from"../internal/communication.js";import{ensureInitialized as o}from"../internal/internalAPIs.js";import{getApiVersionTag as r}from"../internal/telemetry.js";import{ChildAppWindow as e}from"./appWindow.js";import{FrameContexts as n,TaskModuleDimension as l}from"./constants.js";import{botUrlOpenHelper as a,urlOpenHelper as s,updateResizeHelper as d,urlSubmitHelper as u}from"./dialog.js";import{runtime as m}from"./runtime.js";const h="v1";var c;!function(c){function f(t){return t.height=t.height?t.height:l.Small,t.width=t.width?t.width:l.Small,t}c.startTask=function(t,d){const u=r(h,"tasks.startTask"),c=d?t=>{var i,o;return d(null!==(i=t.err)&&void 0!==i?i:"",null!==(o=t.result)&&void 0!==o?o:"")}:void 0;return void 0===t.card&&void 0===t.url||t.card?(o(m,n.content,n.sidePanel,n.meetingStage),i(u,"tasks.startTask",[t],d)):void 0!==t.completionBotId?a(u,function(t){if(void 0===t.url||void 0===t.completionBotId)throw new Error(`Both url ${t.url} and completionBotId ${t.completionBotId} are required for bot url dialog. At least one is undefined.`);const i={url:t.url,size:{height:t.height?t.height:l.Small,width:t.width?t.width:l.Small},title:t.title,fallbackUrl:t.fallbackUrl,completionBotId:t.completionBotId};return i}(t),c):s(u,function(t){if(void 0===t.url)throw new Error("url property of taskInfo object can't be undefined");const i={url:t.url,size:{height:t.height?t.height:l.Small,width:t.width?t.width:l.Small},title:t.title,fallbackUrl:t.fallbackUrl};return i}(t),c),new e},c.updateTask=function(i){i=f(i);const o=t(i,["width","height"]);if(Object.keys(o).length)throw new Error("resize requires a TaskInfo argument containing only width and height");d(r(h,"tasks.updateTask"),i)},c.submitTask=function(t,i){u(r(h,"tasks.submitTask"),t,i)},c.getDefaultSizeIfNotProvided=f}(c||(c={}));export{c as tasks};
@@ -1 +1 @@
1
- const t="2.29.0-beta.3";export{t as version};
1
+ const t="2.29.1-beta.0";export{t as version};
@@ -1 +1 @@
1
- import{__awaiter as e,__rest as i}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.22.4_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{sendMessageToParent as r}from"../internal/communication.js";import{registerHandler as o}from"../internal/handlers.js";import{ensureInitialized as t}from"../internal/internalAPIs.js";import{getApiVersionTag as n}from"../internal/telemetry.js";import{ssrSafeWindow as d,inServerSideRenderingEnvironment as a}from"../internal/utils.js";import{createEffectParameterChangeCallback as s,processMediaStream as f}from"../internal/videoEffectsUtils.js";import{VideoPerformanceMonitor as m}from"../internal/videoPerformanceMonitor.js";import{FrameContexts as l,errorNotSupportedOnPlatform as c}from"./constants.js";import{runtime as v}from"./runtime.js";const u="v2";var F;!function(F){const p=a()?void 0:new m(r);var E,g;function h(e){r(n(u,"videoEffects.notifyError"),"video.notifyError",[e])}function P(){return t(v)&&!!v.supports.video&&(!!v.supports.video.mediaStream||!!v.supports.video.sharedFrame)}function V(){var e;return t(v,l.sidePanel)&&function(){var e,i,r,o;return!(!(null===(i=null===(e=d().chrome)||void 0===e?void 0:e.webview)||void 0===i?void 0:i.getTextureStream)||!(null===(o=null===(r=d().chrome)||void 0===r?void 0:r.webview)||void 0===o?void 0:o.registerTextureStream))}()&&!!(null===(e=v.supports.video)||void 0===e?void 0:e.mediaStream)}function w(){var e;return t(v,l.sidePanel)&&!!(null===(e=v.supports.video)||void 0===e?void 0:e.sharedFrame)}(F.VideoFrameFormat||(F.VideoFrameFormat={})).NV12="NV12",(E=F.EffectChangeType||(F.EffectChangeType={})).EffectChanged="EffectChanged",E.EffectDisabled="EffectDisabled",(g=F.EffectFailureReason||(F.EffectFailureReason={})).InvalidEffectId="InvalidEffectId",g.InitializationFailure="InitializationFailure",F.registerForVideoFrame=function(d){if(t(v,l.sidePanel),!P())throw c;if(!d.videoFrameHandler||!d.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(o(n(u,"videoEffects.setFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==p?void 0:p.setFrameProcessTimeLimit(e.timeLimit)),!1),V())!function(i,d){if(t(v,l.sidePanel),!P()||!V())throw c;o(n(u,"videoEffects.startVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(r=>e(this,void 0,void 0,(function*(){const{streamId:o}=r,t=function(i,r){return o=>e(this,void 0,void 0,(function*(){const e=o.videoFrame;null==r||r.reportStartFrameProcessing(e.codedWidth,e.codedHeight);const t=yield i(o);return null==r||r.reportFrameProcessed(),t}))}(i,p);yield f(o,t,h,p)}))),!1),r(n(u,"videoEffects.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[d])}(d.videoFrameHandler,d.config);else{if(!w())throw c;!function(e,d){if(t(v,l.sidePanel),!P()||!w())throw c;o(n(u,"videoEffects.registerForVideoBufferHandler"),"video.newVideoFrame",(o=>{if(o){const t=o.timestamp;null==p||p.reportStartFrameProcessing(o.width,o.height),e(function(e){if("videoFrameBuffer"in e)return e;{const{data:r}=e,o=i(e,["data"]);return Object.assign(Object.assign({},o),{videoFrameBuffer:r})}}(o),(()=>{null==p||p.reportFrameProcessed(),function(e){r(n(u,"videoEffects.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}(t)}),h)}}),!1),r(n(u,"videoEffects.registerForVideoFrame"),"video.registerForVideoFrame",[d])}(d.videoBufferHandler,d.config)}null==p||p.startMonitorSlowFrameProcessing()},F.notifySelectedVideoEffectChanged=function(e,i){if(t(v,l.sidePanel),!P())throw c;r(n(u,"videoEffects.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,i])},F.registerForVideoEffect=function(e){if(t(v,l.sidePanel),!P())throw c;o(n(u,"videoEffects.registerEffectParameterChangeHandler"),"video.effectParameterChange",s(e,p),!1),r(n(u,"videoEffects.registerForVideoEffect"),"video.registerForVideoEffect")},F.isSupported=P}(F||(F={}));export{F as videoEffects};
1
+ import{__awaiter as e,__rest as i}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.24.0_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{sendMessageToParent as r}from"../internal/communication.js";import{registerHandler as o}from"../internal/handlers.js";import{ensureInitialized as t}from"../internal/internalAPIs.js";import{getApiVersionTag as n}from"../internal/telemetry.js";import{ssrSafeWindow as d,inServerSideRenderingEnvironment as a}from"../internal/utils.js";import{createEffectParameterChangeCallback as s,processMediaStream as f}from"../internal/videoEffectsUtils.js";import{VideoPerformanceMonitor as m}from"../internal/videoPerformanceMonitor.js";import{FrameContexts as l,errorNotSupportedOnPlatform as c}from"./constants.js";import{runtime as v}from"./runtime.js";const u="v2";var F;!function(F){const p=a()?void 0:new m(r);var E,g;function h(e){r(n(u,"videoEffects.notifyError"),"video.notifyError",[e])}function P(){return t(v)&&!!v.supports.video&&(!!v.supports.video.mediaStream||!!v.supports.video.sharedFrame)}function V(){var e;return t(v,l.sidePanel)&&function(){var e,i,r,o;return!(!(null===(i=null===(e=d().chrome)||void 0===e?void 0:e.webview)||void 0===i?void 0:i.getTextureStream)||!(null===(o=null===(r=d().chrome)||void 0===r?void 0:r.webview)||void 0===o?void 0:o.registerTextureStream))}()&&!!(null===(e=v.supports.video)||void 0===e?void 0:e.mediaStream)}function w(){var e;return t(v,l.sidePanel)&&!!(null===(e=v.supports.video)||void 0===e?void 0:e.sharedFrame)}(F.VideoFrameFormat||(F.VideoFrameFormat={})).NV12="NV12",(E=F.EffectChangeType||(F.EffectChangeType={})).EffectChanged="EffectChanged",E.EffectDisabled="EffectDisabled",(g=F.EffectFailureReason||(F.EffectFailureReason={})).InvalidEffectId="InvalidEffectId",g.InitializationFailure="InitializationFailure",F.registerForVideoFrame=function(d){if(t(v,l.sidePanel),!P())throw c;if(!d.videoFrameHandler||!d.videoBufferHandler)throw new Error("Both videoFrameHandler and videoBufferHandler must be provided");if(o(n(u,"videoEffects.setFrameProcessTimeLimitHandler"),"video.setFrameProcessTimeLimit",(e=>null==p?void 0:p.setFrameProcessTimeLimit(e.timeLimit)),!1),V())!function(i,d){if(t(v,l.sidePanel),!P()||!V())throw c;o(n(u,"videoEffects.startVideoExtensibilityVideoStreamHandler"),"video.startVideoExtensibilityVideoStream",(r=>e(this,void 0,void 0,(function*(){const{streamId:o}=r,t=function(i,r){return o=>e(this,void 0,void 0,(function*(){const e=o.videoFrame;null==r||r.reportStartFrameProcessing(e.codedWidth,e.codedHeight);const t=yield i(o);return null==r||r.reportFrameProcessed(),t}))}(i,p);yield f(o,t,h,p)}))),!1),r(n(u,"videoEffects.mediaStream.registerForVideoFrame"),"video.mediaStream.registerForVideoFrame",[d])}(d.videoFrameHandler,d.config);else{if(!w())throw c;!function(e,d){if(t(v,l.sidePanel),!P()||!w())throw c;o(n(u,"videoEffects.registerForVideoBufferHandler"),"video.newVideoFrame",(o=>{if(o){const t=o.timestamp;null==p||p.reportStartFrameProcessing(o.width,o.height),e(function(e){if("videoFrameBuffer"in e)return e;{const{data:r}=e,o=i(e,["data"]);return Object.assign(Object.assign({},o),{videoFrameBuffer:r})}}(o),(()=>{null==p||p.reportFrameProcessed(),function(e){r(n(u,"videoEffects.notifyVideoFrameProcessed"),"video.videoFrameProcessed",[e])}(t)}),h)}}),!1),r(n(u,"videoEffects.registerForVideoFrame"),"video.registerForVideoFrame",[d])}(d.videoBufferHandler,d.config)}null==p||p.startMonitorSlowFrameProcessing()},F.notifySelectedVideoEffectChanged=function(e,i){if(t(v,l.sidePanel),!P())throw c;r(n(u,"videoEffects.notifySelectedVideoEffectChanged"),"video.videoEffectChanged",[e,i])},F.registerForVideoEffect=function(e){if(t(v,l.sidePanel),!P())throw c;o(n(u,"videoEffects.registerEffectParameterChangeHandler"),"video.effectParameterChange",s(e,p),!1),r(n(u,"videoEffects.registerForVideoEffect"),"video.registerForVideoEffect")},F.isSupported=P}(F||(F={}));export{F as videoEffects};
@@ -1 +1 @@
1
- import{__awaiter as i}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.22.4_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{sendAndHandleSdkError as e}from"../internal/communication.js";import{ensureInitialized as t}from"../internal/internalAPIs.js";import{getApiVersionTag as r}from"../internal/telemetry.js";import{FrameContexts as n,errorNotSupportedOnPlatform as s,errorInvalidCount as o,errorInvalidResponse as a}from"./constants.js";import{DevicePermission as u}from"./interfaces.js";import{runtime as m}from"./runtime.js";const l="v2";var p;!function(p){var c,d;let f;(c=p.CameraRestriction||(p.CameraRestriction={}))[c.FrontOrRear=1]="FrontOrRear",c[c.FrontOnly=2]="FrontOnly",c[c.RearOnly=3]="RearOnly",(d=p.Source||(p.Source={}))[d.Camera=1]="Camera",d[d.Gallery=2]="Gallery",p.hasPermission=function(){if(t(m,n.content,n.task),!f.isSupported())throw s;const i=u.Media;return e(r(l,"visualMedia.hasPermission"),"permissions.has",i)},p.requestPermission=function(){if(t(m,n.content,n.task),!f.isSupported())throw s;const i=u.Media;return e(r(l,"visualMedia.requestPermission"),"permissions.request",i)},function(u){function p(){return!!(t(m)&&m.supports.visualMedia&&m.supports.visualMedia.image&&m.supports.permissions)}function c(){if(!p())throw s}function d(i){if(!i||i.maxVisualMediaCount>10||i.maxVisualMediaCount<1)throw o}function f(i,e){if(e.length>i)throw a}u.captureImages=function(s){return i(this,void 0,void 0,(function*(){t(m,n.content,n.task),c(),d(s);const i=yield e(r(l,"visualMedia.image.captureImages"),"visualMedia.image.captureImages",s);return f(s.maxVisualMediaCount,i),i}))},u.retrieveImages=function(s){return i(this,void 0,void 0,(function*(){t(m,n.content,n.task),c(),d(s);const i=yield e(r(l,"visualMedia.image.retrieveImages"),"visualMedia.image.retrieveImages",s);return f(s.maxVisualMediaCount,i),i}))},u.isSupported=p}(f=p.image||(p.image={}))}(p||(p={}));export{p as visualMedia};
1
+ import{__awaiter as i}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.24.0_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{sendAndHandleSdkError as e}from"../internal/communication.js";import{ensureInitialized as t}from"../internal/internalAPIs.js";import{getApiVersionTag as r}from"../internal/telemetry.js";import{FrameContexts as n,errorNotSupportedOnPlatform as s,errorInvalidCount as o,errorInvalidResponse as a}from"./constants.js";import{DevicePermission as u}from"./interfaces.js";import{runtime as m}from"./runtime.js";const l="v2";var p;!function(p){var c,d;let f;(c=p.CameraRestriction||(p.CameraRestriction={}))[c.FrontOrRear=1]="FrontOrRear",c[c.FrontOnly=2]="FrontOnly",c[c.RearOnly=3]="RearOnly",(d=p.Source||(p.Source={}))[d.Camera=1]="Camera",d[d.Gallery=2]="Gallery",p.hasPermission=function(){if(t(m,n.content,n.task),!f.isSupported())throw s;const i=u.Media;return e(r(l,"visualMedia.hasPermission"),"permissions.has",i)},p.requestPermission=function(){if(t(m,n.content,n.task),!f.isSupported())throw s;const i=u.Media;return e(r(l,"visualMedia.requestPermission"),"permissions.request",i)},function(u){function p(){return!!(t(m)&&m.supports.visualMedia&&m.supports.visualMedia.image&&m.supports.permissions)}function c(){if(!p())throw s}function d(i){if(!i||i.maxVisualMediaCount>10||i.maxVisualMediaCount<1)throw o}function f(i,e){if(e.length>i)throw a}u.captureImages=function(s){return i(this,void 0,void 0,(function*(){t(m,n.content,n.task),c(),d(s);const i=yield e(r(l,"visualMedia.image.captureImages"),"visualMedia.image.captureImages",s);return f(s.maxVisualMediaCount,i),i}))},u.retrieveImages=function(s){return i(this,void 0,void 0,(function*(){t(m,n.content,n.task),c(),d(s);const i=yield e(r(l,"visualMedia.image.retrieveImages"),"visualMedia.image.retrieveImages",s);return f(s.maxVisualMediaCount,i),i}))},u.isSupported=p}(f=p.image||(p.image={}))}(p||(p={}));export{p as visualMedia};
@@ -1 +1 @@
1
- import{__awaiter as t}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.22.4_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{sendAndUnwrap as e}from"../internal/communication.js";import{GlobalVars as o}from"../internal/globalVars.js";import{ensureInitialized as r}from"../internal/internalAPIs.js";import{getApiVersionTag as i}from"../internal/telemetry.js";import{app as n}from"./app.js";import{errorNotSupportedOnPlatform as s,HostClientType as l,HostName as p}from"./constants.js";import{runtime as a}from"./runtime.js";var m;!function(m){function d(){return r(a)&&void 0!==a.supports.webStorage}m.isWebStorageClearedOnUserLogOut=function(){return t(this,void 0,void 0,(function*(){if(r(a),!d())throw s;return!(!a.isLegacyTeams||o.hostClientType!==l.android&&o.hostClientType!==l.ios&&o.hostClientType!==l.ipados||(yield function(){return t(this,void 0,void 0,(function*(){return null===u&&(u=(yield n.getContext()).app.host.name),u}))}())!==p.teams)||(yield e(i("v2","webStorage.isWebStorageClearedOnUserLogOut"),"webStorage.isWebStorageClearedOnUserLogOut"))}))},m.isSupported=d}(m||(m={}));let u=null;export{m as webStorage};
1
+ import{__awaiter as t}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.24.0_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{sendAndUnwrap as e}from"../internal/communication.js";import{GlobalVars as o}from"../internal/globalVars.js";import{ensureInitialized as r}from"../internal/internalAPIs.js";import{getApiVersionTag as i}from"../internal/telemetry.js";import{app as n}from"./app.js";import{errorNotSupportedOnPlatform as s,HostClientType as l,HostName as p}from"./constants.js";import{runtime as a}from"./runtime.js";var m;!function(m){function d(){return r(a)&&void 0!==a.supports.webStorage}m.isWebStorageClearedOnUserLogOut=function(){return t(this,void 0,void 0,(function*(){if(r(a),!d())throw s;return!(!a.isLegacyTeams||o.hostClientType!==l.android&&o.hostClientType!==l.ios&&o.hostClientType!==l.ipados||(yield function(){return t(this,void 0,void 0,(function*(){return null===u&&(u=(yield n.getContext()).app.host.name),u}))}())!==p.teams)||(yield e(i("v2","webStorage.isWebStorageClearedOnUserLogOut"),"webStorage.isWebStorageClearedOnUserLogOut"))}))},m.isSupported=d}(m||(m={}));let u=null;export{m as webStorage};
@@ -5527,8 +5527,10 @@ export namespace app {
5527
5527
  * @remarks
5528
5528
  * Initialize must have completed successfully (as determined by the resolved Promise) before any other library calls are made
5529
5529
  *
5530
- * @param validMessageOrigins - Optionally specify a list of cross frame message origins. They must have
5531
- * https: protocol otherwise they will be ignored. Example: https://www.example.com
5530
+ * @param validMessageOrigins - Optionally specify a list of cross-frame message origins. This parameter is used if you know that your app
5531
+ * will be hosted on a custom domain (i.e., not a standard Microsoft 365 host like Teams, Outlook, etc.) Most apps will never need
5532
+ * to pass a value for this parameter.
5533
+ * Any domains passed in the array must have the https: protocol on the string otherwise they will be ignored. Example: https://www.example.com
5532
5534
  * @returns Promise that will be fulfilled when initialization has completed, or rejected if the initialization fails or times out
5533
5535
  */
5534
5536
  function initialize(validMessageOrigins?: string[]): Promise<void>;
@@ -10066,8 +10068,10 @@ export type registerOnThemeChangeHandlerFunctionType = (theme: string) => void;
10066
10068
  * Initializes the library. This must be called before any other SDK calls
10067
10069
  * but after the frame is loaded successfully.
10068
10070
  * @param callback - Optionally specify a callback to invoke when Teams SDK has successfully initialized
10069
- * @param validMessageOrigins - Optionally specify a list of cross frame message origins. There must have
10070
- * https: protocol otherwise they will be ignored. Example: https://www.example.com
10071
+ * @param validMessageOrigins - Optionally specify a list of cross-frame message origins. This parameter is used if you know that your app
10072
+ * will be hosted on a custom domain (i.e., not a standard Microsoft 365 host like Teams, Outlook, etc.) Most apps will never need
10073
+ * to pass a value for this parameter.
10074
+ * Any domains passed in the array must have the https: protocol on the string otherwise they will be ignored. Example: https://www.example.com
10071
10075
  */
10072
10076
  export function initialize(callback?: callbackFunctionType, validMessageOrigins?: string[]): void;
10073
10077
  /**
@@ -2957,7 +2957,7 @@ function isFollowingApiVersionTagFormat(apiVersionTag) {
2957
2957
  }
2958
2958
 
2959
2959
  ;// CONCATENATED MODULE: ./src/artifactsForCDN/validDomains.json
2960
- const validDomains_namespaceObject = /*#__PURE__*/JSON.parse('{"validOrigins":["teams.microsoft.com","teams.microsoft.us","gov.teams.microsoft.us","dod.teams.microsoft.us","int.teams.microsoft.com","outlook.office.com","outlook-sdf.office.com","outlook.office365.com","outlook-sdf.office365.com","outlook.live.com","outlook-sdf.live.com","teams.live.com","local.teams.live.com","local.teams.live.com:8080","local.teams.office.com","local.teams.office.com:8080","devspaces.skype.com","*.www.office.com","www.office.com","word.office.com","excel.office.com","powerpoint.office.com","www.officeppe.com","*.www.microsoft365.com","www.microsoft365.com","bing.com","edgeservices.bing.com","www.bing.com","www.staging-bing-int.com","*.cloud.microsoft","*.m365.cloud.microsoft","edgeapi.svc.cloud.microsoft","copilot.microsoft.com","windows.msn.com","fa000000125.resources.office.net","fa000000129.resources.office.net","fa000000124.resources.office.net","fa000000128.resources.office.net","fa000000136.resources.office.net"]}');
2960
+ const validDomains_namespaceObject = /*#__PURE__*/JSON.parse('{"validOrigins":["teams.microsoft.com","teams.microsoft.us","gov.teams.microsoft.us","dod.teams.microsoft.us","int.teams.microsoft.com","outlook.office.com","outlook-sdf.office.com","outlook.office365.com","outlook-sdf.office365.com","outlook.live.com","outlook-sdf.live.com","teams.live.com","local.teams.live.com","local.teams.live.com:8080","local.teams.office.com","local.teams.office.com:8080","devspaces.skype.com","*.www.office.com","www.office.com","word.office.com","excel.office.com","powerpoint.office.com","www.officeppe.com","*.www.microsoft365.com","www.microsoft365.com","bing.com","edgeservices.bing.com","work.bing.com","www.bing.com","www.staging-bing-int.com","*.cloud.microsoft","*.m365.cloud.microsoft","edgeapi.freya.svc.cloud.microsoft","copilot.microsoft.com","windows.msn.com","fa000000125.resources.office.net","fa000000129.resources.office.net","fa000000124.resources.office.net","fa000000128.resources.office.net","fa000000136.resources.office.net"]}');
2961
2961
  var artifactsForCDN_validDomains_namespaceObject = /*#__PURE__*/__webpack_require__.t(validDomains_namespaceObject, 2);
2962
2962
  ;// CONCATENATED MODULE: ./src/internal/constants.ts
2963
2963
 
@@ -3511,7 +3511,7 @@ const _minRuntimeConfigToUninitialize = {
3511
3511
  * @hidden
3512
3512
  * Package version.
3513
3513
  */
3514
- const version = "2.29.0-beta.3";
3514
+ const version = "2.29.1-beta.0";
3515
3515
 
3516
3516
  ;// CONCATENATED MODULE: ./src/internal/internalAPIs.ts
3517
3517
 
@@ -5306,8 +5306,10 @@ var app;
5306
5306
  * @remarks
5307
5307
  * Initialize must have completed successfully (as determined by the resolved Promise) before any other library calls are made
5308
5308
  *
5309
- * @param validMessageOrigins - Optionally specify a list of cross frame message origins. They must have
5310
- * https: protocol otherwise they will be ignored. Example: https://www.example.com
5309
+ * @param validMessageOrigins - Optionally specify a list of cross-frame message origins. This parameter is used if you know that your app
5310
+ * will be hosted on a custom domain (i.e., not a standard Microsoft 365 host like Teams, Outlook, etc.) Most apps will never need
5311
+ * to pass a value for this parameter.
5312
+ * Any domains passed in the array must have the https: protocol on the string otherwise they will be ignored. Example: https://www.example.com
5311
5313
  * @returns Promise that will be fulfilled when initialization has completed, or rejected if the initialization fails or times out
5312
5314
  */
5313
5315
  function initialize(validMessageOrigins) {
@@ -15583,8 +15585,10 @@ const publicAPIsTelemetryVersionNumber = "v1" /* ApiVersionNumber.V_1 */;
15583
15585
  * Initializes the library. This must be called before any other SDK calls
15584
15586
  * but after the frame is loaded successfully.
15585
15587
  * @param callback - Optionally specify a callback to invoke when Teams SDK has successfully initialized
15586
- * @param validMessageOrigins - Optionally specify a list of cross frame message origins. There must have
15587
- * https: protocol otherwise they will be ignored. Example: https://www.example.com
15588
+ * @param validMessageOrigins - Optionally specify a list of cross-frame message origins. This parameter is used if you know that your app
15589
+ * will be hosted on a custom domain (i.e., not a standard Microsoft 365 host like Teams, Outlook, etc.) Most apps will never need
15590
+ * to pass a value for this parameter.
15591
+ * Any domains passed in the array must have the https: protocol on the string otherwise they will be ignored. Example: https://www.example.com
15588
15592
  */
15589
15593
  function initialize(callback, validMessageOrigins) {
15590
15594
  appInitializeHelper(getApiVersionTag(publicAPIsTelemetryVersionNumber, "initialize" /* ApiName.PublicAPIs_Initialize */), validMessageOrigins).then(() => {