@causalfoundry/js-sdk
Version:
Causal Foundry WEB SDK (JS/TS)
1 lines • 176 kB
JavaScript
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.init=t():e.init=t()}(this,()=>(()=>{var e={736:(e,t,n)=>{e.exports=function(e){function t(e){let n,i,o,a=null;function s(...e){if(!s.enabled)return;const r=s,i=Number(new Date),o=i-(n||i);r.diff=o,r.prev=n,r.curr=i,n=i,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(n,i)=>{if("%%"===n)return"%";a++;const o=t.formatters[i];if("function"==typeof o){const t=e[a];n=o.call(r,t),e.splice(a,1),a--}return n}),t.formatArgs.call(r,e),(r.log||t.log).apply(r,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=r,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(i!==t.namespaces&&(i=t.namespaces,o=t.enabled(e)),o),set:e=>{a=e}}),"function"==typeof t.init&&t.init(s),s}function r(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function i(e,t){let n=0,r=0,i=-1,o=0;for(;n<e.length;)if(r<t.length&&(t[r]===e[n]||"*"===t[r]))"*"===t[r]?(i=r,o=n,r++):(n++,r++);else{if(-1===i)return!1;r=i+1,o++,n=o}for(;r<t.length&&"*"===t[r];)r++;return r===t.length}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names,...t.skips.map(e=>"-"+e)].join(",");return t.enable(""),e},t.enable=function(e){t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const e of n)"-"===e[0]?t.skips.push(e.slice(1)):t.names.push(e)},t.enabled=function(e){for(const n of t.skips)if(i(e,n))return!1;for(const n of t.names)if(i(e,n))return!0;return!1},t.humanize=n(6585),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach(n=>{t[n]=e[n]}),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},857:e=>{"use strict";e.exports=require("os")},1491:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ELearningTypes:()=>r,ExamAction:()=>i,ModuleAction:()=>o,QuestionAction:()=>a});let r=function(e){return e.Module="module",e.Question="question",e.Exam="exam",e}({}),i=function(e){return e.Start="start",e.Submit="submit",e.Result="result",e.Other="other",e}({}),o=function(e){return e.View="view",e.Other="other",e}({}),a=function(e){return e.Answer="answer",e.Skip="skip",e.Other="other",e}({})},1928:e=>{"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},2012:(e,t,n)=>{"use strict";var r=n(9516),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,o,a={};return e?(r.forEach(e.split("\n"),function(e){if(o=e.indexOf(":"),t=r.trim(e.substr(0,o)).toLowerCase(),n=r.trim(e.substr(o+1)),t){if(a[t]&&i.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}}),a):a}},2018:e=>{"use strict";e.exports=require("tty")},2203:e=>{"use strict";e.exports=require("stream")},2505:(e,t,n)=>{e.exports=n(8015)},2613:e=>{"use strict";e.exports=require("assert")},2881:(e,t,n)=>{"use strict";var r=n(9516),i=n(6987);e.exports=function(e,t,n){var o=this||i;return r.forEach(n,function(n){e=n.call(o,e,t)}),e}},3106:e=>{"use strict";e.exports=require("zlib")},3164:(e,t,n)=>{var r,i,o,a=n(7016),s=a.URL,c=n(8611),u=n(5692),d=n(2203).Writable,l=n(2613),p=n(7507);r="undefined"!=typeof process,i="undefined"!=typeof window&&"undefined"!=typeof document,o=P(Error.captureStackTrace),r||!i&&o||console.warn("The follow-redirects package should be excluded from browser builds.");var h=!1;try{l(new s(""))}catch(e){h="ERR_INVALID_URL"===e.code}var m=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],f=["abort","aborted","connect","error","socket","timeout"],g=Object.create(null);f.forEach(function(e){g[e]=function(t,n,r){this._redirectable.emit(e,t,n,r)}});var y=O("ERR_INVALID_URL","Invalid URL",TypeError),v=O("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),_=O("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",v),w=O("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),E=O("ERR_STREAM_WRITE_AFTER_END","write after end"),b=d.prototype.destroy||A;function C(e,t){d.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var n=this;this._onNativeResponse=function(e){try{n._processResponse(e)}catch(e){n.emit("error",e instanceof v?e:new v({cause:e}))}},this._performRequest()}function T(e){var t={maxRedirects:21,maxBodyLength:10485760},n={};return Object.keys(e).forEach(function(r){var i=r+":",o=n[i]=e[r],a=t[r]=Object.create(o);Object.defineProperties(a,{request:{value:function(e,r,o){return s&&e instanceof s?e=I(e):R(e)?e=I(k(e)):(o=r,r=S(e),e={protocol:i}),P(r)&&(o=r,r=null),(r=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e,r)).nativeProtocols=n,R(r.host)||R(r.hostname)||(r.hostname="::1"),l.equal(r.protocol,i,"protocol mismatch"),p("options",r),new C(r,o)},configurable:!0,enumerable:!0,writable:!0},get:{value:function(e,t,n){var r=a.request(e,t,n);return r.end(),r},configurable:!0,enumerable:!0,writable:!0}})}),t}function A(){}function k(e){var t;if(h)t=new s(e);else if(!R((t=S(a.parse(e))).protocol))throw new y({input:e});return t}function S(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname))throw new y({input:e.href||e});if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host))throw new y({input:e.href||e});return e}function I(e,t){var n=t||{};for(var r of m)n[r]=e[r];return n.hostname.startsWith("[")&&(n.hostname=n.hostname.slice(1,-1)),""!==n.port&&(n.port=Number(n.port)),n.path=n.search?n.pathname+n.search:n.pathname,n}function L(e,t){var n;for(var r in t)e.test(r)&&(n=t[r],delete t[r]);return null==n?void 0:String(n).trim()}function O(e,t,n){function r(n){P(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,n||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return r.prototype=new(n||Error),Object.defineProperties(r.prototype,{constructor:{value:r,enumerable:!1},name:{value:"Error ["+e+"]",enumerable:!1}}),r}function N(e,t){for(var n of f)e.removeListener(n,g[n]);e.on("error",A),e.destroy(t)}function R(e){return"string"==typeof e||e instanceof String}function P(e){return"function"==typeof e}C.prototype=Object.create(d.prototype),C.prototype.abort=function(){N(this._currentRequest),this._currentRequest.abort(),this.emit("abort")},C.prototype.destroy=function(e){return N(this._currentRequest,e),b.call(this,e),this},C.prototype.write=function(e,t,n){if(this._ending)throw new E;if(!(R(e)||"object"==typeof(r=e)&&"length"in r))throw new TypeError("data should be a string, Buffer or Uint8Array");var r;P(t)&&(n=t,t=null),0!==e.length?this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,n)):(this.emit("error",new w),this.abort()):n&&n()},C.prototype.end=function(e,t,n){if(P(e)?(n=e,e=t=null):P(t)&&(n=t,t=null),e){var r=this,i=this._currentRequest;this.write(e,t,function(){r._ended=!0,i.end(null,null,n)}),this._ending=!0}else this._ended=this._ending=!0,this._currentRequest.end(null,null,n)},C.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)},C.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)},C.prototype.setTimeout=function(e,t){var n=this;function r(t){t.setTimeout(e),t.removeListener("timeout",t.destroy),t.addListener("timeout",t.destroy)}function i(t){n._timeout&&clearTimeout(n._timeout),n._timeout=setTimeout(function(){n.emit("timeout"),o()},e),r(t)}function o(){n._timeout&&(clearTimeout(n._timeout),n._timeout=null),n.removeListener("abort",o),n.removeListener("error",o),n.removeListener("response",o),n.removeListener("close",o),t&&n.removeListener("timeout",t),n.socket||n._currentRequest.removeListener("socket",i)}return t&&this.on("timeout",t),this.socket?i(this.socket):this._currentRequest.once("socket",i),this.on("socket",r),this.on("abort",o),this.on("error",o),this.on("response",o),this.on("close",o),this},["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(e){C.prototype[e]=function(t,n){return this._currentRequest[e](t,n)}}),["aborted","connection","socket"].forEach(function(e){Object.defineProperty(C.prototype,e,{get:function(){return this._currentRequest[e]}})}),C.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}},C.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(!t)throw new TypeError("Unsupported protocol "+e);if(this._options.agents){var n=e.slice(0,-1);this._options.agent=this._options.agents[n]}var r=this._currentRequest=t.request(this._options,this._onNativeResponse);for(var i of(r._redirectable=this,f))r.on(i,g[i]);if(this._currentUrl=/^\//.test(this._options.path)?a.format(this._options):this._options.path,this._isRedirect){var o=0,s=this,c=this._requestBodyBuffers;!function e(t){if(r===s._currentRequest)if(t)s.emit("error",t);else if(o<c.length){var n=c[o++];r.finished||r.write(n.data,n.encoding,e)}else s._ended&&r.end()}()}},C.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var n,r=e.headers.location;if(!r||!1===this._options.followRedirects||t<300||t>=400)return e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),void(this._requestBodyBuffers=[]);if(N(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)throw new _;var i=this._options.beforeRedirect;i&&(n=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var o=this._options.method;((301===t||302===t)&&"POST"===this._options.method||303===t&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],L(/^content-/i,this._options.headers));var c,u,d=L(/^host$/i,this._options.headers),m=k(this._currentUrl),f=d||m.host,g=/^\w+:/.test(r)?this._currentUrl:a.format(Object.assign(m,{host:f})),y=(c=r,u=g,h?new s(c,u):k(a.resolve(u,c)));if(p("redirecting to",y.href),this._isRedirect=!0,I(y,this._options),(y.protocol!==m.protocol&&"https:"!==y.protocol||y.host!==f&&!function(e,t){l(R(e)&&R(t));var n=e.length-t.length-1;return n>0&&"."===e[n]&&e.endsWith(t)}(y.host,f))&&L(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),P(i)){var v={headers:e.headers,statusCode:t},w={url:g,method:o,headers:n};i(this._options,v,w),this._sanitizeOptions(this._options)}this._performRequest()},e.exports=T({http:c,https:u}),e.exports.wrap=T},3191:(e,t,n)=>{"use strict";var r=n(1928);function i(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var n=this;e(function(e){n.reason||(n.reason=new r(e),t(n.reason))})}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var e;return{token:new i(function(t){e=t}),cancel:e}},e.exports=i},3471:(e,t,n)=>{"use strict";var r=n(9516);function i(){this.handlers=[]}i.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){r.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=i},3830:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AmbulanceStatus:()=>s,EmergencyMgmtCatalogType:()=>i,EmergencyMgmtEventType:()=>r,EmergencyMgmtItemAction:()=>o,IncidentType:()=>a});let r=function(e){return e.Incident="incident",e.Ambulance="ambulance",e}({}),i=function(e){return e.ERO="user_ero",e.Ambulance="ambulance",e}({}),o=function(e){return e.View="view",e.Add="add",e.Update="update",e.Remove="remove",e.Start="start",e.End="end",e.Pause="pause",e.Resume="resume",e.Attend="attend",e.Decline="decline",e.Terminate="terminate",e.Transfer="transfer",e.Skip="skip",e.Dispatch="dispatch",e.Denial="denial",e.Other="other",e}({}),a=function(e){return e.Emergency="emergency",e.Grievance="grievance",e.NonEmergency="non_emergency",e.Transfer="transfer",e.FollowUp="follow_up",e.ServiceOffering="service_offering",e.CustomerSupport="customer_support",e.Other="other",e}({}),s=function(e){return e.Available="available",e.Busy="busy",e.Maintenance="maintenance",e.Other="other",e}({})},3864:e=>{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},3948:(e,t,n)=>{"use strict";var r=n(9516);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,i,o,a){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(i)&&s.push("path="+i),r.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},4198:e=>{"use strict";e.exports=JSON.parse('{"name":"axios","version":"0.21.4","description":"Promise based HTTP client for the browser and node.js","main":"index.js","scripts":{"test":"grunt test","start":"node ./sandbox/server.js","build":"NODE_ENV=production grunt build","preversion":"npm test","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json","postversion":"git push && git push --tags","examples":"node ./examples/server.js","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","fix":"eslint --fix lib/**/*.js"},"repository":{"type":"git","url":"https://github.com/axios/axios.git"},"keywords":["xhr","http","ajax","promise","node"],"author":"Matt Zabriskie","license":"MIT","bugs":{"url":"https://github.com/axios/axios/issues"},"homepage":"https://axios-http.com","devDependencies":{"coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^8.2.1","sinon":"^4.5.0","terser-webpack-plugin":"^4.2.3","typescript":"^4.0.5","url-search-params":"^0.10.0","webpack":"^4.44.2","webpack-dev-server":"^3.11.0"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"jsdelivr":"dist/axios.min.js","unpkg":"dist/axios.min.js","typings":"./index.d.ts","dependencies":{"follow-redirects":"^1.14.0"},"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}]}')},4202:(e,t,n)=>{"use strict";var r=n(9516);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=i(window.location.href),function(t){var n=r.isString(t)?i(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},4490:(e,t,n)=>{"use strict";var r=n(9516),i=n(2881),o=n(3864),a=n(6987);function s(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return s(e),e.headers=e.headers||{},e.data=i.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),(e.adapter||a.adapter)(e).then(function(t){return s(e),t.data=i.call(e,t.data,t.headers,e.transformResponse),t},function(t){return o(t)||(s(e),t&&t.response&&(t.response.data=i.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},4568:(e,t,n)=>{"use strict";n.r(t),n.d(t,{LoyaltyCatalogSubject:()=>i,LoyaltyTypes:()=>r,MilestoneAction:()=>p,PromoAction:()=>o,PromoItemType:()=>s,PromoType:()=>a,RedeemType:()=>l,RewardAction:()=>d,SurveyAction:()=>u,SurveyType:()=>c});let r=function(e){return e.Survey="survey",e.Reward="reward",e.Level="level",e.Milestone="milestone",e.Promo="promo",e}({}),i=function(e){return e.Survey="survey",e.Reward="reward",e}({}),o=function(e){return e.Apply="apply",e.View="view",e.Other="other",e}({}),a=function(e){return e.AddToCart="add_to_cart",e.Coupon="coupon",e.Other="other",e}({}),s=function(e){return e.Blood="blood",e.Book="book",e.Clothing="clothing",e.Drug="drug",e.Grocery="grocery",e.Electronics="electronics",e.Misc="misc",e.Oxygen="oxygen",e.Subscription="subscription",e.Facility="facility",e.Other="other",e}({}),c=function(e){return e.OpenEnded="open_ended",e.ClosedEnded="closed_ended",e.Nominal="nominal",e.LikertScale="likert_scale",e.RatingScale="rating_scale",e.YesNo="yes_no",e.Interview="interview",e.Other="other",e}({}),u=function(e){return e.View="view",e.Impression="impression",e.Start="start",e.Submit="submit",e.Other="other",e}({}),d=function(e){return e.View="view",e.Add="add",e.Redeem="redeem",e.Other="other",e}({}),l=function(e){return e.Cash="cash",e.Airtime="airtime",e.Other="other",e}({}),p=function(e){return e.Achieved="achieved",e.Other="other",e}({})},4680:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},4841:(e,t,n)=>{"use strict";var r=n(4198),i={};["object","boolean","number","function","string","symbol"].forEach(function(e,t){i[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});var o={},a=r.version.split(".");function s(e,t){for(var n=t?t.split("."):a,r=e.split("."),i=0;i<3;i++){if(n[i]>r[i])return!0;if(n[i]<r[i])return!1}return!1}i.transitional=function(e,t,n){var i=t&&s(t);function a(e,t){return"[Axios v"+r.version+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,s){if(!1===e)throw new Error(a(r," has been removed in "+t));return i&&!o[r]&&(o[r]=!0,console.warn(a(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,s)}},e.exports={isOlderVersion:s,assertOptions:function(e,t,n){if("object"!=typeof e)throw new TypeError("options must be an object");for(var r=Object.keys(e),i=r.length;i-- >0;){var o=r[i],a=t[o];if(a){var s=e[o],c=void 0===s||a(s,o,e);if(!0!==c)throw new TypeError("option "+o+" must be "+c)}else if(!0!==n)throw Error("Unknown option "+o)}},validators:i}},4889:(e,t,n)=>{"use strict";n.r(t),n.d(t,{CfLogEventType:()=>c,CfLogEvents:()=>s,Country:()=>o,CurrencyCode:()=>i,Language:()=>a,NudgeScreenType:()=>u,QuestionType:()=>r});let r=function(e){return e.OpenEnded="open_ended",e.ClosedEnded="closed_ended",e.Nominal="nominal",e.LikertScale="likert_scale",e.RatingScale="rating_scale",e.YesNo="yes_no",e.Interview="interview",e.Other="other",e}({}),i=function(e){return e.AED="AED",e.AFN="AFN",e.ALL="ALL",e.AMD="AMD",e.ANG="ANG",e.AOA="AOA",e.ARS="ARS",e.AUD="AUD",e.AWG="AWG",e.AZN="AZN",e.BAM="BAM",e.BBD="BBD",e.BDT="BDT",e.BGN="BGN",e.BHD="BHD",e.BIF="BIF",e.BMD="BMD",e.BND="BND",e.BOB="BOB",e.BRL="BRL",e.BSD="BSD",e.BTN="BTN",e.BWP="BWP",e.BYR="BYR",e.BZD="BZD",e.CAD="CAD",e.CDF="CDF",e.CHF="CHF",e.CLP="CLP",e.CNY="CNY",e.COP="COP",e.CRC="CRC",e.CUC="CUC",e.CUP="CUP",e.CVE="CVE",e.CZK="CZK",e.DJF="DJF",e.DKK="DKK",e.DOP="DOP",e.DZD="DZD",e.EGP="EGP",e.ERN="ERN",e.ETB="ETB",e.EUR="EUR",e.FJD="FJD",e.FKP="FKP",e.GBP="GBP",e.GEL="GEL",e.GGP="GGP",e.GHS="GHS",e.GIP="GIP",e.GMD="GMD",e.GNF="GNF",e.GTQ="GTQ",e.GYD="GYD",e.HKD="HKD",e.HNL="HNL",e.HRK="HRK",e.HTG="HTG",e.HUF="HUF",e.IDR="IDR",e.ILS="ILS",e.IMP="IMP",e.INR="INR",e.IQD="IQD",e.IRR="IRR",e.ISK="ISK",e.JEP="JEP",e.JMD="JMD",e.JOD="JOD",e.JPY="JPY",e.KES="KES",e.KGS="KGS",e.KHR="KHR",e.KMF="KMF",e.KPW="KPW",e.KRW="KRW",e.KWD="KWD",e.KYD="KYD",e.KZT="KZT",e.LAK="LAK",e.LBP="LBP",e.LKR="LKR",e.LRD="LRD",e.LSL="LSL",e.LYD="LYD",e.MAD="MAD",e.MDL="MDL",e.MGA="MGA",e.MKD="MKD",e.MMK="MMK",e.MNT="MNT",e.MOP="MOP",e.MRO="MRO",e.MUR="MUR",e.MVR="MVR",e.MWK="MWK",e.MXN="MXN",e.MYR="MYR",e.MZN="MZN",e.NAD="NAD",e.NGN="NGN",e.NIO="NIO",e.NOK="NOK",e.NPR="NPR",e.NZD="NZD",e.OMR="OMR",e.PAB="PAB",e.PEN="PEN",e.PGK="PGK",e.PHP="PHP",e.PKR="PKR",e.PLN="PLN",e.PYG="PYG",e.QAR="QAR",e.RON="RON",e.RSD="RSD",e.RUB="RUB",e.RWF="RWF",e.SAR="SAR",e.SBD="SBD",e.SCR="SCR",e.SDG="SDG",e.SEK="SEK",e.SGD="SGD",e.SHP="SHP",e.SLL="SLL",e.SOS="SOS",e.SPL="SPL",e.SRD="SRD",e.STD="STD",e.SVC="SVC",e.SYP="SYP",e.SZL="SZL",e.THB="THB",e.TJS="TJS",e.TMT="TMT",e.TND="TND",e.TOP="TOP",e.TRY="TRY",e.TTD="TTD",e.TVD="TVD",e.TWD="TWD",e.TZS="TZS",e.UAH="UAH",e.UGX="UGX",e.USD="USD",e.UYU="UYU",e.UZS="UZS",e.VEF="VEF",e.VND="VND",e.VUV="VUV",e.WST="WST",e.XAF="XAF",e.XCD="XCD",e.XDR="XDR",e.XOF="XOF",e.XPF="XPF",e.YER="YER",e.ZAR="ZAR",e.ZMW="ZMW",e.ZWD="ZWD",e}({}),o=function(e){return e.Ascension_Island="Ascension Island",e.Andorra="Andorra",e.United_Arab_Emirates="United Arab Emirates",e.Afghanistan="Afghanistan",e.Antigua_and_Barbuda="Antigua and Barbuda",e.Anguilla="Anguilla",e.Albania="Albania",e.Armenia="Armenia",e.Netherlands_Antilles="Netherlands Antilles",e.Angola="Angola",e.Antarctica="Antarctica",e.Argentina="Argentina",e.American_Samoa="American Samoa",e.Austria="Austria",e.Australia="Australia",e.Aruba="Aruba",e.Aland_Islands="Aland Islands",e.Azerbaijan="Azerbaijan",e.Bosnia_and_Herzegovina="Bosnia and Herzegovina",e.Barbados="Barbados",e.Bangladesh="Bangladesh",e.Belgium="Belgium",e.Burkina_Faso="Burkina Faso",e.Bulgaria="Bulgaria",e.Bahrain="Bahrain",e.Burundi="Burundi",e.Benin="Benin",e.Saint_Barthelemy="Saint Barthelemy",e.Bermuda="Bermuda",e.Brunei_Darussalam="Brunei Darussalam",e.Bolivia="Bolivia",e.Caribbean_Netherlands="Caribbean Netherlands",e.Brazil="Brazil",e.Bahamas="Bahamas",e.Bhutan="Bhutan",e.Burma="Burma",e.Bouvet_Island="Bouvet Island",e.Botswana="Botswana",e.Belarus="Belarus",e.Belize="Belize",e.Canada="Canada",e.Cocos_Islands="Cocos Islands",e.Democratic_Republic_Congo="Democratic Republic Congo",e.Central_African_Republic="Central African Republic",e.Congo="Congo",e.Switzerland="Switzerland",e.Ivory_Coast="Ivory Coast",e.Cook_Islands="Cook Islands",e.Chile="Chile",e.Cameroon="Cameroon",e.China="China",e.Colombia="Colombia",e.Clipperton_Island="Clipperton Island",e.Costa_Rica="Costa Rica",e.Serbia_and_Montenegro="Serbia and Montenegro",e.Cuba="Cuba",e.Cape_Verde="Cape Verde",e.Curacao="Curacao",e.Christmas_Island="Christmas Island",e.Cyprus="Cyprus",e.Czech_Republic="Czech Republic",e.Germany="Germany",e.Diego_Garcia="Diego Garcia",e.Djibouti="Djibouti",e.Denmark="Denmark",e.Dominica="Dominica",e.Dominican_Republic="Dominican Republic",e.Algeria="Algeria",e.Ceuta_Melilla="Ceuta Melilla",e.Ecuador="Ecuador",e.Estonia="Estonia",e.Egypt="Egypt",e.Western_Sahara="Western Sahara",e.Eritrea="Eritrea",e.Spain="Spain",e.Ethiopia="Ethiopia",e.European_Union="European Union",e.Eurozone="Eurozone",e.Finland="Finland",e.Fiji="Fiji",e.Malvinas="Malvinas",e.Micronesia="Micronesia",e.Faroe_Islands="Faroe Islands",e.France="France",e.France_Metropolitan="France Metropolitan",e.Gabon="Gabon",e.United_Kingdom="United Kingdom",e.Grenada="Grenada",e.Georgia="Georgia",e.French_Guiana="French Guiana",e.Guernsey="Guernsey",e.Ghana="Ghana",e.Gibraltar="Gibraltar",e.Greenland="Greenland",e.Gambia="Gambia",e.Guinea="Guinea",e.Guadeloupe="Guadeloupe",e.Equatorial_Guinea="Equatorial Guinea",e.Greece="Greece",e.South_Georgia_and_South_Sandwich_Islands="South Georgia and South Sandwich Islands",e.Guatemala="Guatemala",e.Guam="Guam",e.Guinea_Bissau="Guinea Bissau",e.Guyana="Guyana",e.Hong_Kong="Hong Kong",e.Heard_Island_and_McDonald_Islands="Heard Island and McDonald Islands",e.Honduras="Honduras",e.Croatia="Croatia",e.Haiti="Haiti",e.Hungary="Hungary",e.Canary_Islands="Canary Islands",e.Indonesia="Indonesia",e.Ireland="Ireland",e.Israel="Israel",e.Isle_of_Man="Isle of Man",e.India="India",e.British_Indian_Ocean_Territory="British Indian Ocean Territory",e.Iraq="Iraq",e.Iran="Iran",e.Iceland="Iceland",e.Italy="Italy",e.Jersey="Jersey",e.Jamaica="Jamaica",e.Jordan="Jordan",e.Japan="Japan",e.Kenya="Kenya",e.Kyrgyzstan="Kyrgyzstan",e.Cambodia="Cambodia",e.Kiribati="Kiribati",e.Comoros="Comoros",e.Saint_Kitts_and_Nevis="Saint Kitts and Nevis",e.North_Korea="North Korea",e.South_Korea="South Korea",e.Kuwait="Kuwait",e.Cayman_Islands="Cayman Islands",e.Kazakhstan="Kazakhstan",e.Lao="Lao",e.Lebanon="Lebanon",e.Saint_Lucia="Saint Lucia",e.Liechtenstein="Liechtenstein",e.Sri_Lanka="Sri Lanka",e.Liberia="Liberia",e.Lesotho="Lesotho",e.Lithuania="Lithuania",e.Luxembourg="Luxembourg",e.Latvia="Latvia",e.Libya="Libya",e.Morocco="Morocco",e.Monaco="Monaco",e.Moldova="Moldova",e.Montenegro="Montenegro",e.Saint_Martin="Saint Martin",e.Madagascar="Madagascar",e.Marshall_Islands="Marshall Islands",e.North_Macedonia="North Macedonia",e.Mali="Mali",e.Myanmar="Myanmar",e.Mongolia="Mongolia",e.Macao="Macao",e.Northern_Mariana_Islands="Northern Mariana Islands",e.Martinique="Martinique",e.Mauritania="Mauritania",e.Montserrat="Montserrat",e.Malta="Malta",e.Mauritius="Mauritius",e.Maldives="Maldives",e.Malawi="Malawi",e.Mexico="Mexico",e.Malaysia="Malaysia",e.Mozambique="Mozambique",e.Namibia="Namibia",e.New_Caledonia="New Caledonia",e.Niger="Niger",e.Norfolk_Island="Norfolk Island",e.Nigeria="Nigeria",e.Nicaragua="Nicaragua",e.Netherlands="Netherlands",e.Norway="Norway",e.Nepal="Nepal",e.Nauru="Nauru",e.Neutral_Zone="Neutral Zone",e.Niue="Niue",e.New_Zealand="New Zealand",e.Oman="Oman",e.Panama="Panama",e.Peru="Peru",e.French_Polynesia="French Polynesia",e.Papua_New_Guinea="Papua New Guinea",e.Philippines="Philippines",e.Pakistan="Pakistan",e.Poland="Poland",e.Saint_Pierre_and_Miquelon="Saint Pierre and Miquelon",e.Pitcairn="Pitcairn",e.Puerto_Rico="Puerto Rico",e.Palestine="Palestine",e.Portugal="Portugal",e.Palau="Palau",e.Paraguay="Paraguay",e.Qatar="Qatar",e.Reunion="Reunion",e.Romania="Romania",e.Serbia="Serbia",e.Russia="Russia",e.Rwanda="Rwanda",e.Saudi_Arabia="Saudi Arabia",e.Solomon_Islands="Solomon Islands",e.Seychelles="Seychelles",e.Sudan="Sudan",e.Sweden="Sweden",e.Singapore="Singapore",e.Saint_Helena="Saint Helena",e.Slovenia="Slovenia",e.Svalbard="Svalbard",e.Slovakia="Slovakia",e.Sierra_Leone="Sierra Leone",e.San_Marino="San Marino",e.Senegal="Senegal",e.Somalia="Somalia",e.Suriname="Suriname",e.South_Sudan="South Sudan",e.Sao_Tome_and_Principe="Sao Tome and Principe",e.USSR="USSR",e.El_Salvador="El Salvador",e.Sint_Maarten="Sint Maarten",e.Syria="Syria",e.Eswatini="Eswatini",e.Turks_and_Caicos_Islands="Turks and Caicos Islands",e.French_Southern_Territories="French Southern Territories",e.Togo="Togo",e.Thailand="Thailand",e.Tajikistan="Tajikistan",e.Tokelau="Tokelau",e.Timor_Leste="Timor Leste",e.Turkmenistan="Turkmenistan",e.Tunisia="Tunisia",e.Tonga="Tonga",e.East_Timor="East Timor",e.Turkey="Turkey",e.Trinidad_and_Tobago="Trinidad and Tobago",e.Tuvalu="Tuvalu",e.Taiwan="Taiwan",e.Tanzania="Tanzania",e.Ukraine="Ukraine",e.Uganda="Uganda",e.United_States_Minor_Outlying_Islands="United States Minor Outlying Islands",e.United_States="United States",e.Uruguay="Uruguay",e.Uzbekistan="Uzbekistan",e.Vatican="Vatican",e.Saint_Vincent_and_Grenadines="Saint Vincent and Grenadines",e.Venezuela="Venezuela",e.British_Virgin_Islands="British Virgin Islands",e.US_Virgin_Islands="US Virgin Islands",e.Vietnam="Vietnam",e.Vanuatu="Vanuatu",e.Wallis_and_Futuna="Wallis and Futuna",e.Samoa="Samoa",e.Northern_Ireland="Northern Ireland",e.Kosovo="Kosovo",e.Yemen="Yemen",e.Mayotte="Mayotte",e.Yugoslavia="Yugoslavia",e.South_Africa="South Africa",e.Zambia="Zambia",e.Zaire="Zaire",e.Zimbabwe="Zimbabwe",e}({}),a=function(e){return e.Afar="Afar",e.Abkhaz="Abkhaz",e.Avestan="Avestan",e.Afrikaans="Afrikaans",e.Akan="Akan",e.Amharic="Amharic",e.Aragonese="Aragonese",e.Arabic="Arabic",e.Avaric="Avaric",e.Aymara="Aymara",e.Azerbaijani="Azerbaijani",e.Bashkir="Bashkir",e.Belarusian="Belarusian",e.Bulgarian="Bulgarian",e.Bihari="Bihari",e.Bislama="Bislama",e.Bambara="Bambara",e.Bengali="Bengali",e.Tibetan="Tibetan",e.Breton="Breton",e.Bosnian="Bosnian",e.Catalan="Catalan",e.Chechen="Chechen",e.Chamorro="Chamorro",e.Corsican="Corsican",e.Cree="Cree",e.Czech="Czech",e.Slavonic="Slavonic",e.Chuvash="Chuvash",e.Welsh="Welsh",e.Danish="Danish",e.German="German",e.Maldivian="Maldivian",e.Dzongkha="Dzongkha",e.Ewe="Ewe",e.Greek="Greek",e.English="English",e.Esperanto="Esperanto",e.Spanish="Spanish",e.Estonian="Estonian",e.Basque="Basque",e.Persian="Persian",e.Fulah="Fulah",e.Finnish="Finnish",e.Fijian="Fijian",e.Faroese="Faroese",e.French="French",e.Western_Frisian="Western_Frisian",e.Irish="Irish",e.Gaelic="Gaelic",e.Galician="Galician",e.Guarani="Guarani",e.Gujarati="Gujarati",e.Manx="Manx",e.Hausa="Hausa",e.Hebrew="Hebrew",e.Hindi="Hindi",e.Hiri_Motu="Hiri_Motu",e.Croatian="Croatian",e.Haitian="Haitian",e.Hungarian="Hungarian",e.Armenian="Armenian",e.Herero="Herero",e.Interlingua="Interlingua",e.Indonesian="Indonesian",e.Occidental="Occidental",e.Igbo="Igbo",e.Nuosu="Nuosu",e.Inupiaq="Inupiaq",e.Ido="Ido",e.Icelandic="Icelandic",e.Italian="Italian",e.Inuktitut="Inuktitut",e.Japanese="Japanese",e.Javanese="Javanese",e.Georgian="Georgian",e.Kongo="Kongo",e.Kikuyu="Kikuyu",e.Kuanyama="Kuanyama",e.Kazakh="Kazakh",e.Greenlandic="Greenlandic",e.Central_Khmer="Central_Khmer",e.Kannada="Kannada",e.Korean="Korean",e.Kanuri="Kanuri",e.Kashmiri="Kashmiri",e.Kurdish="Kurdish",e.Komi="Komi",e.Cornish="Cornish",e.Kirghiz="Kirghiz",e.Latin="Latin",e.Luxembourgish="Luxembourgish",e.Ganda="Ganda",e.Limburgish="Limburgish",e.Lingala="Lingala",e.Lao="Lao",e.Lithuanian="Lithuanian",e.Luba_katanga="Luba_katanga",e.Latvian="Latvian",e.Malagasy="Malagasy",e.Marshallese="Marshallese",e.Maori="Maori",e.Macedonian="Macedonian",e.Malayalam="Malayalam",e.Mongolian="Mongolian",e.Moldavian="Moldavian",e.Marathi="Marathi",e.Malay="Malay",e.Maltese="Maltese",e.Burmese="Burmese",e.Nauruan="Nauruan",e.Norwegian_Bokmal="Norwegian_Bokmal",e.North_Ndebele="North_Ndebele",e.Nepali="Nepali",e.Ndonga="Ndonga",e.Dutch="Dutch",e.Norwegian_Nynorsk="Norwegian_Nynorsk",e.Norwegian="Norwegian",e.South_Ndebele="South_Ndebele",e.Navajo="Navajo",e.Nyanja="Nyanja",e.Occitan="Occitan",e.Ojibwa="Ojibwa",e.Oromo="Oromo",e.Oriya="Oriya",e.Ossetian="Ossetian",e.Punjabi="Punjabi",e.Pali="Pali",e.Polish="Polish",e.Pushto="Pushto",e.Portuguese="Portuguese",e.Quechua="Quechua",e.Reunionese="Reunionese",e.Romansh="Romansh",e.Rundi="Rundi",e.Romanian="Romanian",e.Russian="Russian",e.Kinyarwanda="Kinyarwanda",e.Sanskrit="Sanskrit",e.Sardinian="Sardinian",e.Sindhi="Sindhi",e.Northern_Sami="Northern Sami",e.Sango="Sango",e.Slavic="Slavic_Languages",e.Sinhalese="Sinhalese",e.Slovak="Slovak",e.Slovenian="Slovenian",e.Samoan="Samoan",e.Shona="Shona",e.Somali="Somali",e.Albanian="Albanian",e.Serbian="Serbian",e.Swati="Swati",e.Southern_Sotho="Southern Sotho",e.Sundanese="Sundanese",e.Swedish="Swedish",e.Swahili="Swahili",e.Tamil="Tamil",e.Telugu="Telugu",e.Tajik="Tajik",e.Thai="Thai",e.Tigrinya="Tigrinya",e.Turkmen="Turkmen",e.Tagalog="Tagalog",e.Tswana="Tswana",e.Tongan="Tongan",e.Turkish="Turkish",e.Tsonga="Tsonga",e.Tatar="Tatar",e.Twi="Twi",e.Tahitian="Tahitian",e.Uighur="Uighur",e.Ukrainian="Ukrainian",e.Urdu="Urdu",e.Uzbek="Uzbek",e.Venda="Venda",e.Vietnamese="Vietnamese",e.Volapuk="Volapuk",e.Walloon="Walloon",e.Wolof="Wolof",e.Xhosa="Xhosa",e.Yiddish="Yiddish",e.Yoruba="Yoruba",e.Zhuang="Zhuang",e.Chinese="Chinese",e.Zulu="Zulu",e}({}),s=function(e){return e.NudgeAction="nudge-action",e}({}),c=function(e){return e.Redirect="redirect",e.AddToCart="add_to_cart",e}({}),u=function(e){return e.None="",e.Home="home",e.Search="search",e.Product="product",e.Cart="cart",e.Checkout="checkout",e.Reminder="reminder",e.Favorite="favorite",e.Other="other",e}({})},5019:e=>{"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},5155:(e,t,n)=>{"use strict";var r=n(9516),i=n(9106),o=n(3471),a=n(4490),s=n(5343),c=n(4841),u=c.validators;function d(e){this.defaults=e,this.interceptors={request:new o,response:new o}}d.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&c.assertOptions(t,{silentJSONParsing:u.transitional(u.boolean,"1.0.0"),forcedJSONParsing:u.transitional(u.boolean,"1.0.0"),clarifyTimeoutError:u.transitional(u.boolean,"1.0.0")},!1);var n=[],r=!0;this.interceptors.request.forEach(function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(r=r&&t.synchronous,n.unshift(t.fulfilled,t.rejected))});var i,o=[];if(this.interceptors.response.forEach(function(e){o.push(e.fulfilled,e.rejected)}),!r){var d=[a,void 0];for(Array.prototype.unshift.apply(d,n),d=d.concat(o),i=Promise.resolve(e);d.length;)i=i.then(d.shift(),d.shift());return i}for(var l=e;n.length;){var p=n.shift(),h=n.shift();try{l=p(l)}catch(e){h(e);break}}try{i=a(l)}catch(e){return Promise.reject(e)}for(;o.length;)i=i.then(o.shift(),o.shift());return i},d.prototype.getUri=function(e){return e=s(this.defaults,e),i(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],function(e){d.prototype[e]=function(t,n){return this.request(s(n||{},{method:e,url:t,data:(n||{}).data}))}}),r.forEach(["post","put","patch"],function(e){d.prototype[e]=function(t,n,r){return this.request(s(r||{},{method:e,url:t,data:n}))}}),e.exports=d},5240:(e,t,n)=>{"use strict";n.d(t,{CallCenter:()=>wo,CfLog:()=>Ce,ECommerce:()=>co,ELearning:()=>lo,EmergencyMgmt:()=>bo,Loyalty:()=>go,Navigation:()=>j,PatientMgmt:()=>ho,Payments:()=>vo});const r=require("events");var i=n(9780);let o=function(e){return e[e.Log=0]="Log",e[e.Info=1]="Info",e[e.Warn=2]="Warn",e[e.Error=3]="Error",e}({});function a(e){return function(t,n){if(e){let e;switch(t){default:e=console.log;break;case o.Info:e=console.info;break;case o.Warn:e=console.warn;break;case o.Error:e=console.error}e(n)}}}let s=function(e){return e.Impression="impression",e}({});const c=e=>{const t=e=>("0"+e).slice(-2);let n=e.getTimezoneOffset();const r=n>0?"-":"+";return n=Math.abs(n),e.getFullYear()+"-"+t(e.getMonth()+1)+"-"+t(e.getDate())+"T"+t(e.getHours())+":"+t(e.getMinutes())+":"+t(e.getSeconds())+"."+("00"+e.getMilliseconds()).slice(-3)+r+t(n/60|0)+":"+t(n%60)},u=e=>{const t=28===e.length||29===e.length,n="string"==typeof e,r=!isNaN(new Date(e).getTime());return t&&n&&r},d=(e,t)=>{for(const n of t)if(Array.isArray(e[n])){if(e[n].length>0&&e[n].some(e=>"string"==typeof e&&0===e.trim().length))throw new Error(`non empty strings in ${n} are mandatory`)}else if("string"==typeof e[n]&&0===e[n].trim().length)throw new Error(`non empty ${n} are mandatory`)};class l{throwAndLogError(e,t){const n=new Error(t),r={title:t,event_type:e,exception_type:n.name,exception_source:"JS-SDK",stack_trace:n.stack||"no stack",ts:c(new Date)};throw D("exception",e,r,!1,""),n}throwAPIError(e,t){const n=new Error(t),r={title:t,event_type:e,exception_type:n.name,exception_source:"JS-SDK",stack_trace:n.stack||"no stack",ts:c(new Date)};D("exception",e,r,!1,"")}throwNudgeFetchError(e,t){const n=new Error(t),r={title:t,event_type:e,exception_type:n.name,exception_source:"JS-SDK",stack_trace:n.stack||"no stack",ts:c(new Date)};D("exception",e,r,!1,"")}}var p=n(857);const h=require("crypto");var m=n.n(h);const f=new Uint8Array(256);let g=f.length;function y(){return g>f.length-16&&(m().randomFillSync(f),g=0),f.slice(g,g+=16)}const v=/^(?:[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,_=[];for(let e=0;e<256;++e)_.push((e+256).toString(16).substr(1));const w=function(e,t=0){const n=(_[e[t+0]]+_[e[t+1]]+_[e[t+2]]+_[e[t+3]]+"-"+_[e[t+4]]+_[e[t+5]]+"-"+_[e[t+6]]+_[e[t+7]]+"-"+_[e[t+8]]+_[e[t+9]]+"-"+_[e[t+10]]+_[e[t+11]]+_[e[t+12]]+_[e[t+13]]+_[e[t+14]]+_[e[t+15]]).toLowerCase();if(!function(e){return"string"==typeof e&&v.test(e)}(n))throw TypeError("Stringified UUID is invalid");return n},E=function(e,t,n){const r=(e=e||{}).random||(e.rng||y)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return w(r)},b=("object"==typeof navigator&&navigator.userAgent&&navigator.userAgent.includes("jsdom"),"object"==typeof process&&!!process.versions&&process.versions.node,"object"==typeof window&&"object"==typeof document&&9===document.nodeType),C="visible",T="CFUserIdStorageKey";let A=!1;function k(){if(b){return localStorage.getItem(T)||""}return""}function S(){if(!b)return`${(0,p.platform)()} -|- ${(0,p.release)()}`;if(!window?.navigator)return"";const e=window.navigator.userAgentData?.platform,t=window.navigator.platform,n=window.navigator?.userAgent||";";return`${e||t} -|- ${n?.match(/(([^)]+))/)?.[1].split(";")[1].trim()}`}class I{impressionsDetectors={};user_id="";constructor(e,t,n,r,i,o){this.sender=e,this.impressionDetectorClass=t,this.deviceId=i,this.defaultBlock=r,this.debug=a(n),this.isUsingAsInternalWrapper=o}static createInstance(e,t,n,r,i,o){return I.instance||(I.instance=new I(e,t,n,r,i,o)),I.instance}static getInstance(){return I.instance||(new l).throwAndLogError("CfLog","CfLog instance not created"),I.instance}login(e){this.user_id=e}resolveModule(e){return e===i.ContentBlock.Core?this.currentBlock?this.currentBlock:this.defaultBlock:e}resolveUserId(e,t,n){return e&&0!==e.length?e:t||k()||n}async trackEvent(e,t,n,r){const i={...e,time:r||(new Date).toISOString()};i.ctx=i.ctx||{},i.ctx.__ol=!b||!("undefined"!=typeof window&&void 0!==window.navigator&&!window.navigator.onLine),this.sender.add(this.resolveUserId(t,this.user_id,this.deviceId),this.deviceId,i,n,this.isUsingAsInternalWrapper)}async trackCatalog(e){this.sender.addCatalogItem(e)}startTrackingImpressions(e,t,n){this.impressionsDetectors[t]=new this.impressionDetectorClass({intersectionThreshold:.5}),this.impressionsDetectors[t].on(s.Impression,e),this.impressionsDetectors[t].start(t,n,{})}stopTrackingImpressions(e){e?this.impressionsDetectors[e]&&this.impressionsDetectors[e].stop():Object.values(this.impressionsDetectors).forEach(e=>e.stop())}restartTrackingImpressions(e){if(!e||!this.impressionsDetectors[e])throw console.error("Impossible to restart impression to unknown containerClassname"),new Error("unknown-container");this.impressionsDetectors[e].restart({})}setCurrentBlock(e){setTimeout(()=>{this.currentBlock=e},15)}}function L(){return I.getInstance()}function O(e){return JSON.parse(JSON.stringify(e))}function N(e){const t={};for(const[n,r]of Object.entries(e)){const e=M(n);if(null!=r)if("string"==typeof r)""!==r&&(t[e]=r);else if(["number","boolean"].includes(typeof r))t[e]=r;else if(Array.isArray(r)){const n=r.filter(e=>null!=e).join(", ");""!==n&&(t[e]=n)}else if("object"==typeof r){const e=N(r);Object.assign(t,e)}else t[e]=String(r)}return t}function R(e){const t={};for(const[n,r]of Object.entries(e)){const e=M(n);if(null!=r)if("string"==typeof r)""!==r&&(t[e]=r);else if(["number","boolean"].includes(typeof r)){const n=String(r);""!==n&&(t[e]=n)}else if(Array.isArray(r)){const n=r.filter(e=>null!=e).map(e=>String(e)).join(", ");""!==n&&(t[e]=n)}else if("object"==typeof r){const e=R(r);Object.assign(t,e)}else{const n=String(r);""!==n&&(t[e]=n)}}return t}const P=e=>R(e?O(e):{}),x=e=>N(e?O(e):{}),M=e=>e.trim().replace(/\s+/g,"_").toLowerCase(),D=(e,t,n,r=!1,i="",o)=>{const a=L(),s={name:e,property:t,ctx:x(n)};a.trackEvent(s,i,r,o)},z=(e,t,n)=>{const r=L(),i={id:e,type:t,kv:P(n)};r.trackCatalog(i)};let F=function(e){return e.Identify="identify",e.Page="page",e.App="app",e.Search="search",e.Media="media",e.ActionResponse="action_response",e.Rate="rate",e.ModuleSelection="module_selection",e.Item="item",e.Delivery="delivery",e.Checkout="checkout",e.Cart="cart",e.CancelCheckout="cancel_checkout",e.ItemReport="item_report",e.ItemRequest="item_request",e.Module="module",e.Exam="exam",e.Question="question",e.Level="level",e.Milestone="milestone",e.Promo="promo",e.Survey="survey",e.Reward="reward",e.Payment="payment",e.Patient="patient",e.Encounter="encounter",e.Appointment="appointment",e.Diagnosis="diagnosis",e}({});async function B(e,t){if(""==e)return void(new l).throwAndLogError("user catalog","invalid user id");const n=(new Date).getTimezoneOffset();t.timezone=(e=>{const t=e=>e<10?`0${e}`:`${e}`;return`${e>0?"-":"+"}${t(Math.floor(Math.abs(e)/60))}:${t(Math.abs(e)%60)}`})(n),null!=t.birth_year&&(t.birth_year<1900||t.birth_year>(new Date).getFullYear())?(new l).throwAndLogError("user catalog","invalid user birth_year"):z(e,i.CoreCatalogType.User,t)}async function U(e,t){""!=e?(d(t,["country"]),z(e,i.CoreCatalogType.Site,t)):(new l).throwAndLogError("site catalog","invalid site id")}const j={logIdentifyEvent:(e,t=!1,n)=>{D(i.NavigationTypes.Identify,e.action,e,t,"",n)},logIngestEvent:(e,t,n=!1,r)=>{let o,a=!0;switch(e){case i.NavigationTypes.App:a=null!=t.action||((new l).throwAndLogError(i.NavigationTypes.App,"app action is required"),!1),a&&(o=t.action);break;case i.NavigationTypes.Page:a=(e=>void 0!==e.duration&&e.duration>=0)(t),a&&(o=t.title);break;case i.NavigationTypes.Media:a=(e=>(e.seek_time=e.type===i.MediaType.Image?0:e.seek_time,""==e.id?((new l).throwAndLogError(i.NavigationTypes.Media,"empty media id"),!1):null==e.type?((new l).throwAndLogError(i.NavigationTypes.Media,"media type is required"),!1):null==e.action?((new l).throwAndLogError(i.NavigationTypes.Media,"media action is required"),!1):!(e.seek_time&&e.seek_time<0&&((new l).throwAndLogError(i.NavigationTypes.Media,"negative media seek time"),1))))(t),a&&(o=t.type);break;case i.NavigationTypes.Search:{const e=t;a=(e=>e.page<0?((new l).throwAndLogError(i.NavigationTypes.Search,"negative search page"),!1):(0!==e.results_list.length&&e.results_list.every(e=>{if(""==e)return(new l).throwAndLogError(i.NavigationTypes.Search,"empty search result item id"),!1}),!0))(e),a&&(o=e.query,Array.isArray(e.results_list)?t.results_list=[...new Set(e.results_list)]:t.results_list=[]);break}case i.NavigationTypes.Rate:a=(e=>e.rate_value<0?((new l).throwAndLogError(i.NavigationTypes.Rate,"negative rate value"),!1):e.rate_value<0||e.rate_value>5?((new l).throwAndLogError(i.NavigationTypes.Rate,"invalid rate range 0-5"),!1):null==e.type?((new l).throwAndLogError(i.NavigationTypes.Rate,"rate type is required"),!1):null!=e.subject_id&&""!=e.subject_id||((new l).throwAndLogError(i.NavigationTypes.Rate,"rate subject id is required"),!1))(t),a&&(o=t.type);break;case i.NavigationTypes.Track:a=(e=>{const t=M(e.name);return e.name&&""!==e.name.trim()?!new Set(Object.values(F)).has(t)||((new l).throwAndLogError(i.NavigationTypes.Track,`The event name "${e.name}" is reserved and cannot be used.`),!1):((new l).throwAndLogError(i.NavigationTypes.Track,"name for track event is required"),!1)})(t),a&&(e=M(t.name),o=t.property,t=t.meta);break;case i.NavigationTypes.ModuleSelection:a=(e=>!!e.type||((new l).throwAndLogError(i.NavigationTypes.ModuleSelection,"module type is required"),!1))(t),a&&(o=t.type)}a&&(e===i.NavigationTypes.Media&&t.type===i.MediaType.Image&&(t.seek_time=0),D(e,o,t,n,"",r))},logCatalogEvent:(e,t,n)=>{switch(t){case i.CoreCatalogType.User:B(e,n);break;case i.CoreCatalogType.Site:U(e,n);break;case i.CoreCatalogType.Media:!async function(e,t){""==e?(new l).throwAndLogError("media catalog","invalid media item id"):null==t.type&&(new l).throwAndLogError("media catalog","invalid media type"),d(t,["type"]),z(e,i.CoreCatalogType.Media,t)}(e,n);case i.CoreCatalogType.Other:}},logPushNotificationEvent:(e,t=!0,n)=>{D(i.NavigationTypes.ActionResponse,e.response,e,t,"",n)},logSearchEvent:(e,t,n=!1)=>{const r={query:(o=e).query,module:o.module||i.SearchModuleType.Core,results_list:o.results_list?.map(e=>e.id)||[],filter:o.filter,page:o.page,meta:o.meta};var o;return j.logIngestEvent(i.NavigationTypes.Search,r,n),"no-search-id"}};class ${flushing=!1;flushIntervalId=0;exceptionsEndPoint="/ingest/sdk/crash";userId="";deviceId="";usingAsInternalWrapper=!1;constructor(e,t){if(this.queue=[],this.catalogQueue=[],this.cfNetwork=e,this.options=t,this.debug=a(this.options.debug),this.options.flushInterval<1e3&&(this.options.flushInterval=1e3),this.options.cacheEventsInLocalstorage&&"undefined"!=typeof Storage)try{this.queue=JSON.parse(localStorage.getItem(this.options.cacheEventsKey)||"[]"),this.catalogQueue=JSON.parse(localStorage.getItem(this.options.cacheCatalogKey)||"[]")}catch(e){this.debug(o.Error,`Error getting queue items from cache ${e.message||""}`)}this.endpointURL=`${this.options.baseUrl}${this.options.ingestPath}`,this.catalogEndpointURL=`${this.options.baseUrl}${this.options.dimensionPath}`,this.updateQueueCache(),this.flushIntervalId=+setInterval(()=>{this.flush()},this.options.flushInterval)}flush(){if(this.options.pauseSDK)return;const e=[...this.queue],t=[...this.catalogQueue];if(0===e.length||0===t.length)return void this.debug(o.Log,"Skip sending empty list of logs ");const n=e.map(e=>e.uuid),r=e.map(e=>e.event),i=t.map(e=>e.uuid),a=t.map(e=>e.catalog);this.flushing=!0,this.send(r,n),this.sendCatalog(a,i)}add(e,t,n,r=!1,i=!1){if(this.options.pauseSDK)return;const o={uuid:E(),event:n,time:+new Date,retries:0};this.userId=e,this.deviceId=t,this.usingAsInternalWrapper=i,this.queue.some(e=>e.event===o.event)||(this.queue.push(o),this.updateQueueCache(),r&&this.send([o.event],[o.uuid]))}addCatalogItem(e,t=!1){if(this.options.pauseSDK)return;const n={uuid:E(),catalog:e,retries:0};this.usingAsInternalWrapper=t,this.catalogQueue.some(e=>e.catalog===n.catalog)||(this.catalogQueue.push(n),this.updateCatalogQueueCache())}removeQueueItemsExceedMaxRetries(){this.queue=this.queue.filter(e=>e.retries<=this.options.flushMaxRetries),this.updateQueueCache()}removeQueueCatalogItemsExceedMaxRetries(){this.catalogQueue=this.catalogQueue.filter(e=>e.retries<=this.options.flushMaxRetries),this.updateCatalogQueueCache()}removeFromQueue(e){this.queue=this.queue.filter(t=>-1===e.indexOf(t.uuid)),this.updateQueueCache()}removeFromCatalogQueue(e){this.catalogQueue=this.catalogQueue.filter(t=>-1===e.indexOf(t.uuid)),this.updateCatalogQueueCache()}removeIndexFromQueue(e){this.queue.splice(e,1),this.updateQueueCache()}removeIndexFromCatalogQueue(e){this.catalogQueue.splice(e,1),this.updateCatalogQueueCache()}updateQueueCache(){this.options.cacheEventsInLocalstorage&&"undefined"!=typeof Storage&&localStorage.setItem(this.options.cacheEventsKey,JSON.stringify(this.queue))}updateCatalogQueueCache(){this.options.cacheEventsInLocalstorage&&"undefined"!=typeof Storage&&localStorage.setItem(this.options.cacheCatalogKey,JSON.stringify(this.catalogQueue))}addRetries(e){const t=+new Date;this.queue.filter(t=>-1!==e.indexOf(t.uuid)).forEach(e=>{e.retries=+e.retries+1,e.lastRetry=t}),this.updateQueueCache()}addCatalogRetries(e){const t=+new Date;this.catalogQueue.filter(t=>-1!==e.indexOf(t.uuid)).forEach(e=>{e.retries=+e.retries+1,e.lastRetry=t}),this.updateCatalogQueueCache()}send(e,t){if(this.options.pauseSDK)return;const n=(e=>{const t=new Set;return e.filter(e=>{const n=(e=>JSON.stringify(e))(e);return!t.has(n)&&(t.add(n),!0)})})(e),r={s_id:this.generateSessionID(this.userId),sdk:"js/0.9.12",app_id:b&&document?.location.host||"NO_URL_FOUND",app_version:b&&window?.navigator&&""!==window.navigator.userAgent?function(){const e=navigator.userAgent;let t,n=e.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[];return/trident/i.test(n[1])?(t=/\brv[ :]+(\d+)/g.exec(e)||[],"IE "+(t[1]||"")):"Chrome"===n[1]&&(t=e.match(/\b(OPR|Edge)\/(\d+)/),null!=t)?t.slice(1).join(" ").replace("OPR","Opera"):(n=n[2]?[n[1],n[2]]:[navigator.appName,navigator.appVersion,"-?"],null!=(t=e.match(/version\/(\d+)/i))&&n.splice(1,1,t[1]),n.join(" "))}()||"0":"NO_BROWSER",device_id:this.deviceId,device_os:S()};return this.cfNetwork.send(this.endpointURL,{data:n,internal:r,id:this.userId}).then(()=>{this.debug(o.Info,`Flushed ${n.length} events`),this.removeFromQueue(t)}).catch(e=>{e.response.data.data&&this.removeIndexFromQueue(Number(e.response.data.data)),this.addRetries(t),this.debug(o.Error,e.message||"")}).finally(()=>{this.flushing=!1,this.removeQueueItemsExceedMaxRetries()})}sendCatalog(e,t){if(this.options.pauseSDK)return;const n=(e=>{const t=new Set;return e.filter(e=>{const n=(e=>JSON.s