Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

amazon-quicksight-embedding-sdk

Package Overview
Dependencies
Maintainers
10
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

amazon-quicksight-embedding-sdk - npm Package Compare versions

Comparing version 2.2.1 to 2.2.2

3

CHANGELOG.md

@@ -0,1 +1,4 @@

**2.2.2**
* Minor update and bug fixes
* Add a survey link to README

@@ -2,0 +5,0 @@ **2.2.1**

2

dist/commons/index.d.ts
import { BuildExperienceUrlOptions, TargetedMessageEvent, InternalExperience, PostMessageEvent, UrlInfo } from '../types';
declare const SDK_VERSION = "2.2.1";
declare const SDK_VERSION = "2.2.2";
declare const FRAME_TIMEOUT = 60000;

@@ -4,0 +4,0 @@ declare const isMessageEvent: (messageEvent: TargetedMessageEvent) => messageEvent is TargetedMessageEvent;

@@ -65,3 +65,3 @@ "use strict";

var punycode_1 = require("punycode");
var SDK_VERSION = '2.2.1';
var SDK_VERSION = '2.2.2';
exports.SDK_VERSION = SDK_VERSION;

@@ -68,0 +68,0 @@ var FRAME_TIMEOUT = 60000;

@@ -243,3 +243,3 @@ "use strict";

DashboardId: dashboardId,
Parameters: navigateToDashboardOptions.parameters
Parameters: navigateToDashboardOptions === null || navigateToDashboardOptions === void 0 ? void 0 : navigateToDashboardOptions.parameters
}

@@ -246,0 +246,0 @@ })];

