/*!TikTok attaches importance to your privacy and safety. We use this script to control webapi usages and make sure they are within our privacy policy.*/ !function(){"use strict";var e="main_thread",t="out_app",r="cookie_set_by_document",n="cookie_blocked_on_start",a="general_fetch",o="webapi",i="storage_use",l="sw_incompat",c="ready_for_msg",s="force_update_sw",u="frequency",p="cost_time",d="main_thread_ctx",f="network_rule",h="__PNS_RUNTIME_SW_EVENT__",m="__PNS_RUNTIME_SE_ERROR__",v="__PNS_RUNTIME__";function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:k(),r=globalThis[t];return r||(r={pendingEvents:[],pendingConfig:{},pendingListeners:{},errors:[],pushEvent:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,o=arguments.length>3?arguments[3]:void 0;R(r.pendingEvents,{eventName:t,eventDetail:n,source:a,options:o},O)},pushError:function(e){R(r.errors,e,20)},pageContextObservers:[]},globalThis[t]=r),r}function S(){return"undefined"==typeof globalThis}function j(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:k();return S()?null:x(e)}var q=function(e){return e&&"function"==typeof e.then},$=function(e){return function(t){return q(e)?e.then(t):t(e)}};function N(e,t,r){return function(){for(var n=arguments.length,a=new Array(n),o=0;o0){var a,o=(a=Math).max.apply(a,g(Object.keys(r).map(Number)))+1,i=Array.from(b(function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r0){var d=!1,f=!0,h=!1,m=void 0;try{for(var v,y=n[Symbol.iterator]();!(f=(v=y.next()).done);f=!0){var _=v.value;e.startsWith(_)&&(d=!0)}}catch(e){h=!0,m=e}finally{try{f||null==y.return||y.return()}finally{if(h)throw m}}if(!d)return!0}return!1}var ne=["127.0.0.1","localhost"],ae=["is_test_only=1","slardar_heatmap"];function oe(e,t){var r=w(t);if(r){var n=r.search;if(n)for(var a=0;a3&&void 0!==arguments[3])||arguments[3],a=encodeURIComponent(t),o="?"===e[0],i=(o?e.slice(1):e).split("&"),l=!1,c=0;c0||e._blocked||!1}function Se(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:location,t=e.href,r=e.host,n=e.pathname,a=e.search,o=e.hash;return{url:t,host:r,path:n,search:a,hash:o}}function je(){ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ je=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function c(e,t,r,n){var a=t&&t.prototype instanceof p?t:p,o=Object.create(a.prototype),i=new R(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return x()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var l=g(i,r);if(l){if(l===u)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=s(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===u)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var u={};function p(){}function d(){}function f(){}var h={};l(h,a,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(O([])));v&&v!==t&&r.call(v,a)&&(h=v);var y=f.prototype=p.prototype=Object.create(h);function _(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){function n(a,o,i,l){var c=s(e[a],e,o);if("throw"!==c.type){var u=c.arg,p=u.value;return p&&"object"==typeof p&&r.call(p,"__await")?t.resolve(p.__await).then((function(e){n("next",e,i,l)}),(function(e){n("throw",e,i,l)})):t.resolve(p).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,l)}))}l(c.arg)}var a;this._invoke=function(e,r){function o(){return new t((function(t,a){n(e,r,t,a)}))}return a=a?a.then(o,o):o()}}function g(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,g(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=s(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,u;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function O(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var l=r.call(o,"catchLoc"),c=r.call(o,"finallyLoc");if(l&&c){if(this.prev=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),k(r),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;k(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}function qe(e){return qe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qe(e)}function $e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ne(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){l=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(l)throw o}}}}var Je=function(e){return"function"==typeof e},Ve=function(){};var Ye=function(){var e=Object.prototype.hasOwnProperty;return function(t,r){return e.call(t,r)}}(),ze=function(e,t,r){Ye(e,r)&&(t[r]=e[r])};function Xe(e,t){if(!e)return[void 0,e];for(var r,n,a=e;a&&!n;)n=Object.getOwnPropertyDescriptor(a,t),r=a,a=Object.getPrototypeOf(a);return[n,r]}function Ke(e,t,r){try{var n=Me(Xe(e,t),2),a=n[0],o=n[1];if(!(null==a?void 0:a.configurable))return!1;var i={},l=a.set,c=a.get,s=r.set,u=r.get;return l&&s&&(i.set=function(e){s(e)||l.call(this,e)}),c&&u&&(i.get=function(){if(!u())return c.call(this)}),Object.defineProperty(o,t,i),!0}catch(e){}return!1}function Qe(e,t,r,n){try{var a=Me(Xe(e,t),2)[1];if("object"===qe(a)&&a&&Je(a[t])){var o=a[t];a[t]=function(){for(var e=arguments.length,t=new Array(e),a=0;aMath.random()}function et(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=(new Error).stack;return null!==(e=null==r?void 0:r.split("\n").slice(t).map((function(e){return e.trim()})).join("\n"))&&void 0!==e?e:""}function tt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r="";for(var n in t)r+="; ".concat(n),r+="=".concat(t[n].split(";")[0]);document.cookie="".concat(e,"=; expires=").concat(new Date(Date.now()-864e5).toUTCString()).concat(r)}function rt(e){var t=e.split("=").slice(1).join("=");try{'"'===t[0]&&(t=t.slice(1,-1)),t=t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)}catch(e){}return t}function nt(e,t){return function(){if(Math.random()0||t.stackSampleRate&&n.some((function(e){return e.test(l.name)}));l.stack=r?nt(et,c)():void 0,e(l)}),l._sample_rate)()}return l.name===it&&mt().updatePageContext(ut(null!==(o=function(e){var t,r=e.split(";"),n=!1,a=r.shift(),o=a?decodeURIComponent(a.split("=")[1]):void 0,i=Ge(r);try{for(i.s();!(t=i.n()).done;){var l=t.value,c=Me(yt.apply(l).split("=")[0],2),s=c[0],u=c[1];if("max-age"===s&&Number(u)<0)return;"expires"===s&&(n=Date.parse(u)1&&i[e]<=2}));return v};function Mt(e,t){for(var r in t){var n=t[r];if(e[r]!==n)return!1}return!0}var Bt,Wt=Ve,Ft=function(e,t){var r,n=t.apis,a=e.webapiHook,o=e.webapiFreqHook,i=Ht({webapi:n}),l=Ge(n);try{var c=function(){var e=r.value,t=e.sampleRate,n=e.apiType,l=e.apiObj,c=e.block,s=e.blockUrls,u=void 0===s?[]:s,p=e.blockWithCallbackParams,d=e.blockWithCallbackIdx,f=e.apiName,h=e.paramCondition,m=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window,n=Ge(e.split(".").filter(Boolean));try{for(n.s();!(t=n.n()).done;){if(!(r=r[t.value]))return null}}catch(e){n.e(e)}finally{n.f()}return r}(l);if(!m)return"continue";var v=N((function(){for(var r=arguments.length,n=new Array(r),s=0;s0?e.reportRequestEventDetail=t.body.then((function(e){return Object.assign(Object.assign({},t),{body:e})})):t.body.then((function(e){var r=Object.assign(Object.assign({},t),{body:e});a.report(r)})):(null!==(c=null===(l=vt().network.respHeaders)||void 0===l?void 0:l.length)&&void 0!==c?c:0)>0?e.reportRequestEventDetail=t:a.report(t),(null!==(u=null===(s=vt().network.freq)||void 0===s?void 0:s.length)&&void 0!==u?u:0)>0&&o.freq&&(null===(p=a.freq)||void 0===p||p.call(a,t)),f)return f;t._remove_body=-1!==(null!==(d=t._replaced_fields)&&void 0!==d?d:[]).indexOf("method")&&-1!==["GET","HEAD"].indexOf(t.method);var h=function(e,t){if(!t._replaced_fields||0===t._replaced_fields.length)return e;var r=-1!==t._replaced_fields.indexOf("body"),n=function(){var n=Promise.resolve(void 0);return t._remove_body?Promise.resolve(void 0):(r?(t.body=JSON.stringify(t.body),n=Promise.resolve(t.body)):e.headers.get("Content-Type")&&-1===["GET","HEAD"].indexOf(e.method.toUpperCase())&&(n=e.blob()),n)},a=e;if(-1!==t._replaced_fields.indexOf("url")||t._remove_body)a=n().then((function(r){var n,a={method:t.method,headers:new Headers(null!==(n=t.header_map)&&void 0!==n?n:{}),referrer:e.referrer,referrerPolicy:e.referrerPolicy,mode:e.mode,credentials:e.credentials,cache:e.cache,redirect:e.redirect,integrity:e.integrity,keepalive:e.keepalive,signal:e.signal,body:r};return new Request(t.request_url,a)}));else{var o,i={};-1!==t._replaced_fields.indexOf("method")&&(i.method=t.method),-1!==t._replaced_fields.indexOf("header")&&(i.headers=new Headers(null!==(o=t.header_map)&&void 0!==o?o:{})),a=r?n().then((function(t){return i.body=t,new Request(e,i)})):new Request(e,i)}return a}(r,t);return h}))}!function(e){e[e.SW_READY=0]="SW_READY"}(Bt||(Bt={}));var Zt={request_url:"",request_host:"",request_path:"",search:"",method:"",source:pe,_request_time:0,_sample_rate:0,_is_json_body:!1,_replaced_fields:[]};function er(e,t,r){var n=!1,a=function(){n=!0,zt(r.status,r.getResponseHeader.bind(r),t,e)};r.addEventListener("load",a),setTimeout((function(){n||(t(e),r.removeEventListener("load",a))}),5e3)}var tr={};function rr(e){var t=e.OriginalXHR,r=e.rule,n=e.switcher;if(0===Object.keys(tr).length)for(var a in t.prototype)tr[a]={enumerable:!0};return function(){var e=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Te(e,t)}(i,e);var t,a,o=(t=i,a=Pe(),function(){var e,r=Ce(t);if(a){var n=Ce(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return Ie(this,e)});function i(){var e;return $e(this,i),(e=o.call(this)).__pumbaa_status=null,e.__pumbaa_readyState=null,e.__pumbaa_statusText=null,e.__pumbaa_detail=Zt,De(e)instanceof i||Object.setPrototypeOf(De(e),(this instanceof i?this.constructor:void 0).prototype),e.__pumbaa_callbackEnabled=Object.assign({},n.callbackEnabled),e}return Ae(i,[{key:"status",get:function(){return null===this.__pumbaa_status?He(Ce(i.prototype),"status",this):this.__pumbaa_status},set:function(e){this.__pumbaa_status=e}},{key:"statusText",get:function(){return null===this.__pumbaa_statusText?He(Ce(i.prototype),"statusText",this):this.__pumbaa_statusText},set:function(e){this.__pumbaa_statusText=e}},{key:"readyState",get:function(){return null===this.__pumbaa_readyState?He(Ce(i.prototype),"readyState",this):this.__pumbaa_readyState},set:function(e){this.__pumbaa_readyState=e}},{key:"__pumbaa_hookFunc",value:function(e){var t=this;return function(){for(var r,n,a=arguments.length,o=new Array(a),l=0;l0?er(this.__pumbaa_detail,n.callback.report,this):n.callback.report(this.__pumbaa_detail),(null!==(p=null===(u=vt().network.freq)||void 0===u?void 0:u.length)&&void 0!==p?p:0)>0&&this.__pumbaa_callbackEnabled.freq&&(null===(f=(d=n.callback).freq)||void 0===f||f.call(d,this.__pumbaa_detail))}if(Kt(this.__pumbaa_detail)){var L="1"===this.__pumbaa_detail["x-pns-block"]?ce():se();return this.__pumbaa_is_aborted||(this.status=L.status,this.readyState=4,this.statusText=L.statusText,this.__pumbaa_res={headers:Be(L.headers).reduce((function(e,t){var r=Me(t,2),n=r[0],a=r[1];return e[n]=a,e}),{})},W.error("".concat(this.__pumbaa_detail.method," ").concat(this.__pumbaa_detail.request_url," ").concat(this.status," (").concat(this.statusText,")"))),!0}return void 0!==this.__pumbaa_detail._replaced_fields&&-1!==(null===(h=this.__pumbaa_detail._replaced_fields)||void 0===h?void 0:h.indexOf("body"))?(He(Ce(i.prototype),"send",this).call(this,y?JSON.stringify(this.__pumbaa_detail.body):this.__pumbaa_detail.body),!0):(He(Ce(i.prototype),"send",this).call(this,v),!0)}},{key:"__pumbaa_abort",value:function(){this.__pumbaa_is_aborted=!0}}]),i}(t);for(var a in e.prototype)delete tr[a];return Object.defineProperties(e.prototype,tr),e}()}var nr="PerformanceObserver"in window,ar=["xmlhttprequest","fetch","beacon"];function or(e,t){var r=e.switcher.activeInterceptRules.map((function(e){return ve(e)?e:Object.assign(Object.assign({},e),{handlers:e.handlers.filter((function(e){return"report"===e.handler}))})}));t.getEntries().forEach((function(t){if(e.isBufferedEntry||!ar.includes(t.initiatorType)){var n=function(e){var t=w(e.name);if(void 0!==t)return{request_url:t.href,request_host:t.host,request_path:t.pathname,method:"UNKNOWN",source:ue,search:t.search,_request_time:Math.trunc(e.startTime+performance.timeOrigin),initiator_type:e.initiatorType,resp_status:e.responseStatus,_is_json_body:!1,_sample_rate:0}}(t);if(n){n.perf_buf=e.isBufferedEntry;var a=e.switcher.getState(Bt.SW_READY);void 0!==a&&(n.sw_ready="".concat(a));var o,i=Object.assign({},n),l=Ge(r);try{for(l.s();!(o=l.n()).done;){var c=o.value;i=ve(c)?_e(i,c):Gt(i,c)}}catch(e){l.e(e)}finally{l.f()}i=Object.assign(Object.assign(Object.assign({},i),n),{_sample_rate:i._sample_rate}),setTimeout((function(){var r,n,a,o;-1===e.securityPolicyViolationURLs.indexOf(t.name)&&(e.switcher.callback.report(i),(null!==(n=null===(r=vt().network.freq)||void 0===r?void 0:r.length)&&void 0!==n?n:0)>0&&e.switcher.callbackEnabled.freq&&(null===(o=(a=e.switcher.callback).freq)||void 0===o||o.call(a,i)))}),100)}}})),e.isBufferedEntry=!1}var ir,lr,cr,sr=at((function(e){var t={isBufferedEntry:!0,securityPolicyViolationURLs:function(){var e=[];return document.addEventListener("securitypolicyviolation",(function(t){var r=w(t.blockedURI);r&&"report"!==t.disposition&&-1===e.indexOf(r.href)&&(100===e.length&&e.shift(),e.push(r.href))})),e}(),switcher:e},r=nr?new PerformanceObserver((function(e){return or(t,e)})):null;try{null==r||r.observe({type:"resource",buffered:!0})}catch(e){or(t,{getEntries:function(){return performance.getEntriesByType("resource")}}),null==r||r.observe({entryTypes:["resource"]})}})),ur=function(){for(var e=arguments.length,t=new Array(e),r=0;r0){var c=Xt(l.request_url,e.rule.withStack);c&&nt((function(){return l.stack=et(5)}),c.rate)()}var s={params:o,switcher:e,eventDetail:l},u=pr(s),p=Kt(s.eventDetail),d=!p&&(t=cr).call.apply(t,[this].concat(Be(u)));return s.eventDetail.beacon_ret=d,(d||xe(s.eventDetail))&&dr(s),d}}}},{key:"hookFetch",value:function(){var e=this;if(window.fetch){var t=this.callback;null!=ir||(ir=window.fetch),window.fetch=function(){for(var r,n,a=arguments.length,o=new Array(a),i=0;i0){var u=Xt(s.request.url,e.rule.withStack);u&&nt((function(){return s.callstack=et(5)}),u.rate)()}var p=Qt(s);function d(e){var r,n=at((function(e){var r,n,a;if((null!==(n=null===(r=vt().network.respHeaders)||void 0===r?void 0:r.length)&&void 0!==n?n:0)>0){var o=e.status,i=s.reportRequestEventDetail;zt(o,null===(a=e.headers)||void 0===a?void 0:a.get.bind(e.headers),t.report,i)}return e}));return(r=e instanceof Request?ir(e):Promise.resolve(e)).then(n).catch((function(){return r}))}return q(p)?p.then(d):d(p)}}}},{key:"hookXHR",value:function(){null!=lr||(lr=window.XMLHttpRequest);var e=rr({OriginalXHR:lr,rule:this.rule,reporter:this.callback,switcher:this});window.XMLHttpRequest=e}},{key:"initPerformance",value:function(){sr(this)}}],[{key:"getInstance",value:function(){if(null===e._instance){for(var t=arguments.length,r=new Array(t),n=0;n=100&&r.shift(),r.push(e)}}}(),u=s.check,p=s.push,v={report:at((function(r){if(r.source!==ue||!(null==u?void 0:u(r.request_url))){var n=r._sample_rate;nt((function(){return t.pushEvent(a,{eventName:a,eventMetrics:{count:1},eventDetail:r},e,{sample_rate:n})}),n)()}})),freq:o.length>0&&Lt?at(gr(o,t)):void 0},y=new fr(v,r,{freq:o.length>0},mt().pageContext);if(navigator&&"serviceWorker"in navigator){var _=st(),b=_.sw,g=_.sw_version,w=!1;navigator.serviceWorker.addEventListener("message",at((function(r){var n,o,l,c;if(r.data.event===h){var s=r.data.data;if(-1===yr.indexOf(s.eventName))return;if(a===s.eventName){if((null!==(n=s.eventDetail)&&void 0!==n?n:{}).rule_name){null==p||p(null!==(l=null===(o=s.eventDetail)||void 0===o?void 0:o._old_url)&&void 0!==l?l:s.eventDetail.request_url);var u=null!==(c=s.eventDetail._sample_rate)&&void 0!==c?c:i;nt((function(){t.pushEvent(s.eventName,s,e,{sample_rate:u})}),u)()}s.sw_version||br()}w||(w=!0,"string"==typeof b&&"string"==typeof g&&-1===g.split(",").indexOf(s.sw_version)&&setTimeout((function(){var e;navigator.serviceWorker.register((e=b).startsWith("http")?e:"".concat(location.origin).concat(e),{updateViaCache:"none"}),br()}),0))}else r.data.event===m&&r.data.error&&t.pushError(r.data.error)}))),navigator.serviceWorker.ready.then((function(t){var n;y.setState(Bt.SW_READY,1);var a=null!==(n=null==t?void 0:t.active)&&void 0!==n?n:navigator.serviceWorker.controller;(null==a?void 0:a.postMessage)&&([{eventName:c,source:e},{eventName:d,source:e,data:mt().pageContext},{eventName:f,source:e,data:r.intercept}].forEach((function(e){return a.postMessage(e)})),dt((function(t){a.postMessage({eventName:d,source:e,data:t})})))}))}else t.pushEvent(l)},kr=function(e,t){!function(e,t){var r,n=t.listener,a=e.eventHook,o=Ge(n);try{var i=function(){var e=r.value,t=e.type,n=e.sampleRate;switch(t){case"navigation_navigate":"undefined"!=typeof window&&"navigation"in window&&at(nt((function(){window.navigation.addEventListener("navigate",(function(t){var r=new URL(t.destination.url,location.href);r.hostname!==location.hostname&&a({eventRule:e,url:r.href})}))}),n),void 0)();break;case"a_click":at(nt((function(){document.addEventListener("DOMContentLoaded",(function(){document.body.addEventListener("click",(function(t){var r=t.target.closest("a");if(r&&"_self"!==r.target){var n=new URL(r.href,location.href);n.hostname!==location.hostname&&a({eventRule:e,url:n.href})}}))}))}),n),void 0)();break;case"submit_click":at(nt((function(){document.addEventListener("DOMContentLoaded",(function(){document.body.addEventListener("click",(function(t){var r=t.target;if(("BUTTON"===r.tagName&&"submit"===r.type||"INPUT"===r.tagName&&"submit"===r.type)&&r.form&&"_self"!==r.form.target){var n=new URL(r.formAction||r.form.action,location.href);n.hostname!==location.hostname&&a({eventRule:e,url:n.href})}}))}))}),n),void 0)()}};for(o.s();!(r=o.n()).done;)i()}catch(e){o.e(e)}finally{o.f()}}({eventHook:at((function(t){e.pushEvent("event",t)}))},t)};function Rr(e){var t=vt(),r=t.cookie;t.storage;var n=t.webapi,a=t.network,i=t.event,l=void 0===i?{listener:[]}:i;jt(e,r),Ct(e),function(e,t){Ft({webapiHook:at((function(t){e.pushEvent(o,t)})),webapiFreqHook:Lt?at((function(t){e.pushEvent(u,t)})):void 0},t)}(e,n),wr(e,a),kr(e,l)}var Or="__PUMBAA_RUN_FLAG__";try{(function(){if(/ByteLocale/g.test(navigator.userAgent))return!1;var e=!0;return window.Garfish&&(e=window.Garfish.getGlobalObject()===window),!(!e||window[Or]||(window[Or]=1,0))})()&&function(e,r){return function(){var n=Date.now(),a=e.apply(void 0,arguments);return x().pushEvent(p,{metrics:{time:Date.now()-n},categories:{version:"1.0.0.873",runtime_env:t,module:r}}),a}}((function(){if(window.Symbol){var e=x();at(Rr)(e);var t=k(),r=document.createElement("script"),n=document.currentScript,a=n.src,o=n.dataset,i=a.substring(0,a.lastIndexOf("/")),l="".concat(i,"/core.js","?globalName=").concat(t);r.src=l,r.crossOrigin="anonymous",r.async=!0,Object.assign(r.dataset,o),document.head.appendChild(r),document.head.removeChild(r)}}),"loader")()}catch(e){}}();