@walkme/sdk
Advanced tools
Comparing version 2.0.16 to 2.0.17
@@ -1,2 +0,2 @@ | ||
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}([function(e,t,n){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([,function(e,t,n){"use strict";var r;n.r(t),n.d(t,"addScript",(function(){return $})),n.d(t,"createSdk",(function(){return B})),n.d(t,"isSelfHosted",(function(){return v})),n.d(t,"getPublicPath",(function(){return w})),n.d(t,"getSdkApplicationsPublicPathWithEntry",(function(){return S})),n.d(t,"getSdkUtilsPublicPathWithEntry",(function(){return T})),n.d(t,"rpc",(function(){return R})),n.d(t,"overTheWire",(function(){return z})),n.d(t,"getLocalStorageItem",(function(){return f})),n.d(t,"LogLevel",(function(){return I})),n.d(t,"setExtra",(function(){return j})),n.d(t,"log",(function(){return _})),n.d(t,"warn",(function(){return C})),n.d(t,"error",(function(){return x})),n.d(t,"logger",(function(){return A})),n.d(t,"CUSTOM_SDKS_CONFIG_KEY",(function(){return m})),n.d(t,"rpcLoader",(function(){return W}));var o=new Uint8Array(16);function a(){if(!r&&!(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(o)}for(var i=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,s=function(e){return"string"==typeof e&&i.test(e)},u=[],c=0;c<256;++c)u.push((c+256).toString(16).substr(1));var l,d=function(e,t,n){var r=(e=e||{}).random||(e.rng||a)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(u[e[t+0]]+u[e[t+1]]+u[e[t+2]]+u[e[t+3]]+"-"+u[e[t+4]]+u[e[t+5]]+"-"+u[e[t+6]]+u[e[t+7]]+"-"+u[e[t+8]]+u[e[t+9]]+"-"+u[e[t+10]]+u[e[t+11]]+u[e[t+12]]+u[e[t+13]]+u[e[t+14]]+u[e[t+15]]).toLowerCase();if(!s(n))throw TypeError("Stringified UUID is invalid");return n}(r)};!function(e){e.request="request",e.response="response"}(l||(l={}));const f=e=>{var t,n;try{return(null===(n=null===(t=globalThis.walkme)||void 0===t?void 0:t.localStorageOverrides)||void 0===n?void 0:n[e])||globalThis.localStorage.getItem(e)}catch(e){}},m="custom-sdks-config";function p(e){return"player"===e?f("walkme-sdk-version"):"sdk-utils"===e?f("walkme-sdk-utils-version"):void 0}function g(e){var t;const n=JSON.parse(f(m)||null),r=null===(t=null==n?void 0:n[e])||void 0===t?void 0:t.customVersion;return"local"===r?"local":r}function y(e){return new URL(window.location.href).searchParams.get(e)}function v(){return"true"===y(k)}function h(){const e=window.location.href.match(/^(.*?\/components)\//);return e&&e[1]}function b(e){if(e){const e=new URL(window.location.href),t=e.pathname.split("/");return t.splice(0,1),t.splice(-4),e.search="",e.pathname=t.join("/"),e.href+"/components"}return"https://cdn.walkme.com"}function w(e){const t=g("player")||p("player")||"2.0";return"local"===t?"https://localhost:9128/dist/":`${b(e)}${e?"/sdk-runtime":"/sdk/player"}/${t}/`}const k="selfhosted";function S(){const e=g("player")||p("player")||"2.0";if("local"===e)return"https://localhost:9902/dist/index.js";if("2"===y("sdk-version")){let t;return t=v()?h():b()+"/sdk",`${t+"/sdk-applications"}/${e}/index.js`}return b()+"/sdk/player/1.0/main.js"}function T(){const e=g("sdk-utils")||p("sdk-utils")||"2.0";if("local"===e)return"https://localhost:9904/dist/index.js";let t;return t=v()?h():b()+"/sdk",`${t+"/sdk-utils"}/${e}/index.js`}var I;!function(e){e.INFO="info",e.ERROR="error",e.WARN="warn"}(I||(I={}));const O={sessionId:"noSessionId",userGuid:"noUserGuid",platformApiVersion:-1,platformImplementation:"unknown",messengerName:"unknown"},j=(e={})=>{Object.assign(O,e)};async function P({eventName:e,module:t,message:n,data:r,logLevel:o,extra:a}){if(!v()){(null==r?void 0:r.error)instanceof Error&&(r.error=JSON.parse(JSON.stringify(r.error,Object.getOwnPropertyNames(r.error))));try{await fetch("https://ec.walkme.com/event/log",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({app:"walkme-sdk",module:t,message:`${e}${n?": "+n:""}`,data:r,level:o,commit:"f5bdeafc0c13c3428ef384f5183e0bd3bb0c3e26",sdkBranch:"master",envInfo:O,extra:a})})}catch(e){}}}const _=e=>P(Object.assign(Object.assign({},e),{logLevel:I.INFO})),C=e=>P(Object.assign(Object.assign({},e),{logLevel:I.WARN})),x=e=>P(Object.assign(Object.assign({},e),{logLevel:I.ERROR,extra:(new Error).stack})),A={warn:C,log:_,error:x,setExtra:j},E=(e=100)=>{const t=Date.now();let n=Date.now(),r=0;const o=()=>Date.now()-n;return{getTotalComputedTime:()=>r+o(),politelyReleaseIfNeeded:async()=>{o()>e&&await(async()=>{r+=Date.now()-n,await new Promise(e=>{setTimeout(e,10)}),n=Date.now()})()},getTotalAbsoluteTime:()=>Date.now()-t}};var L=function(e){return this instanceof L?(this.v=e,this):new L(e)},N=function(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),a=[];return r={},i("next"),i("throw"),i("return"),r[Symbol.asyncIterator]=function(){return this},r;function i(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){a.push([e,t,n,r])>1||s(e,t)}))})}function s(e,t){try{(n=o[e](t)).value instanceof L?Promise.resolve(n.value.v).then(u,c):l(a[0][2],n)}catch(e){l(a[0][3],e)}var n}function u(e){s("next",e)}function c(e){s("throw",e)}function l(e,t){e(t),a.shift(),a.length&&s(a[0][0],a[0][1])}},M=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){!function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}(r,o,(t=e[n](t)).done,t.value)}))}}};function D(e){const t={},n=new Map;function r(t,n){throw A.error({eventName:"Serializer",message:t,module:"sdk-utils",data:{metadata:n,messengerName:e}}),new Error(t)}function o(t,n,r){return N(this,arguments,(function*(){const o=Object.getOwnPropertyDescriptors(t);let a=0,i=0;for(const e in o)yield L(n.politelyReleaseIfNeeded()),"function"!=typeof o[e].get?(a++,yield yield L(e)):i++;i-a>100&&A.warn({message:`Allot of getters were excluded: ${i}. Compared to ${a} non getter properties`,eventName:"Serializer",module:"sdk-utils",data:{metadata:r,messengerName:e}})}))}const a=(e,t)=>t.has(e)&&e&&(Array.isArray(e)||"object"==typeof e),i=(e,r,o)=>Array.isArray(e)?[]:"object"==typeof e&&e?{}:"function"==typeof e?function(e,r,o){if(n.has(e))return n.get(e);const a=`##function##${o}##${d()}`,i=e.bind(r);return t[a]=i,n.set(e,a),a}(e,r,Array.isArray(r)?"ANONYMOUS":o):e;function s(e,t,n,r){return N(this,arguments,(function*(){var a,i;if(Array.isArray(e))for(let r=0;r<e.length;r++)yield L(n.politelyReleaseIfNeeded()),yield yield L({obj:e[r],key:r,parent:t,originalParent:e});else if("object"==typeof e&&e)try{for(var s,u=M(o(e,n,r));!(s=yield L(u.next())).done;){const r=s.value;yield L(n.politelyReleaseIfNeeded()),yield yield L({obj:e[r],parent:t,key:r,originalParent:e})}}catch(e){a={error:e}}finally{try{s&&!s.done&&(i=u.return)&&(yield L(i.call(u)))}finally{if(a)throw a.error}}}))}return{serialize:async(t,n)=>{var o,u;let c=0;const l=new Set,d={},f=function(){let e,t,n=0;return{shift:()=>{const t=null==e?void 0:e.item;return e=null==e?void 0:e.next,n=Math.max(n-1,0),t},push:r=>{n++;const o={item:r};e?(t.next=o,t=t.next):(e=o,t=o)},get length(){return n}}}();f.push({obj:t,key:"ANONYMOUS",parent:d,originalParent:{}});const m=E(),p=((e,t)=>{const n={};let r=-1;const o=()=>{n[r]&&(n[r].statsForIteration.totalTime=Date.now()-n[r].statsForIteration.startTime,n[r].statsForIteration.totalComputed=e.getTotalComputedTime()-n[r].statsForIteration.lastComputed)},a=e=>{let t;for(const r in n)n[r].statsForIteration[e]>(t?n[t].statsForIteration[e]:-1)&&(t=r);return Object.assign(Object.assign({},n[t]),{iteration:t})};return{addCheckPoint:o=>{r>t||n[r].points.push({message:o,totalComputedTime:e.getTotalComputedTime(),totalAbsoluteTime:e.getTotalAbsoluteTime()})},getCheckPoints:()=>n,getMaxComputedIteration:()=>a("totalComputed"),getMaxAbsoluteIteration:()=>a("totalTime"),setIteration:a=>{-1!==r&&o(),(o=>{r=o,r>t||(n[r]={points:[],statsForIteration:{startTime:Date.now(),lastComputed:e.getTotalComputedTime(),totalTime:-1,totalComputed:-1}})})(a)},finish:()=>{r>t||o()}}})(m,10);for(;f.length;){c++,p.setIteration(c),p.addCheckPoint(`starting the ${c}'s iteration`),c+f.length>5e5&&r("not serializable: https://cdn.walkme.com/sdk/sdk-applications/2.0/docs/index.html#serialization",n),m.getTotalComputedTime()>3e4&&r(`unable to serialize after 30 seconds, ${c} iterations. Giving up`,n);const{obj:e,parent:t,key:d,originalParent:v}=f.shift();if(p.addCheckPoint(`got our next key to serialize: ${d}. checking if we need to release the UI thread first`),await m.politelyReleaseIfNeeded(),d in t)continue;if(p.addCheckPoint("checking circular object"),a(e,l)){t[d]="##CIRCULAR_OBJECT##";continue}l.add(e),p.addCheckPoint("getting base object");const h=i(e,v,d);t[d]=h,p.addCheckPoint("adding children to the queue");try{for(var g,y=(o=void 0,M(s(e,h,m,n)));!(g=await y.next()).done;){const e=g.value;f.push(e)}}catch(e){o={error:e}}finally{try{g&&!g.done&&(u=y.return)&&await u.call(y)}finally{if(o)throw o.error}}p.addCheckPoint(`finished the ${c}'s iteration`)}const v=m.getTotalComputedTime(),h=m.getTotalAbsoluteTime(),b=d.ANONYMOUS;return p.finish(),(v>1500||h>6e3)&&A.warn({message:`serialize took ${v}ms to compute, ${c} iterations to complete, in an overall time of ${h}ms`,eventName:"Serializer",module:"sdk-utils",data:Object.assign(Object.assign(Object.assign({metadata:n,messengerName:e},c<50?{serializedObj:b}:void 0),c<10?{checkPoints:p.getCheckPoints(),maxComputedIteration:p.getMaxComputedIteration(),maxAbsoluteIteration:p.getMaxAbsoluteIteration()}:void 0),{dateNowToString:Date.now.toString()})}),b},deserialize:function e(t,n){return Array.isArray(t)?((t,n)=>t.map(t=>e(t,n)))(t,n):"object"==typeof t&&t?((t,n)=>Object.entries(t).reduce((t,[r,o])=>(t[r]=e(o,n),t),{}))(t,n):/^##function##/.test(t)?(...e)=>n(t,e):t},getFunction:e=>t[e]}}function R(e){const t=D(e.name),n="__sdk__runtime__uniq__me"===e.name?e.name:`${e.name}##${d()}`,r={applicationId:n,messageType:l.request},o={applicationId:n,messageType:l.response},a={},i={},s=e=>t.getFunction(e)||a[e];async function u({metadata:n,data:r}){let o;try{o=await t.serialize(r,n)}catch(r){return n.messageType===l.response&&e.sendMessage({metadata:n,data:await t.serialize(r,n)}),Promise.reject(r)}return e.sendMessage({metadata:n,data:o}),n.messageType===l.request?(a=n.messageId,new Promise((e,t)=>{i[a]={resolve:e,reject:t}})):Promise.resolve();var a}const c=(t="sdk_get_api")=>u({metadata:Object.assign(Object.assign({functionId:t,messageId:d()},r),{messageStackTrace:null}),data:[]}).then(t=>(A.setExtra(Object.assign(Object.assign({},t.extra),{messengerName:e.name})),t)),f=t=>{const n=t.sdk_get_api;if(n){const t=n();A.setExtra(Object.assign(Object.assign({},t.extra),{messengerName:e.name}))}Object.assign(a,t)};return e.receiveMessage((function(a){var c,f;if(!function(e){return e&&"object"==typeof e&&"metadata"in e&&"data"in e}(a))return;const{metadata:m,data:p}=a,{messageType:g,messageId:y,functionId:v,applicationId:h}=m;if(!function({requester:e,messageType:t,functionId:r,messageId:o}){return t===l.response?!!i[o]:e!==n&&!!s(r)}({requester:h,messageType:g,functionId:v,messageId:y}))return;const b=t.deserialize(p,(w=m,(e,t)=>u({metadata:Object.assign({messageStackTrace:w,functionId:e,messageId:d()},r),data:t})));var w;g===l.response?(m.error?(A.warn({data:{metadata:m,messengerName:e.name},eventName:"rpc",message:"other side rejected",module:"sdk-runtime"}),null===(c=i[y])||void 0===c||c.reject(m)):null===(f=i[y])||void 0===f||f.resolve(b),delete i[y]):async function(e,n,r,a){const i=s(n);if(i){let s,c;const l=Object.assign(Object.assign({messageId:e,functionId:n},o),{messageStackTrace:a});try{const e=await i(...r);s=await t.serialize(e,l)}catch(e){c=await t.serialize(e,l)}u({metadata:Object.assign(Object.assign({},l),{error:c}),data:s})}}(y,v,b,m)})),"undefined"!=typeof TESTING?{getApi:c,provideResolver:f,serializer:t,onmessages:i}:{getApi:c,provideResolver:f}}const z=R;function $(e,t){const n=document.createElement("script");n.async=!0,n.src=e,document.getElementsByTagName("head")[0].appendChild(n),n.onerror=t}const U=()=>window,W=async e=>(await new Promise(e=>{var t;t=e,U()._walkmeInternals=U()._walkmeInternals||{},Object.assign(U()._walkmeInternals,{__rpc_loader_resolver:t}),$(T(),()=>{})})).rpc(e);let F=globalThis.sdkInstance;const B=e=>({async init(...t){F=await e(...t)},get content(){return null==F?void 0:F.content},get settings(){return null==F?void 0:F.settings},get storage(){return null==F?void 0:F.storage},get conditions(){return null==F?void 0:F.conditions},get events(){return null==F?void 0:F.events},get language(){return null==F?void 0:F.language},get platform(){return null==F?void 0:F.platform},get apps(){return null==F?void 0:F.apps},get ui(){return null==F?void 0:F.ui},get services(){return null==F?void 0:F.services},get notifications(){return null==F?void 0:F.notifications}});(()=>{const e=null===(t=window._walkmeInternals)||void 0===t?void 0:t.__rpc_loader_resolver;var t;e&&e({rpc:R})})()}])},function(e,t,n){"use strict";var r,o,a,i,s,u,c,l,d,f,m,p;n.d(t,"i",(function(){return r})),n.d(t,"h",(function(){return o})),n.d(t,"e",(function(){return a})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return s})),n.d(t,"f",(function(){return u})),n.d(t,"g",(function(){return c})),n.d(t,"d",(function(){return l})),n.d(t,"k",(function(){return d})),n.d(t,"j",(function(){return f})),n.d(t,"a",(function(){return m})),n.d(t,"l",(function(){return p})),n.d(t,"m",(function(){return g})),n.d(t,"n",(function(){return y})),function(e){e.Video="video",e.Article="article",e.Launcher="launcher",e.ShoutOut="shoutOut",e.Shuttle="shuttle",e.SmartWalkThru="smart-walkthru",e.Survey="survey",e.Task="task",e.Course="course",e.Lesson="lesson",e.Walkthru="walkthru",e.Category="category",e.Tab="tab",e.Experiments="experiments",e.SearchProviderUrl="search-provider-url",e.Tag="tag",e.TrackedElement="trackedElement",e.TrackedPage="trackedPage",e.SupportItem="support",e.SearchResult="search-result",e.HelpDesk="helpDesk",e.SmartTipSet="smartTipSet"}(r||(r={})),function(e){e.Help="help",e.Tasks="tasks"}(o||(o={})),function(e){e[e.Walkthru=0]="Walkthru",e[e.Task=1]="Task",e[e.Launcher=2]="Launcher",e[e.LabelGroup=3]="LabelGroup",e[e.Survey=4]="Survey",e[e.AbExperiment=5]="AbExperiment",e[e.Category=6]="Category",e[e.Content=7]="Content",e[e.Collection=8]="Collection",e[e.Shuttle=9]="Shuttle",e[e.Tag=10]="Tag",e[e.ShoutOut=14]="ShoutOut",e[e.ConditionBlock=17]="ConditionBlock",e[e.BusinessSolution=19]="BusinessSolution",e[e.Lesson=20]="Lesson",e[e.Course=21]="Course",e[e.TrackedPage=22]="TrackedPage",e[e.Spotlight=23]="Spotlight",e[e.Tooltip=24]="Tooltip",e[e.TrackedElement=25]="TrackedElement",e[e.SearchProviderUrl=26]="SearchProviderUrl",e[e.Space=27]="Space",e[e.Folder=28]="Folder",e[e.ActionBot=29]="ActionBot",e[e.ActionBotConversation=30]="ActionBotConversation",e[e.Menu=31]="Menu"}(a||(a={})),function(e){e.IDP="idp"}(i||(i={})),function(e){e[e.Play=2]="Play"}(s||(s={})),function(e){e.Verbose="Verbose",e.Debug="Debug",e.Info="Info",e.Warn="Warn",e.Error="Error"}(u||(u={})),function(e){e.Web="web",e.Mac="mac",e.Windows="windows",e.Mock="mock",e.Worker="worker"}(c||(c={})),function(e){e.BeforeOpen="beforeOpen",e.BeforeClose="beforeClose"}(l||(l={})),function(e){e.VisualDesign="visualDesign"}(d||(d={})),function(e){e.ActionClicked="visualDesign.actionClicked"}(f||(f={})),function(e){e.Remote="remote",e.Destroy="destroy",e.PlayShuttle="playShuttle",e.Play="play",e.PlayContent="playContent",e.PlaySWT="playBf",e.PlayWT="playWt",e.OpenMenu="openMenu"}(m||(m={})),function(e){e.APPS_DRAWS="wm-visualDesign-apps-items",e.DRAW_ACTIONS="wm-visualDesign-item-actions"}(p||(p={}));const g=600;var y;!function(e){e.Empty="%",e.Px="px"}(y||(y={}))},,function(e,t,n){"use strict";n.r(t),n.d(t,"TypeName",(function(){return s.i})),n.d(t,"TabType",(function(){return s.h})),n.d(t,"LegacyTypes",(function(){return s.e})),n.d(t,"EndUserMethods",(function(){return s.b})),n.d(t,"Environment",(function(){return s.c})),n.d(t,"LogLevel",(function(){return s.f})),n.d(t,"PlatformType",(function(){return s.g})),n.d(t,"EventTypeName",(function(){return s.d})),n.d(t,"UIItemType",(function(){return s.k})),n.d(t,"UIEventType",(function(){return s.j})),n.d(t,"ActionType",(function(){return s.a})),n.d(t,"UI_STORAGE_KEYS",(function(){return s.l})),n.d(t,"UI_STORAGE_TIME",(function(){return s.m})),n.d(t,"Unit",(function(){return s.n}));var r=n(0);const o={name:"sdk-iframe-proxy-client",sendMessage:e=>{var t;return null===(t=a().contentWindow)||void 0===t?void 0:t.postMessage(e,"*")},receiveMessage:e=>{window.addEventListener("message",t=>{var n;(null===(n=t.data)||void 0===n?void 0:n.metadata)&&e(t.data)})}},a=()=>document.querySelector("#wm-channel");function i(){return new Promise(e=>{const t=document.createElement("iframe");t.id="wm-channel",t.src=Object(r.getPublicPath)()+"sdk-proxy.html?platform=web",t.style.display="none",t.addEventListener("load",()=>{const t=Object(r.rpc)(o).getApi();e(t)}),document.body.appendChild(t)})}var s=n(1);const u=Object(r.createSdk)((async function(e={mode:"common"}){try{return await("iframe"===e.mode?((null===(o=null===(n=null===(t=globalThis._walkmeInternals)||void 0===t?void 0:t.ctx)||void 0===n?void 0:n.get("FeaturesManager"))||void 0===o?void 0:o.isFeatureEnabled("playerSDKV2"))?c:i)():async function(){if(globalThis.sdkInstance)return globalThis.sdkInstance;const e=self;if(!e.__walkmeSDKLazyLoad){e.__walkmeSDKLazyLoad={},e.__walkmeSDKLazyLoad.promise=new Promise(t=>{e.__walkmeSDKLazyLoad.resolve=t,e.__walkmeSDKLazyLoad.reject=t});const t=document.createElement("script");t.src=""+Object(r.getSdkApplicationsPublicPathWithEntry)(),document.body.appendChild(t)}const t=await e.__walkmeSDKLazyLoad.promise;return await t.init(),globalThis.sdkInstance=t,t}())}catch(e){throw console.error(e),e}var t,n,o}));t.default=u;async function c(){return await new Promise(e=>{var t;const n=({data:t})=>{"WalkMeApplicationsLoader-PlayerSDKLoaded"===t&&(window.removeEventListener("message",n),e())};(null===(t=globalThis._walkmeInternals)||void 0===t?void 0:t.getPlayerSdk)?e():window.addEventListener("message",n)}),globalThis._walkmeInternals.getPlayerSdk()}}])})); | ||
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}([function(e,t,n){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([,function(e,t,n){"use strict";var r;n.r(t),n.d(t,"addScript",(function(){return z})),n.d(t,"createSdk",(function(){return F})),n.d(t,"isSelfHosted",(function(){return h})),n.d(t,"getCdnRoot",(function(){return w})),n.d(t,"getPublicPath",(function(){return k})),n.d(t,"getSdkApplicationsPublicPathWithEntry",(function(){return O})),n.d(t,"getSdkUtilsPublicPathWithEntry",(function(){return j})),n.d(t,"rpc",(function(){return M})),n.d(t,"overTheWire",(function(){return R})),n.d(t,"getLocalStorageItem",(function(){return f})),n.d(t,"getNavigatorProps",(function(){return m})),n.d(t,"LogLevel",(function(){return P})),n.d(t,"setExtra",(function(){return I})),n.d(t,"log",(function(){return x})),n.d(t,"warn",(function(){return A})),n.d(t,"error",(function(){return E})),n.d(t,"logger",(function(){return L})),n.d(t,"CUSTOM_SDKS_CONFIG_KEY",(function(){return p})),n.d(t,"rpcLoader",(function(){return $}));var o=new Uint8Array(16);function a(){if(!r&&!(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(o)}for(var i=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,s=function(e){return"string"==typeof e&&i.test(e)},u=[],c=0;c<256;++c)u.push((c+256).toString(16).substr(1));var l,d=function(e,t,n){var r=(e=e||{}).random||(e.rng||a)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(u[e[t+0]]+u[e[t+1]]+u[e[t+2]]+u[e[t+3]]+"-"+u[e[t+4]]+u[e[t+5]]+"-"+u[e[t+6]]+u[e[t+7]]+"-"+u[e[t+8]]+u[e[t+9]]+"-"+u[e[t+10]]+u[e[t+11]]+u[e[t+12]]+u[e[t+13]]+u[e[t+14]]+u[e[t+15]]).toLowerCase();if(!s(n))throw TypeError("Stringified UUID is invalid");return n}(r)};!function(e){e.request="request",e.response="response"}(l||(l={}));const f=e=>{var t,n;try{return(null===(n=null===(t=globalThis.walkme)||void 0===t?void 0:t.localStorageOverrides)||void 0===n?void 0:n[e])||globalThis.localStorage.getItem(e)}catch(e){}},m=()=>{try{const{appVersion:e,connection:t,hardwareConcurrency:n,userAgent:r,userAgentData:o,webdriver:a,plugins:i}=navigator;return{appVersion:e,connection:t,hardwareConcurrency:n,userAgent:r,userAgentData:o,webdriver:a,plugins:i}}catch(e){return{}}},p="custom-sdks-config";function g(e){return"player"===e?f("walkme-sdk-version"):"sdk-utils"===e?f("walkme-sdk-utils-version"):void 0}function y(e){var t;const n=JSON.parse(f(p)||null),r=null===(t=null==n?void 0:n[e])||void 0===t?void 0:t.customVersion;return"local"===r?"local":r}function v(e){return new URL(window.location.href).searchParams.get(e)}function h(){return"true"===v(T)}function b(){const e=window.location.href.match(/^(.*?\/components)\//);return e&&e[1]}function w(e){if(e){const e=new URL(window.location.href),t=e.pathname.split("/");return t.splice(0,1),t.splice(-4),e.search="",e.pathname=t.join("/"),e.href+"/components"}return"true"===v(S)||"eu-cdn.walkme.com"===new URL(window.location.href).hostname?"https://eu-cdn.walkme.com":"https://cdn.walkme.com"}function k(e){const t=y("player")||g("player")||"2.0";return"local"===t?"https://localhost:9128/dist/":`${w(e)}${e?"/sdk-runtime":"/sdk/player"}/${t}/`}const T="selfhosted",S="isEu";function O(){const e=y("player")||g("player")||"2.0";if("local"===e)return"https://localhost:9902/dist/index.js";if("2"===v("sdk-version")){let t;return t=h()?b():w()+"/sdk",`${t+"/sdk-applications"}/${e}/index.js`}return w()+"/sdk/player/1.0/main.js"}function j(){const e=y("sdk-utils")||g("sdk-utils")||"2.0";if("local"===e)return"https://localhost:9904/dist/index.js";let t;return t=h()?b():w()+"/sdk",`${t+"/sdk-utils"}/${e}/index.js`}var P;!function(e){e.INFO="info",e.ERROR="error",e.WARN="warn"}(P||(P={}));const _={sessionId:"noSessionId",userGuid:"noUserGuid",platformApiVersion:-1,platformImplementation:"unknown",messengerName:"unknown"},I=(e={})=>{Object.assign(_,e)};async function C({eventName:e,module:t,message:n,data:r,logLevel:o,extra:a}){if(!h()){(null==r?void 0:r.error)instanceof Error&&(r.error=JSON.parse(JSON.stringify(r.error,Object.getOwnPropertyNames(r.error))));try{await fetch("https://ec.walkme.com/event/log",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({app:"walkme-sdk",module:t,message:`${e}${n?": "+n:""}`,data:r,level:o,commit:"4f04ad30acbfeac1035120e91a6379d9d4ae8a05",sdkBranch:"master",envInfo:_,extra:a})})}catch(e){}}}const x=e=>C(Object.assign(Object.assign({},e),{logLevel:P.INFO})),A=e=>C(Object.assign(Object.assign({},e),{logLevel:P.WARN})),E=e=>C(Object.assign(Object.assign({},e),{logLevel:P.ERROR,extra:(new Error).stack})),L={warn:A,log:x,error:E,setExtra:I},D=(e=100)=>{const t=Date.now();let n=Date.now(),r=0;const o=()=>Date.now()-n;return{getTotalComputedTime:()=>r+o(),politelyReleaseIfNeeded:()=>o()>e&&(async()=>{r+=Date.now()-n,await new Promise(e=>{setTimeout(e,10)}),n=Date.now()})(),getTotalAbsoluteTime:()=>Date.now()-t}};function N(e){const t={},n=new Map;function r(t,n){throw L.error({eventName:"Serializer",message:t,module:"sdk-utils",data:{metadata:n,messengerName:e}}),new Error(t)}const o=(e,t)=>t.has(e)&&e&&(Array.isArray(e)||"object"==typeof e),a=(e,r,o)=>Array.isArray(e)?[]:"object"==typeof e&&e?{}:"function"==typeof e?function(e,r,o){if(n.has(e))return n.get(e);const a=`##function##${o}##${d()}`,i=e.bind(r);return t[a]=i,n.set(e,a),a}(e,r,Array.isArray(r)?"ANONYMOUS":o):e;function*i(t,n,r,o){if(Array.isArray(t))for(let e=0;e<t.length;e++)yield{obj:t[e],key:e,parent:n,originalParent:t};else if("object"==typeof t&&t)for(const r of function*(t,n,r){const o=Date.now(),a=Object.getOwnPropertyDescriptors(t),i=Date.now()-o;i>50&&L.warn({eventName:"get_own_property_descriptors_measurement",message:"the function getOwnPropertyDescriptors took too long to execute",module:"sdk-utils",data:{duration:i}});let s=0,u=0;for(const e in a)"function"!=typeof a[e].get?(s++,yield e):u++;u-s>100&&L.warn({message:`Allot of getters were excluded: ${u}. Compared to ${s} non getter properties`,eventName:"Serializer",module:"sdk-utils",data:{metadata:r,messengerName:e}})}(t,0,o))yield{obj:t[r],parent:n,key:r,originalParent:t}}return{serialize:async(t,n)=>{let s=0;const u=new Set,c={},l=function(){let e,t,n=0;return{shift:()=>{const t=null==e?void 0:e.item;return e=null==e?void 0:e.next,n=Math.max(n-1,0),t},push:r=>{n++;const o={item:r};e?(t.next=o,t=t.next):(e=o,t=o)},get length(){return n}}}();l.push({obj:t,key:"ANONYMOUS",parent:c,originalParent:{}});const d=D(),f=((e,t)=>{const n={};let r=-1;const o=()=>{n[r]&&(n[r].statsForIteration.totalTime=Date.now()-n[r].statsForIteration.startTime,n[r].statsForIteration.totalComputed=e.getTotalComputedTime()-n[r].statsForIteration.lastComputed)},a=e=>{let t;for(const r in n)n[r].statsForIteration[e]>(t?n[t].statsForIteration[e]:-1)&&(t=r);return Object.assign(Object.assign({},n[t]),{iteration:t})};return{addCheckPoint:o=>{r>t||n[r].points.push({message:o,totalComputedTime:e.getTotalComputedTime(),totalAbsoluteTime:e.getTotalAbsoluteTime()})},getCheckPoints:()=>n,getMaxComputedIteration:()=>a("totalComputed"),getMaxAbsoluteIteration:()=>a("totalTime"),setIteration:a=>{-1!==r&&o(),(o=>{r=o,r>t||(n[r]={points:[],statsForIteration:{startTime:Date.now(),lastComputed:e.getTotalComputedTime(),totalTime:-1,totalComputed:-1}})})(a)},finish:()=>{r>t||o()}}})(d,10);for(;l.length;){s++,f.setIteration(s),f.addCheckPoint(`starting the ${s}'s iteration`),s+l.length>5e5&&r("not serializable: https://cdn.walkme.com/sdk/sdk-applications/2.0/docs/index.html#serialization",n),d.getTotalComputedTime()>3e4&&r(`unable to serialize after 30 seconds, ${s} iterations. Giving up`,n);const{obj:e,parent:t,key:c,originalParent:m}=l.shift();f.addCheckPoint(`got our next key to serialize: ${c}. checking if we need to release the UI thread first`);const p=d.politelyReleaseIfNeeded();if(!1!==p&&await p,c in t)continue;if(f.addCheckPoint("checking circular object"),o(e,u)){t[c]="##CIRCULAR_OBJECT##";continue}u.add(e),f.addCheckPoint("getting base object");const g=a(e,m,c);t[c]=g,f.addCheckPoint("adding children to the queue");for(const t of i(e,g,0,n))l.push(t);f.addCheckPoint(`finished the ${s}'s iteration`)}const p=d.getTotalComputedTime(),g=d.getTotalAbsoluteTime(),y=c.ANONYMOUS;return f.finish(),(p>1500||g>6e3)&&L.warn({message:`serialize took ${p}ms to compute, ${s} iterations to complete, in an overall time of ${g}ms`,eventName:"Serializer",module:"sdk-utils",data:Object.assign(Object.assign(Object.assign({metadata:n,messengerName:e},s<50?{serializedObj:y}:void 0),s<10?{checkPoints:f.getCheckPoints(),maxComputedIteration:f.getMaxComputedIteration(),maxAbsoluteIteration:f.getMaxAbsoluteIteration()}:void 0),{dateNowToString:Date.now.toString(),setTimeoutToString:setTimeout.toString(),navigatorProps:m()})}),y},deserialize:function e(t,n){return Array.isArray(t)?((t,n)=>t.map(t=>e(t,n)))(t,n):"object"==typeof t&&t?((t,n)=>Object.entries(t).reduce((t,[r,o])=>(t[r]=e(o,n),t),{}))(t,n):/^##function##/.test(t)?(...e)=>n(t,e):t},getFunction:e=>t[e]}}function M(e){const t=N(e.name),n="__sdk__runtime__uniq__me"===e.name?e.name:`${e.name}##${d()}`,r={applicationId:n,messageType:l.request},o={applicationId:n,messageType:l.response},a={},i={},s=e=>t.getFunction(e)||a[e];function u(){const e=Date.now();let t;for(let n=0;n<1e4;n++)if(t=Date.now()-e,t>100)return{iterations:n,duration:t};return{iterations:1e4,duration:t}}function c(e){if("platform_get_api"===e.functionId){const e=m();L.error({eventName:"platform_get_api_failed",module:"sdk-runtime",data:{navigatorProps:e,performance:u()}})}}async function f({metadata:n,data:r}){let o;try{o=await t.serialize(r,n)}catch(r){return c(n),n.messageType===l.response&&e.sendMessage({metadata:n,data:await t.serialize(r,n)}),Promise.reject(r)}return e.sendMessage({metadata:n,data:o}),n.messageType===l.request?(a=n.messageId,new Promise((e,t)=>{i[a]={resolve:e,reject:t}})):Promise.resolve();var a}const p=(t="sdk_get_api")=>f({metadata:Object.assign(Object.assign({functionId:t,messageId:d()},r),{messageStackTrace:null}),data:[]}).then(t=>(L.setExtra(Object.assign(Object.assign({},t.extra),{messengerName:e.name})),t)),g=t=>{const n=t.sdk_get_api;if(n){const t=n();L.setExtra(Object.assign(Object.assign({},t.extra),{messengerName:e.name}))}Object.assign(a,t)};return e.receiveMessage((function(a){var u,m;if(!function(e){return e&&"object"==typeof e&&"metadata"in e&&"data"in e}(a))return;const{metadata:p,data:g}=a,{messageType:y,messageId:v,functionId:h,applicationId:b}=p;if(!function({requester:e,messageType:t,functionId:r,messageId:o}){return t===l.response?!!i[o]:e!==n&&!!s(r)}({requester:b,messageType:y,functionId:h,messageId:v}))return;const w=t.deserialize(g,(k=p,(e,t)=>f({metadata:Object.assign({messageStackTrace:k,functionId:e,messageId:d()},r),data:t})));var k;y===l.response?(p.error?(L.warn({data:{metadata:p,messengerName:e.name},eventName:"rpc",message:"other side rejected",module:"sdk-runtime"}),c(p),null===(u=i[v])||void 0===u||u.reject(p)):null===(m=i[v])||void 0===m||m.resolve(w),delete i[v]):async function(e,n,r,a){const i=s(n);if(i){let s,u;const c=Object.assign(Object.assign({messageId:e,functionId:n},o),{messageStackTrace:a});try{const e=await i(...r);s=await t.serialize(e,c)}catch(e){u=await t.serialize(e,c)}await f({metadata:Object.assign(Object.assign({},c),{error:u}),data:s})}}(v,h,w,p)})),"undefined"!=typeof TESTING?{getApi:p,provideResolver:g,serializer:t,onmessages:i}:{getApi:p,provideResolver:g}}const R=M;function z(e,t){const n=document.createElement("script");n.async=!0,n.src=e,document.getElementsByTagName("head")[0].appendChild(n),n.onerror=t}const U=()=>window,$=async e=>(await new Promise(e=>{var t;t=e,U()._walkmeInternals=U()._walkmeInternals||{},Object.assign(U()._walkmeInternals,{__rpc_loader_resolver:t}),z(j(),()=>{})})).rpc(e);let W=globalThis.sdkInstance;const F=e=>({async init(...t){W=await e(...t)},get content(){return null==W?void 0:W.content},get settings(){return null==W?void 0:W.settings},get storage(){return null==W?void 0:W.storage},get conditions(){return null==W?void 0:W.conditions},get events(){return null==W?void 0:W.events},get language(){return null==W?void 0:W.language},get platform(){return null==W?void 0:W.platform},get apps(){return null==W?void 0:W.apps},get ui(){return null==W?void 0:W.ui},get services(){return null==W?void 0:W.services},get notifications(){return null==W?void 0:W.notifications}});(()=>{const e=null===(t=window._walkmeInternals)||void 0===t?void 0:t.__rpc_loader_resolver;var t;e&&e({rpc:M})})()}])},function(e,t,n){"use strict";var r,o,a,i,s,u,c,l,d,f,m,p;n.d(t,"i",(function(){return r})),n.d(t,"h",(function(){return o})),n.d(t,"e",(function(){return a})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return s})),n.d(t,"f",(function(){return u})),n.d(t,"g",(function(){return c})),n.d(t,"d",(function(){return l})),n.d(t,"k",(function(){return d})),n.d(t,"j",(function(){return f})),n.d(t,"a",(function(){return m})),n.d(t,"l",(function(){return p})),n.d(t,"m",(function(){return g})),n.d(t,"n",(function(){return y})),function(e){e.Video="video",e.Article="article",e.Launcher="launcher",e.ShoutOut="shoutOut",e.Shuttle="shuttle",e.SmartWalkThru="smart-walkthru",e.Survey="survey",e.Task="task",e.Course="course",e.Lesson="lesson",e.Walkthru="walkthru",e.Category="category",e.Tab="tab",e.Experiments="experiments",e.SearchProviderUrl="search-provider-url",e.Tag="tag",e.TrackedElement="trackedElement",e.TrackedPage="trackedPage",e.SupportItem="support",e.SearchResult="search-result",e.HelpDesk="helpDesk",e.SmartTipSet="smartTipSet"}(r||(r={})),function(e){e.Help="help",e.Tasks="tasks"}(o||(o={})),function(e){e[e.Walkthru=0]="Walkthru",e[e.Task=1]="Task",e[e.Launcher=2]="Launcher",e[e.LabelGroup=3]="LabelGroup",e[e.Survey=4]="Survey",e[e.AbExperiment=5]="AbExperiment",e[e.Category=6]="Category",e[e.Content=7]="Content",e[e.Collection=8]="Collection",e[e.Shuttle=9]="Shuttle",e[e.Tag=10]="Tag",e[e.ShoutOut=14]="ShoutOut",e[e.ConditionBlock=17]="ConditionBlock",e[e.BusinessSolution=19]="BusinessSolution",e[e.Lesson=20]="Lesson",e[e.Course=21]="Course",e[e.TrackedPage=22]="TrackedPage",e[e.Spotlight=23]="Spotlight",e[e.Tooltip=24]="Tooltip",e[e.TrackedElement=25]="TrackedElement",e[e.SearchProviderUrl=26]="SearchProviderUrl",e[e.Space=27]="Space",e[e.Folder=28]="Folder",e[e.ActionBot=29]="ActionBot",e[e.ActionBotConversation=30]="ActionBotConversation",e[e.Menu=31]="Menu"}(a||(a={})),function(e){e.IDP="idp"}(i||(i={})),function(e){e[e.Play=2]="Play"}(s||(s={})),function(e){e.Verbose="Verbose",e.Debug="Debug",e.Info="Info",e.Warn="Warn",e.Error="Error"}(u||(u={})),function(e){e.Web="web",e.Mac="mac",e.Windows="windows",e.Mock="mock",e.Worker="worker"}(c||(c={})),function(e){e.BeforeOpen="beforeOpen",e.BeforeClose="beforeClose"}(l||(l={})),function(e){e.VisualDesign="visualDesign"}(d||(d={})),function(e){e.ActionClicked="visualDesign.actionClicked"}(f||(f={})),function(e){e.Remote="remote",e.Destroy="destroy",e.PlayShuttle="playShuttle",e.Play="play",e.PlayContent="playContent",e.PlaySWT="playBf",e.PlayWT="playWt",e.OpenMenu="openMenu"}(m||(m={})),function(e){e.APPS_DRAWS="wm-visualDesign-apps-items",e.DRAW_ACTIONS="wm-visualDesign-item-actions"}(p||(p={}));const g=600;var y;!function(e){e.Empty="%",e.Px="px"}(y||(y={}))},,function(e,t,n){"use strict";n.r(t),n.d(t,"TypeName",(function(){return s.i})),n.d(t,"TabType",(function(){return s.h})),n.d(t,"LegacyTypes",(function(){return s.e})),n.d(t,"EndUserMethods",(function(){return s.b})),n.d(t,"Environment",(function(){return s.c})),n.d(t,"LogLevel",(function(){return s.f})),n.d(t,"PlatformType",(function(){return s.g})),n.d(t,"EventTypeName",(function(){return s.d})),n.d(t,"UIItemType",(function(){return s.k})),n.d(t,"UIEventType",(function(){return s.j})),n.d(t,"ActionType",(function(){return s.a})),n.d(t,"UI_STORAGE_KEYS",(function(){return s.l})),n.d(t,"UI_STORAGE_TIME",(function(){return s.m})),n.d(t,"Unit",(function(){return s.n}));var r=n(0);const o={name:"sdk-iframe-proxy-client",sendMessage:e=>{var t;return null===(t=a().contentWindow)||void 0===t?void 0:t.postMessage(e,"*")},receiveMessage:e=>{window.addEventListener("message",t=>{var n;(null===(n=t.data)||void 0===n?void 0:n.metadata)&&e(t.data)})}},a=()=>document.querySelector("#wm-channel");function i(){return new Promise(e=>{const t=document.createElement("iframe");t.id="wm-channel",t.src=Object(r.getPublicPath)()+"sdk-proxy.html?platform=web",t.style.display="none",t.addEventListener("load",()=>{const t=Object(r.rpc)(o).getApi();e(t)}),document.body.appendChild(t)})}var s=n(1);const u=Object(r.createSdk)((async function(e={mode:"common"}){try{return await("iframe"===e.mode?((null===(o=null===(n=null===(t=globalThis._walkmeInternals)||void 0===t?void 0:t.ctx)||void 0===n?void 0:n.get("FeaturesManager"))||void 0===o?void 0:o.isFeatureEnabled("playerSDKV2"))?c:i)():async function(){if(globalThis.sdkInstance)return globalThis.sdkInstance;const e=self;if(!e.__walkmeSDKLazyLoad){e.__walkmeSDKLazyLoad={},e.__walkmeSDKLazyLoad.promise=new Promise(t=>{e.__walkmeSDKLazyLoad.resolve=t,e.__walkmeSDKLazyLoad.reject=t});const t=document.createElement("script");t.src=""+Object(r.getSdkApplicationsPublicPathWithEntry)(),document.body.appendChild(t)}const t=await e.__walkmeSDKLazyLoad.promise;return await t.init(),globalThis.sdkInstance=t,t}())}catch(e){throw console.error(e),e}var t,n,o}));t.default=u;async function c(){return await new Promise(e=>{var t;const n=({data:t})=>{"WalkMeApplicationsLoader-PlayerSDKLoaded"===t&&(window.removeEventListener("message",n),e())};(null===(t=globalThis._walkmeInternals)||void 0===t?void 0:t.getPlayerSdk)?e():window.addEventListener("message",n)}),globalThis._walkmeInternals.getPlayerSdk()}}])})); | ||
//# sourceMappingURL=index.js.map |
@@ -99,2 +99,3 @@ import type { ILanguage, ISdk, PlatformType } from "../../types/sdk"; | ||
Name: string; | ||
OrderIndex: number; | ||
Description: string | null; | ||
@@ -139,2 +140,3 @@ LinkedDeployables: never[]; | ||
Name: string; | ||
OrderIndex: number; | ||
Description: string | null; | ||
@@ -196,2 +198,3 @@ LinkedDeployables: never[]; | ||
Name: string; | ||
OrderIndex: number; | ||
Description: string | null; | ||
@@ -332,2 +335,3 @@ LinkedDeployables: never[]; | ||
Name: string; | ||
OrderIndex: number; | ||
Description: string | null; | ||
@@ -372,2 +376,3 @@ LinkedDeployables: never[]; | ||
Name: string; | ||
OrderIndex: number; | ||
Description: string | null; | ||
@@ -429,2 +434,3 @@ LinkedDeployables: never[]; | ||
Name: string; | ||
OrderIndex: number; | ||
Description: string | null; | ||
@@ -472,3 +478,3 @@ LinkedDeployables: never[]; | ||
data: any; | ||
platform: import("sdk-applications-loader/dist/types/platform").IPlatformAPI_V1; | ||
platform: import("sdk-applications-loader/types/types/platform").IPlatformAPI_V1; | ||
}; | ||
@@ -597,2 +603,3 @@ funcs: { | ||
Name: string; | ||
OrderIndex: number; | ||
Description: string | null; | ||
@@ -637,2 +644,3 @@ LinkedDeployables: never[]; | ||
Name: string; | ||
OrderIndex: number; | ||
Description: string | null; | ||
@@ -694,2 +702,3 @@ LinkedDeployables: never[]; | ||
Name: string; | ||
OrderIndex: number; | ||
Description: string | null; | ||
@@ -830,2 +839,3 @@ LinkedDeployables: never[]; | ||
Name: string; | ||
OrderIndex: number; | ||
Description: string | null; | ||
@@ -870,2 +880,3 @@ LinkedDeployables: never[]; | ||
Name: string; | ||
OrderIndex: number; | ||
Description: string | null; | ||
@@ -927,2 +938,3 @@ LinkedDeployables: never[]; | ||
Name: string; | ||
OrderIndex: number; | ||
Description: string | null; | ||
@@ -970,3 +982,3 @@ LinkedDeployables: never[]; | ||
data: any; | ||
platform: import("sdk-applications-loader/dist/types/platform").IPlatformAPI_V1; | ||
platform: import("sdk-applications-loader/types/types/platform").IPlatformAPI_V1; | ||
}; | ||
@@ -1094,2 +1106,3 @@ funcs: { | ||
Name: string; | ||
OrderIndex: number; | ||
Description: string | null; | ||
@@ -1134,2 +1147,3 @@ LinkedDeployables: never[]; | ||
Name: string; | ||
OrderIndex: number; | ||
Description: string | null; | ||
@@ -1191,2 +1205,3 @@ LinkedDeployables: never[]; | ||
Name: string; | ||
OrderIndex: number; | ||
Description: string | null; | ||
@@ -1327,2 +1342,3 @@ LinkedDeployables: never[]; | ||
Name: string; | ||
OrderIndex: number; | ||
Description: string | null; | ||
@@ -1367,2 +1383,3 @@ LinkedDeployables: never[]; | ||
Name: string; | ||
OrderIndex: number; | ||
Description: string | null; | ||
@@ -1424,2 +1441,3 @@ LinkedDeployables: never[]; | ||
Name: string; | ||
OrderIndex: number; | ||
Description: string | null; | ||
@@ -1467,3 +1485,3 @@ LinkedDeployables: never[]; | ||
data: any; | ||
platform: import("sdk-applications-loader/dist/types/platform").IPlatformAPI_V1; | ||
platform: import("sdk-applications-loader/types/types/platform").IPlatformAPI_V1; | ||
}; | ||
@@ -1470,0 +1488,0 @@ funcs: { |
export declare const createThreadReleaser: (releaseInterval?: number) => { | ||
getTotalComputedTime: () => number; | ||
politelyReleaseIfNeeded: () => Promise<void>; | ||
politelyReleaseIfNeeded: () => false | Promise<void>; | ||
getTotalAbsoluteTime: () => number; | ||
}; |
export declare function isSelfHosted(): boolean; | ||
export declare function getCdnRoot(selfhosted?: boolean): string; | ||
export declare function getPublicPath(selfhosted?: boolean): string; | ||
export declare function getSdkApplicationsPublicPathWithEntry(): string; | ||
export declare function getSdkUtilsPublicPathWithEntry(): string; |
export declare const getLocalStorageItem: (key: string) => any; | ||
export declare const getNavigatorProps: () => { | ||
appVersion: string; | ||
connection: any; | ||
hardwareConcurrency: number; | ||
userAgent: string; | ||
userAgentData: any; | ||
webdriver: boolean; | ||
plugins: PluginArray; | ||
} | { | ||
appVersion?: undefined; | ||
connection?: undefined; | ||
hardwareConcurrency?: undefined; | ||
userAgent?: undefined; | ||
userAgentData?: undefined; | ||
webdriver?: undefined; | ||
plugins?: undefined; | ||
}; |
{ | ||
"name": "@walkme/sdk", | ||
"version": "2.0.16", | ||
"version": "2.0.17", | ||
"description": "Player SDK", | ||
@@ -9,3 +9,3 @@ "main": "dist/index.js", | ||
"test:ci": "echo Testing Testkit Declarations: && ttsc --noEmit src/testkit-ts-test.ts", | ||
"build:ci": "webpack --mode production && webpack --mode development --config=webpack.testkit.config.ts && webpack --mode production --config=webpack.types.config.ts", | ||
"build:ci": "webpack --mode production && webpack --mode production --config=webpack.types.config.ts && webpack --mode development --config=webpack.testkit.config.ts", | ||
"build": "webpack --mode development", | ||
@@ -20,6 +20,7 @@ "start": "webpack-dev-server --mode development", | ||
"sdk-build-configs": "2.0.2", | ||
"sdk-types": "2.0.2", | ||
"sdk-types": "^2.0.2" | ||
}, | ||
"dependencies": { | ||
"sdk-utils": "^2.0.8" | ||
}, | ||
"dependencies": {} | ||
} | ||
} |
export declare const createThreadReleaser: (releaseInterval?: number) => { | ||
getTotalComputedTime: () => number; | ||
politelyReleaseIfNeeded: () => Promise<void>; | ||
politelyReleaseIfNeeded: () => false | Promise<void>; | ||
getTotalAbsoluteTime: () => number; | ||
}; |
export declare function isSelfHosted(): boolean; | ||
export declare function getCdnRoot(selfhosted?: boolean): string; | ||
export declare function getPublicPath(selfhosted?: boolean): string; | ||
export declare function getSdkApplicationsPublicPathWithEntry(): string; | ||
export declare function getSdkUtilsPublicPathWithEntry(): string; |
export declare const getLocalStorageItem: (key: string) => any; | ||
export declare const getNavigatorProps: () => { | ||
appVersion: string; | ||
connection: any; | ||
hardwareConcurrency: number; | ||
userAgent: string; | ||
userAgentData: any; | ||
webdriver: boolean; | ||
plugins: PluginArray; | ||
} | { | ||
appVersion?: undefined; | ||
connection?: undefined; | ||
hardwareConcurrency?: undefined; | ||
userAgent?: undefined; | ||
userAgentData?: undefined; | ||
webdriver?: undefined; | ||
plugins?: undefined; | ||
}; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2
9557
1665314
1
+ Addedsdk-utils@^2.0.8