/*! For license information please see quicksight-embedding-js-sdk.min.js.LICENSE.txt */
(()=>{var e={174:(e,t,r)=>{var n=r(388);r(672).QuickSightEmbedding=n,e.exports=n},672:(e,t,r)=>{"use strict";e.exports=function(){if("object"==typeof globalThis)return globalThis;var e;try{e=this||new Function("return this")()}catch(e){if("object"==typeof window)return window;if("object"==typeof self)return self;if(void 0!==r.g)return r.g}return e}()},388:(e,t,r)=>{"use strict";r.r(t),r.d(t,{QSE:()=>n,SDK_VERSION:()=>D,createEmbeddingContext:()=>Ue});var n={};function o(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t,r,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,o)}function c(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function c(e){a(i,n,o,c,u,"next",e)}function u(e){a(i,n,o,c,u,"throw",e)}c(void 0)}))}}r.r(n);var u=r(687),s=r.n(u);const l={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let f;const p=new Uint8Array(16);function d(){if(!f&&(f="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!f))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return f(p)}const v=[];for(let e=0;e<256;++e)v.push((e+256).toString(16).slice(1));const h=function(e,t,r){if(l.randomUUID&&!t&&!e)return l.randomUUID();const n=(e=e||{}).random||(e.rng||d)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=n[e];return t}return function(e,t=0){return(v[e[t+0]]+v[e[t+1]]+v[e[t+2]]+v[e[t+3]]+"-"+v[e[t+4]]+v[e[t+5]]+"-"+v[e[t+6]]+v[e[t+7]]+"-"+v[e[t+8]]+v[e[t+9]]+"-"+v[e[t+10]]+v[e[t+11]]+v[e[t+12]]+v[e[t+13]]+v[e[t+14]]+v[e[t+15]]).toLowerCase()}(n)},m=function(){var e=new Map,t=function(t,r){t&&"function"==typeof r&&(e.has(t)||e.set(t,[]),e.get(t).push(r))},r=function(t,r){e.has(t)&&e.get(t).forEach((function(e){e(r)}))},n=function(t,r){if(e.has(t)){var n=e.get(t).filter((function(e){return e!==r}));e.set(t,n)}};return{addEventListener:t,invokeEventListener:r,removeEventListener:n,experienceEventListenerBuilder:function(e,o){var i=function(r){return t(e,r)};return o&&i(o),{addExperienceEventListener:i,invokeExperienceEventListener:function(t){return r(e,t)},removeExperienceEventListener:function(t){return n(e,t)}}}}};function E(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==i(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===i(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function y(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return O(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?O(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const g=2147483647,b={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},w=Math.floor,N=String.fromCharCode;function R(e){throw new RangeError(b[e])}const S=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},T=function(e,t,r){let n=0;for(e=r?w(e/700):e>>1,e+=w(e/t);e>455;n+=36)e=w(e/35);return w(n+36*e/(e+38))},_=function(e){const t=[],r=(e=function(e){const t=[];let r=0;const n=e.length;for(;r<n;){const o=e.charCodeAt(r++);if(o>=55296&&o<=56319&&r<n){const n=e.charCodeAt(r++);56320==(64512&n)?t.push(((1023&o)<<10)+(1023&n)+65536):(t.push(o),r--)}else t.push(o)}return t}(e)).length;let n=128,o=0,i=72;for(const r of e)r<128&&t.push(N(r));const a=t.length;let c=a;for(a&&t.push("-");c<r;){let r=g;for(const t of e)t>=n&&t<r&&(r=t);const u=c+1;r-n>w((g-o)/u)&&R("overflow"),o+=(r-n)*u,n=r;for(const r of e)if(r<n&&++o>g&&R("overflow"),r===n){let e=o;for(let r=36;;r+=36){const n=r<=i?1:r>=i+26?26:r-i;if(e<n)break;const o=e-n,a=36-n;t.push(N(S(n+o%a,0))),e=w(o/a)}t.push(N(S(e,0))),i=T(o,u,c===a),o=0,++c}++o,++n}return t.join("")};var x=["parameters"];function I(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function A(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?I(Object(r),!0).forEach((function(t){E(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):I(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var D="2.2.1",j=6e4,L=function(e){var t=/^(https:\/\/[^/]+)\/(embedding|embed)\/([^/]+)\/[^?]+\?(.*)/i.exec(e)||[];if((null==t?void 0:t.length)<4)throw'Invalid embedding url: "'.concat(e,'"');return{guid:t[3],host:t[1],urlSearchParams:new URLSearchParams(t[4])}};function C(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function P(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?C(Object(r),!0).forEach((function(t){E(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var k=function(e){return e.CONTENT_LOADED="CONTENT_LOADED",e.ERROR_OCCURRED="ERROR_OCCURRED",e.SIZE_CHANGED="SIZE_CHANGED",e.PARAMETERS_CHANGED="PARAMETERS_CHANGED",e.SELECTED_SHEET_CHANGED="SELECTED_SHEET_CHANGED",e.MODAL_OPENED="MODAL_OPENED",e.Q_SEARCH_CLOSED="Q_SEARCH_CLOSED",e.Q_SEARCH_OPENED="Q_SEARCH_OPENED",e.Q_SEARCH_SIZE_CHANGED="Q_SEARCH_SIZE_CHANGED",e.Q_SEARCH_ENTERED_FULLSCREEN="Q_SEARCH_ENTERED_FULLSCREEN",e.Q_SEARCH_EXITED_FULLSCREEN="Q_SEARCH_EXITED_FULLSCREEN",e}({}),M=function(e){return e.SET_PARAMETERS="SET_PARAMETERS",e.SET_SELECTED_SHEET_ID="SET_SELECTED_SHEET_ID",e.SET_Q_SEARCH_QUESTION="SET_Q_SEARCH_QUESTION",e}({}),U=function(e){return e.GET_PARAMETERS="GET_PARAMETERS",e.GET_SHEETS="GET_SHEETS",e.GET_SELECTED_SHEET_ID="GET_SELECTED_SHEET_ID",e}({}),H=function(e){return e.ACKNOWLEDGE="ACKNOWLEDGE",e.INITIATE_PRINT="INITIATE_PRINT",e.NAVIGATE_TO_DASHBOARD="NAVIGATE_TO_DASHBOARD",e.CLOSE_Q_SEARCH="CLOSE_Q_SEARCH",e.UNDO="UNDO",e.REDO="REDO",e.RESET="RESET",e.TOGGLE_BOOKMARKS_PANE="TOGGLE_BOOKMARKS_PANE",e}({}),G=P(P(P(P({},k),M),U),H),F=function(e){return e.ERROR="ERROR",e.INFO="INFO",e.WARN="WARN",e}({}),Q=function(e){return e.FRAME_STARTED="FRAME_STARTED",e.FRAME_MOUNTED="FRAME_MOUNTED",e.FRAME_LOADED="FRAME_LOADED",e}({}),V=function(e){return e.FRAME_NOT_CREATED="FRAME_NOT_CREATED",e.NO_BODY="NO_BODY",e.NO_CONTAINER="NO_CONTAINER",e.INVALID_CONTAINER="INVALID_CONTAINER",e.NO_URL="NO_URL",e.INVALID_URL="INVALID_URL",e.NO_FRAME_OPTIONS="NO_FRAME_OPTIONS",e.INVALID_FRAME_OPTIONS="INVALID_FRAME_OPTIONS",e}({}),z=function(e){return e.UNRECOGNIZED_CONTENT_OPTIONS="UNRECOGNIZED_CONTENT_OPTIONS",e.UNRECOGNIZED_FRAME_OPTIONS="UNRECOGNIZED_FRAME_OPTIONS",e.UNRECOGNIZED_EVENT_TARGET="UNRECOGNIZED_EVENT_TARGET",e}({}),B=P(P(P({},Q),V),z),Z=function(e){return e.CONSOLE="CONSOLE",e.CONTEXT="CONTEXT",e.CONTROL="CONTROL",e.VISUAL="VISUAL",e.DASHBOARD="DASHBOARD",e.QSEARCH="QSEARCH",e}({}),W="quicksight-embedding-iframe",q=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=document.createElementNS("http://www.w3.org/2000/svg",e);return Object.entries(t).forEach((function(e){var t=y(e,2),r=t[0],n=t[1];return o.setAttribute(r,n)})),Object.entries(r).forEach((function(e){var t=y(e,2),r=t[0],n=t[1];return o.style.setProperty(r,n)})),n.forEach((function(e){return o.appendChild(e)})),o};var K=["onMessage"];function X(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?X(Object(r),!0).forEach((function(t){E(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):X(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const $=function(e,t,r,n,a,u){var l,f=e.url,p=e.container,d=e.width,v=void 0===d?"100%":d,m=e.height,E=void 0===m?"100%":m,O=e.withIframePlaceholder,g=e.className,b=e.onChange,w=null,N=function(e){"function"==typeof b&&b(e,{frame:w})};if(!p){var R="Container is required for the experience";throw N({eventName:B.NO_CONTAINER,eventLevel:F.ERROR,message:R,data:{experience:n}}),new Error(R)}if("string"==typeof p)try{l=document.querySelector(p)}catch(e){var S=e.message;throw N({eventName:B.INVALID_CONTAINER,eventLevel:F.ERROR,message:S,data:{experience:n}}),e}else"object"===i(p)&&p.nodeName&&(l=p);if(!l){var T="Invalid container '".concat(p,"' for the experience");throw N({eventName:B.INVALID_CONTAINER,eventLevel:F.ERROR,message:T,data:{experience:n}}),new Error(T)}var I,L=r.eventManager,C=r.sendToControlFrame,P=r.timeout,k=void 0===P?j:P,M=t||{},U=M.onMessage,H=o(M,K),Q=(0,L.experienceEventListenerBuilder)(a,(function(e){var t={frame:w};u&&u(e,t),null==U||U(e,t)})),V=Q.addExperienceEventListener,z=Q.removeExperienceEventListener;if(!f)throw N({eventName:B.NO_URL,eventLevel:F.ERROR,message:"Url is required for the experience",data:{experience:n}}),new Error("Url is required for the experience");I=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,n=t.parameters,a=o(t,x),c=r.contextId,u=r.discriminator,s=[],l=function(e){if(!e||"object"!==i(e))return"";var t=Object.entries(e).reduce((function(e,t){var r=y(t,2),n=r[0],o=r[1];return null!=o&&(e[n]="".concat(o)),e}),{punyCodeEmbedOrigin:_("".concat(window.location.origin,"/"))});return new URLSearchParams(t).toString()}(A(A({},a),{},{contextId:c,discriminator:u,clientTime:Date.now(),sdkVersion:D}));l&&s.push(l);var f=function(e){return e&&"object"===i(e)?Object.entries(e).map((function(e){var t=y(e,2),r=t[0],n=t[1],o=[].concat(n),i=encodeURIComponent(r);return o.map((function(e){return encodeURIComponent(e)})).map((function(e){return"p.".concat(i,"=").concat(e)})).join("&")})).join("&"):""}(n);f&&s.push(f);var p=s.join("#"),d="string"==typeof e?e:e.toString();return[d,p].join(d.includes("?")?"&":"?")}(f,H,n);var Z,X=function(){var e=c(s().mark((function e(t){var r,n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=h(),n=Y(Y({},t),{},{eventId:r,timestamp:Date.now(),version:D}),w.contentWindow.postMessage(n,I),t.eventName!==G.ACKNOWLEDGE){e.next=5;break}return e.abrupt("return",Promise.resolve({success:!0}));case 5:return e.abrupt("return",new Promise((function(e,t){var n=function t(n){n.data.eventId===r&&(window.removeEventListener("message",t),e(n.data.message))};window.addEventListener("message",n),setTimeout((function(){window.removeEventListener("message",n),t()}),5e3)})));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),$=function(){var e=c(s().mark((function e(t){var r;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=C||X,e.abrupt("return",r(t));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();Z=setTimeout((function(){throw N({eventName:B.FRAME_NOT_CREATED,eventLevel:F.ERROR,message:"Creating the frame timed out",data:{experience:n}}),new Error("Creating the frame timed out")}),k);var J=function(){var e=c(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Z&&clearTimeout(Z),N({eventName:B.FRAME_LOADED,eventLevel:F.INFO,message:"The frame loaded",data:{experience:n}});case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();N({eventName:B.FRAME_STARTED,eventLevel:F.INFO,message:"Creating the frame",data:{experience:n}});try{w=function(e){var t,r,n=e.id,o=e.src,i=e.width,a=void 0===i?"0px":i,c=e.height,u=void 0===c?"0px":c,s=e.container,l=e.onLoad,f=e.loading,p=e.withIframePlaceholder,d=e.payload,v=e.className,h=n||"".concat(s.id,"-iframe");if(p){if((t=document.createElement("div")).id="".concat(h,"-placeholder"),t.style.width=a,t.style.backgroundColor="rgba(0,0,0,.01)",t.style.display="flex",t.style.justifyContent="center",t.style.alignItems="center",t.className="".concat(W,"-placeholder"),u.endsWith("px")&&(t.style.height=u),"boolean"!=typeof p)t.appendChild(p);else{var m=(r=[1,2,3].map((function(e){var t=q("animate",{attributeName:"opacity",dur:"1s",values:"0;1;0",repeatCount:"indefinite",begin:"".concat(e/10)});return q("circle",{fill:"#ccc",stroke:"none",cx:"".concat(20*e-14),cy:"50",r:"6"},void 0,[t])})),q("svg",{version:"1.1",x:"0px",y:"0px",viewBox:"0 0 100 100","enable-background":"new 0 0 0 0"},{width:"100px",height:"100px"},r));t.appendChild(m)}s.appendChild(t)}var E=[W];v&&E.push(v);var O,y=document.createElement("iframe");return y.className=E.join(" ").trim(),y.id=h,y.name=h,y.width=a,y.height=u,f&&(y.loading=f),y.style.border="0px",y.style.padding="0px",t&&(y.style.opacity="0",y.style.position="absolute"),"0px"===a&&"0px"===u&&(y.style.position="absolute"),s.appendChild(y),d?O=function(e){var t=e.src,r=e.container,n=e.target,o=e.payload;if(t&&r){var i=document.createElement("form");return i.style.visibility="hidden",i.method="POST",i.action=t,i.target=n,i.name="".concat(n,"-form"),Object.keys(o).forEach((function(e){var t=document.createElement("input");t.type="hidden",t.name=e,t.value=o[e],i.appendChild(t)})),r.appendChild(i),i.submit(),{remove:function(){i.remove()}}}}({src:o,target:y.name,container:s,payload:d}):y.src=o,y.addEventListener("load",(function(e){var r;t&&(t.remove(),y.style.position="",y.style.opacity="1",y.style.transition="opacity .5s ease-in-out"),"function"==typeof l&&l(e),null===(r=O)||void 0===r||r.remove()})),y}({id:a,src:I,width:v,height:E,container:l,onLoad:J,withIframePlaceholder:O,className:g})}catch(e){throw N({eventName:B.FRAME_NOT_CREATED,eventLevel:F.ERROR,message:"Failed to create the frame",data:{experience:n}}),e}return N({eventName:B.FRAME_MOUNTED,eventLevel:F.INFO,message:"The frame mounted",data:{frame:w,experience:n}}),{internalAddEventListener:function(e,t){var r=function(r,n){r.eventName===e&&t(r,n)};return V(r),{remove:function(){z(r)}}},internalSend:$,frame:w}};var J=["fitToIframeWidth","locale","parameters","onMessage"];function ee(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function te(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ee(Object(r),!0).forEach((function(t){E(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ee(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const re=function(e,t,r,n){var i=e.url,a=e.resizeHeightOnSizeChangedEvent,u=e.onChange,l=(r||{}).contextId;if(!i){var f="Url is required for the experience";throw null==u||u({eventName:B.NO_URL,eventLevel:F.ERROR,message:f},{frame:null}),new Error(f)}var p=oe(i);if(!p)throw null==u||u({eventName:B.INVALID_URL,eventLevel:F.ERROR,message:"Invalid visual experience url",data:{url:i}},{frame:null}),new Error("Invalid visual experience url");var d=Ae(p,n,l,ie),v=d.experienceIdentifier,h=d.internalExperience,m=$(e,function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.fitToIframeWidth,r=e.locale,n=e.parameters,i=e.onMessage,a=o(e,J),c=Object.keys(a);Object.keys(a).length>0&&(null==u||u({eventName:B.UNRECOGNIZED_CONTENT_OPTIONS,eventLevel:F.WARN,message:"Visual content options contain unrecognized properties",data:{unrecognizedContentOptions:c}},{frame:null}),console.warn("Visual content options contain unrecognized properties"));var s={fitToIframeWidth:null==t||t,locale:r,onMessage:i};return Array.isArray(n)&&(s.parameters=n.reduce((function(e,t){return e[t.Name]=t.Values,e}),{})),s}(t),r,h,v,(function(e,t){"SIZE_CHANGED"===e.eventName&&a&&(t.frame.height="".concat(e.message.height,"px"))})),E=function(){var e=c(s().mark((function e(t){var r,n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=te(te({},t),{},{eventTarget:h}),e.next=3,m.internalSend(r);case 3:return n=e.sent,e.abrupt("return",n);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),O=function(){var e=c(s().mark((function e(t){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",E({eventName:G.SET_PARAMETERS,message:t}));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),y=function(){var e=c(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",E({eventName:G.RESET}));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return{setParameters:O,reset:y,send:E,addEventListener:m.internalAddEventListener}};var ne=function(e){return!!e&&e.experienceType===Z.VISUAL},oe=function(e){var t=/^https:\/\/[^/]+\/embed\/[^/]+\/dashboards\/([\w-]+)\/sheets\/([\w-]+)\/visuals\/([\w-]+)(\?|$)/i.exec(e)||[];if(!(t.length<5))return{experienceType:Z.VISUAL,dashboardId:t[1],sheetId:t[2],visualId:t[3]}},ie=function(e){if(ne(e))return[e.contextId,e.experienceType,e.dashboardId,e.sheetId,e.visualId,e.discriminator].filter(Boolean).join("-")},ae=["locale","onMessage"];function ce(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ue(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ce(Object(r),!0).forEach((function(t){E(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ce(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const se=function(e,t,r,n){var i=e.url,a=e.onChange,u=(r||{}).contextId;if(!i){var l="Url is required for the experience";throw null==a||a({eventName:B.NO_URL,eventLevel:F.ERROR,message:l},{frame:null}),new Error(l)}var f=fe(i);if(!f)throw null==a||a({eventName:B.INVALID_URL,eventLevel:F.ERROR,message:"Invalid console experience url",data:{url:i}},{frame:null}),new Error("Invalid console experience url");var p=Ae(f,n,u,pe),d=p.experienceIdentifier,v=p.internalExperience,h=$(e,function(e){var t=e.locale,r=e.onMessage,n=o(e,ae),i=Object.keys(n);return Object.keys(n).length>0&&(null==a||a({eventName:B.UNRECOGNIZED_CONTENT_OPTIONS,eventLevel:F.WARN,message:"Console content options contain unrecognized properties",data:{unrecognizedContentOptions:i}},{frame:null}),console.warn("Console content options contain unrecognized properties")),{locale:t,onMessage:r}}(t),r,v,d),m=function(){var e=c(s().mark((function e(t){var r,n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=ue(ue({},t),{},{eventTarget:v}),e.next=3,h.internalSend(r);case 3:return n=e.sent,e.abrupt("return",n);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return{send:m,addEventListener:h.internalAddEventListener}};var le=function(e){return!!e&&e.experienceType===Z.CONSOLE},fe=function(e){if(!((/^https:\/\/[^/]+\/embedding\/[^/]+\/(start(\/(favorites|dashboards|analyses))?|dashboards\/[\w-]+|analyses\/[\w-]+)(\?|$)/i.exec(e)||[]).length<5))return{experienceType:Z.CONSOLE}},pe=function(e){if(le(e))return[e.contextId,e.experienceType,e.discriminator].filter(Boolean).join("-")},de=function(e){return!!e&&e.experienceType===Z.CONTEXT},ve=["parameters","locale","attributionOptions","sheetOptions","toolbarOptions","onMessage"];function he(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function me(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?he(Object(r),!0).forEach((function(t){E(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):he(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const Ee=function(e,t,r,n){var i=e.url,a=e.onChange,u=(r||{}).contextId;if(!i){var l="Url is required for the experience";throw null==a||a({eventName:B.NO_URL,eventLevel:F.ERROR,message:l},{frame:null}),new Error(l)}var f=ye(i);if(!f)throw null==a||a({eventName:B.INVALID_URL,eventLevel:F.ERROR,message:"Invalid dashboard experience url",data:{url:i}},{frame:null}),new Error("Invalid dashboard experience url");var p=Ae(f,n,u,ge),d=p.experienceIdentifier,v=p.internalExperience,h=e.resizeHeightOnSizeChangedEvent,m=$(e,function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.parameters,n=t.locale,i=t.attributionOptions,c=t.sheetOptions,u=t.toolbarOptions,s=t.onMessage,l=o(t,ve),f=Object.keys(l);if(f.length>0){var p="Dashboard content options contain unrecognized properties";null==a||a({eventName:B.UNRECOGNIZED_CONTENT_OPTIONS,eventLevel:F.WARN,message:p,data:{unrecognizedContentOptions:f}},{frame:null}),console.warn(p)}var d={locale:n,onMessage:s};return Array.isArray(r)&&(d.parameters=r.reduce((function(e,t){return e[t.Name]=t.Values,e}),{})),!0!==(null==i?void 0:i.overlayContent)&&(d.footerPaddingEnabled=!0),!0!==(null==u?void 0:u.export)&&!0!==(null==u||null===(e=u.export)||void 0===e?void 0:e.print)||(d.printEnabled=!0),!0!==(null==u?void 0:u.undoRedo)&&(d.undoRedoDisabled=!0),!0!==(null==u?void 0:u.reset)&&(d.resetDisabled=!0),!0===(null==u?void 0:u.bookmarks)&&(d.showBookmarksIcon=!0),null!=c&&c.initialSheetId&&(d.sheetId=c.initialSheetId),"boolean"==typeof(null==c?void 0:c.singleSheet)&&(d.sheetTabsDisabled=c.singleSheet),!0===(null==c?void 0:c.emitSizeChangedEventOnSheetChange)&&(d.resizeOnSheetChange=!0),d}(t),r,v,d,(function(e,t){"SIZE_CHANGED"===e.eventName&&h&&(t.frame.height="".concat(e.message.height,"px"))})),E=function(){var e=c(s().mark((function e(t){var r,n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=me(me({},t),{},{eventTarget:v}),e.next=3,m.internalSend(r);case 3:return n=e.sent,e.abrupt("return",n);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),O=function(){var e=c(s().mark((function e(t){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",E({eventName:G.SET_PARAMETERS,message:t}));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),y=function(){var e=c(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",E({eventName:G.INITIATE_PRINT}));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),g=function(){var e=c(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",E({eventName:G.UNDO}));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),b=function(){var e=c(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",E({eventName:G.REDO}));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),w=function(){var e=c(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",E({eventName:G.TOGGLE_BOOKMARKS_PANE}));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),N=function(){var e=c(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",E({eventName:G.RESET}));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),R=function(){var e=c(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",E({eventName:G.GET_PARAMETERS}));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),S=function(){var e=c(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",E({eventName:G.GET_SHEETS}));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),T=function(){var e=c(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",E({eventName:G.GET_SELECTED_SHEET_ID}));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),_=function(){var e=c(s().mark((function e(t,r){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",E({eventName:G.NAVIGATE_TO_DASHBOARD,message:{DashboardId:t,Parameters:r.parameters}}));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),x=function(){var e=c(s().mark((function e(t){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",E({eventName:G.SET_SELECTED_SHEET_ID,message:{SheetId:t}}));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return{getParameters:R,getSheets:S,getSelectedSheetId:T,initiatePrint:y,navigateToDashboard:_,setSelectedSheetId:x,setParameters:O,undo:g,redo:b,reset:N,toggleBookmarksPane:w,send:E,addEventListener:m.internalAddEventListener}};var Oe=function(e){return!!e&&e.experienceType===Z.DASHBOARD},ye=function(e){var t=/^https:\/\/[^/]+\/embed\/[^/]+\/dashboards\/([\w-]+)(\?|$)/i.exec(e)||[];if(!(t.length<3))return{experienceType:Z.DASHBOARD,dashboardId:t[1]}},ge=function(e){if(Oe(e))return[e.contextId,e.experienceType,e.dashboardId,e.discriminator].filter(Boolean).join("-")},be=["hideIcon","hideTopicName","theme","allowTopicSelection","onMessage"];function we(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ne(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?we(Object(r),!0).forEach((function(t){E(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):we(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const Re=function(e,t,r,n){var i,a=e.url,u=e.onChange,l=(r||{}).contextId;if(!a){var f="Url is required for the experience";throw null==u||u({eventName:B.NO_URL,eventLevel:F.ERROR,message:f},{frame:null}),new Error(f)}var p=Te(a);if(!p)throw null==u||u({eventName:B.INVALID_URL,eventLevel:F.ERROR,message:"Invalid q search experience url",data:{url:a}},{frame:null}),new Error("Invalid q search experience url");var d=Ae(p,n,l,_e),v=d.experienceIdentifier,h=d.internalExperience,m=$(e,function(e){var t=e.hideIcon,r=e.hideTopicName,n=e.theme,i=e.allowTopicSelection,a=e.onMessage,c=o(e,be),s=Object.keys(c);Object.keys(c).length>0&&(null==u||u({eventName:B.UNRECOGNIZED_CONTENT_OPTIONS,eventLevel:F.WARN,message:"Q search content options contain unrecognized properties",data:{unrecognizedContentOptions:s}},{frame:null}),console.warn("Q search content options contain unrecognized properties"));var l={allowTopicSelection:i,onMessage:a};return void 0!==t&&(l.qBarIconDisabled=t),void 0!==r&&(l.qBarTopicNameDisabled=r),void 0!==n&&(l.themeId=n),l}(t),r,h,v,(function(e,t){switch(e.eventName){case G.Q_SEARCH_OPENED:case G.Q_SEARCH_CLOSED:t.frame.style.height="".concat(e.message.height,"px");break;case G.CONTENT_LOADED:window.addEventListener("click",(function(e){!m.frame.contains(e.target)&&y()}));break;case G.Q_SEARCH_ENTERED_FULLSCREEN:i={position:t.frame.style.position,top:t.frame.style.top,left:t.frame.style.left,zIndex:t.frame.style.zIndex,width:t.frame.style.width,height:t.frame.style.height},t.frame.style.position="fixed",t.frame.style.top="0px",t.frame.style.left="0px",t.frame.style.zIndex="2147483647",t.frame.style.width="100vw",t.frame.style.height="100vh";break;case G.Q_SEARCH_EXITED_FULLSCREEN:t.frame.style.position=i.position,t.frame.style.top=i.top,t.frame.style.left=i.left,t.frame.style.zIndex=i.zIndex,t.frame.style.width=i.width,t.frame.style.height=i.height}})),E=function(){var e=c(s().mark((function e(t){var r,n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Ne(Ne({},t),{},{eventTarget:h}),e.next=3,m.internalSend(r);case 3:return n=e.sent,e.abrupt("return",n);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),O=function(){var e=c(s().mark((function e(t){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",E({eventName:G.SET_Q_SEARCH_QUESTION,message:{question:t}}));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),y=function(){return E({eventName:G.CLOSE_Q_SEARCH})};return{setQuestion:O,close:y,send:E,addEventListener:m.internalAddEventListener}};var Se=function(e){return!!e&&e.experienceType===Z.QSEARCH},Te=function(e){if(!((/^https:\/\/[^/]+\/embedding\/[^/]+\/q\/search(\/|\?|$)/i.exec(e)||[]).length<2))return{experienceType:Z.QSEARCH}},_e=function(e){if(Se(e))return[e.contextId,e.experienceType,e.discriminator].filter(Boolean).join("-")};function xe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ie(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?xe(Object(r),!0).forEach((function(t){E(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Ae=function(e,t,r,n){var o,i,a=-1;do{a++,i=n(o=Ie(Ie({},e),{},{contextId:r,discriminator:a}))}while(t.has(i));if(i)return t.add(i),{experienceIdentifier:i,internalExperience:o}};function De(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function je(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?De(Object(r),!0).forEach((function(t){E(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):De(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const Le=function(e,t,r,n){var o=t.eventManager,i=t.urlInfo,a=t.contextId,c={experienceType:Z.CONTROL},u=je(je({},c),{},{contextId:a,discriminator:0}),s=Pe(c,i).href,l=o.experienceEventListenerBuilder,f=o.invokeEventListener,p=ke(u);l(p,n);var d=$({url:s,container:e,width:"0px",height:"0px",onChange:r},{onMessage:n},{eventManager:o,contextId:a,timeout:j,urlInfo:i},u,p),v=d.internalSend,h=d.frame;return window.addEventListener("message",(function(e){var t,n=e.data;if((t=n)&&t.eventTarget&&t.eventName)try{var o=function(e){if(!e)throw new Error("No experience provided");if(ne(e))return ie(e);if(Oe(e))return ge(e);if(le(e))return pe(e);if(de(e))return function(e){if(de(e))return[e.contextId,e.experienceType,e.discriminator].filter(Boolean).join("-")}(e);if(Se(e))return _e(e);if(Ce(e))return ke(e);throw new Error("Cannot create experience identifier for the experience")}(n.eventTarget);f(o,n),function(e){var t,r,n={eventName:G.ACKNOWLEDGE,eventTarget:u,message:{eventName:e.eventName,eventTarget:e.eventTarget}};(null===(t=(r=window).requestIdleCallback)||void 0===t?void 0:t.call(r,(function(){return v(n)})))||v(n)}(n)}catch(e){null==r||r({eventName:B.UNRECOGNIZED_EVENT_TARGET,eventLevel:F.WARN,message:"Message with unrecognized event target received",data:{eventTarget:n.eventTarget}},{frame:h}),console.warn("Message with unrecognized event target received")}})),{internalSend:v}};var Ce=function(e){return!!e&&e.experienceType===Z.CONTROL},Pe=function(e,t){var r=t.host,n=t.guid,o="".concat(r,"/embed/").concat(n,"/embedControl");return new URL(o)},ke=function(e){if(Ce(e))return[e.contextId,e.experienceType,e.discriminator].filter(Boolean).join("-")},Me=["url","container","width","height","resizeHeightOnSizeChangedEvent","withIframePlaceholder","className","onChange"];const Ue=function(){var e=c(s().mark((function e(t){var r,n,a,u,l,f,p,d,v,E,O,y,g,b,w;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(t||{}).onChange,a=void 0===n?null:n,u=h(),l=new Set,f=m(),p=null===(r=document.getElementsByTagName("body"))||void 0===r?void 0:r[0]){e.next=8;break}throw null==a||a({eventName:B.NO_BODY,eventLevel:F.ERROR,message:"could not locate <body> element in the page"},{frame:null}),new Error("could not locate <body> element in the page");case 8:return v=function(e){if(!d){var t,r=e.url;if(!r)return;try{t=L(r)}catch(e){return}var n=Le(p,{eventManager:f,urlInfo:t,contextId:u},a).internalSend;d={eventManager:f,sendToControlFrame:n,contextId:u,timeout:j}}return d},E=function(e,t){if(!e){var r="".concat(t," is called without frameOptions");throw null==a||a({eventName:B.NO_FRAME_OPTIONS,eventLevel:F.ERROR,message:r,data:{methodName:t}},{frame:null}),new Error(r)}if("object"!==i(e)||Array.isArray(e)){var n="".concat(t," is called with non-object frameOptions");throw null==a||a({eventName:B.INVALID_FRAME_OPTIONS,eventLevel:F.ERROR,message:n,data:{methodName:t,frameOptionsType:Array.isArray(e)?"array":i(e)}},{frame:null}),new Error(n)}e.url,e.container,e.width,e.height,e.resizeHeightOnSizeChangedEvent,e.withIframePlaceholder,e.className;var c=e.onChange,u=o(e,Me),s=Object.keys(u);if(s.length>0){var l="".concat(t," is called with unrecognized properties");null==c||c({eventName:B.UNRECOGNIZED_FRAME_OPTIONS,eventLevel:F.WARN,message:l,data:{unrecognizedFrameOptions:s}},{frame:null}),console.warn(l)}},O=function(){var e=c(s().mark((function e(t,r){var n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return E(t,"embedVisual"),n=v(t),e.abrupt("return",re(t,r,n,l));case 3:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),y=function(){var e=c(s().mark((function e(t,r){var n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return E(t,"embedDashboard"),n=v(t),e.abrupt("return",Ee(t,r,n,l));case 3:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),g=function(){var e=c(s().mark((function e(t,r){var n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return E(t,"embedConsole"),n=v(t),e.abrupt("return",se(t,r,n,l));case 3:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),b=function(){var e=c(s().mark((function e(t,r){var n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return E(t,"embedQSearchBar"),n=v(t),e.abrupt("return",Re(t,r,n,l));case 3:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),w={embedVisual:O,embedDashboard:y,embedConsole:g,embedQSearchBar:b},e.abrupt("return",w);case 16:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},61:(e,t,r)=>{var n=r(698).default;function o(){"use strict";e.exports=o=function(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},c="function"==typeof Symbol?Symbol:{},u=c.iterator||"@@iterator",s=c.asyncIterator||"@@asyncIterator",l=c.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof h?t:h,i=Object.create(o.prototype),c=new x(n||[]);return a(i,"_invoke",{value:R(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var v={};function h(){}function m(){}function E(){}var O={};f(O,u,(function(){return this}));var y=Object.getPrototypeOf,g=y&&y(y(I([])));g&&g!==r&&i.call(g,u)&&(O=g);var b=E.prototype=h.prototype=Object.create(O);function w(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function N(e,t){function r(o,a,c,u){var s=d(e[o],e,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==n(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,c,u)}),(function(e){r("throw",e,c,u)})):t.resolve(f).then((function(e){l.value=e,c(l)}),(function(e){return r("throw",e,c,u)}))}u(s.arg)}var o;a(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}})}function R(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=S(a,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=d(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,v;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,v):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,v)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function I(e){if(e){var t=e[u];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r<e.length;)if(i.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return n.next=n}}return{next:A}}function A(){return{value:void 0,done:!0}}return m.prototype=E,a(b,"constructor",{value:E,configurable:!0}),a(E,"constructor",{value:m,configurable:!0}),m.displayName=f(E,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,E):(e.__proto__=E,f(e,l,"GeneratorFunction")),e.prototype=Object.create(b),e},t.awrap=function(e){return{__await:e}},w(N.prototype),f(N.prototype,s,(function(){return this})),t.AsyncIterator=N,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new N(p(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},w(b),f(b,l,"Generator"),f(b,u,(function(){return this})),f(b,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!e)for(var t in this)"t"===t.charAt(0)&&i.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var c=i.call(o,"catchLoc"),u=i.call(o,"finallyLoc");if(c&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),_(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:I(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),v}},t}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},698:e=>{function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},687:(e,t,r)=>{var n=r(61)();e.exports=n;try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r(174)})();
(()=>{var e={174:(e,t,r)=>{var n=r(388);r(672).QuickSightEmbedding=n,e.exports=n},672:(e,t,r)=>{"use strict";e.exports=function(){if("object"==typeof globalThis)return globalThis;var e;try{e=this||new Function("return this")()}catch(e){if("object"==typeof window)return window;if("object"==typeof self)return self;if(void 0!==r.g)return r.g}return e}()},388:(e,t,r)=>{"use strict";r.r(t),r.d(t,{QSE:()=>n,SDK_VERSION:()=>D,createEmbeddingContext:()=>Ue});var n={};function o(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t,r,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,o)}function c(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function c(e){a(i,n,o,c,u,"next",e)}function u(e){a(i,n,o,c,u,"throw",e)}c(void 0)}))}}r.r(n);var u=r(687),s=r.n(u);const l={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let f;const p=new Uint8Array(16);function d(){if(!f&&(f="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!f))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return f(p)}const v=[];for(let e=0;e<256;++e)v.push((e+256).toString(16).slice(1));const h=function(e,t,r){if(l.randomUUID&&!t&&!e)return l.randomUUID();const n=(e=e||{}).random||(e.rng||d)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=n[e];return t}return function(e,t=0){return(v[e[t+0]]+v[e[t+1]]+v[e[t+2]]+v[e[t+3]]+"-"+v[e[t+4]]+v[e[t+5]]+"-"+v[e[t+6]]+v[e[t+7]]+"-"+v[e[t+8]]+v[e[t+9]]+"-"+v[e[t+10]]+v[e[t+11]]+v[e[t+12]]+v[e[t+13]]+v[e[t+14]]+v[e[t+15]]).toLowerCase()}(n)},m=function(){var e=new Map,t=function(t,r){t&&"function"==typeof r&&(e.has(t)||e.set(t,[]),e.get(t).push(r))},r=function(t,r){e.has(t)&&e.get(t).forEach((function(e){e(r)}))},n=function(t,r){if(e.has(t)){var n=e.get(t).filter((function(e){return e!==r}));e.set(t,n)}};return{addEventListener:t,invokeEventListener:r,removeEventListener:n,experienceEventListenerBuilder:function(e,o){var i=function(r){return t(e,r)};return o&&i(o),{addExperienceEventListener:i,invokeExperienceEventListener:function(t){return r(e,t)},removeExperienceEventListener:function(t){return n(e,t)}}}}};function E(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==i(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===i(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function y(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return O(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?O(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const g=2147483647,b={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},w=Math.floor,N=String.fromCharCode;function R(e){throw new RangeError(b[e])}const S=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},T=function(e,t,r){let n=0;for(e=r?w(e/700):e>>1,e+=w(e/t);e>455;n+=36)e=w(e/35);return w(n+36*e/(e+38))},_=function(e){const t=[],r=(e=function(e){const t=[];let r=0;const n=e.length;for(;r<n;){const o=e.charCodeAt(r++);if(o>=55296&&o<=56319&&r<n){const n=e.charCodeAt(r++);56320==(64512&n)?t.push(((1023&o)<<10)+(1023&n)+65536):(t.push(o),r--)}else t.push(o)}return t}(e)).length;let n=128,o=0,i=72;for(const r of e)r<128&&t.push(N(r));const a=t.length;let c=a;for(a&&t.push("-");c<r;){let r=g;for(const t of e)t>=n&&t<r&&(r=t);const u=c+1;r-n>w((g-o)/u)&&R("overflow"),o+=(r-n)*u,n=r;for(const r of e)if(r<n&&++o>g&&R("overflow"),r===n){let e=o;for(let r=36;;r+=36){const n=r<=i?1:r>=i+26?26:r-i;if(e<n)break;const o=e-n,a=36-n;t.push(N(S(n+o%a,0))),e=w(o/a)}t.push(N(S(e,0))),i=T(o,u,c===a),o=0,++c}++o,++n}return t.join("")};var x=["parameters"];function I(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function A(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?I(Object(r),!0).forEach((function(t){E(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):I(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var D="2.2.2",j=6e4,L=function(e){var t=/^(https:\/\/[^/]+)\/(embedding|embed)\/([^/]+)\/[^?]+\?(.*)/i.exec(e)||[];if((null==t?void 0:t.length)<4)throw'Invalid embedding url: "'.concat(e,'"');return{guid:t[3],host:t[1],urlSearchParams:new URLSearchParams(t[4])}};function C(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function P(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?C(Object(r),!0).forEach((function(t){E(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var k=function(e){return e.CONTENT_LOADED="CONTENT_LOADED",e.ERROR_OCCURRED="ERROR_OCCURRED",e.SIZE_CHANGED="SIZE_CHANGED",e.PARAMETERS_CHANGED="PARAMETERS_CHANGED",e.SELECTED_SHEET_CHANGED="SELECTED_SHEET_CHANGED",e.MODAL_OPENED="MODAL_OPENED",e.Q_SEARCH_CLOSED="Q_SEARCH_CLOSED",e.Q_SEARCH_OPENED="Q_SEARCH_OPENED",e.Q_SEARCH_SIZE_CHANGED="Q_SEARCH_SIZE_CHANGED",e.Q_SEARCH_ENTERED_FULLSCREEN="Q_SEARCH_ENTERED_FULLSCREEN",e.Q_SEARCH_EXITED_FULLSCREEN="Q_SEARCH_EXITED_FULLSCREEN",e}({}),M=function(e){return e.SET_PARAMETERS="SET_PARAMETERS",e.SET_SELECTED_SHEET_ID="SET_SELECTED_SHEET_ID",e.SET_Q_SEARCH_QUESTION="SET_Q_SEARCH_QUESTION",e}({}),U=function(e){return e.GET_PARAMETERS="GET_PARAMETERS",e.GET_SHEETS="GET_SHEETS",e.GET_SELECTED_SHEET_ID="GET_SELECTED_SHEET_ID",e}({}),H=function(e){return e.ACKNOWLEDGE="ACKNOWLEDGE",e.INITIATE_PRINT="INITIATE_PRINT",e.NAVIGATE_TO_DASHBOARD="NAVIGATE_TO_DASHBOARD",e.CLOSE_Q_SEARCH="CLOSE_Q_SEARCH",e.UNDO="UNDO",e.REDO="REDO",e.RESET="RESET",e.TOGGLE_BOOKMARKS_PANE="TOGGLE_BOOKMARKS_PANE",e}({}),G=P(P(P(P({},k),M),U),H),F=function(e){return e.ERROR="ERROR",e.INFO="INFO",e.WARN="WARN",e}({}),Q=function(e){return e.FRAME_STARTED="FRAME_STARTED",e.FRAME_MOUNTED="FRAME_MOUNTED",e.FRAME_LOADED="FRAME_LOADED",e}({}),V=function(e){return e.FRAME_NOT_CREATED="FRAME_NOT_CREATED",e.NO_BODY="NO_BODY",e.NO_CONTAINER="NO_CONTAINER",e.INVALID_CONTAINER="INVALID_CONTAINER",e.NO_URL="NO_URL",e.INVALID_URL="INVALID_URL",e.NO_FRAME_OPTIONS="NO_FRAME_OPTIONS",e.INVALID_FRAME_OPTIONS="INVALID_FRAME_OPTIONS",e}({}),z=function(e){return e.UNRECOGNIZED_CONTENT_OPTIONS="UNRECOGNIZED_CONTENT_OPTIONS",e.UNRECOGNIZED_FRAME_OPTIONS="UNRECOGNIZED_FRAME_OPTIONS",e.UNRECOGNIZED_EVENT_TARGET="UNRECOGNIZED_EVENT_TARGET",e}({}),B=P(P(P({},Q),V),z),Z=function(e){return e.CONSOLE="CONSOLE",e.CONTEXT="CONTEXT",e.CONTROL="CONTROL",e.VISUAL="VISUAL",e.DASHBOARD="DASHBOARD",e.QSEARCH="QSEARCH",e}({}),W="quicksight-embedding-iframe",q=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=document.createElementNS("http://www.w3.org/2000/svg",e);return Object.entries(t).forEach((function(e){var t=y(e,2),r=t[0],n=t[1];return o.setAttribute(r,n)})),Object.entries(r).forEach((function(e){var t=y(e,2),r=t[0],n=t[1];return o.style.setProperty(r,n)})),n.forEach((function(e){return o.appendChild(e)})),o};var K=["onMessage"];function X(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?X(Object(r),!0).forEach((function(t){E(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):X(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const $=function(e,t,r,n,a,u){var l,f=e.url,p=e.container,d=e.width,v=void 0===d?"100%":d,m=e.height,E=void 0===m?"100%":m,O=e.withIframePlaceholder,g=e.className,b=e.onChange,w=null,N=function(e){"function"==typeof b&&b(e,{frame:w})};if(!p){var R="Container is required for the experience";throw N({eventName:B.NO_CONTAINER,eventLevel:F.ERROR,message:R,data:{experience:n}}),new Error(R)}if("string"==typeof p)try{l=document.querySelector(p)}catch(e){var S=e.message;throw N({eventName:B.INVALID_CONTAINER,eventLevel:F.ERROR,message:S,data:{experience:n}}),e}else"object"===i(p)&&p.nodeName&&(l=p);if(!l){var T="Invalid container '".concat(p,"' for the experience");throw N({eventName:B.INVALID_CONTAINER,eventLevel:F.ERROR,message:T,data:{experience:n}}),new Error(T)}var I,L=r.eventManager,C=r.sendToControlFrame,P=r.timeout,k=void 0===P?j:P,M=t||{},U=M.onMessage,H=o(M,K),Q=(0,L.experienceEventListenerBuilder)(a,(function(e){var t={frame:w};u&&u(e,t),null==U||U(e,t)})),V=Q.addExperienceEventListener,z=Q.removeExperienceEventListener;if(!f)throw N({eventName:B.NO_URL,eventLevel:F.ERROR,message:"Url is required for the experience",data:{experience:n}}),new Error("Url is required for the experience");I=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,n=t.parameters,a=o(t,x),c=r.contextId,u=r.discriminator,s=[],l=function(e){if(!e||"object"!==i(e))return"";var t=Object.entries(e).reduce((function(e,t){var r=y(t,2),n=r[0],o=r[1];return null!=o&&(e[n]="".concat(o)),e}),{punyCodeEmbedOrigin:_("".concat(window.location.origin,"/"))});return new URLSearchParams(t).toString()}(A(A({},a),{},{contextId:c,discriminator:u,clientTime:Date.now(),sdkVersion:D}));l&&s.push(l);var f=function(e){return e&&"object"===i(e)?Object.entries(e).map((function(e){var t=y(e,2),r=t[0],n=t[1],o=[].concat(n),i=encodeURIComponent(r);return o.map((function(e){return encodeURIComponent(e)})).map((function(e){return"p.".concat(i,"=").concat(e)})).join("&")})).join("&"):""}(n);f&&s.push(f);var p=s.join("#"),d="string"==typeof e?e:e.toString();return[d,p].join(d.includes("?")?"&":"?")}(f,H,n);var Z,X=function(){var e=c(s().mark((function e(t){var r,n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=h(),n=Y(Y({},t),{},{eventId:r,timestamp:Date.now(),version:D}),w.contentWindow.postMessage(n,I),t.eventName!==G.ACKNOWLEDGE){e.next=5;break}return e.abrupt("return",Promise.resolve({success:!0}));case 5:return e.abrupt("return",new Promise((function(e,t){var n=function t(n){n.data.eventId===r&&(window.removeEventListener("message",t),e(n.data.message))};window.addEventListener("message",n),setTimeout((function(){window.removeEventListener("message",n),t()}),5e3)})));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),$=function(){var e=c(s().mark((function e(t){var r;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=C||X,e.abrupt("return",r(t));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();Z=setTimeout((function(){throw N({eventName:B.FRAME_NOT_CREATED,eventLevel:F.ERROR,message:"Creating the frame timed out",data:{experience:n}}),new Error("Creating the frame timed out")}),k);var J=function(){var e=c(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Z&&clearTimeout(Z),N({eventName:B.FRAME_LOADED,eventLevel:F.INFO,message:"The frame loaded",data:{experience:n}});case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();N({eventName:B.FRAME_STARTED,eventLevel:F.INFO,message:"Creating the frame",data:{experience:n}});try{w=function(e){var t,r,n=e.id,o=e.src,i=e.width,a=void 0===i?"0px":i,c=e.height,u=void 0===c?"0px":c,s=e.container,l=e.onLoad,f=e.loading,p=e.withIframePlaceholder,d=e.payload,v=e.className,h=n||"".concat(s.id,"-iframe");if(p){if((t=document.createElement("div")).id="".concat(h,"-placeholder"),t.style.width=a,t.style.backgroundColor="rgba(0,0,0,.01)",t.style.display="flex",t.style.justifyContent="center",t.style.alignItems="center",t.className="".concat(W,"-placeholder"),u.endsWith("px")&&(t.style.height=u),"boolean"!=typeof p)t.appendChild(p);else{var m=(r=[1,2,3].map((function(e){var t=q("animate",{attributeName:"opacity",dur:"1s",values:"0;1;0",repeatCount:"indefinite",begin:"".concat(e/10)});return q("circle",{fill:"#ccc",stroke:"none",cx:"".concat(20*e-14),cy:"50",r:"6"},void 0,[t])})),q("svg",{version:"1.1",x:"0px",y:"0px",viewBox:"0 0 100 100","enable-background":"new 0 0 0 0"},{width:"100px",height:"100px"},r));t.appendChild(m)}s.appendChild(t)}var E=[W];v&&E.push(v);var O,y=document.createElement("iframe");return y.className=E.join(" ").trim(),y.id=h,y.name=h,y.width=a,y.height=u,f&&(y.loading=f),y.style.border="0px",y.style.padding="0px",t&&(y.style.opacity="0",y.style.position="absolute"),"0px"===a&&"0px"===u&&(y.style.position="absolute"),s.appendChild(y),d?O=function(e){var t=e.src,r=e.container,n=e.target,o=e.payload;if(t&&r){var i=document.createElement("form");return i.style.visibility="hidden",i.method="POST",i.action=t,i.target=n,i.name="".concat(n,"-form"),Object.keys(o).forEach((function(e){var t=document.createElement("input");t.type="hidden",t.name=e,t.value=o[e],i.appendChild(t)})),r.appendChild(i),i.submit(),{remove:function(){i.remove()}}}}({src:o,target:y.name,container:s,payload:d}):y.src=o,y.addEventListener("load",(function(e){var r;t&&(t.remove(),y.style.position="",y.style.opacity="1",y.style.transition="opacity .5s ease-in-out"),"function"==typeof l&&l(e),null===(r=O)||void 0===r||r.remove()})),y}({id:a,src:I,width:v,height:E,container:l,onLoad:J,withIframePlaceholder:O,className:g})}catch(e){throw N({eventName:B.FRAME_NOT_CREATED,eventLevel:F.ERROR,message:"Failed to create the frame",data:{experience:n}}),e}return N({eventName:B.FRAME_MOUNTED,eventLevel:F.INFO,message:"The frame mounted",data:{frame:w,experience:n}}),{internalAddEventListener:function(e,t){var r=function(r,n){r.eventName===e&&t(r,n)};return V(r),{remove:function(){z(r)}}},internalSend:$,frame:w}};var J=["fitToIframeWidth","locale","parameters","onMessage"];function ee(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function te(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ee(Object(r),!0).forEach((function(t){E(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ee(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const re=function(e,t,r,n){var i=e.url,a=e.resizeHeightOnSizeChangedEvent,u=e.onChange,l=(r||{}).contextId;if(!i){var f="Url is required for the experience";throw null==u||u({eventName:B.NO_URL,eventLevel:F.ERROR,message:f},{frame:null}),new Error(f)}var p=oe(i);if(!p)throw null==u||u({eventName:B.INVALID_URL,eventLevel:F.ERROR,message:"Invalid visual experience url",data:{url:i}},{frame:null}),new Error("Invalid visual experience url");var d=Ae(p,n,l,ie),v=d.experienceIdentifier,h=d.internalExperience,m=$(e,function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.fitToIframeWidth,r=e.locale,n=e.parameters,i=e.onMessage,a=o(e,J),c=Object.keys(a);Object.keys(a).length>0&&(null==u||u({eventName:B.UNRECOGNIZED_CONTENT_OPTIONS,eventLevel:F.WARN,message:"Visual content options contain unrecognized properties",data:{unrecognizedContentOptions:c}},{frame:null}),console.warn("Visual content options contain unrecognized properties"));var s={fitToIframeWidth:null==t||t,locale:r,onMessage:i};return Array.isArray(n)&&(s.parameters=n.reduce((function(e,t){return e[t.Name]=t.Values,e}),{})),s}(t),r,h,v,(function(e,t){"SIZE_CHANGED"===e.eventName&&a&&(t.frame.height="".concat(e.message.height,"px"))})),E=function(){var e=c(s().mark((function e(t){var r,n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=te(te({},t),{},{eventTarget:h}),e.next=3,m.internalSend(r);case 3:return n=e.sent,e.abrupt("return",n);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),O=function(){var e=c(s().mark((function e(t){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",E({eventName:G.SET_PARAMETERS,message:t}));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),y=function(){var e=c(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",E({eventName:G.RESET}));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return{setParameters:O,reset:y,send:E,addEventListener:m.internalAddEventListener}};var ne=function(e){return!!e&&e.experienceType===Z.VISUAL},oe=function(e){var t=/^https:\/\/[^/]+\/embed\/[^/]+\/dashboards\/([\w-]+)\/sheets\/([\w-]+)\/visuals\/([\w-]+)(\?|$)/i.exec(e)||[];if(!(t.length<5))return{experienceType:Z.VISUAL,dashboardId:t[1],sheetId:t[2],visualId:t[3]}},ie=function(e){if(ne(e))return[e.contextId,e.experienceType,e.dashboardId,e.sheetId,e.visualId,e.discriminator].filter(Boolean).join("-")},ae=["locale","onMessage"];function ce(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ue(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ce(Object(r),!0).forEach((function(t){E(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ce(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const se=function(e,t,r,n){var i=e.url,a=e.onChange,u=(r||{}).contextId;if(!i){var l="Url is required for the experience";throw null==a||a({eventName:B.NO_URL,eventLevel:F.ERROR,message:l},{frame:null}),new Error(l)}var f=fe(i);if(!f)throw null==a||a({eventName:B.INVALID_URL,eventLevel:F.ERROR,message:"Invalid console experience url",data:{url:i}},{frame:null}),new Error("Invalid console experience url");var p=Ae(f,n,u,pe),d=p.experienceIdentifier,v=p.internalExperience,h=$(e,function(e){var t=e.locale,r=e.onMessage,n=o(e,ae),i=Object.keys(n);return Object.keys(n).length>0&&(null==a||a({eventName:B.UNRECOGNIZED_CONTENT_OPTIONS,eventLevel:F.WARN,message:"Console content options contain unrecognized properties",data:{unrecognizedContentOptions:i}},{frame:null}),console.warn("Console content options contain unrecognized properties")),{locale:t,onMessage:r}}(t),r,v,d),m=function(){var e=c(s().mark((function e(t){var r,n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=ue(ue({},t),{},{eventTarget:v}),e.next=3,h.internalSend(r);case 3:return n=e.sent,e.abrupt("return",n);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return{send:m,addEventListener:h.internalAddEventListener}};var le=function(e){return!!e&&e.experienceType===Z.CONSOLE},fe=function(e){if(!((/^https:\/\/[^/]+\/embedding\/[^/]+\/(start(\/(favorites|dashboards|analyses))?|dashboards\/[\w-]+|analyses\/[\w-]+)(\?|$)/i.exec(e)||[]).length<5))return{experienceType:Z.CONSOLE}},pe=function(e){if(le(e))return[e.contextId,e.experienceType,e.discriminator].filter(Boolean).join("-")},de=function(e){return!!e&&e.experienceType===Z.CONTEXT},ve=["parameters","locale","attributionOptions","sheetOptions","toolbarOptions","onMessage"];function he(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function me(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?he(Object(r),!0).forEach((function(t){E(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):he(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const Ee=function(e,t,r,n){var i=e.url,a=e.onChange,u=(r||{}).contextId;if(!i){var l="Url is required for the experience";throw null==a||a({eventName:B.NO_URL,eventLevel:F.ERROR,message:l},{frame:null}),new Error(l)}var f=ye(i);if(!f)throw null==a||a({eventName:B.INVALID_URL,eventLevel:F.ERROR,message:"Invalid dashboard experience url",data:{url:i}},{frame:null}),new Error("Invalid dashboard experience url");var p=Ae(f,n,u,ge),d=p.experienceIdentifier,v=p.internalExperience,h=e.resizeHeightOnSizeChangedEvent,m=$(e,function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.parameters,n=t.locale,i=t.attributionOptions,c=t.sheetOptions,u=t.toolbarOptions,s=t.onMessage,l=o(t,ve),f=Object.keys(l);if(f.length>0){var p="Dashboard content options contain unrecognized properties";null==a||a({eventName:B.UNRECOGNIZED_CONTENT_OPTIONS,eventLevel:F.WARN,message:p,data:{unrecognizedContentOptions:f}},{frame:null}),console.warn(p)}var d={locale:n,onMessage:s};return Array.isArray(r)&&(d.parameters=r.reduce((function(e,t){return e[t.Name]=t.Values,e}),{})),!0!==(null==i?void 0:i.overlayContent)&&(d.footerPaddingEnabled=!0),!0!==(null==u?void 0:u.export)&&!0!==(null==u||null===(e=u.export)||void 0===e?void 0:e.print)||(d.printEnabled=!0),!0!==(null==u?void 0:u.undoRedo)&&(d.undoRedoDisabled=!0),!0!==(null==u?void 0:u.reset)&&(d.resetDisabled=!0),!0===(null==u?void 0:u.bookmarks)&&(d.showBookmarksIcon=!0),null!=c&&c.initialSheetId&&(d.sheetId=c.initialSheetId),"boolean"==typeof(null==c?void 0:c.singleSheet)&&(d.sheetTabsDisabled=c.singleSheet),!0===(null==c?void 0:c.emitSizeChangedEventOnSheetChange)&&(d.resizeOnSheetChange=!0),d}(t),r,v,d,(function(e,t){"SIZE_CHANGED"===e.eventName&&h&&(t.frame.height="".concat(e.message.height,"px"))})),E=function(){var e=c(s().mark((function e(t){var r,n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=me(me({},t),{},{eventTarget:v}),e.next=3,m.internalSend(r);case 3:return n=e.sent,e.abrupt("return",n);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),O=function(){var e=c(s().mark((function e(t){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",E({eventName:G.SET_PARAMETERS,message:t}));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),y=function(){var e=c(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",E({eventName:G.INITIATE_PRINT}));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),g=function(){var e=c(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",E({eventName:G.UNDO}));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),b=function(){var e=c(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",E({eventName:G.REDO}));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),w=function(){var e=c(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",E({eventName:G.TOGGLE_BOOKMARKS_PANE}));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),N=function(){var e=c(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",E({eventName:G.RESET}));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),R=function(){var e=c(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",E({eventName:G.GET_PARAMETERS}));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),S=function(){var e=c(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",E({eventName:G.GET_SHEETS}));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),T=function(){var e=c(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",E({eventName:G.GET_SELECTED_SHEET_ID}));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),_=function(){var e=c(s().mark((function e(t,r){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",E({eventName:G.NAVIGATE_TO_DASHBOARD,message:{DashboardId:t,Parameters:null==r?void 0:r.parameters}}));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),x=function(){var e=c(s().mark((function e(t){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",E({eventName:G.SET_SELECTED_SHEET_ID,message:{SheetId:t}}));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return{getParameters:R,getSheets:S,getSelectedSheetId:T,initiatePrint:y,navigateToDashboard:_,setSelectedSheetId:x,setParameters:O,undo:g,redo:b,reset:N,toggleBookmarksPane:w,send:E,addEventListener:m.internalAddEventListener}};var Oe=function(e){return!!e&&e.experienceType===Z.DASHBOARD},ye=function(e){var t=/^https:\/\/[^/]+\/embed\/[^/]+\/dashboards\/([\w-]+)(\?|$)/i.exec(e)||[];if(!(t.length<3))return{experienceType:Z.DASHBOARD,dashboardId:t[1]}},ge=function(e){if(Oe(e))return[e.contextId,e.experienceType,e.dashboardId,e.discriminator].filter(Boolean).join("-")},be=["hideIcon","hideTopicName","theme","allowTopicSelection","onMessage"];function we(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ne(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?we(Object(r),!0).forEach((function(t){E(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):we(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const Re=function(e,t,r,n){var i,a=e.url,u=e.onChange,l=(r||{}).contextId;if(!a){var f="Url is required for the experience";throw null==u||u({eventName:B.NO_URL,eventLevel:F.ERROR,message:f},{frame:null}),new Error(f)}var p=Te(a);if(!p)throw null==u||u({eventName:B.INVALID_URL,eventLevel:F.ERROR,message:"Invalid q search experience url",data:{url:a}},{frame:null}),new Error("Invalid q search experience url");var d=Ae(p,n,l,_e),v=d.experienceIdentifier,h=d.internalExperience,m=$(e,function(e){var t=e.hideIcon,r=e.hideTopicName,n=e.theme,i=e.allowTopicSelection,a=e.onMessage,c=o(e,be),s=Object.keys(c);Object.keys(c).length>0&&(null==u||u({eventName:B.UNRECOGNIZED_CONTENT_OPTIONS,eventLevel:F.WARN,message:"Q search content options contain unrecognized properties",data:{unrecognizedContentOptions:s}},{frame:null}),console.warn("Q search content options contain unrecognized properties"));var l={allowTopicSelection:i,onMessage:a};return void 0!==t&&(l.qBarIconDisabled=t),void 0!==r&&(l.qBarTopicNameDisabled=r),void 0!==n&&(l.themeId=n),l}(t),r,h,v,(function(e,t){switch(e.eventName){case G.Q_SEARCH_OPENED:case G.Q_SEARCH_CLOSED:t.frame.style.height="".concat(e.message.height,"px");break;case G.CONTENT_LOADED:window.addEventListener("click",(function(e){!m.frame.contains(e.target)&&y()}));break;case G.Q_SEARCH_ENTERED_FULLSCREEN:i={position:t.frame.style.position,top:t.frame.style.top,left:t.frame.style.left,zIndex:t.frame.style.zIndex,width:t.frame.style.width,height:t.frame.style.height},t.frame.style.position="fixed",t.frame.style.top="0px",t.frame.style.left="0px",t.frame.style.zIndex="2147483647",t.frame.style.width="100vw",t.frame.style.height="100vh";break;case G.Q_SEARCH_EXITED_FULLSCREEN:t.frame.style.position=i.position,t.frame.style.top=i.top,t.frame.style.left=i.left,t.frame.style.zIndex=i.zIndex,t.frame.style.width=i.width,t.frame.style.height=i.height}})),E=function(){var e=c(s().mark((function e(t){var r,n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Ne(Ne({},t),{},{eventTarget:h}),e.next=3,m.internalSend(r);case 3:return n=e.sent,e.abrupt("return",n);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),O=function(){var e=c(s().mark((function e(t){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",E({eventName:G.SET_Q_SEARCH_QUESTION,message:{question:t}}));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),y=function(){return E({eventName:G.CLOSE_Q_SEARCH})};return{setQuestion:O,close:y,send:E,addEventListener:m.internalAddEventListener}};var Se=function(e){return!!e&&e.experienceType===Z.QSEARCH},Te=function(e){if(!((/^https:\/\/[^/]+\/embedding\/[^/]+\/q\/search(\/|\?|$)/i.exec(e)||[]).length<2))return{experienceType:Z.QSEARCH}},_e=function(e){if(Se(e))return[e.contextId,e.experienceType,e.discriminator].filter(Boolean).join("-")};function xe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ie(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?xe(Object(r),!0).forEach((function(t){E(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Ae=function(e,t,r,n){var o,i,a=-1;do{a++,i=n(o=Ie(Ie({},e),{},{contextId:r,discriminator:a}))}while(t.has(i));if(i)return t.add(i),{experienceIdentifier:i,internalExperience:o}};function De(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function je(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?De(Object(r),!0).forEach((function(t){E(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):De(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const Le=function(e,t,r,n){var o=t.eventManager,i=t.urlInfo,a=t.contextId,c={experienceType:Z.CONTROL},u=je(je({},c),{},{contextId:a,discriminator:0}),s=Pe(c,i).href,l=o.experienceEventListenerBuilder,f=o.invokeEventListener,p=ke(u);l(p,n);var d=$({url:s,container:e,width:"0px",height:"0px",onChange:r},{onMessage:n},{eventManager:o,contextId:a,timeout:j,urlInfo:i},u,p),v=d.internalSend,h=d.frame;return window.addEventListener("message",(function(e){var t,n=e.data;if((t=n)&&t.eventTarget&&t.eventName)try{var o=function(e){if(!e)throw new Error("No experience provided");if(ne(e))return ie(e);if(Oe(e))return ge(e);if(le(e))return pe(e);if(de(e))return function(e){if(de(e))return[e.contextId,e.experienceType,e.discriminator].filter(Boolean).join("-")}(e);if(Se(e))return _e(e);if(Ce(e))return ke(e);throw new Error("Cannot create experience identifier for the experience")}(n.eventTarget);f(o,n),function(e){var t,r,n={eventName:G.ACKNOWLEDGE,eventTarget:u,message:{eventName:e.eventName,eventTarget:e.eventTarget}};(null===(t=(r=window).requestIdleCallback)||void 0===t?void 0:t.call(r,(function(){return v(n)})))||v(n)}(n)}catch(e){null==r||r({eventName:B.UNRECOGNIZED_EVENT_TARGET,eventLevel:F.WARN,message:"Message with unrecognized event target received",data:{eventTarget:n.eventTarget}},{frame:h}),console.warn("Message with unrecognized event target received")}})),{internalSend:v}};var Ce=function(e){return!!e&&e.experienceType===Z.CONTROL},Pe=function(e,t){var r=t.host,n=t.guid,o="".concat(r,"/embed/").concat(n,"/embedControl");return new URL(o)},ke=function(e){if(Ce(e))return[e.contextId,e.experienceType,e.discriminator].filter(Boolean).join("-")},Me=["url","container","width","height","resizeHeightOnSizeChangedEvent","withIframePlaceholder","className","onChange"];const Ue=function(){var e=c(s().mark((function e(t){var r,n,a,u,l,f,p,d,v,E,O,y,g,b,w;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(t||{}).onChange,a=void 0===n?null:n,u=h(),l=new Set,f=m(),p=null===(r=document.getElementsByTagName("body"))||void 0===r?void 0:r[0]){e.next=8;break}throw null==a||a({eventName:B.NO_BODY,eventLevel:F.ERROR,message:"could not locate <body> element in the page"},{frame:null}),new Error("could not locate <body> element in the page");case 8:return v=function(e){if(!d){var t,r=e.url;if(!r)return;try{t=L(r)}catch(e){return}var n=Le(p,{eventManager:f,urlInfo:t,contextId:u},a).internalSend;d={eventManager:f,sendToControlFrame:n,contextId:u,timeout:j}}return d},E=function(e,t){if(!e){var r="".concat(t," is called without frameOptions");throw null==a||a({eventName:B.NO_FRAME_OPTIONS,eventLevel:F.ERROR,message:r,data:{methodName:t}},{frame:null}),new Error(r)}if("object"!==i(e)||Array.isArray(e)){var n="".concat(t," is called with non-object frameOptions");throw null==a||a({eventName:B.INVALID_FRAME_OPTIONS,eventLevel:F.ERROR,message:n,data:{methodName:t,frameOptionsType:Array.isArray(e)?"array":i(e)}},{frame:null}),new Error(n)}e.url,e.container,e.width,e.height,e.resizeHeightOnSizeChangedEvent,e.withIframePlaceholder,e.className;var c=e.onChange,u=o(e,Me),s=Object.keys(u);if(s.length>0){var l="".concat(t," is called with unrecognized properties");null==c||c({eventName:B.UNRECOGNIZED_FRAME_OPTIONS,eventLevel:F.WARN,message:l,data:{unrecognizedFrameOptions:s}},{frame:null}),console.warn(l)}},O=function(){var e=c(s().mark((function e(t,r){var n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return E(t,"embedVisual"),n=v(t),e.abrupt("return",re(t,r,n,l));case 3:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),y=function(){var e=c(s().mark((function e(t,r){var n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return E(t,"embedDashboard"),n=v(t),e.abrupt("return",Ee(t,r,n,l));case 3:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),g=function(){var e=c(s().mark((function e(t,r){var n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return E(t,"embedConsole"),n=v(t),e.abrupt("return",se(t,r,n,l));case 3:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),b=function(){var e=c(s().mark((function e(t,r){var n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return E(t,"embedQSearchBar"),n=v(t),e.abrupt("return",Re(t,r,n,l));case 3:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),w={embedVisual:O,embedDashboard:y,embedConsole:g,embedQSearchBar:b},e.abrupt("return",w);case 16:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},61:(e,t,r)=>{var n=r(698).default;function o(){"use strict";e.exports=o=function(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},c="function"==typeof Symbol?Symbol:{},u=c.iterator||"@@iterator",s=c.asyncIterator||"@@asyncIterator",l=c.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof h?t:h,i=Object.create(o.prototype),c=new x(n||[]);return a(i,"_invoke",{value:R(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var v={};function h(){}function m(){}function E(){}var O={};f(O,u,(function(){return this}));var y=Object.getPrototypeOf,g=y&&y(y(I([])));g&&g!==r&&i.call(g,u)&&(O=g);var b=E.prototype=h.prototype=Object.create(O);function w(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function N(e,t){function r(o,a,c,u){var s=d(e[o],e,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==n(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,c,u)}),(function(e){r("throw",e,c,u)})):t.resolve(f).then((function(e){l.value=e,c(l)}),(function(e){return r("throw",e,c,u)}))}u(s.arg)}var o;a(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}})}function R(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=S(a,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=d(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,v;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,v):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,v)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function I(e){if(e){var t=e[u];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r<e.length;)if(i.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return n.next=n}}return{next:A}}function A(){return{value:void 0,done:!0}}return m.prototype=E,a(b,"constructor",{value:E,configurable:!0}),a(E,"constructor",{value:m,configurable:!0}),m.displayName=f(E,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,E):(e.__proto__=E,f(e,l,"GeneratorFunction")),e.prototype=Object.create(b),e},t.awrap=function(e){return{__await:e}},w(N.prototype),f(N.prototype,s,(function(){return this})),t.AsyncIterator=N,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new N(p(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},w(b),f(b,l,"Generator"),f(b,u,(function(){return this})),f(b,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!e)for(var t in this)"t"===t.charAt(0)&&i.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var c=i.call(o,"catchLoc"),u=i.call(o,"finallyLoc");if(c&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),_(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:I(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),v}},t}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},698:e=>{function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},687:(e,t,r)=>{var n=r(61)();e.exports=n;try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r(174)})();
//# sourceMappingURL=quicksight-embedding-js-sdk.min.js.map
/*!
* amazon-quicksight-embedding-sdk v2.2.1
* amazon-quicksight-embedding-sdk v2.2.2
* git@github.com:awslabs/amazon-quicksight-embedding-sdk.git

@@ -4,0 +4,0 @@ * Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.

{
"name": "amazon-quicksight-embedding-sdk",
"description": "JS SDK for embedding Amazon QuickSight",
"version": "2.2.1",
"version": "2.2.2",
"main": "dist/index.js",

@@ -6,0 +6,0 @@ "types": "dist/index.d.ts",

@@ -15,2 +15,7 @@ # Amazon QuickSight Embedding SDK

&nbsp;
> Do you use SDKs and APIs to manage QuickSight, and embed in a website or App?
>
> Help us improve your experience by [taking this <5-minute survey](https://amazonmr.au1.qualtrics.com/jfe/form/SV_5oS7MAbenBxz60m).
&nbsp;

@@ -23,3 +28,3 @@ ## Installation

...
<script src="https://unpkg.com/amazon-quicksight-embedding-sdk@2.2.1/dist/quicksight-embedding-js-sdk.min.js"></script>
<script src="https://unpkg.com/amazon-quicksight-embedding-sdk@2.2.2/dist/quicksight-embedding-js-sdk.min.js"></script>
<script type="text/javascript">

@@ -453,3 +458,3 @@ const onLoad = async () => {

<title>Dashboard Embedding Example</title>
<script src="https://unpkg.com/amazon-quicksight-embedding-sdk@2.2.1/dist/quicksight-embedding-js-sdk.min.js"></script>
<script src="https://unpkg.com/amazon-quicksight-embedding-sdk@2.2.2/dist/quicksight-embedding-js-sdk.min.js"></script>
<script type="text/javascript">

@@ -852,3 +857,3 @@ const embedDashboard = async() => {

<title>Visual Embedding Example</title>
<script src="https://unpkg.com/amazon-quicksight-embedding-sdk@2.2.1/dist/quicksight-embedding-js-sdk.min.js"></script>
<script src="https://unpkg.com/amazon-quicksight-embedding-sdk@2.2.2/dist/quicksight-embedding-js-sdk.min.js"></script>
<script type="text/javascript">

@@ -1079,3 +1084,3 @@ const embedVisual = async() => {

<title>Console Embedding Example</title>
<script src="https://unpkg.com/amazon-quicksight-embedding-sdk@2.2.1/dist/quicksight-embedding-js-sdk.min.js"></script>
<script src="https://unpkg.com/amazon-quicksight-embedding-sdk@2.2.2/dist/quicksight-embedding-js-sdk.min.js"></script>
<script type="text/javascript">

@@ -1198,3 +1203,3 @@ const embedConsole = async() => {

<title>Q Search Bar Embedding Example</title>
<script src="https://unpkg.com/amazon-quicksight-embedding-sdk@2.2.1/dist/quicksight-embedding-js-sdk.min.js"></script>
<script src="https://unpkg.com/amazon-quicksight-embedding-sdk@2.2.2/dist/quicksight-embedding-js-sdk.min.js"></script>
<script type="text/javascript">

@@ -1201,0 +1206,0 @@ const embedQSearchBar = async() => {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc