@walkeros/web-source-browser 0.5.0 → 0.5.1-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dev.js +1 -1
- package/dist/dev.js.map +1 -1
- package/dist/dev.mjs +1 -1
- package/dist/dev.mjs.map +1 -1
- package/dist/index.es5.js +1 -1
- package/package.json +3 -3
package/dist/index.es5.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _array_with_holes(e){if(Array.isArray(e))return e}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function asyncGeneratorStep(e,t,n,r,o,i,a){try{var c=e[i](a),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(r,o)}function _async_to_generator(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){asyncGeneratorStep(i,r,o,a,c,"next",e)}function c(e){asyncGeneratorStep(i,r,o,a,c,"throw",e)}a(void 0)})}}function _define_property(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _instanceof(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function _iterable_to_array(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}}function _non_iterable_rest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){_define_property(e,t,n[t])})}return e}function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _to_array(e){return _array_with_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_rest()}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _type_of(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_array_like_to_array(e,t):void 0}}function _ts_generator(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=c(0),a.throw=c(1),a.return=c(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function c(c){return function(s){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,s])}}}var Source=function(){var e=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};n=_object_spread({},me,n);var r=Object.entries(t).reduce(function(t,r){var o=_sliced_to_array(r,2),i=o[0],a=o[1],c=e[i];return n.merge&&Array.isArray(c)&&Array.isArray(a)?t[i]=a.reduce(function(e,t){return e.includes(t)?e:_to_consumable_array(e).concat([t])},_to_consumable_array(c)):(n.extend||i in e)&&(t[i]=a),t},{});return n.shallow?_object_spread({},e,r):(Object.assign(e,r),e)},t=function(e){return Array.isArray(e)},n=function(e){return void 0!==e},r=function(e){return e===document||_instanceof(e,Element)},o=function(e){return"object"==(void 0===e?"undefined":_type_of(e))&&null!==e&&!t(e)&&"[object Object]"===Object.prototype.toString.call(e)},i=function(e){return"string"==typeof e},a=function(e){if("true"===e)return!0;if("false"===e)return!1;var t=Number(e);return e==t&&""!==e?t:String(e)},c=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:6,t="";t.length<e;)t+=(36*Math.random()|0).toString(36);return t},s=function(e,t,n){return function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];try{return e.apply(void 0,_to_consumable_array(o))}catch(e){if(!t)return;return t(e)}finally{null==n||n()}}},u=function(e){return e?e.trim().replace(/^'|'$/g,"").trim():""},l=function(e,t){return(e.getAttribute(t)||"").trim()},f=function(e){var t,n=getComputedStyle(e);if("none"===n.display)return!1;if("visible"!==n.visibility)return!1;if(n.opacity&&Number(n.opacity)<.1)return!1;var r=window.innerHeight,o=e.getBoundingClientRect(),i=o.height,a=o.y,c=a+i,s={x:o.x+e.offsetWidth/2,y:o.y+e.offsetHeight/2};if(i<=r){if(e.offsetWidth+o.width===0||e.offsetHeight+o.height===0)return!1;if(s.x<0)return!1;if(s.x>(document.documentElement.clientWidth||window.innerWidth))return!1;if(s.y<0)return!1;if(s.y>(document.documentElement.clientHeight||window.innerHeight))return!1;t=document.elementFromPoint(s.x,s.y)}else{var u=r/2;if(a<0&&c<u)return!1;if(c>r&&a>u)return!1;t=document.elementFromPoint(s.x,r/2)}if(t)do{if(t===e)return!0}while(t=t.parentElement);return!1},d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.cb,o=e.consent,i=e.collector,a=e.storage;if(!o)return v((a?p:y)(e),i,r);var c,s,u,l=(c=e,s=r,function(e,r){if(!n(u)||u!==(null==e?void 0:e.group)){u=null==e?void 0:e.group;var o=function(){return y(c)};return c.consent&&function(e){var t=_object_spread({},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}),n={},r=void 0===e;return Object.keys(t).forEach(function(o){t[o]&&(n[o]=!0,e&&e[o]&&(r=!0))}),!!r&&n}((t(c.consent)?c.consent:[c.consent]).reduce(function(e,t){return _object_spread_props(_object_spread({},e),_define_property({},t,!0))},{}),r)&&(o=function(){return p(c)}),v(o(),e,s)}}),f=(t(o)?o:[o]).reduce(function(e,t){return _object_spread_props(_object_spread({},e),_define_property({},t,l))},{});i?i.command("on","consent",f):he("walker on","consent",f)},v=function(e,t,n){return!1===n?e:(n||(n=we),n(e,t,we))},g=function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ye.Utils.Storage.Session;function o(e){try{return JSON.parse(e||"")}catch(r){var t=1,n="";return e&&(t=0,n=e),{e:t,v:n}}}switch(r){case ye.Utils.Storage.Cookie:var i;t=decodeURIComponent((null===(i=document.cookie.split("; ").find(function(t){return t.startsWith(e+"=")}))||void 0===i?void 0:i.split("=")[1])||"");break;case ye.Utils.Storage.Local:n=o(window.localStorage.getItem(e));break;case ye.Utils.Storage.Session:n=o(window.sessionStorage.getItem(e))}return n&&(t=n.v,0!=n.e&&n.e<Date.now()&&(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ye.Utils.Storage.Session;switch(t){case ye.Utils.Storage.Cookie:_(e,"",0,t);break;case ye.Utils.Storage.Local:window.localStorage.removeItem(e);break;case ye.Utils.Storage.Session:window.sessionStorage.removeItem(e)}}(e,r),t="")),a(t||"")},_=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:30,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:ye.Utils.Storage.Session,o=arguments.length>4?arguments[4]:void 0,i={e:Date.now()+6e4*n,v:String(t)},a=JSON.stringify(i);switch(r){case ye.Utils.Storage.Cookie:t="object"==(void 0===t?"undefined":_type_of(t))?JSON.stringify(t):t;var c="".concat(e,"=").concat(encodeURIComponent(t),"; max-age=").concat(60*n,"; path=/; SameSite=Lax; secure");o&&(c+="; domain="+o),document.cookie=c;break;case ye.Utils.Storage.Local:window.localStorage.setItem(e,a);break;case ye.Utils.Storage.Session:window.sessionStorage.setItem(e,a)}return g(e,r)},p=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Date.now(),n=e.length,r=void 0===n?30:n,o=e.deviceKey,i=void 0===o?"elbDeviceId":o,a=e.deviceStorage,u=void 0===a?"local":a,l=e.deviceAge,f=void 0===l?30:l,d=e.sessionKey,v=void 0===d?"elbSessionId":d,p=e.sessionStorage,m=void 0===p?"local":p,b=e.pulse,h=void 0!==b&&b,w=y(e),S=!1,k=s(function(e,t,n){var r=g(e,n);return r||(r=c(8),_(e,r,1440*t,n)),String(r)})(i,f,u),O=s(function(e,n){var o=JSON.parse(String(g(e,n)));return h||(o.isNew=!1,w.marketing&&(Object.assign(o,w),S=!0),S||o.updated+6e4*r<t?(delete o.id,delete o.referrer,o.start=t,o.count++,o.runs=1,S=!0):o.runs++),o},function(){S=!0})(v,m)||{},j={id:c(12),start:t,isNew:!0,count:1,runs:1},x=Object.assign(j,w,O,{device:k},{isStart:S,storage:!0,updated:t},e.data);return _(v,JSON.stringify(x),2*r,m),x},y=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.isStart||!1,r={isStart:n,storage:!1};if(!1===t.isStart)return r;if(!n&&"navigate"!==_sliced_to_array(performance.getEntriesByType("navigation"),1)[0].type)return r;var o=new URL(t.url||window.location.href),i=t.referrer||document.referrer,a=i&&new URL(i).hostname,s=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r="clickId",o={},i={utm_campaign:"campaign",utm_content:"content",utm_medium:"medium",utm_source:"source",utm_term:"term",dclid:r,fbclid:r,gclid:r,msclkid:r,ttclid:r,twclid:r,igshid:r,sclid:r};return Object.entries(e(i,n)).forEach(function(e){var n=_sliced_to_array(e,2),i=n[0],a=n[1],c=t.searchParams.get(i);c&&(a===r&&(a=i,o[r]=i),o[a]=c)}),o}(o,t.parameters);if(Object.keys(s).length&&(s.marketing||(s.marketing=!0),n=!0),!n){var u=t.domains||[];u.push(o.hostname),n=!u.includes(a)}return n?Object.assign({isStart:n,storage:!1,start:Date.now(),id:c(12),referrer:a},s,t.data):r},m=function(e,t){return e+(t=null!=t?(!(arguments.length>2&&void 0!==arguments[2])||arguments[2]?"-":"")+t:"")},b=function(e,n,r){var o=l(n,m(e,r,!(arguments.length>3&&void 0!==arguments[3])||arguments[3]))||"";return L(o).reduce(function(e,r){var o=_sliced_to_array(P(r),2),i=o[0],c=o[1];if(!i)return e;if(c||(i.endsWith(":")&&(i=i.slice(0,-1)),c=""),c.startsWith("#")){c=c.slice(1);try{var s=n[c];s||"selected"!==c||(s=n.options[n.selectedIndex].text),c=String(s)}catch(e){c=""}}return i.endsWith("[]")?(i=i.slice(0,-2),t(e[i])||(e[i]=[]),e[i].push(a(c))):e[i]=a(c),e},{})},h=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:be.Commands.Prefix,r=e||document.body;if(!r)return[];var o=[],i=be.Commands.Action,a="[".concat(m(n,i,!1),"]"),c=function(e){Object.keys(b(n,e,i,!1)).forEach(function(t){o=o.concat(w(e,t,n))})};return r!==document&&(null===(t=r.matches)||void 0===t?void 0:t.call(r,a))&&c(r),A(r,a,c),o},w=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:be.Commands.Prefix,r=[],o=C(n,e,t),i=o.actions,a=o.nearestOnly;return i.length?(i.forEach(function(o){var i=L(o.actionParams||"",",").reduce(function(e,t){return e[u(t)]=!0,e},{}),c=j(n,e,i,a);if(!c.length){var s="page",l="[".concat(m(n,s),"]"),f=_sliced_to_array(E(e,l,n,s),2),d=f[0],v=f[1];c.push({entity:s,data:d,nested:[],context:v})}c.forEach(function(e){r.push({entity:e.entity,action:o.action,data:e.data,trigger:t,context:e.context,nested:e.nested})})}),r):r},S=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:be.Commands.Prefix,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,r=m(t,be.Commands.Globals,!1),o="[".concat(r,"]"),i={};return A(n,o,function(n){i=e(i,b(t,n,be.Commands.Globals,!1))}),i},k=function(e,t){var n=window.location,r="page",o=t===document?document.body:t,i=_sliced_to_array(E(o,"[".concat(m(e,r),"]"),e,r),2),a=i[0],c=i[1];return a.domain=n.hostname,a.title=document.title,a.referrer=document.referrer,n.search&&(a.search=n.search),n.hash&&(a.hash=n.hash),[a,c]},O=function(e){var t={};return L(e).forEach(function(e){var n=_sliced_to_array(P(e),2),r=n[0],o=n[1],i=_sliced_to_array(I(r),2),a=i[0],c=i[1];if(a){var s=_sliced_to_array(I(o||""),2),u=s[0],l=s[1];u=u||a,t[a]||(t[a]=[]),t[a].push({trigger:a,triggerParams:c,action:u,actionParams:l})}}),t},j=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=[],i=t;for(n=0!==Object.keys(n||{}).length?n:void 0;i;){var a=Se(e,i,t,n);if(a&&(o.push(a),r))break;i=x(e,i)}return o},x=function(e,t){var n=m(e,be.Commands.Link,!1);if(t.matches("[".concat(n,"]"))){var r=_sliced_to_array(P(l(t,n)),2),o=r[0];if("child"===r[1])return document.querySelector("[".concat(n,'="').concat(o,':parent"]'))}return!t.parentElement&&t.getRootNode&&_instanceof(t.getRootNode(),ShadowRoot)?t.getRootNode().host:t.parentElement},E=function(t,n,r,o){for(var i={},a={},c=t,s="[".concat(m(r,be.Commands.Context,!1),"]"),u=0;c;)c.matches(n)&&(i=e(b(r,c,""),i),i=e(b(r,c,o),i)),c.matches(s)&&(Object.entries(b(r,c,be.Commands.Context,!1)).forEach(function(e){var t=_sliced_to_array(e,2),n=t[0],r=t[1];r&&!a[n]&&(a[n]=[r,u])}),++u),c=x(r,c);return[i,a]},A=function(e,t,n){e.querySelectorAll(t).forEach(n)},C=function(e,t,n){for(var r=t;r;){var o=l(r,m(e,be.Commands.Actions,!1));if(o){var i=O(o);if(i[n])return{actions:i[n],nearestOnly:!1}}var a=l(r,m(e,be.Commands.Action,!1));if(a){var c=O(a);if(c[n]||"click"!==n)return{actions:c[n]||[],nearestOnly:!0}}r=x(e,r)}return{actions:[],nearestOnly:!1}},L=function(e){if(!e)return[];var t=new RegExp("(?:[^".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:";","']+|'[^']*')+"),"ig");return e.match(t)||[]},P=function(e){var t=_sliced_to_array(e.split(/:(.+)/,2),2),n=t[0],r=t[1];return[u(n),u(r)]},I=function(e){var t=_sliced_to_array(e.split("(",2),2),n=t[0],r=t[1];return[n,r?r.slice(0,-1):""]},U=function(e){var t=Date.now(),n=je.get(e);return(!n||t-n.lastChecked>500)&&(n={isVisible:f(e),lastChecked:t},je.set(e,n)),n.isVisible},W=function(e){if(window.IntersectionObserver)return s(function(){return new window.IntersectionObserver(function(t){t.forEach(function(t){R(e,t)})},{rootMargin:"0px",threshold:[0,.5]})},function(){})()},R=function(e,t){var n,r=t.target,o=xe.get(e);if(o){var i=o.timers.get(r);if(t.intersectionRatio>0){var a=Date.now(),c=Oe.get(r);if((!c||a-c.lastChecked>1e3)&&(c={isLarge:r.offsetHeight>window.innerHeight,lastChecked:a},Oe.set(r,c)),t.intersectionRatio>=.5||c.isLarge&&U(r)){var s,u=null===(s=o.elementConfigs)||void 0===s?void 0:s.get(r);if((null==u?void 0:u.multiple)&&u.blocked)return;if(!i){var l=window.setTimeout(function(){return _async_to_generator(function(){var t,n,i,a;return _ts_generator(this,function(c){switch(c.label){case 0:return U(r)?(null==(i=null===(t=o.elementConfigs)||void 0===t?void 0:t.get(r))?void 0:i.context)?[4,V(i.context,r,i.trigger)]:[3,2]:[3,3];case 1:c.sent(),c.label=2;case 2:(null==(a=null===(n=o.elementConfigs)||void 0===n?void 0:n.get(r))?void 0:a.multiple)?a.blocked=!0:function(e,t){var n=xe.get(e);if(n){n.observer&&n.observer.unobserve(t);var r=n.timers.get(t);r&&(clearTimeout(r),n.timers.delete(t)),Oe.delete(t),je.delete(t)}}(e,r),c.label=3;case 3:return[2]}})})()},o.duration);o.timers.set(r,l)}return}}i&&(clearTimeout(i),o.timers.delete(r));var f=null===(n=o.elementConfigs)||void 0===n?void 0:n.get(r);(null==f?void 0:f.multiple)&&(f.blocked=!1)}},T=function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{multiple:!1},o=e.settings.scope||document,i=xe.get(o);(null==i?void 0:i.observer)&&t&&(i.elementConfigs||(i.elementConfigs=new WeakMap),i.elementConfigs.set(t,{multiple:null!==(n=r.multiple)&&void 0!==n&&n,blocked:!1,context:e,trigger:r.multiple?"visible":"impression"}),i.observer.observe(t))},N=function(e){if(e){var t=xe.get(e);t&&(t.observer&&t.observer.disconnect(),xe.delete(e))}},D=function(e,t,n,a,c,s,u){var l=e.elb,f=e.settings;if(i(t)&&t.startsWith("walker "))return l(t,n);if(o(t)){var d=t;return d.source||(d.source=H()),d.globals||(d.globals=S(f.prefix,f.scope||document)),l(d)}var v,g=_sliced_to_array(String(o(t)?t.name:t).split(" "),1)[0],_=o(n)?n:{},p={},y=!1;if(r(n)&&(v=n,y=!0),r(c)?v=c:o(c)&&Object.keys(c).length&&(p=c),v){var m=j(f.prefix||"data-elb",v).find(function(e){return e.entity===g});m&&(y&&(_=m.data),p=m.context)}"page"===g&&(_.id=_.id||window.location.pathname);var b=S(f.prefix,f.scope);return l({name:String(t||""),data:_,context:p,globals:b,nested:s,custom:u,trigger:i(a)?a:"",source:H()})},H=function(){return{type:"browser",id:window.location.href,previous_id:document.referrer}},M=function(e,t,n){return _async_to_generator(function(){var r;return _ts_generator(this,function(o){return r=function(){e(t,n)},"loading"!==document.readyState?r():document.addEventListener("DOMContentLoaded",r),[2]})})()},G=function(e,t){t.scope&&q(e,t)},B=function(e,t){t.scope&&J(e,t)},q=function(e,t){var n=t.scope;n&&(n.addEventListener("click",s(function(t){K.call(this,e,t)})),n.addEventListener("submit",s(function(t){Q.call(this,e,t)})))},J=function(e,t){var n=t.scope;Ee=[];var r=n||document;N(r),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;xe.has(e)||xe.set(e,{observer:W(e),timers:new WeakMap,duration:t})}(r,1e3);var o=m(t.prefix,be.Commands.Action,!1);r!==document&&F(e,r,o,t),r.querySelectorAll("[".concat(o,"]")).forEach(function(n){F(e,n,o,t)}),Ee.length&&ee(e,r,t)},V=function(e,t,n){return _async_to_generator(function(){var r;return _ts_generator(this,function(o){return r=w(t,n,e.settings.prefix),[2,Promise.all(r.map(function(t){return D(e,_object_spread_props(_object_spread({name:"".concat(t.entity," ").concat(t.action)},t),{trigger:n}))}))]})})()},F=function(e,t,n,r){var o=l(t,n);o&&Object.values(O(o)).forEach(function(n){return n.forEach(function(n){switch(n.trigger){case Ae.Hover:Y(e,t);break;case Ae.Load:X(e,t);break;case Ae.Pulse:$(e,t,n.triggerParams);break;case Ae.Scroll:z(t,n.triggerParams);break;case Ae.Impression:T(e,t);break;case Ae.Visible:T(e,t,{multiple:!0});break;case Ae.Wait:Z(e,t,n.triggerParams)}})})},K=function(e,t){V(e,t.target,Ae.Click)},Y=function(e,t){t.addEventListener("mouseenter",s(function(t){_instanceof(t.target,Element)&&V(e,t.target,Ae.Hover)}))},X=function(e,t){V(e,t,Ae.Load)},$=function(e,t){setInterval(function(){document.hidden||V(e,t,Ae.Pulse)},parseInt((arguments.length>2&&void 0!==arguments[2]?arguments[2]:"")||"")||15e3)},z=function(e){var t=parseInt((arguments.length>1&&void 0!==arguments[1]?arguments[1]:"")||"")||50;t<0||t>100||Ee.push([e,t])},Q=function(e,t){t.target&&V(e,t.target,Ae.Submit)},Z=function(e,t){setTimeout(function(){return V(e,t,Ae.Wait)},parseInt((arguments.length>2&&void 0!==arguments[2]?arguments[2]:"")||"")||15e3)},ee=function(e,t,n){var r=function(e,t){return e.filter(function(e){var n=_sliced_to_array(e,2),r=n[0],o=n[1],i=window.scrollY+window.innerHeight,a=r.offsetTop;if(i<a)return!0;var c=r.clientHeight;return!(100*(1-(a+c-i)/(c||1))>=o)||(V(t,r,Ae.Scroll),!1)})};ke||(ke=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3,n=null;return function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];if(null===n)return n=setTimeout(function(){n=null},t),e.apply(void 0,_to_consumable_array(o))}}(function(){Ee=r.call(t,Ee,e)}),t.addEventListener("scroll",ke))},te=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"data-elb",n=arguments.length>2?arguments[2]:void 0;ne(e,t,n,!0),ne(e,t,n,!1),n.length=0},ne=function(e,t,n,r){var a=[],c=!0;n.forEach(function(e){var t=oe(e)?_to_consumable_array(Array.from(e)):ie(e)?Array.from(e):[e];if((!Array.isArray(t)||0!==t.length)&&(!Array.isArray(t)||1!==t.length||t[0])){var n=t[0],s=!o(n)&&i(n)&&n.startsWith("walker ");if(o(n)){if("object"===(void 0===n?"undefined":_type_of(n))&&0===Object.keys(n).length)return}else{var u=Array.from(t);if(!i(u[0])||""===u[0].trim())return;c&&"walker run"===u[0]&&(c=!1)}(r&&s||!r&&!s)&&a.push(t)}}),a.forEach(function(n){re(e,t,n)})},re=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"data-elb",n=arguments.length>2?arguments[2]:void 0;s(function(){if(Array.isArray(n)){var r=_to_array(n),o=r[0],a=r.slice(1);if(!o||i(o)&&""===o.trim())return;if(i(o)&&o.startsWith("walker "))return void e(o,a[0]);D.apply(void 0,[{elb:e,settings:{prefix:t,scope:document,pageview:!1,session:!1,elb:"",elbLayer:!1}},o].concat(_to_consumable_array(a)))}else if(n&&"object"===(void 0===n?"undefined":_type_of(n))){if(0===Object.keys(n).length)return;e(n)}},function(){})()},oe=function(e){return null!=e&&"object"===(void 0===e?"undefined":_type_of(e))&&"[object Arguments]"===Object.prototype.toString.call(e)},ie=function(e){return null!=e&&"object"===(void 0===e?"undefined":_type_of(e))&&"length"in e&&"number"==typeof e.length},ae=function(e){var t={push:e,group:void 0,command:arguments.length>2?arguments[2]:void 0};return d(_object_spread_props(_object_spread({},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}),{collector:t}))},ce=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).prefix||"data-elb";return function(t){var r=void 0,o=t,a={},c={},s={},u={},l={},f={};function d(e){return Object.entries(e).map(function(e){var t=_sliced_to_array(e,2),r=t[0],o=t[1];return"".concat(r,":").concat(function(e){if(!n(e)||null===e)return"undefined";var t=String(e);return(t=(t=(t=t.replace(/\\/g,"\\\\")).replace(/;/g,"\\;")).replace(/:/g,"\\:")).replace(/'/g,"\\'")}(o))}).join(";")}var v={entity:function(e){return r=e,o=e,v},data:function(e,t){var n=null!=o?o:"";return a[n]||(a[n]={}),i(e)?a[n][e]=t:Object.assign(a[n],e),v},action:function(e,t){if(i(e))if(n(t))c[e]=t;else if(e.includes(":")){var r=_sliced_to_array(e.split(":",2),2),o=r[0],a=r[1];c[o]=a}else c[e]=e;else Object.assign(c,e);return v},actions:function(e,t){if(i(e))if(n(t))s[e]=t;else if(e.includes(":")){var r=_sliced_to_array(e.split(":",2),2),o=r[0],a=r[1];s[o]=a}else s[e]=e;else Object.assign(s,e);return v},context:function(e,t){return i(e)?u[e]=t:Object.assign(u,e),v},globals:function(e,t){return i(e)?l[e]=t:Object.assign(l,e),v},link:function(e,t){return i(e)?f[e]=t:Object.assign(f,e),v},get:function(){var t={};return r&&(t[e]=r),Object.entries(a).forEach(function(n){var r=_sliced_to_array(n,2),o=r[0],i=r[1];if(Object.keys(i).length>0){var a=o?"".concat(e,"-").concat(o):"".concat(e,"-");t[a]=d(i)}}),Object.keys(c).length>0&&(t["".concat(e,"action")]=d(c)),Object.keys(s).length>0&&(t["".concat(e,"actions")]=d(s)),Object.keys(u).length>0&&(t["".concat(e,"context")]=d(u)),Object.keys(l).length>0&&(t["".concat(e,"globals")]=d(l)),Object.keys(f).length>0&&(t["".concat(e,"link")]=d(f)),t}};return v}},se=Object.defineProperty,ue=Object.getOwnPropertyDescriptor,le=Object.getOwnPropertyNames,fe=Object.prototype.hasOwnProperty,de=function(e,t){for(var n in t)se(e,n,{get:t[n],enumerable:!0})},ve={};de(ve,{SourceBrowser:function(){return Ce},createTagger:function(){return ce},default:function(){return De},examples:function(){return Le},getAllEvents:function(){return h},getElbAttributeName:function(){return m},getElbValues:function(){return b},getEvents:function(){return w},getGlobals:function(){return S},sourceBrowser:function(){return Ne}});var ge=Object.defineProperty;!function(e,t){for(var n in t)ge(e,n,{get:t[n],enumerable:!0})}({},{Level:function(){return pe}});var _e,pe=((_e=pe||{})[_e.ERROR=0]="ERROR",_e[_e.INFO=1]="INFO",_e[_e.DEBUG=2]="DEBUG",_e),ye={Utils:{Storage:{Local:"local",Session:"session",Cookie:"cookie"}}},me={merge:!0,shallow:!0,extend:!0},be={Commands:{Action:"action",Actions:"actions",Config:"config",Consent:"consent",Context:"context",Custom:"custom",Destination:"destination",Elb:"elb",Globals:"globals",Hook:"hook",Init:"init",Link:"link",On:"on",Prefix:"data-elb",Ready:"ready",Run:"run",Session:"session",User:"user",Walker:"walker"},Utils:{Storage:{Cookie:"cookie",Local:"local",Session:"session"}}},he=function(){var e=window;(e.elbLayer=e.elbLayer||[]).push(arguments)},we=function(e,t){var n={};return e.id&&(n.session=e.id),e.storage&&e.device&&(n.device=e.device),t?t.command("user",n):he("walker user",n),e.isStart&&(t?t.push({name:"session start",data:e}):he({name:"session start",data:e})),e};function Se(t,n,r,o){var i=l(n,m(t));if(!i||o&&!o[i])return null;var a=[n],c="[".concat(m(t,i),"],[").concat(m(t,""),"]"),s=m(t,be.Commands.Link,!1),u={},f=[],d=_sliced_to_array(E(r||n,c,t,i),2),v=d[0],g=d[1];A(n,"[".concat(s,"]"),function(e){var n=_sliced_to_array(P(l(e,s)),2),r=n[0];"parent"===n[1]&&A(document.body,"[".concat(s,'="').concat(r,':child"]'),function(e){a.push(e);var n=Se(t,e);n&&f.push(n)})});var _=[];a.forEach(function(e){e.matches(c)&&_.push(e),A(e,c,function(e){return _.push(e)})});var p={};return _.forEach(function(n){p=e(p,b(t,n,"")),u=e(u,b(t,n,i))}),u=e(e(p,u),v),a.forEach(function(e){A(e,"[".concat(m(t),"]"),function(e){var n=Se(t,e);n&&f.push(n)})}),{entity:i,data:u,context:g,nested:f}}var ke,Oe=new WeakMap,je=new WeakMap,xe=new WeakMap,Ee=[],Ae={Click:"click",Custom:"custom",Hover:"hover",Load:"load",Pulse:"pulse",Scroll:"scroll",Submit:"submit",Impression:"impression",Visible:"visible",Wait:"wait"},Ce={},Le={};de(Le,{env:function(){return Pe}});var Pe={};de(Pe,{push:function(){return Te}});var Ie,Ue=function(){},We=function(){return function(){return Promise.resolve({ok:!0,successful:[],queued:[],failed:[]})}},Re={error:Ue,info:Ue,debug:Ue,throw:function(e){throw"string"==typeof e?new Error(e):e},scope:function(){return Re}},Te={get push(){return We()},get command(){return We()},get elb(){return We()},get window(){return{addEventListener:Ue,removeEventListener:Ue,location:{href:"https://example.com/page",pathname:"/page",search:"?query=test",hash:"#section",host:"example.com",hostname:"example.com",origin:"https://example.com",protocol:"https:"},document:{},navigator:{language:"en-US",userAgent:"Mozilla/5.0 (Test)"},screen:{width:1920,height:1080},innerWidth:1920,innerHeight:1080,pageXOffset:0,pageYOffset:0,scrollX:0,scrollY:0}},get document(){return{addEventListener:Ue,removeEventListener:Ue,querySelector:Ue,querySelectorAll:function(){return[]},getElementById:Ue,getElementsByClassName:function(){return[]},getElementsByTagName:function(){return[]},createElement:function(){return{setAttribute:Ue,getAttribute:Ue,addEventListener:Ue,removeEventListener:Ue}},body:{appendChild:Ue,removeChild:Ue},documentElement:{scrollTop:0,scrollLeft:0},readyState:"complete",title:"Test Page",referrer:"",cookie:""}},logger:Re},Ne=function(e,t){return _async_to_generator(function(){var n,r,o,a,c,s,u,l,f,d,v,g,_;return _ts_generator(this,function(p){switch(p.label){case 0:return n=t.elb,r=t.command,o=t.window,a=t.document,c=(null==e?void 0:e.settings)||{},s=o||(void 0!==globalThis.window?globalThis.window:void 0),u=a||(void 0!==globalThis.document?globalThis.document:void 0),l=function(){return _object_spread({prefix:"data-elb",pageview:!0,session:!0,elb:"elb",elbLayer:"elbLayer",scope:(arguments.length>1?arguments[1]:void 0)||void 0},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})}(c,u),f={settings:l},d={elb:n,settings:l},s&&u?(!1!==l.elbLayer&&n&&function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.name||"elbLayer",r=t.window||window;if(r){var o=r;o[n]||(o[n]=[]);var i=o[n];i.push=function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];if(oe(r[0])){var i=_to_consumable_array(Array.from(r[0])),a=Array.prototype.push.apply(this,[i]);return re(e,t.prefix,i),a}var c=Array.prototype.push.apply(this,r);return r.forEach(function(n){re(e,t.prefix,n)}),c},Array.isArray(i)&&i.length>0&&te(e,t.prefix,i)}}(n,{name:i(l.elbLayer)?l.elbLayer:"elbLayer",prefix:l.prefix,window:s}),l.session&&n&&(v="boolean"==typeof l.session?{}:l.session,ae(n,v,r)),[4,M(G,d,l)]):[3,2];case 1:p.sent(),function(){if(B(d,l),l.pageview){var e=_sliced_to_array(k(l.prefix||"data-elb",l.scope),2),t=e[0],n=e[1];D(d,"page view",t,"load",n)}}(),i(l.elb)&&l.elb&&(s[l.elb]=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=_sliced_to_array(t,6),o=r[0],i=r[1],a=r[2],c=r[3],s=r[4],u=r[5];return D(d,o,i,a,c,s,u)}),p.label=2;case 2:return g=function(e,t){return _async_to_generator(function(){var o,i,a,c;return _ts_generator(this,function(f){switch(e){case"consent":l.session&&t&&n&&(o="boolean"==typeof l.session?{}:l.session,ae(n,o,r));break;case"session":case"ready":default:break;case"run":u&&s&&(B(d,l),l.pageview&&(i=_sliced_to_array(k(l.prefix||"data-elb",l.scope),2),a=i[0],c=i[1],D(d,"page view",a,"load",c)))}return[2]})})()},_=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=_sliced_to_array(t,6),o=r[0],i=r[1],a=r[2],c=r[3],s=r[4],u=r[5];return D(d,o,i,a,c,s,u)},[2,{type:"browser",config:f,push:_,destroy:function(){return _async_to_generator(function(){return _ts_generator(this,function(e){return u&&N(l.scope||u),[2]})})()},on:g}]}})})()},De=Ne;return Ie=ve,function(e,t,n,r){if(t&&"object"===(void 0===t?"undefined":_type_of(t))||"function"==typeof t){var o=!0,i=!1,a=void 0;try{for(var c,s=function(){var o=c.value;fe.call(e,o)||o===n||se(e,o,{get:function(){return t[o]},enumerable:!(r=ue(t,o))||r.enumerable})},u=le(t)[Symbol.iterator]();!(o=(c=u.next()).done);o=!0)s()}catch(e){i=!0,a=e}finally{try{o||null==u.return||u.return()}finally{if(i)throw a}}}return e}(se({},"__esModule",{value:!0}),Ie)}();
|
|
1
|
+
"use strict";function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _array_with_holes(e){if(Array.isArray(e))return e}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function asyncGeneratorStep(e,t,n,r,o,i,a){try{var c=e[i](a),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(r,o)}function _async_to_generator(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){asyncGeneratorStep(i,r,o,a,c,"next",e)}function c(e){asyncGeneratorStep(i,r,o,a,c,"throw",e)}a(void 0)})}}function _define_property(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _instanceof(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function _iterable_to_array(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}}function _non_iterable_rest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){_define_property(e,t,n[t])})}return e}function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _to_array(e){return _array_with_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_rest()}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _type_of(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_array_like_to_array(e,t):void 0}}function _ts_generator(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(a,"next",{value:s(0)}),c(a,"throw",{value:s(1)}),c(a,"return",{value:s(2)}),"function"==typeof Symbol&&c(a,Symbol.iterator,{value:function(){return this}}),a;function s(c){return function(s){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,s])}}}var Source=function(){var e=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};n=_object_spread({},me,n);var r=Object.entries(t).reduce(function(t,r){var o=_sliced_to_array(r,2),i=o[0],a=o[1],c=e[i];return n.merge&&Array.isArray(c)&&Array.isArray(a)?t[i]=a.reduce(function(e,t){return e.includes(t)?e:_to_consumable_array(e).concat([t])},_to_consumable_array(c)):(n.extend||i in e)&&(t[i]=a),t},{});return n.shallow?_object_spread({},e,r):(Object.assign(e,r),e)},t=function(e){return Array.isArray(e)},n=function(e){return void 0!==e},r=function(e){return e===document||_instanceof(e,Element)},o=function(e){return"object"==(void 0===e?"undefined":_type_of(e))&&null!==e&&!t(e)&&"[object Object]"===Object.prototype.toString.call(e)},i=function(e){return"string"==typeof e},a=function(e){if("true"===e)return!0;if("false"===e)return!1;var t=Number(e);return e==t&&""!==e?t:String(e)},c=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:6,t="";t.length<e;)t+=(36*Math.random()|0).toString(36);return t},s=function(e,t,n){return function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];try{return e.apply(void 0,_to_consumable_array(o))}catch(e){if(!t)return;return t(e)}finally{null==n||n()}}},u=function(e){return e?e.trim().replace(/^'|'$/g,"").trim():""},l=function(e,t){return(e.getAttribute(t)||"").trim()},f=function(e){var t,n=getComputedStyle(e);if("none"===n.display)return!1;if("visible"!==n.visibility)return!1;if(n.opacity&&Number(n.opacity)<.1)return!1;var r=window.innerHeight,o=e.getBoundingClientRect(),i=o.height,a=o.y,c=a+i,s={x:o.x+e.offsetWidth/2,y:o.y+e.offsetHeight/2};if(i<=r){if(e.offsetWidth+o.width===0||e.offsetHeight+o.height===0)return!1;if(s.x<0)return!1;if(s.x>(document.documentElement.clientWidth||window.innerWidth))return!1;if(s.y<0)return!1;if(s.y>(document.documentElement.clientHeight||window.innerHeight))return!1;t=document.elementFromPoint(s.x,s.y)}else{var u=r/2;if(a<0&&c<u)return!1;if(c>r&&a>u)return!1;t=document.elementFromPoint(s.x,r/2)}if(t)do{if(t===e)return!0}while(t=t.parentElement);return!1},d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.cb,o=e.consent,i=e.collector,a=e.storage;if(!o)return v((a?_:y)(e),i,r);var c,s,u,l=(c=e,s=r,function(e,r){if(!n(u)||u!==(null==e?void 0:e.group)){u=null==e?void 0:e.group;var o=function(){return y(c)};return c.consent&&function(e){var t=_object_spread({},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}),n={},r=void 0===e;return Object.keys(t).forEach(function(o){t[o]&&(n[o]=!0,e&&e[o]&&(r=!0))}),!!r&&n}((t(c.consent)?c.consent:[c.consent]).reduce(function(e,t){return _object_spread_props(_object_spread({},e),_define_property({},t,!0))},{}),r)&&(o=function(){return _(c)}),v(o(),e,s)}}),f=(t(o)?o:[o]).reduce(function(e,t){return _object_spread_props(_object_spread({},e),_define_property({},t,l))},{});i?i.command("on","consent",f):he("walker on","consent",f)},v=function(e,t,n){return!1===n?e:(n||(n=we),n(e,t,we))},g=function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ye.Utils.Storage.Session;function o(e){try{return JSON.parse(e||"")}catch(r){var t=1,n="";return e&&(t=0,n=e),{e:t,v:n}}}switch(r){case ye.Utils.Storage.Cookie:var i;t=decodeURIComponent((null===(i=document.cookie.split("; ").find(function(t){return t.startsWith(e+"=")}))||void 0===i?void 0:i.split("=")[1])||"");break;case ye.Utils.Storage.Local:n=o(window.localStorage.getItem(e));break;case ye.Utils.Storage.Session:n=o(window.sessionStorage.getItem(e))}return n&&(t=n.v,0!=n.e&&n.e<Date.now()&&(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ye.Utils.Storage.Session;switch(t){case ye.Utils.Storage.Cookie:p(e,"",0,t);break;case ye.Utils.Storage.Local:window.localStorage.removeItem(e);break;case ye.Utils.Storage.Session:window.sessionStorage.removeItem(e)}}(e,r),t="")),a(t||"")},p=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:30,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:ye.Utils.Storage.Session,o=arguments.length>4?arguments[4]:void 0,i={e:Date.now()+6e4*n,v:String(t)},a=JSON.stringify(i);switch(r){case ye.Utils.Storage.Cookie:t="object"==(void 0===t?"undefined":_type_of(t))?JSON.stringify(t):t;var c="".concat(e,"=").concat(encodeURIComponent(t),"; max-age=").concat(60*n,"; path=/; SameSite=Lax; secure");o&&(c+="; domain="+o),document.cookie=c;break;case ye.Utils.Storage.Local:window.localStorage.setItem(e,a);break;case ye.Utils.Storage.Session:window.sessionStorage.setItem(e,a)}return g(e,r)},_=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Date.now(),n=e.length,r=void 0===n?30:n,o=e.deviceKey,i=void 0===o?"elbDeviceId":o,a=e.deviceStorage,u=void 0===a?"local":a,l=e.deviceAge,f=void 0===l?30:l,d=e.sessionKey,v=void 0===d?"elbSessionId":d,_=e.sessionStorage,m=void 0===_?"local":_,b=e.pulse,h=void 0!==b&&b,w=y(e),S=!1,k=s(function(e,t,n){var r=g(e,n);return r||(r=c(8),p(e,r,1440*t,n)),String(r)})(i,f,u),O=s(function(e,n){var o=JSON.parse(String(g(e,n)));return h||(o.isNew=!1,w.marketing&&(Object.assign(o,w),S=!0),S||o.updated+6e4*r<t?(delete o.id,delete o.referrer,o.start=t,o.count++,o.runs=1,S=!0):o.runs++),o},function(){S=!0})(v,m)||{},j={id:c(12),start:t,isNew:!0,count:1,runs:1},x=Object.assign(j,w,O,{device:k},{isStart:S,storage:!0,updated:t},e.data);return p(v,JSON.stringify(x),2*r,m),x},y=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.isStart||!1,r={isStart:n,storage:!1};if(!1===t.isStart)return r;if(!n&&"navigate"!==_sliced_to_array(performance.getEntriesByType("navigation"),1)[0].type)return r;var o=new URL(t.url||window.location.href),i=t.referrer||document.referrer,a=i&&new URL(i).hostname,s=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r="clickId",o={},i={utm_campaign:"campaign",utm_content:"content",utm_medium:"medium",utm_source:"source",utm_term:"term",dclid:r,fbclid:r,gclid:r,msclkid:r,ttclid:r,twclid:r,igshid:r,sclid:r};return Object.entries(e(i,n)).forEach(function(e){var n=_sliced_to_array(e,2),i=n[0],a=n[1],c=t.searchParams.get(i);c&&(a===r&&(a=i,o[r]=i),o[a]=c)}),o}(o,t.parameters);if(Object.keys(s).length&&(s.marketing||(s.marketing=!0),n=!0),!n){var u=t.domains||[];u.push(o.hostname),n=!u.includes(a)}return n?Object.assign({isStart:n,storage:!1,start:Date.now(),id:c(12),referrer:a},s,t.data):r},m=function(e,t){return e+(t=null!=t?(!(arguments.length>2&&void 0!==arguments[2])||arguments[2]?"-":"")+t:"")},b=function(e,n,r){var o=l(n,m(e,r,!(arguments.length>3&&void 0!==arguments[3])||arguments[3]))||"";return L(o).reduce(function(e,r){var o=_sliced_to_array(P(r),2),i=o[0],c=o[1];if(!i)return e;if(c||(i.endsWith(":")&&(i=i.slice(0,-1)),c=""),c.startsWith("#")){c=c.slice(1);try{var s=n[c];s||"selected"!==c||(s=n.options[n.selectedIndex].text),c=String(s)}catch(e){c=""}}return i.endsWith("[]")?(i=i.slice(0,-2),t(e[i])||(e[i]=[]),e[i].push(a(c))):e[i]=a(c),e},{})},h=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:be.Commands.Prefix,r=e||document.body;if(!r)return[];var o=[],i=be.Commands.Action,a="[".concat(m(n,i,!1),"]"),c=function(e){Object.keys(b(n,e,i,!1)).forEach(function(t){o=o.concat(w(e,t,n))})};return r!==document&&(null===(t=r.matches)||void 0===t?void 0:t.call(r,a))&&c(r),A(r,a,c),o},w=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:be.Commands.Prefix,r=[],o=C(n,e,t),i=o.actions,a=o.nearestOnly;return i.length?(i.forEach(function(o){var i=L(o.actionParams||"",",").reduce(function(e,t){return e[u(t)]=!0,e},{}),c=j(n,e,i,a);if(!c.length){var s="page",l="[".concat(m(n,s),"]"),f=_sliced_to_array(E(e,l,n,s),2),d=f[0],v=f[1];c.push({entity:s,data:d,nested:[],context:v})}c.forEach(function(e){r.push({entity:e.entity,action:o.action,data:e.data,trigger:t,context:e.context,nested:e.nested})})}),r):r},S=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:be.Commands.Prefix,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,r=m(t,be.Commands.Globals,!1),o="[".concat(r,"]"),i={};return A(n,o,function(n){i=e(i,b(t,n,be.Commands.Globals,!1))}),i},k=function(e,t){var n=window.location,r="page",o=t===document?document.body:t,i=_sliced_to_array(E(o,"[".concat(m(e,r),"]"),e,r),2),a=i[0],c=i[1];return a.domain=n.hostname,a.title=document.title,a.referrer=document.referrer,n.search&&(a.search=n.search),n.hash&&(a.hash=n.hash),[a,c]},O=function(e){var t={};return L(e).forEach(function(e){var n=_sliced_to_array(P(e),2),r=n[0],o=n[1],i=_sliced_to_array(I(r),2),a=i[0],c=i[1];if(a){var s=_sliced_to_array(I(o||""),2),u=s[0],l=s[1];u=u||a,t[a]||(t[a]=[]),t[a].push({trigger:a,triggerParams:c,action:u,actionParams:l})}}),t},j=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=[],i=t;for(n=0!==Object.keys(n||{}).length?n:void 0;i;){var a=Se(e,i,t,n);if(a&&(o.push(a),r))break;i=x(e,i)}return o},x=function(e,t){var n=m(e,be.Commands.Link,!1);if(t.matches("[".concat(n,"]"))){var r=_sliced_to_array(P(l(t,n)),2),o=r[0];if("child"===r[1])return document.querySelector("[".concat(n,'="').concat(o,':parent"]'))}return!t.parentElement&&t.getRootNode&&_instanceof(t.getRootNode(),ShadowRoot)?t.getRootNode().host:t.parentElement},E=function(t,n,r,o){for(var i={},a={},c=t,s="[".concat(m(r,be.Commands.Context,!1),"]"),u=0;c;)c.matches(n)&&(i=e(b(r,c,""),i),i=e(b(r,c,o),i)),c.matches(s)&&(Object.entries(b(r,c,be.Commands.Context,!1)).forEach(function(e){var t=_sliced_to_array(e,2),n=t[0],r=t[1];r&&!a[n]&&(a[n]=[r,u])}),++u),c=x(r,c);return[i,a]},A=function(e,t,n){e.querySelectorAll(t).forEach(n)},C=function(e,t,n){for(var r=t;r;){var o=l(r,m(e,be.Commands.Actions,!1));if(o){var i=O(o);if(i[n])return{actions:i[n],nearestOnly:!1}}var a=l(r,m(e,be.Commands.Action,!1));if(a){var c=O(a);if(c[n]||"click"!==n)return{actions:c[n]||[],nearestOnly:!0}}r=x(e,r)}return{actions:[],nearestOnly:!1}},L=function(e){if(!e)return[];var t=new RegExp("(?:[^".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:";","']+|'[^']*')+"),"ig");return e.match(t)||[]},P=function(e){var t=_sliced_to_array(e.split(/:(.+)/,2),2),n=t[0],r=t[1];return[u(n),u(r)]},I=function(e){var t=_sliced_to_array(e.split("(",2),2),n=t[0],r=t[1];return[n,r?r.slice(0,-1):""]},U=function(e){var t=Date.now(),n=je.get(e);return(!n||t-n.lastChecked>500)&&(n={isVisible:f(e),lastChecked:t},je.set(e,n)),n.isVisible},W=function(e){if(window.IntersectionObserver)return s(function(){return new window.IntersectionObserver(function(t){t.forEach(function(t){R(e,t)})},{rootMargin:"0px",threshold:[0,.5]})},function(){})()},R=function(e,t){var n,r=t.target,o=xe.get(e);if(o){var i=o.timers.get(r);if(t.intersectionRatio>0){var a=Date.now(),c=Oe.get(r);if((!c||a-c.lastChecked>1e3)&&(c={isLarge:r.offsetHeight>window.innerHeight,lastChecked:a},Oe.set(r,c)),t.intersectionRatio>=.5||c.isLarge&&U(r)){var s,u=null===(s=o.elementConfigs)||void 0===s?void 0:s.get(r);if((null==u?void 0:u.multiple)&&u.blocked)return;if(!i){var l=window.setTimeout(function(){return _async_to_generator(function(){var t,n,i,a;return _ts_generator(this,function(c){switch(c.label){case 0:return U(r)?(null==(i=null===(t=o.elementConfigs)||void 0===t?void 0:t.get(r))?void 0:i.context)?[4,V(i.context,r,i.trigger)]:[3,2]:[3,3];case 1:c.sent(),c.label=2;case 2:(null==(a=null===(n=o.elementConfigs)||void 0===n?void 0:n.get(r))?void 0:a.multiple)?a.blocked=!0:function(e,t){var n=xe.get(e);if(n){n.observer&&n.observer.unobserve(t);var r=n.timers.get(t);r&&(clearTimeout(r),n.timers.delete(t)),Oe.delete(t),je.delete(t)}}(e,r),c.label=3;case 3:return[2]}})})()},o.duration);o.timers.set(r,l)}return}}i&&(clearTimeout(i),o.timers.delete(r));var f=null===(n=o.elementConfigs)||void 0===n?void 0:n.get(r);(null==f?void 0:f.multiple)&&(f.blocked=!1)}},T=function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{multiple:!1},o=e.settings.scope||document,i=xe.get(o);(null==i?void 0:i.observer)&&t&&(i.elementConfigs||(i.elementConfigs=new WeakMap),i.elementConfigs.set(t,{multiple:null!==(n=r.multiple)&&void 0!==n&&n,blocked:!1,context:e,trigger:r.multiple?"visible":"impression"}),i.observer.observe(t))},N=function(e){if(e){var t=xe.get(e);t&&(t.observer&&t.observer.disconnect(),xe.delete(e))}},D=function(e,t,n,a,c,s,u){var l=e.elb,f=e.settings;if(i(t)&&t.startsWith("walker "))return l(t,n);if(o(t)){var d=t;return d.source||(d.source=H()),d.globals||(d.globals=S(f.prefix,f.scope||document)),l(d)}var v,g=_sliced_to_array(String(o(t)?t.name:t).split(" "),1)[0],p=o(n)?n:{},_={},y=!1;if(r(n)&&(v=n,y=!0),r(c)?v=c:o(c)&&Object.keys(c).length&&(_=c),v){var m=j(f.prefix||"data-elb",v).find(function(e){return e.entity===g});m&&(y&&(p=m.data),_=m.context)}"page"===g&&(p.id=p.id||window.location.pathname);var b=S(f.prefix,f.scope);return l({name:String(t||""),data:p,context:_,globals:b,nested:s,custom:u,trigger:i(a)?a:"",source:H()})},H=function(){return{type:"browser",id:window.location.href,previous_id:document.referrer}},M=function(e,t,n){return _async_to_generator(function(){var r;return _ts_generator(this,function(o){return r=function(){e(t,n)},"loading"!==document.readyState?r():document.addEventListener("DOMContentLoaded",r),[2]})})()},G=function(e,t){t.scope&&q(e,t)},B=function(e,t){t.scope&&J(e,t)},q=function(e,t){var n=t.scope;n&&(n.addEventListener("click",s(function(t){K.call(this,e,t)})),n.addEventListener("submit",s(function(t){Q.call(this,e,t)})))},J=function(e,t){var n=t.scope;Ee=[];var r=n||document;N(r),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;xe.has(e)||xe.set(e,{observer:W(e),timers:new WeakMap,duration:t})}(r,1e3);var o=m(t.prefix,be.Commands.Action,!1);r!==document&&F(e,r,o,t),r.querySelectorAll("[".concat(o,"]")).forEach(function(n){F(e,n,o,t)}),Ee.length&&ee(e,r,t)},V=function(e,t,n){return _async_to_generator(function(){var r;return _ts_generator(this,function(o){return r=w(t,n,e.settings.prefix),[2,Promise.all(r.map(function(t){return D(e,_object_spread_props(_object_spread({name:"".concat(t.entity," ").concat(t.action)},t),{trigger:n}))}))]})})()},F=function(e,t,n,r){var o=l(t,n);o&&Object.values(O(o)).forEach(function(n){return n.forEach(function(n){switch(n.trigger){case Ae.Hover:Y(e,t);break;case Ae.Load:X(e,t);break;case Ae.Pulse:$(e,t,n.triggerParams);break;case Ae.Scroll:z(t,n.triggerParams);break;case Ae.Impression:T(e,t);break;case Ae.Visible:T(e,t,{multiple:!0});break;case Ae.Wait:Z(e,t,n.triggerParams)}})})},K=function(e,t){V(e,t.target,Ae.Click)},Y=function(e,t){t.addEventListener("mouseenter",s(function(t){_instanceof(t.target,Element)&&V(e,t.target,Ae.Hover)}))},X=function(e,t){V(e,t,Ae.Load)},$=function(e,t){setInterval(function(){document.hidden||V(e,t,Ae.Pulse)},parseInt((arguments.length>2&&void 0!==arguments[2]?arguments[2]:"")||"")||15e3)},z=function(e){var t=parseInt((arguments.length>1&&void 0!==arguments[1]?arguments[1]:"")||"")||50;t<0||t>100||Ee.push([e,t])},Q=function(e,t){t.target&&V(e,t.target,Ae.Submit)},Z=function(e,t){setTimeout(function(){return V(e,t,Ae.Wait)},parseInt((arguments.length>2&&void 0!==arguments[2]?arguments[2]:"")||"")||15e3)},ee=function(e,t,n){var r=function(e,t){return e.filter(function(e){var n=_sliced_to_array(e,2),r=n[0],o=n[1],i=window.scrollY+window.innerHeight,a=r.offsetTop;if(i<a)return!0;var c=r.clientHeight;return!(100*(1-(a+c-i)/(c||1))>=o)||(V(t,r,Ae.Scroll),!1)})};ke||(ke=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3,n=null;return function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];if(null===n)return n=setTimeout(function(){n=null},t),e.apply(void 0,_to_consumable_array(o))}}(function(){Ee=r.call(t,Ee,e)}),t.addEventListener("scroll",ke))},te=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"data-elb",n=arguments.length>2?arguments[2]:void 0;ne(e,t,n,!0),ne(e,t,n,!1),n.length=0},ne=function(e,t,n,r){var a=[],c=!0;n.forEach(function(e){var t=oe(e)?_to_consumable_array(Array.from(e)):ie(e)?Array.from(e):[e];if((!Array.isArray(t)||0!==t.length)&&(!Array.isArray(t)||1!==t.length||t[0])){var n=t[0],s=!o(n)&&i(n)&&n.startsWith("walker ");if(o(n)){if("object"===(void 0===n?"undefined":_type_of(n))&&0===Object.keys(n).length)return}else{var u=Array.from(t);if(!i(u[0])||""===u[0].trim())return;c&&"walker run"===u[0]&&(c=!1)}(r&&s||!r&&!s)&&a.push(t)}}),a.forEach(function(n){re(e,t,n)})},re=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"data-elb",n=arguments.length>2?arguments[2]:void 0;s(function(){if(Array.isArray(n)){var r=_to_array(n),o=r[0],a=r.slice(1);if(!o||i(o)&&""===o.trim())return;if(i(o)&&o.startsWith("walker "))return void e(o,a[0]);D.apply(void 0,[{elb:e,settings:{prefix:t,scope:document,pageview:!1,session:!1,elb:"",elbLayer:!1}},o].concat(_to_consumable_array(a)))}else if(n&&"object"===(void 0===n?"undefined":_type_of(n))){if(0===Object.keys(n).length)return;e(n)}},function(){})()},oe=function(e){return null!=e&&"object"===(void 0===e?"undefined":_type_of(e))&&"[object Arguments]"===Object.prototype.toString.call(e)},ie=function(e){return null!=e&&"object"===(void 0===e?"undefined":_type_of(e))&&"length"in e&&"number"==typeof e.length},ae=function(e){var t={push:e,group:void 0,command:arguments.length>2?arguments[2]:void 0};return d(_object_spread_props(_object_spread({},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}),{collector:t}))},ce=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).prefix||"data-elb";return function(t){var r=void 0,o=t,a={},c={},s={},u={},l={},f={};function d(e){return Object.entries(e).map(function(e){var t=_sliced_to_array(e,2),r=t[0],o=t[1];return"".concat(r,":").concat(function(e){if(!n(e)||null===e)return"undefined";var t=String(e);return(t=(t=(t=t.replace(/\\/g,"\\\\")).replace(/;/g,"\\;")).replace(/:/g,"\\:")).replace(/'/g,"\\'")}(o))}).join(";")}var v={entity:function(e){return r=e,o=e,v},data:function(e,t){var n=null!=o?o:"";return a[n]||(a[n]={}),i(e)?a[n][e]=t:Object.assign(a[n],e),v},action:function(e,t){if(i(e))if(n(t))c[e]=t;else if(e.includes(":")){var r=_sliced_to_array(e.split(":",2),2),o=r[0],a=r[1];c[o]=a}else c[e]=e;else Object.assign(c,e);return v},actions:function(e,t){if(i(e))if(n(t))s[e]=t;else if(e.includes(":")){var r=_sliced_to_array(e.split(":",2),2),o=r[0],a=r[1];s[o]=a}else s[e]=e;else Object.assign(s,e);return v},context:function(e,t){return i(e)?u[e]=t:Object.assign(u,e),v},globals:function(e,t){return i(e)?l[e]=t:Object.assign(l,e),v},link:function(e,t){return i(e)?f[e]=t:Object.assign(f,e),v},get:function(){var t={};return r&&(t[e]=r),Object.entries(a).forEach(function(n){var r=_sliced_to_array(n,2),o=r[0],i=r[1];if(Object.keys(i).length>0){var a=o?"".concat(e,"-").concat(o):"".concat(e,"-");t[a]=d(i)}}),Object.keys(c).length>0&&(t["".concat(e,"action")]=d(c)),Object.keys(s).length>0&&(t["".concat(e,"actions")]=d(s)),Object.keys(u).length>0&&(t["".concat(e,"context")]=d(u)),Object.keys(l).length>0&&(t["".concat(e,"globals")]=d(l)),Object.keys(f).length>0&&(t["".concat(e,"link")]=d(f)),t}};return v}},se=Object.defineProperty,ue=Object.getOwnPropertyDescriptor,le=Object.getOwnPropertyNames,fe=Object.prototype.hasOwnProperty,de=function(e,t){for(var n in t)se(e,n,{get:t[n],enumerable:!0})},ve={};de(ve,{SourceBrowser:function(){return Ce},createTagger:function(){return ce},default:function(){return De},examples:function(){return Le},getAllEvents:function(){return h},getElbAttributeName:function(){return m},getElbValues:function(){return b},getEvents:function(){return w},getGlobals:function(){return S},sourceBrowser:function(){return Ne}});var ge=Object.defineProperty;!function(e,t){for(var n in t)ge(e,n,{get:t[n],enumerable:!0})}({},{Level:function(){return _e}});var pe,_e=((pe=_e||{})[pe.ERROR=0]="ERROR",pe[pe.INFO=1]="INFO",pe[pe.DEBUG=2]="DEBUG",pe),ye={Utils:{Storage:{Local:"local",Session:"session",Cookie:"cookie"}}},me={merge:!0,shallow:!0,extend:!0},be={Commands:{Action:"action",Actions:"actions",Config:"config",Consent:"consent",Context:"context",Custom:"custom",Destination:"destination",Elb:"elb",Globals:"globals",Hook:"hook",Init:"init",Link:"link",On:"on",Prefix:"data-elb",Ready:"ready",Run:"run",Session:"session",User:"user",Walker:"walker"},Utils:{Storage:{Cookie:"cookie",Local:"local",Session:"session"}}},he=function(){var e=window;(e.elbLayer=e.elbLayer||[]).push(arguments)},we=function(e,t){var n={};return e.id&&(n.session=e.id),e.storage&&e.device&&(n.device=e.device),t?t.command("user",n):he("walker user",n),e.isStart&&(t?t.push({name:"session start",data:e}):he({name:"session start",data:e})),e};function Se(t,n,r,o){var i=l(n,m(t));if(!i||o&&!o[i])return null;var a=[n],c="[".concat(m(t,i),"],[").concat(m(t,""),"]"),s=m(t,be.Commands.Link,!1),u={},f=[],d=_sliced_to_array(E(r||n,c,t,i),2),v=d[0],g=d[1];A(n,"[".concat(s,"]"),function(e){var n=_sliced_to_array(P(l(e,s)),2),r=n[0];"parent"===n[1]&&A(document.body,"[".concat(s,'="').concat(r,':child"]'),function(e){a.push(e);var n=Se(t,e);n&&f.push(n)})});var p=[];a.forEach(function(e){e.matches(c)&&p.push(e),A(e,c,function(e){return p.push(e)})});var _={};return p.forEach(function(n){_=e(_,b(t,n,"")),u=e(u,b(t,n,i))}),u=e(e(_,u),v),a.forEach(function(e){A(e,"[".concat(m(t),"]"),function(e){var n=Se(t,e);n&&f.push(n)})}),{entity:i,data:u,context:g,nested:f}}var ke,Oe=new WeakMap,je=new WeakMap,xe=new WeakMap,Ee=[],Ae={Click:"click",Custom:"custom",Hover:"hover",Load:"load",Pulse:"pulse",Scroll:"scroll",Submit:"submit",Impression:"impression",Visible:"visible",Wait:"wait"},Ce={},Le={};de(Le,{env:function(){return Pe}});var Pe={};de(Pe,{push:function(){return Te}});var Ie,Ue=function(){},We=function(){return function(){return Promise.resolve({ok:!0,successful:[],queued:[],failed:[]})}},Re={error:Ue,info:Ue,debug:Ue,throw:function(e){throw"string"==typeof e?new Error(e):e},scope:function(){return Re}},Te={get push(){return We()},get command(){return We()},get elb(){return We()},get window(){return{addEventListener:Ue,removeEventListener:Ue,location:{href:"https://example.com/page",pathname:"/page",search:"?query=test",hash:"#section",host:"example.com",hostname:"example.com",origin:"https://example.com",protocol:"https:"},document:{},navigator:{language:"en-US",userAgent:"Mozilla/5.0 (Test)"},screen:{width:1920,height:1080},innerWidth:1920,innerHeight:1080,pageXOffset:0,pageYOffset:0,scrollX:0,scrollY:0}},get document(){return{addEventListener:Ue,removeEventListener:Ue,querySelector:Ue,querySelectorAll:function(){return[]},getElementById:Ue,getElementsByClassName:function(){return[]},getElementsByTagName:function(){return[]},createElement:function(){return{setAttribute:Ue,getAttribute:Ue,addEventListener:Ue,removeEventListener:Ue}},body:{appendChild:Ue,removeChild:Ue},documentElement:{scrollTop:0,scrollLeft:0},readyState:"complete",title:"Test Page",referrer:"",cookie:""}},logger:Re},Ne=function(e,t){return _async_to_generator(function(){var n,r,o,a,c,s,u,l,f,d,v,g,p;return _ts_generator(this,function(_){switch(_.label){case 0:return n=t.elb,r=t.command,o=t.window,a=t.document,c=(null==e?void 0:e.settings)||{},s=o||(void 0!==globalThis.window?globalThis.window:void 0),u=a||(void 0!==globalThis.document?globalThis.document:void 0),l=function(){return _object_spread({prefix:"data-elb",pageview:!0,session:!0,elb:"elb",elbLayer:"elbLayer",scope:(arguments.length>1?arguments[1]:void 0)||void 0},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})}(c,u),f={settings:l},d={elb:n,settings:l},s&&u?(!1!==l.elbLayer&&n&&function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.name||"elbLayer",r=t.window||window;if(r){var o=r;o[n]||(o[n]=[]);var i=o[n];i.push=function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];if(oe(r[0])){var i=_to_consumable_array(Array.from(r[0])),a=Array.prototype.push.apply(this,[i]);return re(e,t.prefix,i),a}var c=Array.prototype.push.apply(this,r);return r.forEach(function(n){re(e,t.prefix,n)}),c},Array.isArray(i)&&i.length>0&&te(e,t.prefix,i)}}(n,{name:i(l.elbLayer)?l.elbLayer:"elbLayer",prefix:l.prefix,window:s}),l.session&&n&&(v="boolean"==typeof l.session?{}:l.session,ae(n,v,r)),[4,M(G,d,l)]):[3,2];case 1:_.sent(),function(){if(B(d,l),l.pageview){var e=_sliced_to_array(k(l.prefix||"data-elb",l.scope),2),t=e[0],n=e[1];D(d,"page view",t,"load",n)}}(),i(l.elb)&&l.elb&&(s[l.elb]=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=_sliced_to_array(t,6),o=r[0],i=r[1],a=r[2],c=r[3],s=r[4],u=r[5];return D(d,o,i,a,c,s,u)}),_.label=2;case 2:return g=function(e,t){return _async_to_generator(function(){var o,i,a,c;return _ts_generator(this,function(f){switch(e){case"consent":l.session&&t&&n&&(o="boolean"==typeof l.session?{}:l.session,ae(n,o,r));break;case"session":case"ready":default:break;case"run":u&&s&&(B(d,l),l.pageview&&(i=_sliced_to_array(k(l.prefix||"data-elb",l.scope),2),a=i[0],c=i[1],D(d,"page view",a,"load",c)))}return[2]})})()},p=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=_sliced_to_array(t,6),o=r[0],i=r[1],a=r[2],c=r[3],s=r[4],u=r[5];return D(d,o,i,a,c,s,u)},[2,{type:"browser",config:f,push:p,destroy:function(){return _async_to_generator(function(){return _ts_generator(this,function(e){return u&&N(l.scope||u),[2]})})()},on:g}]}})})()},De=Ne;return Ie=ve,function(e,t,n,r){if(t&&"object"===(void 0===t?"undefined":_type_of(t))||"function"==typeof t){var o=!0,i=!1,a=void 0;try{for(var c,s=function(){var o=c.value;fe.call(e,o)||o===n||se(e,o,{get:function(){return t[o]},enumerable:!(r=ue(t,o))||r.enumerable})},u=le(t)[Symbol.iterator]();!(o=(c=u.next()).done);o=!0)s()}catch(e){i=!0,a=e}finally{try{o||null==u.return||u.return()}finally{if(i)throw a}}}return e}(se({},"__esModule",{value:!0}),Ie)}();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@walkeros/web-source-browser",
|
|
3
3
|
"description": "Browser DOM source for walkerOS",
|
|
4
|
-
"version": "0.5.0",
|
|
4
|
+
"version": "0.5.1-next.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"module": "./dist/index.mjs",
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
"update": "npx npm-check-updates -u && npm update"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@walkeros/collector": "0.5.0",
|
|
34
|
-
"@walkeros/web-core": "0.5.0"
|
|
33
|
+
"@walkeros/collector": "0.5.1-next.0",
|
|
34
|
+
"@walkeros/web-core": "0.5.1-next.0"
|
|
35
35
|
},
|
|
36
36
|
"repository": {
|
|
37
37
|
"url": "git+https://github.com/elbwalker/walkerOS.git",
|