!function(e,t){var n,i,o,r,a,s,c,u,l,f,d,h,p,g,v,m,_,y=["entityKeys"],b=["entityKeys","wid"];function k(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function E(e,t){if(null==e)return{};var n,i,o=function(e,t){if(null==e)return{};var n,i,o={},r=Object.keys(e);for(i=0;i=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function S(e){for(var t=1;t=0;--o){var r=this.tryEntries[o],a=r.completion;if("root"===r.tryLoc)return i("end");if(r.tryLoc<=this.prev){var s=n.call(r,"catchLoc"),c=n.call(r,"finallyLoc");if(s&&c){if(this.prev=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),E(n),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if("throw"===i.type){var o=i.arg;E(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:S(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},e}function O(e,t,n,i,o,r,a){try{var s=e[r](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(i,o)}function M(e){return function(){var t=this,n=arguments;return new Promise((function(i,o){var r=e.apply(t,n);function a(e){O(r,i,o,a,s,"next",e)}function s(e){O(r,i,o,a,s,"throw",e)}a(void 0)}))}}function z(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&&j(e,t)}function I(e){var t=U();return function(){var n,i=L(e);if(t){var o=L(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return P(this,n)}}function P(e,t){if(t&&("object"===J(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return B(e)}function B(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function N(e){var t="function"==typeof Map?new Map:void 0;return N=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,i)}function i(){return G(e,arguments,L(this).constructor)}return i.prototype=Object.create(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),j(i,e)},N(e)}function G(e,t,n){return G=U()?Reflect.construct.bind():function(e,t,n){var i=[null];i.push.apply(i,t);var o=new(Function.bind.apply(e,i));return n&&j(o,n.prototype),o},G.apply(null,arguments)}function U(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function j(e,t){return j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},j(e,t)}function L(e){return L=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},L(e)}function V(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=F(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}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 r,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,r=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}function F(e,t){if(e){if("string"==typeof e)return K(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(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?K(e,t):void 0}}function K(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n=0;s--)(o=e[s])&&(a=(r<3?o(a):r>3?o(t,n,a):o(t,n))||a);return r>3&&a&&Object.defineProperty(t,n,a),a /** * @license * Copyright 2019 Google LLC * SPDX-License-Identifier: BSD-3-Clause */}void 0===Element.prototype.getAttributeNames&&(Element.prototype.getAttributeNames=function(){for(var e=this.attributes,t=e.length,n=new Array(t),i=0;i>>0,1)}},{key:"_$Eg",value:function(){var e=this;this.constructor.elementProperties.forEach((function(t,n){e.hasOwnProperty(n)&&(e._$Ei.set(n,e[n]),delete e[n])}))}},{key:"createRenderRoot",value:function(){var e,t=null!==(e=this.shadowRoot)&&void 0!==e?e:this.attachShadow(this.constructor.shadowRootOptions);return function(e,t){Q?e.adoptedStyleSheets=t.map((function(e){return e instanceof CSSStyleSheet?e:e.styleSheet})):t.forEach((function(t){var n=document.createElement("style"),i=Z.litNonce;void 0!==i&&n.setAttribute("nonce",i),n.textContent=t.cssText,e.appendChild(n)}))}(t,this.constructor.elementStyles),t}},{key:"connectedCallback",value:function(){var e;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(e=this._$ES)||void 0===e||e.forEach((function(e){var t;return null===(t=e.hostConnected)||void 0===t?void 0:t.call(e)}))}},{key:"enableUpdating",value:function(e){}},{key:"disconnectedCallback",value:function(){var e;null===(e=this._$ES)||void 0===e||e.forEach((function(e){var t;return null===(t=e.hostDisconnected)||void 0===t?void 0:t.call(e)}))}},{key:"attributeChangedCallback",value:function(e,t,n){this._$AK(e,n)}},{key:"_$EO",value:function(e,t){var n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:fe,o=this.constructor._$Ep(e,i);if(void 0!==o&&!0===i.reflect){var r=(void 0!==(null===(n=i.converter)||void 0===n?void 0:n.toAttribute)?i.converter:ue).toAttribute(t,i.type);this._$El=e,null==r?this.removeAttribute(o):this.setAttribute(o,r),this._$El=null}}},{key:"_$AK",value:function(e,t){var n,i=this.constructor,o=i._$Ev.get(e);if(void 0!==o&&this._$El!==o){var r=i.getPropertyOptions(o),a="function"==typeof r.converter?{fromAttribute:r.converter}:void 0!==(null===(n=r.converter)||void 0===n?void 0:n.fromAttribute)?r.converter:ue;this._$El=o,this[o]=a.fromAttribute(t,r.type),this._$El=null}}},{key:"requestUpdate",value:function(e,t,n){var i=!0;void 0!==e&&(((n=n||this.constructor.getPropertyOptions(e)).hasChanged||le)(this[e],t)?(this._$AL.has(e)||this._$AL.set(e,t),!0===n.reflect&&this._$El!==e&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(e,n))):i=!1),!this.isUpdatePending&&i&&(this._$E_=this._$Ej())}},{key:"_$Ej",value:(t=M(R().mark((function e(){var t;return R().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.isUpdatePending=!0,e.prev=1,e.next=4,this._$E_;case 4:e.next=9;break;case 6:e.prev=6,e.t0=e.catch(1),Promise.reject(e.t0);case 9:if(t=this.scheduleUpdate(),e.t1=null!=t,!e.t1){e.next=14;break}return e.next=14,t;case 14:return e.abrupt("return",!this.isUpdatePending);case 15:case"end":return e.stop()}}),e,this,[[1,6]])}))),function(){return t.apply(this,arguments)})},{key:"scheduleUpdate",value:function(){return this.performUpdate()}},{key:"performUpdate",value:function(){var e,t=this;if(this.isUpdatePending){this.hasUpdated,this._$Ei&&(this._$Ei.forEach((function(e,n){return t[n]=e})),this._$Ei=void 0);var n=!1,i=this._$AL;try{(n=this.shouldUpdate(i))?(this.willUpdate(i),null===(e=this._$ES)||void 0===e||e.forEach((function(e){var t;return null===(t=e.hostUpdate)||void 0===t?void 0:t.call(e)})),this.update(i)):this._$Ek()}catch(e){throw n=!1,this._$Ek(),e}n&&this._$AE(i)}}},{key:"willUpdate",value:function(e){}},{key:"_$AE",value:function(e){var t;null===(t=this._$ES)||void 0===t||t.forEach((function(e){var t;return null===(t=e.hostUpdated)||void 0===t?void 0:t.call(e)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}},{key:"_$Ek",value:function(){this._$AL=new Map,this.isUpdatePending=!1}},{key:"updateComplete",get:function(){return this.getUpdateComplete()}},{key:"getUpdateComplete",value:function(){return this._$E_}},{key:"shouldUpdate",value:function(e){return!0}},{key:"update",value:function(e){var t=this;void 0!==this._$EC&&(this._$EC.forEach((function(e,n){return t._$EO(n,t[n],e)})),this._$EC=void 0),this._$Ek()}},{key:"updated",value:function(e){}},{key:"firstUpdated",value:function(e){}}],[{key:"addInitializer",value:function(e){var t;null!==(t=this.h)&&void 0!==t||(this.h=[]),this.h.push(e)}},{key:"observedAttributes",get:function(){var e=this;this.finalize();var t=[];return this.elementProperties.forEach((function(n,i){var o=e._$Ep(i,n);void 0!==o&&(e._$Ev.set(o,i),t.push(o))})),t}},{key:"createProperty",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:fe;if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){var n="symbol"==J(e)?Symbol():"__"+e,i=this.getPropertyDescriptor(e,n,t);void 0!==i&&Object.defineProperty(this.prototype,e,i)}}},{key:"getPropertyDescriptor",value:function(e,t,n){return{get:function(){return this[t]},set:function(i){var o=this[e];this[t]=i,this.requestUpdate(e,o,n)},configurable:!0,enumerable:!0}}},{key:"getPropertyOptions",value:function(e){return this.elementProperties.get(e)||fe}},{key:"finalize",value:function(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;var e=Object.getPrototypeOf(this);if(e.finalize(),this.elementProperties=new Map(e.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){var t,n=this.properties,i=V([].concat(D(Object.getOwnPropertyNames(n)),D(Object.getOwnPropertySymbols(n))));try{for(i.s();!(t=i.n()).done;){var o=t.value;this.createProperty(o,n[o])}}catch(e){i.e(e)}finally{i.f()}}return this.elementStyles=this.finalizeStyles(this.styles),!0}},{key:"finalizeStyles",value:function(e){var t=[];if(Array.isArray(e)){var n,i=V(new Set(e.flat(1/0).reverse()));try{for(i.s();!(n=i.n()).done;){var o=n.value;t.unshift(oe(o))}}catch(e){i.e(e)}finally{i.f()}}else void 0!==e&&t.push(oe(e));return t}},{key:"_$Ep",value:function(e,t){var n=t.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof e?e.toLowerCase():void 0}}]),i}(N(HTMLElement));de.finalized=!0,de.elementProperties=new Map,de.elementStyles=[],de.shadowRootOptions={mode:"open"},null==ce||ce({ReactiveElement:de}),(null!==(X=re.reactiveElementVersions)&&void 0!==X?X:re.reactiveElementVersions=[]).push("1.4.1");var he=window,pe=he.trustedTypes,ge=pe?pe.createPolicy("lit-html",{createHTML:function(e){return e}}):void 0,ve="lit$".concat((Math.random()+"").slice(9),"$"),me="?"+ve,_e="<".concat(me,">"),ye=document,be=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return ye.createComment(e)},ke=function(e){return null===e||"object"!=J(e)&&"function"!=typeof e},Ee=Array.isArray,we=function(e){return Ee(e)||"function"==typeof(null==e?void 0:e[Symbol.iterator])},Se=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ce=/-->/g,xe=/>/g,Ae=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),Te=/'/g,De=/"/g,Re=/^(?:script|style|textarea|title)$/i,Oe=function(e){return function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o":"",a=Se,s=0;s"===l[0]?(a=null!=n?n:Se,f=-1):void 0===l[1]?f=-2:(f=a.lastIndex-l[2].length,u=l[1],a=void 0===l[3]?Ae:'"'===l[3]?De:Te):a===De||a===Te?a=Ae:a===Ce||a===xe?a=Se:(a=Ae,n=void 0);var h=a===Ae&&e[s+1].startsWith("/>")?" ":"";r+=a===Se?c+_e:f>=0?(o.push(u),c.slice(0,f)+"$lit$"+c.slice(f)+ve+h):c+ve+(-2===f?(o.push(void 0),s):h)}var p=r+(e[i]||"")+(2===t?"":"");if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==ge?ge.createHTML(p):p,o]}(o,r),f=T(l,2),d=f[0],h=f[1];if(this.el=e.createElement(d,n),Pe.currentNode=this.el.content,2===r){var p=this.el.content,g=p.firstChild;g.remove(),p.append.apply(p,D(g.childNodes))}for(;null!==(i=Pe.nextNode())&&u.length0){i.textContent=pe?pe.emptyScript:"";for(var R=0;R2&&void 0!==arguments[2]?arguments[2]:e,s=arguments.length>3?arguments[3]:void 0;if(t===Me)return t;var c=void 0!==s?null===(n=a._$Cl)||void 0===n?void 0:n[s]:a._$Cu,u=ke(t)?void 0:t._$litDirective$;return(null==c?void 0:c.constructor)!==u&&(null===(i=null==c?void 0:c._$AO)||void 0===i||i.call(c,!1),void 0===u?c=void 0:(c=new u(e))._$AT(e,a,s),void 0!==s?(null!==(o=(r=a)._$Cl)&&void 0!==o?o:r._$Cl=[])[s]=c:a._$Cu=c),void 0!==c&&(t=Ne(e,c._$AS(e,t.values),c,s)),t}var Ge,Ue,je=function(){function e(t,n){H(this,e),this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=n}return $(e,[{key:"parentNode",get:function(){return this._$AM.parentNode}},{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"p",value:function(e){var t,n=this._$AD,i=n.el.content,o=n.parts,r=(null!==(t=null==e?void 0:e.creationScope)&&void 0!==t?t:ye).importNode(i,!0);Pe.currentNode=r;for(var a=Pe.nextNode(),s=0,c=0,u=o[0];void 0!==u;){if(s===u.index){var l=void 0;2===u.type?l=new Le(a,a.nextSibling,this,e):1===u.type?l=new u.ctor(a,u.name,u.strings,this,e):6===u.type&&(l=new $e(a,this,e)),this.v.push(l),u=o[++c]}s!==(null==u?void 0:u.index)&&(a=Pe.nextNode(),s++)}return r}},{key:"m",value:function(e){var t,n=0,i=V(this.v);try{for(i.s();!(t=i.n()).done;){var o=t.value;void 0!==o&&(void 0!==o.strings?(o._$AI(e,o,n),n+=o.strings.length-2):o._$AI(e[n])),n++}}catch(e){i.e(e)}finally{i.f()}}}]),e}(),Le=function(){function e(t,n,i,o){var r;H(this,e),this.type=2,this._$AH=ze,this._$AN=void 0,this._$AA=t,this._$AB=n,this._$AM=i,this.options=o,this._$C_=null===(r=null==o?void 0:o.isConnected)||void 0===r||r}return $(e,[{key:"_$AU",get:function(){var e,t;return null!==(t=null===(e=this._$AM)||void 0===e?void 0:e._$AU)&&void 0!==t?t:this._$C_}},{key:"parentNode",get:function(){var e=this._$AA.parentNode,t=this._$AM;return void 0!==t&&11===e.nodeType&&(e=t.parentNode),e}},{key:"startNode",get:function(){return this._$AA}},{key:"endNode",get:function(){return this._$AB}},{key:"_$AI",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this;e=Ne(this,e,t),ke(e)?e===ze||null==e||""===e?(this._$AH!==ze&&this._$AR(),this._$AH=ze):e!==this._$AH&&e!==Me&&this.$(e):void 0!==e._$litType$?this.T(e):void 0!==e.nodeType?this.k(e):we(e)?this.O(e):this.$(e)}},{key:"S",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._$AB;return this._$AA.parentNode.insertBefore(e,t)}},{key:"k",value:function(e){this._$AH!==e&&(this._$AR(),this._$AH=this.S(e))}},{key:"$",value:function(e){this._$AH!==ze&&ke(this._$AH)?this._$AA.nextSibling.data=e:this.k(ye.createTextNode(e)),this._$AH=e}},{key:"T",value:function(e){var t,n=e.values,i=e._$litType$,o="number"==typeof i?this._$AC(e):(void 0===i.el&&(i.el=Be.createElement(i.h,this.options)),i);if((null===(t=this._$AH)||void 0===t?void 0:t._$AD)===o)this._$AH.m(n);else{var r=new je(o,this),a=r.p(this.options);r.m(n),this.k(a),this._$AH=r}}},{key:"_$AC",value:function(e){var t=Ie.get(e.strings);return void 0===t&&Ie.set(e.strings,t=new Be(e)),t}},{key:"O",value:function(t){Ee(this._$AH)||(this._$AH=[],this._$AR());var n,i,o=this._$AH,r=0,a=V(t);try{for(a.s();!(i=a.n()).done;){var s=i.value;r===o.length?o.push(n=new e(this.S(be()),this.S(be()),this,this.options)):n=o[r],n._$AI(s),r++}}catch(e){a.e(e)}finally{a.f()}r0&&void 0!==arguments[0]?arguments[0]:this._$AA.nextSibling,n=arguments.length>1?arguments[1]:void 0;for(null===(e=this._$AP)||void 0===e||e.call(this,!1,!0,n);t&&t!==this._$AB;){var i=t.nextSibling;t.remove(),t=i}}},{key:"setConnected",value:function(e){var t;void 0===this._$AM&&(this._$C_=e,null===(t=this._$AP)||void 0===t||t.call(this,e))}}]),e}(),Ve=function(){function e(t,n,i,o,r){H(this,e),this.type=1,this._$AH=ze,this._$AN=void 0,this.element=t,this.name=n,this._$AM=o,this.options=r,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=ze}return $(e,[{key:"tagName",get:function(){return this.element.tagName}},{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"_$AI",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=this.strings,r=!1;if(void 0===o)e=Ne(this,e,t,0),(r=!ke(e)||e!==this._$AH&&e!==Me)&&(this._$AH=e);else{var a,s,c=e;for(e=o[0],a=0;a1&&void 0!==arguments[1]?arguments[1]:this;if((e=null!==(t=Ne(this,e,n,0))&&void 0!==t?t:ze)!==Me){var i=this._$AH,o=e===ze&&i!==ze||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,r=e!==ze&&(i===ze||o);o&&this.element.removeEventListener(this.name,this,i),r&&this.element.addEventListener(this.name,this,e),this._$AH=e}}},{key:"handleEvent",value:function(e){var t,n;"function"==typeof this._$AH?this._$AH.call(null!==(n=null===(t=this.options)||void 0===t?void 0:t.host)&&void 0!==n?n:this.element,e):this._$AH.handleEvent(e)}}]),n}(Ve),$e=function(){function e(t,n,i){H(this,e),this.element=t,this.type=6,this._$AN=void 0,this._$AM=n,this.options=i}return $(e,[{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"_$AI",value:function(e){Ne(this,e)}}]),e}(),Je=he.litHtmlPolyfillSupport;null==Je||Je(Be,Le),(null!==(Y=he.litHtmlVersions)&&void 0!==Y?Y:he.litHtmlVersions=[]).push("2.3.1");var We=function(e){z(n,e);var t=I(n);function n(){var e;return H(this,n),(e=t.apply(this,arguments)).renderOptions={host:B(e)},e._$Do=void 0,e}return $(n,[{key:"createRenderRoot",value:function(){var e,t,i=x(L(n.prototype),"createRenderRoot",this).call(this);return null!==(e=(t=this.renderOptions).renderBefore)&&void 0!==e||(t.renderBefore=i.firstChild),i}},{key:"update",value:function(e){var t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),x(L(n.prototype),"update",this).call(this,e),this._$Do=function(e,t,n){var i,o,r=null!==(i=null==n?void 0:n.renderBefore)&&void 0!==i?i:t,a=r._$litPart$;if(void 0===a){var s=null!==(o=null==n?void 0:n.renderBefore)&&void 0!==o?o:null;r._$litPart$=a=new Le(t.insertBefore(be(),s),s,void 0,null!=n?n:{})}return a._$AI(e),a}(t,this.renderRoot,this.renderOptions)}},{key:"connectedCallback",value:function(){var e;x(L(n.prototype),"connectedCallback",this).call(this),null===(e=this._$Do)||void 0===e||e.setConnected(!0)}},{key:"disconnectedCallback",value:function(){var e;x(L(n.prototype),"disconnectedCallback",this).call(this),null===(e=this._$Do)||void 0===e||e.setConnected(!1)}},{key:"render",value:function(){return Me}}]),n}(de);We.finalized=!0,We._$litElement$=!0,null===(Ge=globalThis.litElementHydrateSupport)||void 0===Ge||Ge.call(globalThis,{LitElement:We});var Xe=globalThis.litElementPolyfillSupport;null==Xe||Xe({LitElement:We}),(null!==(Ue=globalThis.litElementVersions)&&void 0!==Ue?Ue:globalThis.litElementVersions=[]).push("3.2.2"); /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ var Ye,Ze=1,Qe=2,et=function(e){return function(){for(var t=arguments.length,n=new Array(t),i=0;i2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");return P(i)}return $(n,[{key:"render",value:function(e){return" "+Object.keys(e).filter((function(t){return e[t]})).join(" ")+" "}},{key:"update",value:function(e,t){var n,i,o=this,r=T(t,1)[0];if(void 0===this.nt){for(var a in this.nt=new Set,void 0!==e.strings&&(this.st=new Set(e.strings.join(" ").split(/\s/).filter((function(e){return""!==e})))),r)r[a]&&!(null===(n=this.st)||void 0===n?void 0:n.has(a))&&this.nt.add(a);return this.render(r)}var s=e.element.classList;for(var c in this.nt.forEach((function(e){e in r||(s.remove(e),o.nt.delete(e))})),r){var u=!!r[c];u===this.nt.has(c)||(null===(i=this.st)||void 0===i?void 0:i.has(c))||(u?(s.add(c),this.nt.add(c)):(s.remove(c),this.nt.delete(c)))}return Me}}]),n}(tt)),it=function(e){return function(t){return"function"==typeof t?function(e,t){return customElements.define(e,t),t}(e,t):function(e,t){return{kind:t.kind,elements:t.elements,finisher:function(t){customElements.define(e,t)}}}(e,t)}};function ot(e){return function(t,n){return void 0!==n?function(e,t,n){t.constructor.createProperty(n,e)}(e,t,n):function(e,t){return"method"===t.kind&&t.descriptor&&!("value"in t.descriptor)?S(S({},t),{},{finisher:function(n){n.createProperty(t.key,e)}}):{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:t.key,initializer:function(){"function"==typeof t.initializer&&(this[t.key]=t.initializer.call(this))},finisher:function(n){n.createProperty(t.key,e)}}}(e,t)}} /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */function rt(e){return ot(S(S({},e),{},{state:!0}))} /** * @license * Copyright 2021 Google LLC * SPDX-License-Identifier: BSD-3-Clause */null===(Ye=window.HTMLSlotElement)||void 0===Ye||Ye.prototype.assignedElements;var at=["ar"],st="cookie-consent",ct="https://sf16-website-login.neutral.ttwstatic.com/obj/tiktok_web_login_static/tiktok_fonts/",ut='\n\n',lt="LOCAL_IS_EFFECTIVE",ft={channel:"sg",channel_type:"tcpy"};/*! js-cookie v3.0.1 | MIT */function dt(e){for(var t=1;t0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function vt(){for(var e=[],t=0;t-1&&(t=e.slice(0,e.indexOf("Build/")))}));else if("ios"===e||"mac"===e||"windows"===e)if(this.isNewIpad())t="iPad";else{var n=navigator.userAgent.replace("Mozilla/5.0 (",""),i=n.indexOf(";");t=n.slice(0,i)}}catch(e){return t.trim()}return t.trim()},e.prototype.isNewIpad=function(){return void 0!==this.userAgent&&"MacIntel"===navigator.platform&&"number"==typeof navigator.maxTouchPoints&&navigator.maxTouchPoints>1},e}(),Nt={sg:"1fz22z22z1nz21z4mz4bz4bz21z1ez18z1jz1gz49z1kz1az21z4az19z27z22z1cz1mz24z1cz20z21z1cz18z4az1az1mz1k",va:"1fz22z22z1nz21z4mz4bz4bz1kz18z1jz1gz24z18z49z1kz1az21z4az19z27z22z1cz1mz24z1cz20z21z1cz18z4az1az1mz1k"},Gt={va:"1fz22z22z1nz21z4mz4bz4bz22z1mz19z1jz1mz1ez4az1gz22z1mz19z21z1lz21z21z1bz1iz4az1az1mz1k",sg:"1fz22z22z1nz21z4mz4bz4bz22z1mz19z1jz1mz1ez4az22z1mz19z21z1lz21z21z1bz1iz4az1az1mz1k",in:"1fz22z22z1nz21z4mz4bz4bz22z1mz19z1jz1mz1ez4az1gz22z1mz19z21z1lz21z21z1bz1iz4az1az1mz1k"},Ut={sg:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z49z21z1ez4az22z1gz1iz22z1mz1iz24z4az1az1mz1k",va:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z49z24z18z4az22z1gz1iz22z1mz1iz24z4az1az1mz1k",in:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z49z24z18z49z23z21z1cz18z21z22z4ez18z4az22z1gz1iz22z1mz1iz24z4az1az1mz1k",ie2:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z49z1gz1cz4ez4az22z1gz1iz22z1mz1iz25z4az1cz23"},jt={sg:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z4az22z1gz1iz22z1mz1iz25z4az23z21",va:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z4az22z1gz1iz22z1mz1iz24z4az23z21",ie:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z49z1gz1cz4az22z1gz1iz22z1mz1iz25z4az1cz23",ie2:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z49z1gz1cz4ez4az22z1gz1iz22z1mz1iz25z4az1cz23"};!function(e){e.Init="init",e.Config="config",e.Start="start",e.Ready="ready",e.TokenComplete="token-complete",e.TokenStorage="token-storage",e.TokenFetch="token-fetch",e.TokenError="token-error",e.ConfigUuid="config-uuid",e.ConfigWebId="config-webid",e.ConfigDomain="config-domain",e.CustomWebId="custom-webid",e.TokenChange="token-change",e.TokenReset="token-reset",e.ConfigTransform="config-transform",e.EnvTransform="env-transform",e.SessionReset="session-reset",e.SessionResetTime="session-reset-time",e.Event="event",e.Events="events",e.EventNow="event-now",e.CleanEvents="clean-events",e.BeconEvent="becon-event",e.SubmitBefore="submit-before",e.SubmitScuess="submit-scuess",e.SubmitAfter="submit-after",e.SubmitError="submit-error",e.SubmitVerify="submit-verify",e.DestoryInstance="destory-instance",e.Stay="stay",e.ResetStay="reset-stay",e.StayReady="stay-ready",e.SetStay="set-stay",e.RouteChange="route-change",e.RouteReady="route-ready",e.Ab="ab",e.AbVar="ab-var",e.AbAllVars="ab-all-vars",e.AbConfig="ab-config",e.AbExternalVersion="ab-external-version",e.AbVersionChangeOn="ab-version-change-on",e.AbVersionChangeOff="ab-version-change-off",e.AbOpenLayer="ab-open-layer",e.AbCloseLayer="ab-close-layer",e.AbReady="ab-ready",e.AbComplete="ab-complete",e.AbTimeout="ab-timeout",e.Profile="profile",e.ProfileSet="profile-set",e.ProfileSetOnce="profile-set-once",e.ProfileUnset="profile-unset",e.ProfileIncrement="profile-increment",e.ProfileAppend="profile-append",e.ProfileClear="profile-clear",e.Autotrack="autotrack",e.AutotrackReady="autotrack-ready",e.CepReady="cep-ready",e.TracerReady="tracer-ready",e.sessionRecord="session-record",e.SessionRecordStart="session-record-start",e.SessionRecordPause="session-record-pause",e.SessionRecordEnd="session-record-end",e.SessionRecordReport="session-record-report",e.VisualCollectReady="visual-collect-ready",e.VisualApiReady="visual-api-ready",e.VisualApiUpdate="visual-api-update"}(_t||(_t={})),function(e){e.DEBUGGER_MESSAGE="debugger-message",e.DEBUGGER_MESSAGE_SDK="debugger-message-sdk",e.DEBUGGER_MESSAGE_FETCH="debugger-message-fetch",e.DEBUGGER_MESSAGE_FETCH_RESULT="debugger-message-fetch-result",e.DEBUGGER_MESSAGE_EVENT="debugger-message-event",e.DEVTOOL_WEB_READY="devtool-web-ready"}(yt||(yt={}));var Lt,Vt=_t,Ft=void 0,Kt=(new Date).getTimezoneOffset(),Ht=parseInt(""+-Kt/60,10),qt=60*Kt,$t=function(){function e(e,t){this.is_first_time=!0,this.configPersist=!1,this.initConfig=t,this.collect=e;var n=new Bt(t.app_id,t.cookie_domain||"",t.cookie_expire||6048e5).init(),i="__tea_cache_first_"+t.app_id;this.configKey="__tea_cache_config_"+t.app_id,this.sessionStorage=new Pt(!1,"session"),this.localStorage=new Pt(!1,"local"),this.channelUrl="tcpy"===t.channel_type||"ttp"===t.channel_type?{WEBID_URL:"/v1/user/webid",TOB_URL:"",REPORT_URL:"/v1/list"}:{WEBID_URL:"/webid",TOB_URL:"/tobid",REPORT_URL:"/list"},t.configPersist&&(this.configPersist=!0,this.storage=1===t.configPersist?this.sessionStorage:this.localStorage);var o=this.localStorage.getItem(i);o&&1==o?this.is_first_time=!1:(this.is_first_time=!0,this.localStorage.setItem(i,"1")),this.envInfo={user:{user_unique_id:Ft,user_type:Ft,user_id:Ft,user_is_auth:Ft,user_is_login:Ft,device_id:Ft,web_id:Ft,ip_addr_id:Ft,user_unique_id_type:Ft},header:{app_id:Ft,app_name:Ft,app_install_id:Ft,install_id:Ft,app_package:Ft,app_channel:Ft,app_version:Ft,ab_version:Ft,os_name:n.os_name,os_version:n.os_version,device_model:n.device_model,ab_client:Ft,traffic_type:Ft,client_ip:Ft,device_brand:Ft,os_api:Ft,access:Ft,language:n.language,region:Ft,app_language:Ft,app_region:Ft,creative_id:n.utm.creative_id,ad_id:n.utm.ad_id,campaign_id:n.utm.campaign_id,log_type:Ft,rnd:Ft,platform:n.platform,sdk_version:"5.3.0_oversea",sdk_lib:"js",province:Ft,city:Ft,timezone:Ht,tz_offset:qt,tz_name:Ft,sim_region:Ft,carrier:Ft,resolution:n.screen_width+"x"+n.screen_height,browser:n.browser,browser_version:n.browser_version,referrer:n.referrer,referrer_host:n.referrer_host,width:n.screen_width,height:n.screen_height,screen_width:n.screen_width,screen_height:n.screen_height,utm_term:n.utm.utm_term,utm_content:n.utm.utm_content,utm_source:n.utm.utm_source,utm_medium:n.utm.utm_medium,utm_campaign:n.utm.utm_campaign,tracer_data:JSON.stringify(n.utm.tracer_data),custom:{}}},this.ab_version="",this.ab_uuid_cache={},this.evtParams={},this.reportErrorCallback=function(){},this.isLast=!1,this.setCustom(n),this.initDomain(),this.initABData()}return e.prototype.initDomain=function(e){var t=this.initConfig.channel_domain;if(t)this.domain=t;else{var n=e||this.initConfig.channel,i=this.initConfig&&this.initConfig.channel_type?"tcpy"===this.initConfig.channel_type?Ut[n]:jt[n]:Nt[n];i||(console.warn("current channel: "+n+" is not exist, use va instead, please check!!!!"),i=Nt.sg),this.domain=St(i)}},e.prototype.setDomain=function(e){this.customDomain=!0,this.domain=e},e.prototype.getDomain=function(e){return this.customDomain||e&&this.initDomain(e),this.domain},e.prototype.initABData=function(){var e,t="__tea_sdk_ab_version_"+this.initConfig.app_id;e=this.localStorage.getItem(t),this.setAbCache(e)},e.prototype.setAbCache=function(e){this.ab_cache=e},e.prototype.getAbCache=function(){return this.ab_cache},e.prototype.clearAbCache=function(){this.ab_cache={},this.ab_version=""},e.prototype.setAbVersion=function(e){this.ab_version=e},e.prototype.getAbVersion=function(){return this.ab_version},e.prototype.setAbUuidCache=function(e,t){var n=t||this.envInfo.user.user_unique_id;this.ab_uuid_cache[""+n]||(this.ab_uuid_cache[""+n]=[]),-1===this.ab_uuid_cache[""+n].indexOf(e)&&this.ab_uuid_cache[""+n].push(e)},e.prototype.getAbUuidCache=function(e){return this.ab_uuid_cache[""+e]},e.prototype.getUrl=function(e){var t="";switch(e){case"event":t=this.channelUrl.REPORT_URL;break;case"webid":t=this.channelUrl.WEBID_URL;break;case"tobid":t=this.channelUrl.TOB_URL}var n="";return this.initConfig.caller&&(n="?sdk_version=5.3.0_oversea&sdk_name=web&app_id="+this.initConfig.app_id+"&caller="+this.initConfig.caller),""+this.getDomain()+t+n},e.prototype.setCustom=function(e){if(e&&e.latest_data&&e.latest_data.isLast)for(var t in delete e.latest_data.isLast,this.isLast=!0,e.latest_data)this.envInfo.header.custom[t]=e.latest_data[t]},e.prototype.setAppid=function(e){this.envInfo.header.app_id=e},e.prototype.set=function(e){var t=this;Object.keys(e).forEach((function(n){if(void 0!==e[n]&&null!==e[n]||t.delete(n),"traffic_type"===n&&t.isLast&&(t.envInfo.header.custom.$latest_traffic_source_type=e[n]),"evtParams"===n)t.evtParams=pt(pt({},t.evtParams||{}),e.evtParams||{});else if("_staging_flag"===n)t.evtParams=pt(pt({},t.evtParams||{}),{_staging_flag:e._staging_flag});else if("reportErrorCallback"===n&&"function"==typeof e[n])t.reportErrorCallback=e[n];else{var i="",o="";if(n.indexOf(".")>-1){var r=n.split(".");i=r[0],o=r[1]}i?"user"===i||"header"===i?t.envInfo[i][o]=e[n]:t.envInfo.header.custom[o]=e[n]:Object.hasOwnProperty.call(t.envInfo.user,n)?["user_type","ip_addr_id"].indexOf(n)>-1?t.envInfo.user[n]=e[n]?Number(e[n]):e[n]:["user_id","web_id","user_unique_id","user_unique_id_type"].indexOf(n)>-1?t.envInfo.user[n]=e[n]?String(e[n]):e[n]:["user_is_auth","user_is_login"].indexOf(n)>-1?t.envInfo.user[n]=Boolean(e[n]):"device_id"===n&&(t.envInfo.user[n]=e[n]):Object.hasOwnProperty.call(t.envInfo.header,n)?t.envInfo.header[n]=e[n]:t.envInfo.header.custom[n]=e[n]}}))},e.prototype.get=function(e){try{return e?"evtParams"===e?this.evtParams:"reportErrorCallback"===e?this[e]:Object.hasOwnProperty.call(this.envInfo.user,e)?this.envInfo.user[e]:Object.hasOwnProperty.call(this.envInfo.header,e)?this.envInfo.header[e]:JSON.parse(JSON.stringify(this.envInfo[e])):JSON.parse(JSON.stringify(this.envInfo))}catch(e){console.log("get config stringify error "),this.collect.emit(yt.DEBUGGER_MESSAGE,{type:yt.DEBUGGER_MESSAGE_SDK,info:"SDK Something Error",level:"error",time:Date.now(),data:e.message,infoType:"sdk"})}},e.prototype.setStore=function(e){try{if(!this.configPersist)return;var t=this.storage.getItem(this.configKey)||{};if(t&&Object.keys(e).length){var n=Object.assign(e,t);this.storage.setItem(this.configKey,n)}}catch(e){console.log("setStore error"),this.collect.emit(yt.DEBUGGER_MESSAGE,{type:yt.DEBUGGER_MESSAGE_SDK,info:"SDK Something Error",level:"error",time:Date.now(),data:e.message,infoType:"sdk"})}},e.prototype.getStore=function(){try{if(!this.configPersist)return null;var e=this.storage.getItem(this.configKey)||{};return e&&Object.keys(e).length?e:null}catch(e){return this.collect.emit(yt.DEBUGGER_MESSAGE,{type:yt.DEBUGGER_MESSAGE_SDK,info:"SDK Something Error",level:"error",time:Date.now(),data:e.message,infoType:"sdk"}),null}},e.prototype.delete=function(e){try{if(!this.configPersist)return;var t=this.storage.getItem(this.configKey)||{};t&&Object.hasOwnProperty.call(t,e)&&(delete t[e],this.storage.setItem(this.configKey,t))}catch(e){this.collect.emit(yt.DEBUGGER_MESSAGE,{type:yt.DEBUGGER_MESSAGE_SDK,info:"SDK Something Error",level:"error",time:Date.now(),data:e.message,infoType:"sdk"}),console.log("delete error")}},e}(),Jt=function(){function e(e,t){this.isLog=t||!1,this.name=e||""}return e.prototype.info=function(e){this.isLog&&console.log("%c %s","color: yellow; background-color: black;","[Tea instance: "+this.name+"] "+e)},e.prototype.warn=function(e){this.isLog&&console.warn("%c %s","color: #4D1B00; background-color: #FF7D00;","[Tea instance: "+this.name+"] "+e)},e.prototype.error=function(e){this.isLog&&console.error("%c %s","color: #FFF; background-color: #F53F3F;","[Tea instance: "+this.name+"] "+e)},e.prototype.throw=function(e){throw this.error(this.name),new Error(e)},e}(),Wt=function(){function e(){this.spiderBot=["Baiduspider","googlebot","360Spider","haosouspider","YoudaoBot","Yisouspider","Googlebot","Headless","Applebot","Bingbot","PetalBot"]}return e.prototype.checkSpider=function(e){if(!e.enable_spider)return!1;var t=window.navigator.userAgent;if(!t)return!0;var n=!1;return this.spiderBot.forEach((function(e){-1!==t.indexOf(e)&&(n=!0)})),n},e}(),Xt=function(){function e(e,t){this.collect=e,this.native=t}var t=e.prototype;return t.bridgeInject=function(){try{return!!this.native&&(AppLogBridge?(console.log("AppLogBridge is injected"),!0):(console.log("AppLogBridge is not inject"),!1))}catch(e){return console.log("AppLogBridge is not inject"),!1}},t.bridgeReady=function(){var e=this;return new Promise((function(t,n){try{e.bridgeInject()?AppLogBridge.hasStarted((function(e){console.log("AppLogBridge is started? : "+e),e?t(!0):n(!1)})):n(!1)}catch(e){console.log("AppLogBridge, error:"+JSON.stringify(e.stack)),n(!1)}}))},t.setNativeAppId=function(e){try{AppLogBridge.setNativeAppId(JSON.stringify(e)),console.log("change bridge appid, event report with appid: "+e)}catch(e){console.error("setNativeAppId error")}},t.setConfig=function(e){var t=this;try{Object.keys(e).forEach((function(n){"user_unique_id"===n?t.setUserUniqueId(e[n]):e[n]?t.addHeaderInfo(n,e[n]):t.removeHeaderInfo(n)}))}catch(e){console.error("setConfig error")}},t.setUserUniqueId=function(e){try{AppLogBridge.setUserUniqueId(e)}catch(e){console.error("setUserUniqueId error")}},t.addHeaderInfo=function(e,t){try{AppLogBridge.addHeaderInfo(e,t)}catch(e){console.error("addHeaderInfo error")}},t.setHeaderInfo=function(e){try{AppLogBridge.setHeaderInfo(JSON.stringify(e))}catch(e){console.error("setHeaderInfo error")}},t.removeHeaderInfo=function(e){try{AppLogBridge.removeHeaderInfo(e)}catch(e){console.error("removeHeaderInfo error")}},t.reportPv=function(e){this.onEventV3("predefine_pageview",e)},t.onEventV3=function(e,t){try{AppLogBridge.onEventV3(e,t),this.collect.emit(DebuggerMesssge.DEBUGGER_MESSAGE,{type:DebuggerMesssge.DEBUGGER_MESSAGE_EVENT,info:"bridge埋点上报",time:Date.now(),data:[{events:[{event:e,params:t}]}],code:200,status:"success"})}catch(e){console.error("onEventV3 error")}},t.profileSet=function(e){try{AppLogBridge.profileSet(e)}catch(e){console.error("profileSet error")}},t.profileSetOnce=function(e){try{AppLogBridge.profileSetOnce(e)}catch(e){console.error("profileSetOnce error")}},t.profileIncrement=function(e){try{AppLogBridge.profileIncrement(e)}catch(e){console.error("profileIncrement error")}},t.profileUnset=function(e){try{AppLogBridge.profileUnset(e)}catch(e){console.error("profileUnset error")}},t.profileAppend=function(e){try{AppLogBridge.profileAppend(e)}catch(e){console.error("profileAppend error")}},e}(),Yt=function(){function e(){this.eventLimit=50,this.enable_ttwebid=!1,this.eventCache=[],this.beconEventCache=[]}return e.prototype.apply=function(e,t){var n=this;this.collect=e,this.config=t,this.configManager=e.configManager,this.cacheStorgae=new Pt(!0),this.localStorage=new Pt(!1),this.maxReport=t.max_report||10,this.reportTime=t.reportTime||30,this.timeout=t.timeout||1e5,this.enable_ttwebid=t.enable_ttwebid,this.reportUrl=t.report_url||this.configManager.getUrl("event"),this.eventKey="__tea_cache_events_"+this.configManager.get("app_id"),this.beconKey="__tea_cache_events_becon_"+this.configManager.get("app_id"),this.abKey="__tea_sdk_ab_version_"+this.configManager.get("app_id"),this.refer_key="__tea_cache_refer_"+this.configManager.get("app_id"),this.collect.on(Vt.Ready,(function(){n.reportAll(!1)})),this.collect.on(Vt.ConfigDomain,(function(){n.reportUrl=n.configManager.getUrl("event")})),this.collect.on(Vt.Event,(function(e){n.event(e)})),this.collect.on(Vt.BeconEvent,(function(e){n.beconEvent(e)})),this.collect.on(Vt.CleanEvents,(function(){n.reportAll(!1)})),this.linster()},e.prototype.linster=function(){var e=this;window.addEventListener("unload",(function(){e.reportAll(!0)}),!1),Ct((function(){e.reportAll(!0)})),document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e.reportAll(!0)}),!1)},e.prototype.reportAll=function(e){this.report(e),this.reportBecon()},e.prototype.event=function(e){var t=this;if(!this.collect.destroy&&!this.collect.sdkStop)try{var n=vt(e,this.cacheStorgae.getItem(this.eventKey)||[]);if(this.cacheStorgae.setItem(this.eventKey,n),this.reportTimeout&&clearTimeout(this.reportTimeout),n.length>=this.maxReport)this.report(!1);else{var i=this.reportTime;this.reportTimeout=setTimeout((function(){t.report(!1),t.reportTimeout=null}),i)}}catch(e){this.collect.emit(yt.DEBUGGER_MESSAGE,{type:yt.DEBUGGER_MESSAGE_SDK,info:"SDK Something Error",level:"error",time:Date.now(),data:e.message,infoType:"sdk"})}},e.prototype.beconEvent=function(e){if(!this.collect.destroy&&!this.collect.sdkStop){var t=vt(e,this.cacheStorgae.getItem(this.beconKey)||[]);this.cacheStorgae.setItem(this.beconKey,t),this.collect.tokenManager.getReady()&&this.collect.sdkReady&&(this.cacheStorgae.removeItem(this.beconKey),this.send(this.split(this.merge(t)),!0))}},e.prototype.reportBecon=function(){if(!this.collect.destroy&&!this.collect.sdkStop&&this.collect.tokenManager.getReady()&&this.collect.sdkReady){var e=this.cacheStorgae.getItem(this.beconKey)||[];e&&e.length&&(this.cacheStorgae.removeItem(this.beconKey),this.send(this.split(this.merge(e)),!0))}},e.prototype.report=function(e){if(!this.collect.destroy&&!this.collect.sdkStop&&this.collect.tokenManager.getReady()&&this.collect.sdkReady){var t=this.cacheStorgae.getItem(this.eventKey)||[];t.length&&(this.cacheStorgae.removeItem(this.eventKey),this.sliceEvent(t,e))}},e.prototype.sliceEvent=function(e,t){if(e.length>this.eventLimit)for(var n=0;n>t/4).toString(10):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,e)}().replace(/-/g,"").slice(0,19)},Qt=function(){function e(){this.cacheToken={},this.enableCookie=!1,this.enable_ttwebid=!1,this.enableCustomWebid=!1}return e.prototype.apply=function(e,t){var n=this;this.collect=e,this.config=t,this.configManager=this.collect.configManager,this.storage=new Pt(!1),this.tokenKey="__tea_cache_tokens_"+t.app_id,this.enable_ttwebid=t.enable_ttwebid,this.enableCustomWebid=t.enable_custom_webid,this.collect.on(Vt.ConfigUuid,(function(e){n.setUuid(e)})),this.collect.on(Vt.ConfigWebId,(function(e){n.setWebId(e)})),this.enableCookie=t.cross_subdomain,this.expiresTime=t.cookie_expire||6048e5,this.cookieDomain=t.cookie_domain||"",this.checkStorage()},e.prototype.checkStorage=function(){var e=this;this.cacheToken=this.storage.getItem(this.tokenKey)||{},this.tokenType=this.cacheToken&&this.cacheToken._type_?this.cacheToken._type_:"default","custom"!==this.tokenType||this.enableCustomWebid?this.enableCustomWebid?this.collect.on(Vt.CustomWebId,(function(){e.tokenReady=!0,e.collect.emit(Vt.TokenComplete)})):this.checkEnv()||(this.enable_ttwebid?this.completeTtWid(this.cacheToken):this.check()):this.remoteWebid()},e.prototype.check=function(){this.cacheToken&&this.cacheToken.web_id?this.complete(this.cacheToken):this.config.disable_webid?this.complete({web_id:Zt(),user_unique_id:this.configManager.get("user_unique_id")||Zt()}):this.remoteWebid()},e.prototype.checkEnv=function(){var e=window.navigator.userAgent;if(-1!==e.indexOf("miniProgram")||-1!==e.indexOf("MiniProgram")){var t=Tt(window.location.href);return!(!t||!t.Web_ID||(this.complete({web_id:""+t.Web_ID,user_unique_id:this.configManager.get("user_unique_id")||""+t.Web_ID}),0))}return!1},e.prototype.remoteWebid=function(){var e=this,t=this.configManager.getUrl("webid"),n={app_key:this.config.app_key,app_id:this.config.app_id,url:location.href,user_agent:window.navigator.userAgent,referer:document.referrer,user_unique_id:""};this.collect.emit(yt.DEBUGGER_MESSAGE,{type:yt.DEBUGGER_MESSAGE_SDK,info:"SDK Fetch WebID Request",logType:"fetch",level:"info",time:Date.now(),data:n});var i=Zt();this.collect.requestManager.useRequest({url:t,data:n,success:function(t){var n;t&&0===t.e?(n=t.web_id,e.collect.emit(yt.DEBUGGER_MESSAGE,{type:yt.DEBUGGER_MESSAGE_SDK,info:"Fetch WebID Request Success",logType:"fetch",level:"info",time:Date.now(),data:t})):(n=i,e.collect.configManager.set({localWebId:i}),e.collect.emit(Vt.TokenError),e.collect.emit(yt.DEBUGGER_MESSAGE,{type:yt.DEBUGGER_MESSAGE_SDK,info:"Fetch WebID Request Data Error, Use LocalId",logType:"fetch",level:"warn",time:Date.now(),data:t}),e.collect.logger.warn("appid: "+e.config.app_id+" get webid error, use local webid~")),e.complete({web_id:e.configManager.get("web_id")||n,user_unique_id:e.configManager.get("user_unique_id")||n})},fail:function(){e.complete({web_id:e.configManager.get("web_id")||i,user_unique_id:e.configManager.get("user_unique_id")||i}),e.collect.configManager.set({localWebId:i}),e.collect.emit(Vt.TokenError),e.collect.emit(yt.DEBUGGER_MESSAGE,{type:yt.DEBUGGER_MESSAGE_SDK,info:"Fetch WebID Request Network Fail, Use LocalId",logType:"fetch",level:"error",time:Date.now(),data:null}),e.collect.logger.warn("appid: "+e.config.app_id+", get webid error, use local webid~")},timeout:3e5})},e.prototype.complete=function(e){var t=e.web_id,n=e.user_unique_id;e.timestamp=Date.now(),this.collect.configManager.set({web_id:t,user_unique_id:n}),this.setStorage(e),this.tokenReady=!0,this.collect.emit(yt.DEBUGGER_MESSAGE,{type:yt.DEBUGGER_MESSAGE_SDK,info:"SDK UserInfo Complete",logType:"info",secType:"USER",level:"info",time:Date.now(),data:{web_id:t,user_unique_id:n},infoType:"sdk"}),this.collect.emit(Vt.TokenComplete)},e.prototype.completeTtWid=function(e){var t=e.user_unique_id||"",n=this.configManager.get("user_unique_id");(n||t)&&this.configManager.set({user_unique_id:n||t}),this.setStorage(e),this.tokenReady=!0,this.collect.emit(Vt.TokenComplete)},e.prototype.setUuid=function(e){if(e&&-1===["null","undefined","Null","None"].indexOf(e)){var t=String(e),n=this.configManager.get("user_unique_id"),i=this.cacheToken&&this.cacheToken.user_unique_id;if(t===n&&t===i)return;this.configManager.set({user_unique_id:t}),this.cacheToken||(this.cacheToken={}),this.cacheToken.user_unique_id=t,this.cacheToken.timestamp=Date.now(),this.setStorage(this.cacheToken),this.collect.emit(Vt.TokenChange,"uuid"),this.collect.emit(Vt.SessionReset)}else this.clearUuid()},e.prototype.clearUuid=function(){this.config.enable_ttwebid||this.configManager.get("web_id")&&(this.configManager.set({user_unique_id:this.configManager.get("web_id")}),this.cacheToken&&this.cacheToken.web_id&&(this.cacheToken.user_unique_id=this.cacheToken.web_id,this.cacheToken.timestamp=Date.now(),this.setStorage(this.cacheToken)),this.collect.emit(Vt.TokenReset))},e.prototype.setWebId=function(e){if(e&&!this.config.enable_ttwebid){this.cacheToken&&this.cacheToken.web_id?this.cacheToken.web_id!==e&&(this.cacheToken.user_unique_id=this.cacheToken.web_id===this.cacheToken.user_unique_id?e:this.cacheToken.user_unique_id,this.cacheToken.web_id=e):(this.cacheToken={},this.cacheToken.web_id=e,this.cacheToken.user_unique_id=e),this.cacheToken.timestamp=Date.now();var t=this.configManager.get("web_id"),n=this.configManager.get("user_unique_id");n&&n!==t||(this.configManager.set({user_unique_id:e}),this.collect.emit(Vt.TokenChange,"uuid")),t!==e&&(this.configManager.set({web_id:e}),this.collect.emit(Vt.TokenChange,"webid")),this.setStorage(this.cacheToken)}},e.prototype.setStorage=function(e){e._type_=this.enableCustomWebid?"custom":"default",delete e["diss".split("").reverse().join("")],this.storage.setItem(this.tokenKey,e),this.cacheToken=e},e.prototype.getReady=function(){return this.tokenReady},e.prototype.getTobId=function(){var e=this;return new Promise((function(t){if("tcpy"!==e.config.channel_type&&"ttp"!==e.config.channel_type){var n={app_id:e.config.app_id,user_unique_id:e.configManager.get("user_unique_id"),web_id:e.configManager.get("web_id"),user_unique_id_type:e.configManager.get("user_unique_id_type")};e.collect.emit(yt.DEBUGGER_MESSAGE,{type:yt.DEBUGGER_MESSAGE_SDK,info:"SDK Fetch GetToken Request",logType:"fetch",level:"info",time:Date.now(),data:n,infoType:"sdk"}),e.collect.requestManager.useRequest({url:e.configManager.getUrl("tobid"),data:n,success:function(n){n&&0===n.e?(t(n.tobid),e.collect.emit(yt.DEBUGGER_MESSAGE,{type:yt.DEBUGGER_MESSAGE_SDK,info:"Fetch GetToken Request Success",logType:"fetch",level:"info",time:Date.now(),data:n,infoType:"sdk"})):(t(""),e.collect.emit(yt.DEBUGGER_MESSAGE,{type:yt.DEBUGGER_MESSAGE_SDK,info:"Fetch GetToken Request Fail",logType:"fetch",level:"error",time:Date.now(),data:n,infoType:"sdk"}))},fail:function(){t(""),e.collect.emit(yt.DEBUGGER_MESSAGE,{type:yt.DEBUGGER_MESSAGE_SDK,info:"Fetch GetToken Request Network Error",logType:"fetch",level:"error",time:Date.now(),infoType:"sdk"})},time:3e4,withCredentials:e.enable_ttwebid})}else t("")}))},e}(),en=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))},tn=function(){function e(){}return e.prototype.apply=function(e,t){var n=this;this.collect=e,this.storage=new Pt(!1,"session"),this.sessionKey="__tea_session_id_"+t.app_id,this.expireTime=t.expireTime||18e5,this.disableSession=t.disable_session,this.disableSessionTimeCheck=t.disable_session_check,this.disableSession||(this.setSessionId(),this.collect.on(Vt.SessionReset,(function(e){n.resetSessionId(e)})),this.collect.on(Vt.SessionResetTime,(function(){n.updateSessionIdTime()})))},e.prototype.updateSessionIdTime=function(){var e=this.storage.getItem(this.sessionKey);if(e&&e.sessionId){var t=e.timestamp;Date.now()-t>this.expireTime?e={sessionId:en(),timestamp:Date.now()}:e.timestamp=Date.now(),this.storage.setItem(this.sessionKey,e),this.resetExpTime()}},e.prototype.setSessionId=function(){var e=this,t=this.storage.getItem(this.sessionKey);t&&t.sessionId?t.timestamp=Date.now():t={sessionId:en(),timestamp:Date.now()},this.storage.setItem(this.sessionKey,t),this.disableSessionTimeCheck||(this.sessionExp=setInterval((function(){e.checkEXp()}),this.expireTime))},e.prototype.getSessionId=function(){var e=this.storage.getItem(this.sessionKey);return this.disableSession?"":e&&e.sessionId?e.sessionId:""},e.prototype.resetExpTime=function(){var e=this;this.sessionExp&&(clearInterval(this.sessionExp),this.sessionExp=setInterval((function(){e.checkEXp()}),this.expireTime))},e.prototype.resetSessionId=function(e){var t={sessionId:e||en(),timestamp:Date.now()};this.storage.setItem(this.sessionKey,t)},e.prototype.checkEXp=function(){var e=this.storage.getItem(this.sessionKey);e&&e.sessionId&&Date.now()-e.timestamp+30>=this.expireTime&&(e={sessionId:en(),timestamp:Date.now()},this.storage.setItem(this.sessionKey,e))},e}(),nn=function(){function e(e,t){this.collector=e,this.config=t,this.requestType=t.request_type,this.supportBeacon=!(!window.navigator||!window.navigator.sendBeacon),this.errorCode={NO_URL:4001,IMG_ON:4e3,IMG_CATCH:4002,BEACON_FALSE:4003,XHR_ON:500,RESPONSE:5001,TIMEOUT:5005},this.customHeader=t.custom_request_header||{}}return e.prototype.useFetch=function(e){var t=e.url,n=e.data,i=e.method,o=e.success,r=e.fail,a={"Content-Type":"application/json; charset=utf-8"};if(Object.keys(this.customHeader).length)for(var s in this.customHeader)a[s]=this.customHeader[s];window.fetch?fetch(t,{method:i||"POST",headers:a,body:JSON.stringify(n)}).then((function(e){return e.json()})).then((function(e){o&&o(e)})).catch((function(e){r&&r(n,e)})):(this.requestType="xhr",console.log("your brwoser not support fetch, use xhr"),this.useRequest({url:t,data:n,method:i,success:o,fail:r}))},e.prototype.useBeacon=function(e){var t=e.url,n=e.data,i=e.success,o=e.fail;"xhr"!==this.requestType?window.navigator.sendBeacon(t,JSON.stringify(n))?i&&i():o&&o(n,this.errorCode.BEACON_FALSE):this.useXhr(e)},e.prototype.useXhr=function(e){var t=this,n=e.url,i=e.data,o=e.method,r=e.success,a=e.fail,s=e.timeout,c=e.withCredentials,u=e.app_key;try{var l=new XMLHttpRequest,f=o||"POST";if(l.open(f,""+n,!0),l.setRequestHeader("Content-Type","application/json; charset=utf-8"),u&&l.setRequestHeader("X-MCS-AppKey",""+u),Object.keys(this.customHeader).length)for(var d in this.customHeader)l.setRequestHeader(d,this.customHeader[d]);c&&(l.withCredentials=!0),s&&(l.timeout=s,l.ontimeout=function(){a&&a(i,t.errorCode.TIMEOUT)}),l.onload=function(){if(r){var e=null;if(l.responseText){try{e=JSON.parse(l.responseText)}catch(t){e={}}r(e,i)}}},l.onerror=function(){l.abort(),a&&a(i,t.errorCode.XHR_ON)},l.send(JSON.stringify(i))}catch(e){}},e.prototype.useRequest=function(e){var t=e.useBeacon,n=e.forceXhr;if("xhr"===this.requestType)this.useXhr(e);else{if(t&&this.supportBeacon)return void this.useBeacon(e);if("fetch"===this.requestType&&!n)return void this.useFetch(e);this.useXhr(e)}},e}(),on=function(){function e(e,t){if(this.devToolReady=!1,this.devToolOrigin="*",this.sendAlready=!1,t.enable_debug&&"Microsoft Internet Explorer"!==e.configManager.get("browser")){this.collect=e,this.config=t,this.app_id=t.app_id;var n=e.adapters.storage;this.cacheStorgae=new n(!1),this.loadUrl=t.devtool_url||"https://sf16-scmcdn-va.ibytedtos.com/obj/static-us/log-sdk/collect/devtool/debug-web.v2.0.0.js",this.filterEvent=new Set(["__bav_page","__bav_beat","__bav_page_statistics","__bav_click","__bav_page_exposure","bav2b_page","bav2b_beat","bav2b_page_statistics","bav2b_click","bav2b_page_exposure","_be_active","predefine_pageview","__profile_set","__profile_set_once","__profile_increment","__profile_unset","__profile_append","predefine_page_alive","predefine_page_close","abtest_exposure"]),this.load()}}return e.prototype.loadScript=function(e){try{var t=document.createElement("script");t.src=e,t.onerror=function(){console.log("load DevTool render fail")},t.onload=function(){console.log("load DevTool render success")},document.getElementsByTagName("body")[0].appendChild(t)}catch(e){console.log("devTool load fail, "+e.message)}},e.prototype.parseUrl=function(){var e={};try{var t=window.location.href.split("?")[1].split("&");t.length&&t.forEach((function(t){var n=t.split("=");e[decodeURIComponent(n[0])]=decodeURIComponent(n[1])}))}catch(e){}return e},e.prototype.load=function(){try{var e=this.parseUrl();if(e.open_devtool_web&&e.app_id){if(parseInt(e.app_id)!==this.app_id)return}else if(!this.getStorage())return;this.loadBaseInfo(),this.loadHook(),this.setStorage(),this.addLintener(),this.loadDebuggerModule(),this.loadDevTool()}catch(e){console.log("debug fail, "+e.message)}},e.prototype.getStorage=function(){var e=this.cacheStorgae.getItem("__applog_open_devtool_web");return e&&parseInt(e)===this.app_id},e.prototype.setStorage=function(){this.cacheStorgae.setItem("__applog_open_devtool_web",this.app_id)},e.prototype.loadDevTool=function(){this.loadScript(this.loadUrl)},e.prototype.loadBaseInfo=function(){if(this.log=[],this.event=[],this.info=[{title:"BaseInfo",key:"base",type:1,content:[{name:"app_id",desc:"APPID",value:this.config.app_id},{name:"channel",desc:"CHANNEL",value:this.config.channel},{name:"domain",desc:"Domain",value:this.collect.configManager.getDomain()},{name:"sdk_version",desc:"SDK Version",value:"5.3.0_oversea"},{name:"sdk_type",desc:"SDK Import Type",value:"npm"}]},{title:"UserInfo",key:"user",type:2,content:[{name:"uuid",desc:"UserUniqueId",value:this.collect.configManager.get("user").user_unique_id||""},{name:"web_id",desc:"WEB_ID",value:this.collect.configManager.get("user").web_id||""}]},{title:"CommonInfo",type:2,key:"common",content:[{name:"browser",desc:"Browser",value:this.collect.configManager.get("browser")},{name:"browser_version",desc:"Browser Version",value:this.collect.configManager.get("browser_version")},{name:"platform",desc:"Platform",value:this.collect.configManager.get("platform")},{name:"device_model",desc:"Devide Model",value:this.collect.configManager.get("device_model")},{name:"os_name",desc:"Os Name",value:this.collect.configManager.get("os_name")},{name:"os_version",desc:"Os Version",value:this.collect.configManager.get("os_version")},{name:"resolution",desc:"Screen Resolution",value:this.collect.configManager.get("resolution")},{name:"referrer",desc:"Referrer",value:this.collect.configManager.get("referrer")},{name:"custom",desc:"Custom Info",value:JSON.stringify(this.collect.configManager.get("custom"))}]},{title:"Config Info",key:"config",type:3,content:[{name:"autotrack",desc:"AutoTrackEvent",value:!!this.config.autotrack},{name:"stay",desc:"StayDuration",value:!!this.config.enable_stay_duration}]},{title:"A/B Config Info",key:"ab",type:4,content:[{name:"ab",desc:"A/BTester",value:!!this.config.enable_ab_test}]}],this.config.enable_ab_test){var e=this.getInfo("ab"),t=[{name:"ab",desc:"A/BTester",value:!!this.config.enable_ab_test},{name:"vid",desc:"A/B VID",value:this.collect.configManager.getAbVersion()},{name:"ab_domain",desc:"Domain",value:this.config.ab_channel_domain||St(Gt[this.config.channel])},{name:"all_values",desc:"A/B ALL Values",value:this.collect.configManager.getAbCache()}];e.content=t,this.setInfo("ab",e)}},e.prototype.getInfo=function(e){var t=null;return this.info.forEach((function(n){n.key===e&&(t=n)})),t},e.prototype.setInfo=function(e,t){var n=!1;this.info.forEach((function(i){i.key===e&&(n=!0,i=t)})),n||this.info.push(t)},e.prototype.getSecondInfo=function(e,t){var n=this.getInfo(e),i=null;return n.content.forEach((function(e){e.name===t&&(i=e)})),i},e.prototype.setSecondInfo=function(e,t,n){var i=this.getInfo(e);i.content.forEach((function(e){e.name===t&&(e.value=n)})),this.setInfo(e,i)},e.prototype.loadHook=function(){var e=this;this.collect.on(yt.DEBUGGER_MESSAGE,(function(t){switch(t.type){case yt.DEBUGGER_MESSAGE_SDK:var n={time:t.time,type:t.logType||"sdk",infoType:t.infoType||"sdk",level:t.level,name:t.info,show:!0,levelShow:!0,needDesc:!!t.data};return t.data&&(n.desc={content:JSON.stringify(t.data)}),e.updateLog(n),t.secType&&"AB"===t.secType?(e.setSecondInfo("ab","vid",e.collect.configManager.getAbVersion()),e.setSecondInfo("ab","all_values",e.collect.configManager.getAbCache())):"USER"===t.secType&&(e.setSecondInfo("user","uuid",e.collect.configManager.get("user").user_unique_id),e.setSecondInfo("user","web_id",e.collect.configManager.get("user").web_id)),void e.updateInfo();case yt.DEBUGGER_MESSAGE_EVENT:if(t.data&&t.data.length){var i=t.data[0],o=i.events;if(!o.length)return;o.forEach((function(n){n.checkShow=!0,n.searchShow=!0,n.focusShow=!0,n.status=t.status,n.type=e.filterEvent.has(n.event)?"sdk":"cus",n.verifyType=t.verifyType?"verify":"no",n.info="","fail"===t.status&&(n.info={message:"code: "+t.code+", msg: "+(t.msg||t.failType)})})),e.updateEvent(i)}return}}))},e.prototype.addLintener=function(){var e=this;window.addEventListener("message",(function(t){if(t&&t.data&&"devtool:web:ready"===t.data.type){if(e.devToolOrigin=t.origin,e.devToolReady=!0,e.sendAlready)return;e.sendData("devtool:web:init",{info:e.info,log:e.log,event:e.event,sdk_type:"5.3.0_oversea".includes("tob")?"tob":"inner",appId:e.app_id}),e.sendAlready=!0}t&&t.data&&"devtool:web:ssid"===t.data.type&&e.collect.getToken((function(t){e.setSecondInfo("user","sid",t.tobid),e.updateInfo()}))}))},e.prototype.sendData=function(e,t){try{var n={type:e,payload:t};window&&window.postMessage(n,this.devToolOrigin)}catch(e){}},e.prototype.updateInfo=function(){this.devToolReady&&this.sendData("devtool:web:info",this.info)},e.prototype.updateLog=function(e){this.devToolReady?this.sendData("devtool:web:log",e):this.log.push(e)},e.prototype.updateEvent=function(e){this.devToolReady?this.sendData("devtool:web:event",e):this.event.push(e)},e.prototype.loadDebuggerModule=function(){var e="#debugger-applog-web {\n position: fixed;\n width: 45px;\n height: 45px;\n background-image: url("+St("1fz22z22z1nz21z4mz4bz4bz1jz1dz49z1az1bz1lz49z22z1mz21z4az19z27z22z1cz21z1az1kz4az1az1mz1kz4bz1mz19z1hz4bz21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz1bz1cz24z22z1mz1mz1jz4bz18z1nz1nz1jz1mz1ez4az1nz1lz1e")+");\n bottom: 5%;\n right: 10%;\n cursor: pointer;\n z-index:100;\n background-size: 45px;\n }",t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.appendChild(document.createTextNode(e)),t.appendChild(n);var i=document.createElement("div");i.innerHTML='
';var o=document.createElement("div");o.innerHTML='
',document.getElementsByTagName("body")[0].appendChild(i),document.getElementsByTagName("body")[0].appendChild(o);var r=document.getElementById("debugger-applog-web");r&&r.addEventListener("click",(function(){window&&window.postMessage({type:"devtool:web:open-draw"},location.origin)}))},e}(),rn={autotrack:{src:{sg:"https://sf16-scmcdn-sg.ibytedtos.com/obj/static-sg/log-sdk/collect/5.0/plugin/autotrack.js",va:"https://sf16-scmcdn-va.ibytedtos.com/obj/static-us/log-sdk/collect/5.0/plugin/autotrack.js"},object:"LogAutoTrack"},ab:{src:{sg:"https://sf16-scmcdn-sg.ibytedtos.com/obj/static-sg/log-sdk/collect/5.0/plugin/ab.js",va:"https://sf16-scmcdn-va.ibytedtos.com/obj/static-us/log-sdk/collect/5.0/plugin/ab.js"},object:"LogAb"},stay:{src:{sg:"https://sf16-scmcdn-sg.ibytedtos.com/obj/static-sg/log-sdk/collect/5.0/plugin/stay.js",va:"https://sf16-scmcdn-va.ibytedtos.com/obj/static-us/log-sdk/collect/5.0/plugin/stay.js"},object:"LogStay"},route:{src:{sg:"https://sf16-scmcdn-sg.ibytedtos.com/obj/static-sg/log-sdk/collect/5.0/plugin/route.js",va:"https://sf16-scmcdn-va.ibytedtos.com/obj/static-us/log-sdk/collect/5.0/plugin/route.js"},object:"LogRoute"},tracer:{src:{sg:"https://sf16-scmcdn-sg.ibytedtos.com/obj/static-sg/log-sdk/collect/5.0/plugin/tracer.js",va:"https://sf16-scmcdn-va.ibytedtos.com/obj/static-us/log-sdk/collect/5.0/plugin/tracer.js"},object:"LogTracer"},retry:{src:{sg:"https://sf16-scmcdn-sg.ibytedtos.com/obj/static-sg/log-sdk/collect/5.0/plugin/retry.js",va:"https://sf16-scmcdn-va.ibytedtos.com/obj/static-us/log-sdk/collect/5.0/plugin/retry.js"},object:"LogRetry"},visual:{src:{sg:"https://sf16-scmcdn-sg.ibytedtos.com/obj/static-sg/log-sdk/collect/5.0/plugin/visual.js",va:"https://sf16-scmcdn-va.ibytedtos.com/obj/static-us/log-sdk/collect/5.0/plugin/visual.js"},object:"LogVisual"}},an=["ab","autotrack","Stay","store","et","profile","cep","heartbeat","monitor","route","tracer"],sn=function(){function e(e){this.disableAutoPageView=!1,this.bridgeReport=!1,this.staging=!1,this.pluginInstances=[],this.sended=!1,this.started=!1,this.destroy=!1,this.sdkReady=!1,this.adapters={},this.loadType="base",this.sdkStop=!1,this.name=e,this.hook=new bt,this.remotePlugin=new Map,this.Types=Vt,this.adapters.storage=Pt,this.loadType="full"}return e.usePlugin=function(t,n,i){if(n){for(var o=!1,r=0,a=e.plugins.length;r0&&this.changeListener.forEach((function(t){"function"==typeof t&&t(e)}))},e.prototype.configVersions=function(e){this.collect.configManager.setAbVersion(e)},e.prototype.getVar=function(e,t,n,i){if(!e)throw new Error("variable must not be empty");if(void 0===t)throw new Error("variable no default value");if("function"!=typeof n)throw new Error("callback must be a function");var o={name:e,defaultValue:t,callback:n,type:Lt.Var};this.collect.emit(yt.DEBUGGER_MESSAGE,{type:yt.DEBUGGER_MESSAGE_SDK,secType:"AB",info:"SDK Execute GetVar",level:"info",time:Date.now(),data:e,infoType:"cus"}),"complete"===this.fetchStatus&&"complete"===this.refreshFetchStatus?this.getRealVar(o,e,i):this.callbacks.push(o)},e.prototype.setAbUuid=function(e,t){this.collect.configManager.setAbUuidCache(e,t)},e.prototype.getRealVar=function(e,t,n){var i=e.name,o=e.defaultValue,r=e.callback,a=this.data;if(a){if(kt(a[i])){var s=a[i].vid;return"$ab_url"===t?this.mulilinkVersions.includes(s)||this.mulilinkVersions.push(s):this.versions.includes(s)||this.versions.push(s),this.setAbUuid(s,n),this.updateVersions(),this.fechEvent(s,t,o),r(a[i].val),void this.collect.emit(yt.DEBUGGER_MESSAGE,{type:yt.DEBUGGER_MESSAGE_SDK,secType:"AB",info:"SDK Execute GetVar, Exposure Experiment "+i,level:"info",time:Date.now(),data:a[i],infoType:"sdk"})}this.collect.emit(yt.DEBUGGER_MESSAGE,{type:yt.DEBUGGER_MESSAGE_SDK,secType:"AB",info:"SDK Execute GerVar Default Callback",level:"info",time:Date.now(),data:this.data,infoType:"sdk"}),r(o)}else r(o)},e.prototype.getAllVars=function(e){if("function"!=typeof e)throw new Error("callback must be a function");var t={callback:e,type:Lt.All};this.collect.emit(yt.DEBUGGER_MESSAGE,{type:yt.DEBUGGER_MESSAGE_SDK,secType:"AB",info:"SDK Execute GetAllVars",level:"info",time:Date.now(),infoType:"cus"}),"complete"===this.fetchStatus&&"complete"===this.refreshFetchStatus?this.getRealAllVars(t):this.callbacks.push(t)},e.prototype.getRealAllVars=function(e){(0,e.callback)(this.data?JSON.parse(JSON.stringify(this.data)):{}),this.collect.emit(yt.DEBUGGER_MESSAGE,{type:yt.DEBUGGER_MESSAGE_SDK,secType:"AB",info:"SDK Execute GetAllVars Callback",level:"info",time:Date.now(),data:this.data,infoType:"sdk"})},e.prototype.fechEvent=function(e,t,n){try{if(this.config.disable_track_event)return;if(!e)return;var i=this.collect.configManager.get(),o=i.header,r=i.user,a=this.getABCache(),s=r[this.ab_user_mode]||r.user_unique_id;if(a&&a.uuid&&a.uuid!==s)return;var c={event:"abtest_exposure",ab_sdk_version:""+e,params:JSON.stringify({app_id:this.config.appId,ab_url:"$ab_url"===t?n:window.location.href,data:this.data}),local_time_ms:Date.now()};o.custom=JSON.stringify(o.custom);var u={events:[c],user:r,header:o};this.reportExposure(u,t)}catch(e){this.collect.emit(yt.DEBUGGER_MESSAGE,{type:yt.DEBUGGER_MESSAGE_SDK,info:"SDK Something Error",level:"error",time:Date.now(),data:e.message,infoType:"sdk"})}},e.prototype.reportExposure=function(e,t){var n=this;this.exposureCache.push(e),this.reportTimeout&&clearTimeout(this.reportTimeout),this.exposureCache.length>=this.exposureLimit?this.report(t):this.reportTimeout=setTimeout((function(){n.report(t),clearTimeout(n.reportTimeout)}),this.ab_batch_time)},e.prototype.report=function(e){var t=this;this.collect.requestManager.useRequest({url:this.reportUrl,data:this.exposureCache,timeout:2e4,useBeacon:"$ab_url"===e}),this.exposureCache.forEach((function(e){t.collect.emit(yt.DEBUGGER_MESSAGE,{type:yt.DEBUGGER_MESSAGE_EVENT,info:"SDK Report Exposure Event Success",time:Date.now(),data:[e],code:200,status:"success",infoType:"sdk"})})),this.exposureCache=[]},e.prototype.setExternalAbVersion=function(e){this.extVersions=[e],this.updateVersions()},e.prototype.getABconfig=function(e,t){var n=Object.keys(e);n&&n.length&&this.collect.configManager.set(e),this.fetchAB(t)},e.prototype.get=function(e){return this.cacheStorgae.getItem(e)},e.prototype.set=function(e,t){this.cacheStorgae.setItem(e,t),this.collect.configManager.setAbCache(t),this.collect.event("abtest_cache",{env_uuid:this.collect.configManager.get("user").user_unique_id||"",cache:JSON.stringify(t)})},e.prototype.getABCache=function(e){var t={ab_version:[],ab_ext_version:[],ab_version_multilink:[],data:null,timestamp:+new Date,uuid:""};return t=this.get(this.abKey)||t,e?t[e]:t},e.prototype.updateABCache=function(){var e=this.getABCache();e.ab_version_multilink=this.mulilinkVersions,e.ab_ext_version=this.extVersions,e.ab_version=this.versions,e.timestamp=Date.now(),this.set(this.abKey,e)},e.prototype.setAbCache=function(e){var t=this.getABCache();t.data=this.data,t.uuid=e,t.timestamp=Date.now(),this.set(this.abKey,t)},e.prototype.clearCache=function(){this.refreshFetchStatus="ing",this.data={},this.extVersions=[],this.mulilinkVersions=[],this.versions=[],this.collect.configManager.clearAbCache()},e.prototype.openOverlayer=function(e){var t=this;if(function(){if(!document.getElementById(cn)){var e="body { opacity: 0 !important; }",t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.id=cn,n.type="text/css",n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e)),t.appendChild(n)}}(),e)var n=setTimeout((function(){t.closeOverlayer(),clearTimeout(n)}),e)},e.prototype.closeOverlayer=function(){var e;(e=document.getElementById(cn))&&e.parentElement.removeChild(e)},e.prototype.fetchComplete=function(e,t){var n=this;try{if(e&&"[object Object]"==Object.prototype.toString.call(e)){this.data=e,this.setAbCache(t);var i=[];Object.keys(e).forEach((function(t){var n=e[t].vid;n&&i.push(n)})),this.versions=this.versions.filter((function(e){return i.includes(e)}));var o=e.$ab_url,r=e.$ab_modification;if(r&&r.val&&this.enable_ab_visual){if(this.collect.destroy)return}else if(o&&this.enable_multilink){this.mulilinkVersions=this.mulilinkVersions.filter((function(e){return i.includes(e)}));var a=o.val,s=o.vid;a&&s&&this.getVar("$ab_url",a,(function(){n.editMode||(a!==window.location.href?setTimeout((function(){if(!n.collect.destroy){var e=""+a;e=-1===e.indexOf("http")?"https://"+e:e,At(e).host!==location.host?e=e+"&vid="+s:window.history.replaceState("","",e),window.location.href=e}}),100):n.closeOverlayer())}))}this.updateVersions()}else this.closeOverlayer();this.callbacks.forEach((function(e){return n[e.type===Lt.Var?"getRealVar":"getRealAllVars"](e,"")})),this.callbacks=[]}catch(e){}},e.prototype.fetchAB=function(e){var t=this,n=this.collect.configManager.get(),i={header:pt(pt(pt({aid:this.config.app_id},n.user||{}),n.header||{}),{ab_sdk_version:this.collect.configManager.getAbVersion(),ab_url:window.location.href})};this.collect.emit(yt.DEBUGGER_MESSAGE,{type:yt.DEBUGGER_MESSAGE_SDK,info:"SDK Fetch AB Request",level:"info",logType:"fetch",time:Date.now(),data:i,infoType:"sdk"});var o=n.user[this.ab_user_mode]||n.user.user_unique_id;this.collect.requestManager.useRequest({url:this.fetchUrl,data:i,success:function(n){t.fetchStatus="complete",t.refreshFetchStatus="complete";var i=n.data;"success"===n.message?(t.fetchComplete(i,o),e&&e(i)):(t.fetchComplete(null,o),e&&e(null)),t.collect.emit(t.types.AbComplete,i),t.collect.emit(yt.DEBUGGER_MESSAGE,{type:yt.DEBUGGER_MESSAGE_SDK,secType:"AB",info:"SDK Fetch AB Request Success",level:"info",logType:"fetch",time:Date.now(),data:i,infoType:"sdk"})},fail:function(){t.fetchStatus="complete",t.refreshFetchStatus="complete",t.fetchComplete(null,o),t.collect.emit(t.types.AbTimeout),e&&e(null),t.collect.emit(yt.DEBUGGER_MESSAGE,{type:yt.DEBUGGER_MESSAGE_SDK,secType:"AB",info:"SDK Fetch AB Request Network Error",level:"error",logType:"fetch",time:Date.now(),infoType:"sdk"})},timeout:this.timeout})},e.prototype.filterUrl=function(e){try{var t="";-1!==e.indexOf("&multilink=true")?t="&multilink=true[\0-ÿ]*":-1!==e.indexOf("?multilink=true")&&(t="\\?multilink=true[\0-ÿ]*");var n=new RegExp(t,"g");e=e.replace(n,"")}catch(e){}return e},e}(),ln=function(){function e(){}return e.prototype.apply=function(e,t){var n=this;if(t.event_verify_url)if("string"==typeof t.event_verify_url){if(this.url=t.event_verify_url+"/v1/list_test",this.url){var i=e.Types;e.on(i.SubmitBefore,(function(t){e.requestManager.useBeacon({url:n.url,data:t}),e.emit(yt.DEBUGGER_MESSAGE,{type:yt.DEBUGGER_MESSAGE_EVENT,info:"SDK Report ByteIo Verify Request",time:Date.now(),data:t,code:200,status:"success",verifyType:!0})}))}}else console.log("please use correct et_test url")},e}(),fn=function(){function e(e,t){this.maxDuration=432e5,this.aliveDTime=6e4,this.options={aliveName:"predefine_page_alive",params:{}},this.focusState=!0,this.collect=e,this.config=t,this.pageStartTime=Date.now(),this.sessionStartTime=this.pageStartTime,this.timerHandler=null,kt(t.enable_stay_duration)&&(this.options=Object.assign(this.options,t.enable_stay_duration)),this.hard=this.options.mode&&"hard"===this.options.mode,this.focusState=document.hasFocus()}return e.prototype.setParams=function(e,t,n){this.set_path=e,this.set_url=n,this.set_title=t},e.prototype.enable=function(e,t,n){this.url_path=e,this.url=n,this.title=t,this.disableCallback=this.enablePageAlive(),this.hard&&(this.removeMode=this.hardMode())},e.prototype.disable=function(){this.disableCallback(),this.pageStartTime=Date.now()},e.prototype.sendEvent=function(e,t){void 0===t&&(t=!1);var n=t?this.aliveDTime:Date.now()-this.sessionStartTime;n<0||n>this.aliveDTime||Date.now()-this.pageStartTime>this.maxDuration||t&&"hidden"===document.visibilityState||this.hard&&!this.focusState||(this.collect.beconEvent(this.options.aliveName,pt({url_path:this.getParams("url_path"),title:this.getParams("title"),url:this.getParams("url"),duration:n,is_support_visibility_change:xt(),startTime:this.sessionStartTime,hidden:document.visibilityState,leave:e,mode:this.hard?"hard":"normal",focusState:this.focusState},this.options.params)),this.sessionStartTime=Date.now())},e.prototype.getParams=function(e){switch(e){case"url_path":return this.set_path||this.url_path||location.pathname;case"title":return this.set_title||this.title||document.title||location.pathname;case"url":return this.set_url||this.url||location.href}},e.prototype.setUpTimer=function(){var e=this;return this.timerHandler&&clearInterval(this.timerHandler),setInterval((function(){Date.now()-e.sessionStartTime>e.aliveDTime&&e.sendEvent(!1,!0)}),1e3)},e.prototype.visibilitychange=function(){"hidden"===document.visibilityState?this.timerHandler&&(clearInterval(this.timerHandler),this.sendEvent(!1)):"visible"===document.visibilityState&&(this.sessionStartTime=Date.now(),this.timerHandler=this.setUpTimer())},e.prototype.beforeunload=function(){document.hidden||this.sendEvent(!0)},e.prototype.enablePageAlive=function(){var e=this;this.timerHandler=this.setUpTimer();var t=this.visibilitychange.bind(this),n=this.beforeunload.bind(this);return document.addEventListener("visibilitychange",t),Ct(n),function(){e.beforeunload(),document.removeEventListener("visibilitychange",t),window.removeEventListener("beforeunload",n),window.removeEventListener("pagehide",n)}},e.prototype.hardMode=function(){var e=this,t=function(){e.timerHandler&&(clearInterval(e.timerHandler),e.sendEvent(!1)),e.focusState=!1},n=function(){e.focusState=!0,e.sessionStartTime=Date.now(),e.timerHandler=e.setUpTimer()};return window.addEventListener("blur",t),window.addEventListener("focus",n),function(){window.removeEventListener("blur",t),window.removeEventListener("focus",n)}},e}(),dn=function(){function e(e,t){var n=this;this.maxDuration=432e5,this.aliveDTime=6e4,this.options={closeName:"predefine_page_close",params:{}},this.focusState=!0,this.visibilitychange=function(){"hidden"===document.visibilityState?n.activeEndTime=Date.now():"visible"===document.visibilityState&&(n.activeEndTime&&(n.totalTime+=n.activeEndTime-n.activeStartTime,n.activeTimes+=1),n.activeEndTime=void 0,n.activeStartTime=Date.now())},this.beforeunload=function(){if(n.totalTime+=(n.activeEndTime||Date.now())-n.activeStartTime,n.config.autotrack)try{window.sessionStorage.setItem("_tea_cache_duration",JSON.stringify({duration:n.totalTime,page_title:document.title||location.pathname}))}catch(e){}n.sendEventPageClose()},this.collect=e,this.config=t,this.maxDuration=t.maxDuration||864e5,this.pageStartTime=Date.now(),kt(t.enable_stay_duration)&&(this.options=Object.assign(this.options,t.enable_stay_duration)),this.hard=this.options.mode&&"hard"===this.options.mode,this.focusState=document.hasFocus(),this.resetData()}return e.prototype.setParams=function(e,t,n){this.set_path=e,this.set_url=n,this.set_title=t},e.prototype.resetParams=function(e,t,n){this.url_path=e,this.url=n,this.title=t},e.prototype.enable=function(e,t,n){this.url_path=e,this.url=n,this.title=t,this.disableCallback=this.enablePageClose(),this.hard&&(this.removeMode=this.hardMode())},e.prototype.disable=function(){this.disableCallback()},e.prototype.resetData=function(){this.activeStartTime=void 0===this.activeStartTime?this.pageStartTime:Date.now(),this.activeEndTime=void 0,this.activeTimes=1,this.totalTime=0,this.resetParams(location.pathname,document.title,location.href)},e.prototype.sendEventPageClose=function(){var e=Date.now()-this.pageStartTime;this.totalTime<0||e<0||this.totalTime>=this.maxDuration||this.hard&&!this.focusState||(this.collect.beconEvent(this.options.closeName,pt({url_path:this.getParams("url_path"),title:this.getParams("title"),url:this.getParams("url"),active_times:this.activeTimes,duration:this.totalTime,total_duration:e,is_support_visibility_change:xt(),mode:this.hard?"hard":"normal",focusState:this.focusState},this.options.params)),this.pageStartTime=Date.now(),this.resetData())},e.prototype.getParams=function(e){switch(e){case"url_path":return this.set_path||this.url_path||location.pathname;case"title":return this.set_title||this.title||document.title||location.pathname;case"url":return this.set_url||this.url||location.href}},e.prototype.enablePageClose=function(){var e=this,t=this.visibilitychange.bind(this),n=this.beforeunload.bind(this);return document.addEventListener("visibilitychange",t),Ct(n),function(){e.beforeunload(),document.removeEventListener("visibilitychange",t),window.removeEventListener("beforeunload",n),window.removeEventListener("pagehide",n)}},e.prototype.hardMode=function(){var e=this,t=function(){e.focusState=!1},n=function(){e.focusState=!0};return window.addEventListener("blur",t),window.addEventListener("focus",n),function(){window.removeEventListener("blur",t),window.removeEventListener("focus",n)}},e}(),hn=function(){function e(){}return e.prototype.apply=function(e,t){var n=this;if(this.collect=e,this.config=t,this.config.enable_stay_duration){this.title=document.title||location.pathname,this.url=location.href,this.url_path=location.pathname,this.pageAlive=new fn(e,t),this.pageClose=new dn(e,t);var i=this.collect.Types;this.collect.on(i.ResetStay,(function(e){var t=e.url_path,i=e.title,o=e.url;n.resetStayDuration(t,i,o)})),this.collect.on(i.RouteChange,(function(e){e.init||t.disable_route_report||n.resetStayDuration()})),this.collect.on(i.SetStay,(function(e){var t=e.url_path,i=e.title,o=e.url;n.setStayParmas(t,i,o)})),this.enable(this.url_path,this.title,this.url),this.ready(i.Stay),this.collect.emit(i.StayReady)}},e.prototype.ready=function(e){var t=this;if(this.collect.set(e),this.collect.hook._hooksCache.hasOwnProperty(e)){var n=this.collect.hook._hooksCache[e];if(!Object.keys(n).length)return;var i=function(e){n[e].length&&n[e].forEach((function(n){t.collect.hook.emit(e,n)}))};for(var o in n)i(o)}},e.prototype.enable=function(e,t,n){this.pageAlive.enable(e,t,n),this.pageClose.enable(e,t,n)},e.prototype.disable=function(){this.pageAlive.disable(),this.pageClose.disable()},e.prototype.setStayParmas=function(e,t,n){void 0===e&&(e=""),void 0===t&&(t=""),void 0===n&&(n=""),this.pageAlive.setParams(e,t,n),this.pageClose.setParams(e,t,n),this.collect.emit(yt.DEBUGGER_MESSAGE,{type:yt.DEBUGGER_MESSAGE_SDK,info:"SDK Execute resetStayParams",level:"info",time:Date.now(),data:{url_path:e,title:t,url:n}})},e.prototype.reset=function(e,t,n){this.disable(),this.enable(e,t,n)},e.prototype.resetStayDuration=function(e,t,n){this.reset(e,t,n),this.collect.emit(yt.DEBUGGER_MESSAGE,{type:yt.DEBUGGER_MESSAGE_SDK,info:"SDK Execute resetStayDuration",level:"info",time:Date.now(),data:{url_path:e,title:t,url:n}})},e}(),pn=function(){function e(){var e=this;this.setInterval=function(){e.clearIntervalFunc=function(e,t){void 0===e&&(e=function(){}),void 0===t&&(t=1e3);var n,i=Date.now()+t;return n=window.setTimeout((function o(){var r=Date.now()-i;e(),i+=t,n=window.setTimeout(o,Math.max(0,t-r))}),t),function(){window.clearTimeout(n)}}((function(){e.isSessionhasEvent&&e.endCurrentSession()}),e.sessionInterval)},this.clearInterval=function(){e.clearIntervalFunc&&e.clearIntervalFunc()}}return e.prototype.apply=function(e,t){var n=this;if(this.collect=e,!t.disable_heartbeat){this.sessionInterval=6e4,this.startTime=0,this.lastTime=0,this.setInterval();var i=this.collect.Types;this.collect.on(i.SessionReset,(function(){n.process()}))}},e.prototype.endCurrentSession=function(){this.collect.event("_be_active",{start_time:this.startTime,end_time:this.lastTime,url:window.location.href,referrer:window.document.referrer,title:document.title||location.pathname}),this.isSessionhasEvent=!1,this.startTime=0},e.prototype.process=function(){this.isSessionhasEvent||(this.isSessionhasEvent=!0,this.startTime=+new Date);var e=this.lastTime||+new Date;this.lastTime=+new Date,this.lastTime-e>this.sessionInterval&&(this.clearInterval(),this.endCurrentSession(),this.setInterval())},e}(),gn=function(){function e(){}return e.prototype.apply=function(e,t){var n=this;if(this.collect=e,this.config=t,!this.config.channel_domain&&!t.disable_track_event&&!t.disable_sdk_monitor){this.url=e.configManager.getUrl("event");var i=this.collect.Types;this.collect.on(i.Ready,(function(){n.sdkOnload()})),this.collect.on(i.SubmitError,(function(e){var t=e.type,i=e.eventData,o=e.errorCode;"f_data"===t&&n.sdkError(i,o)}))}},e.prototype.sdkOnload=function(){var e=this;try{var t=this.collect.configManager.get(),n=t.header,i=t.user,o=n.app_id,r=n.app_name,a=n.sdk_version,s=i.web_id,c={events:[{event:"onload",params:JSON.stringify({app_id:o,app_name:r||"",sdk_version:a,sdk_type:"npm",sdk_config:this.config,sdk_desc:"TOC_OVERSEA"}),local_time_ms:Date.now()}],user:{user_unique_id:s},header:{}};setTimeout((function(){e.collect.requestManager.useRequest({url:e.url,data:[c],timeout:3e4,app_key:"566f58151b0ed37e",forceXhr:!0})}),16)}catch(e){}},e.prototype.sdkError=function(e,t){var n=this;try{var i=e[0],o=i.user,r=i.header,a=[];e.forEach((function(e){e.events.forEach((function(e){a.push(e)}))}));var s={events:a.map((function(e){return{event:"on_error",params:JSON.stringify({error_code:t,app_id:r.app_id,app_name:r.app_name||"",error_event:e.event,sdk_version:r.sdk_version,local_time_ms:e.local_time_ms,tea_event_index:Date.now(),params:e.params,header:JSON.stringify(r),user:JSON.stringify(o)}),local_time_ms:Date.now()}})),user:{user_unique_id:o.user_unique_id},header:{}};setTimeout((function(){n.collect.requestManager.useRequest({url:n.url,data:[s],timeout:3e4,app_key:"566f58151b0ed37e",forceXhr:!0})}),16)}catch(e){}},e}();function vn(e,t){if(void 0===t&&(t="list"),!e)return!1;if(t&&"list"===t){if(["LI","TR","DL"].includes(e.nodeName))return!0;if(e.dataset&&e.dataset.hasOwnProperty("teaIdx"))return!0;if(e.hasAttribute&&e.hasAttribute("data-tea-idx"))return!0}else{if(["A","BUTTON"].includes(e.nodeName))return!0;if(e.dataset&&e.dataset.hasOwnProperty("teaContainer"))return!0;if(e.hasAttribute&&e.hasAttribute("data-tea-container"))return!0}return!1}function mn(e){for(var t=e;t&&!vn(t,"container");){if("HTML"===t.nodeName||"BODY"===t.nodeName)return e;t=t.parentElement}return t||e}function _n(e){var t="";return 3===e.nodeType?t=e.textContent.trim():e.dataset&&e.dataset.hasOwnProperty("teaTitle")||e.hasAttribute("ata-tea-title")?t=e.getAttribute("data-tea-title"):e.hasAttribute("title")?t=e.getAttribute("title"):"INPUT"===e.nodeName&&["button","submit"].includes(e.getAttribute("type"))?t=e.getAttribute("value"):"IMG"===e.nodeName&&e.getAttribute("alt")&&(t=e.getAttribute("alt")),t.slice(0,200)}var yn=function(e,t){return e.hasAttribute?e.hasAttribute(t):e.attributes?!(!e.attributes[t]||!e.attributes[t].specified):void 0},bn=function(){function e(e,t,n){var i=this;this.statistics=!1,this.pageView=!1,this.clickEvent=function(e){(function(e,t){if(1!==e.nodeType)return!1;if(!t.svg&&function(e){if("svg"===e.tagName.toLowerCase())return!0;for(var t=e.parentElement,n=!1;t;)"svg"===t.tagName.toLowerCase()?(t=null,n=!0):t=t.parentElement;return n}(e))return!1;if(["HTML","BODY"].includes(e.tagName.toUpperCase()))return!1;var n=e;return!("none"===n.style.display||!vn(n,"container")&&!function(e){if(e.children.length){var t=e.children;return![].slice.call(t).some((function(e){return e.children.length>0}))}return!0}(n)&&!t.svg)})(e.target,i.options)&&i.eventHandel({eventType:"dom",eventName:"click"},e)},this.changeEvent=function(e){i.eventHandel({eventType:"dom",eventName:"change"},e)},this.submitEvent=function(e){i.eventHandel({eventType:"dom",eventName:"submit"},e)},this.getPageViewEvent=function(e,t){t&&"pushState"===t&&i.eventHandel({eventType:"dom",eventName:"beat"},pt({beat_type:0},e)),i.eventHandel({eventType:"dom",eventName:"page_view"},e)},this.getPageLoadEvent=function(e){i.eventHandel({eventType:"dom",eventName:"page_statistics"},{lcp:e})},this.config=n.getConfig().eventConfig,this.collect=t,this.options=e,this.beatTime=e.beat}return e.prototype.init=function(e){this.eventHandel=e;var t=this.config.mode;this.addListener(t)},e.prototype.addListener=function(e){var t=this;if("proxy-capturing"===e){if(this.config.click&&window.document.addEventListener("click",this.clickEvent,!0),this.config.change&&window.document.addEventListener("change",this.changeEvent,!0),this.config.submit&&window.document.addEventListener("submit",this.submitEvent,!0),this.config.pv){this.collect.on("route-change",(function(e){var n=e.config,i=e.name;t.getPageViewEvent(n,i),t.pageView=!0}));var n=setTimeout((function(){t.pageView||(t.getPageViewEvent(t.getDefaultConfig()),t.pageView=!0,clearTimeout(n))}),2e3)}if(this.config.beat){try{"complete"===document.readyState?this.beatEvent(this.beatTime):window.addEventListener("load",(function(){t.beatEvent(t.beatTime)}));var i=0,o=null;window.addEventListener("scroll",(function(){clearTimeout(o),o=setTimeout(r,500),i=document.documentElement.scrollTop||document.body.scrollTop}));var r=function(){(document.documentElement.scrollTop||document.body.scrollTop)==i&&t.eventHandel({eventType:"dom",eventName:"beat"},{beat_type:1})}}catch(e){}try{var a=window.performance&&window.performance.getEntriesByType("paint");a&&a.length?(new PerformanceObserver((function(e){var n=e.getEntries(),i=n[n.length-1],o=i.renderTime||i.loadTime;t.statistics||(t.getPageLoadEvent(o),t.statistics=!0)})).observe({entryTypes:["largest-contentful-paint"]}),setTimeout((function(){t.statistics||(t.getPageLoadEvent(a[0].startTime||0),t.statistics=!0)}),2e3)):this.getPageLoadEvent(0)}catch(e){this.getPageLoadEvent(0)}}}},e.prototype.removeListener=function(){window.document.removeEventListener("click",this.clickEvent,!0),window.document.removeEventListener("change",this.changeEvent,!0),window.document.removeEventListener("submit",this.submitEvent,!0)},e.prototype.beatEvent=function(e){var t=this;try{var n;this.eventHandel({eventType:"dom",eventName:"beat"},{beat_type:3}),this.beatTime&&(n=setInterval((function(){t.eventHandel({eventType:"dom",eventName:"beat"},{beat_type:2})}),e)),Ct((function(){t.eventHandel({eventType:"dom",eventName:"beat",eventSend:"becon"},{beat_type:0}),t.beatTime&&clearInterval(n)}))}catch(e){}},e.prototype.getDefaultConfig=function(){return{is_html:1,url:location.href,referrer:document.referrer,page_key:location.href,refer_page_key:document.referrer,page_title:document.title||location.pathname,page_manual_key:"",refer_page_manual_key:"",refer_page_title:"",page_path:location.pathname,page_host:location.host}},e}(),kn={eventConfig:{mode:"proxy-capturing",submit:!1,click:!0,change:!1,pv:!0,beat:!0,hashTag:!1,impr:!1},scoutConfig:{mode:"xpath"}},En=function(){function e(e,t){this.config=e,this.config.eventConfig=Object.assign(this.config.eventConfig,t)}return e.prototype.getConfig=function(){return this.config},e.prototype.setConfig=function(e){return this.config=e},e}();function wn(e,t,n,i){var o={},r=function(e){if(e){var t=e.getBoundingClientRect(),n=t.width,i=t.height;return{left:t.left,top:t.top,element_width:n,element_height:i}}}(t),a=function(e,t){void 0===e&&(e={}),void 0===t&&(t={});var n=e.clientX,i=e.clientY,o=t.left,r=t.top,a=n-o>=0?n-o:0,s=i-r>=0?i-r:0;return{touch_x:Math.floor(a),touch_y:Math.floor(s)}}(e,r),s=r.element_width,c=r.element_height,u=a.touch_x,l=a.touch_y,f=function(e){for(var t=[];null!==e.parentElement;)t.push(e),e=e.parentElement;var n=[],i=[];return t.forEach((function(e){var t=function(e){if(null===e)return{str:"",index:0};var t=0,n=e.parentElement;if(n)for(var i=n.children,o=0;o0)for(var o=t.childNodes,r=0;r0)for(var o=t.childNodes,r=0;r0?o:0)),t.page_start_ms=i.navigationStart}catch(e){console.log("page_statistics event error "+JSON.stringify(e))}return t},e.prototype.handleBeadtEvent=function(e){e.event=this.eventName.beat,e.page_key=window.location.href,e.is_html=1,e.page_title=document.title,e.page_manual_key=this.initConfig.autotrack.page_manual_key||"";try{e.page_viewport_width=window.innerWidth,e.page_viewport_height=window.innerHeight,e.page_total_width=document.documentElement.scrollWidth,e.page_total_height=document.documentElement.scrollHeight,e.scroll_width=document.documentElement.scrollLeft+window.innerWidth,e.scroll_height=document.documentElement.scrollTop+window.innerHeight,e.since_page_start_ms=Date.now()-window.performance.timing.navigationStart,e.page_start_ms=window.performance.timing.navigationStart}catch(e){console.log("beat event error "+JSON.stringify(e))}return e},e}(),xn=function(){function e(e){this.collect=e,this.eventNameList=["report_click_event","report_change_event","report_submit_event","report_exposure_event","report_page_view_event","report_page_statistics_event","report_beat_event"]}return e.prototype.send=function(e,t){var n=e.eventSend,i=t.event;delete t.event,n&&"becon"===n?this.collect.beconEvent(i,t):this.collect.event(i,t)},e.prototype.get=function(e,t){var n=Object.assign({headers:{"content-type":"application/json"},method:"GET"},t);fetch(e,n)},e.prototype.post=function(e,t){var n=Object.assign({headers:{"content-type":"application/json"},method:"POST"},t);fetch(e,n)},e}(),An={},Tn=[];function Dn(e,t,n,i){var o=e&&e.source||window.opener||window.parent,r=e&&e.origin||i||"*",a={type:t,payload:n};o.postMessage(JSON.stringify(a),r)}function Rn(e){if(Tn.some((function(e){return"*"===e}))||Tn.some((function(t){return e.origin.indexOf(t)>-1}))){var t=e.data;if("string"==typeof e.data)try{t=JSON.parse(e.data)}catch(e){t=void 0}if(!t)return;var n=t.type,i=t.payload;An[n]&&An[n].forEach((function(t){"function"==typeof t&&t(e,i)}))}}var On=!1;function Mn(e,t){window.TEAVisualEditor=window.TEAVisualEditor||{},window.TEAVisualEditor.appId=t.app_id;var n,i,o,r,a=t.channel_domain,s="";if((n=["*"]).length&&n.forEach((function(e){Tn.push(e)})),a){var c,u="";try{var l=window.performance.getEntriesByType("resource");if(l&&l.length&&(l.forEach((function(e){"script"===e.initiatorType&&e.name&&-1!==e.name.indexOf("collect")&&(u=e.name)})),u&&(c=u.split("/"))&&c.length)){s="https:/";for(var f=2;f=0&&c<=window.innerHeight&&a>=0&&s<=window.innerWidth&&(n.visible=!0,this.EventHandle({eventType:"dom",eventName:"exposure"},e))}}else n._observeId=this.count,n.visible=!1,this.observeMap.set(this.count,n),this.observe(n),this.count++},e.prototype.exposureRemove=function(e){this.observeMap.has(e._observeId)&&(this.observeMap.delete(e._observeId),this.unobserve(e))},e.prototype.exposureEvent=function(e){if(e.intersectionRatio>=this.Ratio&&e.isIntersecting){if("0"===e.target.style.opacity||"hidden"===e.target.style.visibility)return;if(!0===e.target.visible)return;e.target.visible=!0,this.EventHandle({eventType:"dom",eventName:"exposure"},e)}else e.target.visible=!1},e.prototype.observe=function(e){this.instance.observe(e)},e.prototype.unobserve=function(e){this.instance.unobserve(e)},e._observer_instance=null,e._observer_map=new Map,e}(),Bn=function(){function e(e,t){e.autotrack&&e.autotrack.exposure&&(this._intersection=new Pn(e,t),this._observer=new In(this._intersection),this.initObserver())}return e.prototype.initObserver=function(){var e=this;Array.prototype.forEach.call(document.querySelectorAll("[data-exposure]"),(function(t){e._intersection.exposureAdd(t,"intersect")}))},e}(),Nn={hashTag:!1,impr:!1},Gn=function(){function e(){}return e.prototype.apply=function(e,t){if(this.autoTrackStart=!1,this.collect=e,this.config=t,t.autotrack){var n=e.Types;t.autotrack&&t.autotrack.collect_url&&!t.autotrack.collect_url()||(this.ready(n.Autotrack),this.collect.emit(n.AutotrackReady))}},e.prototype.ready=function(e){this.collect.set(e);var t=this.config.autotrack;t="object"==J(t)?t:{},t=Object.assign(Nn,t),this.destroyed=!1,this.options=t,this.Config=new En(kn,this.options),this.Exposure=new Bn(this.config,this.handle.bind(this)),this.Listener=new bn(t,this.collect,this.Config),this.EventHandle=new Cn(this.config,t),this.Request=new xn(this.collect),this.autoTrackStart=!0,this.init(),Mn(this,this.config)},e.prototype.init=function(){this.Listener.init(this.handle.bind(this)),"base"===this.collect.loadType&&(window.opener||window.parent).postMessage("[tea-sdk]ready","*")},e.prototype.handle=function(e,t){"dom"===e.eventType&&this.handleDom(e,t)},e.prototype.handleDom=function(e,t){try{var n=e.eventName;if("click"===n||"exposure"===n||"change"===n||"submit"===n){var i=this.EventHandle.handleEvent(t,n);null!==i&&this.Request.send({eventType:"custom",eventName:"report_"+n+"_event",extra:{methods:"GET"}},i)}else if("page_view"===n||"page_statistics"===n){var o;o="page_view"===n?this.EventHandle.handleViewEvent(t):this.EventHandle.handleStatisticsEvent(t),this.Request.send({eventType:"custom",eventName:"report_${eventName}_event",extra:{methods:"GET"}},o)}else if("beat"===n){var r=this.EventHandle.handleBeadtEvent(t),a=e.eventSend;this.Request.send({eventType:"custom",eventName:"report_${eventName}_event",extra:{methods:"GET"},eventSend:a},r)}}catch(e){console.log("handel dom event error "+JSON.stringify(e))}},e.prototype.destroy=function(){if(!this.autoTrackStart)return console.warn("engine is undefined, make sure you have called autoTrack.start()");this.autoTrackStart=!1,this.Listener.removeListener()},e}();!function(e){e.Net="net",e.FailNet="f_net",e.FailData="f_data"}(zn||(zn={}));var Un={pv:["predefine_pageview"],sdk:["_be_active","predefine_page_alive","predefine_page_close","__profile_set","__profile_set_once","__profile_increment","__profile_unset","__profile_append"],autotrack:["bav2b_click","bav2b_page","bav2b_beat","bav2b_page_statistics","__bav_click","__bav_page","__bav_beat","__bav_page_statistics"]},jn=function(){function e(){}return e.prototype.apply=function(e,t){var n=this;if(this.ready=t.app_id&&t.enable_tracer&&!t.disable_track_event,this.ready){this.limit={pv:1,sdk:3,autotrack:3,log:3},this.errorCode={f_net:0,f_data:0},this.tracerCache=new Map,this.collect=e,this.appid=t.app_id,this.reportUrl=e.configManager.getUrl("event");var i=this.collect.Types;e.adapters.fetch,this.collect.on(i.Event,(function(e){Et(e)?e.forEach((function(e){n.addCount("log")})):n.addCount("log")})),this.collect.on(i.SubmitError,(function(e){var t=e.type,i=e.eventDate,o=e.errorCode,r=e.response;n.addErrorCount(i,t,o,r)})),this.listener(),this.collect.emit(i.TracerReady)}},e.prototype.addCount=function(e,t,n){void 0===t&&(t="net"),void 0===n&&(n=1);try{this.tracerCache||(this.tracerCache=new Map);var i=void 0;if(this.tracerCache.has(e))(o=this.tracerCache.get(e)).has(t)?(i=o.get(t).params.count,i++,o.set(t,this.processTracer(i,e,t))):(i=n,o.set(t,this.processTracer(n,e,t)));else{var o=new Map;i=n,o.set(t,this.processTracer(n,e,t)),this.tracerCache.set(e,o)}"net"===t&&i>=this.limit[e]&&this.report(!1)}catch(e){console.log(e)}},e.prototype.addErrorCount=function(e,t,n,i){var o=this;try{if(e&&e.length){var r=e[0].events;r&&r.length&&("f_data"===t?(i&&i.hasOwnProperty("sc")?this.addCount("log",t,r.length-i.sc):this.addCount("log",t,r.length),this.errorCode[t]=n):r.forEach((function(e){var i="log";for(var r in Un)if(-1!==Un[r].indexOf(e.event)){i=r;break}o.addCount(i,t,1),o.errorCode[t]=n})))}}catch(e){}},e.prototype.report=function(e){if(this.tracerCache){var t=[];this.tracerCache.forEach((function(e){console.log(e),e.forEach((function(e){t.push(e)}))})),t&&t.length&&this.sendTracer(t,e)}},e.prototype.sendTracer=function(e,t){try{var n=this.collect.eventManager.merge(e);this.collect.requestManager.useRequest({url:this.reportUrl,data:n,useBeacon:t}),this.tracerCache=null}catch(e){}},e.prototype.processTracer=function(e,t,n){try{var i={count:e,state:n,key:t,params_for_special:"applog_trace",aid:this.appid,platform:"web",_staging_flag:1,sdk_version:"5.3.0_oversea"};"f_net"!==n&&"f_data"!==n||(i.errorCode=this.errorCode[n]);var o=this.collect.processEvent("applog_trace",i);if(o&&o.event)return delete o.is_bav,o}catch(e){console.warn("something error")}},e.prototype.listener=function(){var e=this;document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e.leavePage()})),Ct((function(){e.leavePage()}))},e.prototype.leavePage=function(){this.report(!0)},e}(),Ln="undefined"!=typeof window?(window.LogPluginObject||(window.LogPluginObject={}),window.LogPluginObject):null,Vn=function(){function e(){}return e.prototype.apply=function(e,t){this._plugin={},this.config=t,this.collect=e,this.channel=t.channel||"cn",this.loadExtend()},e.prototype.loadExtend=function(){var e=this;try{this.collect.remotePlugin.forEach((function(t,n){if("sdk"===t)if(rn.hasOwnProperty(n)){var i=rn[n].object,o=""+rn[n].src[e.channel];e.exist(n,i,o)}else console.warn("your "+n+" is not exist,please check plugin name");else"object"==J(t)&&(t.src?e.exist(n,t.call,t.src):e.process(n,t.instance,"INSTANCE"))}))}catch(e){this.collect.emit(yt.DEBUGGER_MESSAGE,{type:yt.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:e.message}),console.log("load extend error")}},e.prototype.exist=function(e,t,n){var i=this;Ln[t]?(this.process(e,Ln[t]),console.log("already has "+e+" plugin~")):this.loadPlugin(e,n,(function(){i.process(e,Ln[t]),console.log(" %c %s %s %s","color: yellow; background-color: black;","–","load plugin:"+e+" success","-")}),(function(){console.log(" %c %s %s %s","color: red; background-color: yellow;","–","load plugin:"+e+" error","-")}))},e.prototype.process=function(e,t,n){try{if(n){var i=new t;i.apply&&i.apply(this.collect,this.config),console.log("excude "+e+" success")}else t&&t(this.collect,this.config)}catch(t){this.collect.emit(yt.DEBUGGER_MESSAGE,{type:yt.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:t.message}),console.log("excude "+e+" error, message:"+t.message)}},e.prototype.loadPlugin=function(e,t,n,i){var o=this;try{var r=document.createElement("script");r.src=t,this._plugin[e]||(this._plugin[e]=[]),this._plugin[e].push(n),r.onerror=function(){i(t)},r.onload=function(){o._plugin[e].forEach((function(e){e()}))},document.getElementsByTagName("head")[0].appendChild(r)}catch(e){this.collect.emit(yt.DEBUGGER_MESSAGE,{type:yt.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:Date.now(),data:e.message})}},e}(),Fn=function(){function e(){this.autotrack=!1,this.spa=!1,this.cache={},this.allowHash=!1}return e.prototype.apply=function(e,t){if(t.spa||t.autotrack){var n=e.Types;this.collect=e,this.config=t,this.appid=t.app_id,this.allowHash=t.allow_hash,this.fncArray=new Map,this.setKey(),this.setLocation(),this.hack(),this.init(),this.listener(),e.emit(n.RouteReady)}},e.prototype.setKey=function(){var e=this.collect.adapters.storage;this.storage=new e(!1),this.cache_key="__tea_cache_refer_"+this.appid,this.cache={refer_key:"",refer_title:document.title||location.pathname,refer_manual_key:"",routeChange:!1},this.config.autotrack&&"object"==J(this.config.autotrack)&&this.config.autotrack.page_manual_key&&(this.cache.refer_manual_key=this.config.autotrack.page_manual_key),this.storage.setItem(this.cache_key,this.cache)},e.prototype.hack=function(){var e=this,t=window.history.pushState;history.pushState=function(n){for(var i=[],o=1;o1&&void 0!==arguments[1]?arguments[1]:{};if(qn&&Hn){var n="".concat(location.protocol,"//").concat(location.host).concat(location.pathname);Hn.event(e,S({page_url:n,host:location.host,user_agent:navigator.userAgent,referrer:n},t))}}var Jn=function(){this.__data__=[],this.size=0};var Wn=function(e,t){return e===t||e!=e&&t!=t};var Xn=function(e,t){for(var n=e.length;n--;)if(Wn(e[n][0],t))return n;return-1},Yn=Array.prototype.splice;var Zn=function(e){var t=this.__data__,n=Xn(t,e);return!(n<0)&&(n==t.length-1?t.pop():Yn.call(t,n,1),--this.size,!0)};var Qn=function(e){var t=this.__data__,n=Xn(t,e);return n<0?void 0:t[n][1]};var ei=function(e){return Xn(this.__data__,e)>-1};var ti=function(e,t){var n=this.__data__,i=Xn(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this};function ni(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e<=9007199254740991};var Po=function(e){return null!=e&&Io(e.length)&&!Ci(e)};var Bo=function(e){return xo(e)&&Po(e)};var No=function(){return!1},Go=ui((function(e,t){var n=t&&!t.nodeType&&t,i=n&&e&&!e.nodeType&&e,o=i&&i.exports===n?di.Buffer:void 0,r=(o?o.isBuffer:void 0)||No;e.exports=r})),Uo=Function.prototype,jo=Object.prototype,Lo=Uo.toString,Vo=jo.hasOwnProperty,Fo=Lo.call(Object);var Ko=function(e){if(!xo(e)||"[object Object]"!=Ei(e))return!1;var t=Eo(e);if(null===t)return!0;var n=Vo.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Lo.call(n)==Fo},Ho={};Ho["[object Float32Array]"]=Ho["[object Float64Array]"]=Ho["[object Int8Array]"]=Ho["[object Int16Array]"]=Ho["[object Int32Array]"]=Ho["[object Uint8Array]"]=Ho["[object Uint8ClampedArray]"]=Ho["[object Uint16Array]"]=Ho["[object Uint32Array]"]=!0,Ho["[object Arguments]"]=Ho["[object Array]"]=Ho["[object ArrayBuffer]"]=Ho["[object Boolean]"]=Ho["[object DataView]"]=Ho["[object Date]"]=Ho["[object Error]"]=Ho["[object Function]"]=Ho["[object Map]"]=Ho["[object Number]"]=Ho["[object Object]"]=Ho["[object RegExp]"]=Ho["[object Set]"]=Ho["[object String]"]=Ho["[object WeakMap]"]=!1;var qo=function(e){return xo(e)&&Io(e.length)&&!!Ho[Ei(e)]};var $o=function(e){return function(t){return e(t)}},Jo=ui((function(e,t){var n=t&&!t.nodeType&&t,i=n&&e&&!e.nodeType&&e,o=i&&i.exports===n&&li.process,r=function(){try{var e=i&&i.require&&i.require("util").types;return e||o&&o.binding&&o.binding("util")}catch(e){}}();e.exports=r})),Wo=Jo&&Jo.isTypedArray,Xo=Wo?$o(Wo):qo;var Yo=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]},Zo=Object.prototype.hasOwnProperty;var Qo=function(e,t,n){var i=e[t];Zo.call(e,t)&&Wn(i,n)&&(void 0!==n||t in e)||lo(e,t,n)};var er=function(e,t,n,i){var o=!n;n||(n={});for(var r=-1,a=t.length;++r-1&&e%1==0&&e0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}},kr=br(_r);var Er=function(e,t){return kr(vr(e,t,hr),e+"")};var wr=function(e,t,n){if(!wi(n))return!1;var i=J(t);return!!("number"==i?Po(n)&&ir(t,n.length):"string"==i&&t in n)&&Wn(n[t],e)};var Sr,Cr=function(e){return Er((function(t,n){var i=-1,o=n.length,r=o>1?n[o-1]:void 0,a=o>2?n[2]:void 0;for(r=e.length>3&&"function"==typeof r?(o--,r):void 0,a&&wr(n[0],n[1],a)&&(r=o<3?void 0:r,o=1),t=Object(t);++i0;)a[r=i[o]]||(t[r]=e[r],a[r]=!0);e=Object.getPrototypeOf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:Dr,kindOfTest:Rr,endsWith:function(e,t,n){e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;var i=e.indexOf(t,n);return-1!==i&&i===n},toArray:function(e){if(!e)return null;var t=e.length;if(Mr(t))return null;for(var n=new Array(t);t-- >0;)n[t]=e[t];return n},isTypedArray:Kr,isFileList:Ur};function qr(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var $r=function(e,t,n){if(!t)return e;var i;if(n)i=n(t);else if(Hr.isURLSearchParams(t))i=t.toString();else{var o=[];Hr.forEach(t,(function(e,t){null!=e&&(Hr.isArray(e)?t+="[]":e=[e],Hr.forEach(e,(function(e){Hr.isDate(e)?e=e.toISOString():Hr.isObject(e)&&(e=JSON.stringify(e)),o.push(qr(t)+"="+qr(e))})))})),i=o.join("&")}if(i){var r=e.indexOf("#");-1!==r&&(e=e.slice(0,r)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e};function Jr(){this.handlers=[]}Jr.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},Jr.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},Jr.prototype.forEach=function(e){Hr.forEach(this.handlers,(function(t){null!==t&&e(t)}))};var Wr=Jr,Xr=function(e,t){Hr.forEach(e,(function(n,i){i!==t&&i.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[i])}))};function Yr(e,t,n,i,o){Error.call(this),this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),i&&(this.request=i),o&&(this.response=o)}Hr.inherits(Yr,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var Zr=Yr.prototype,Qr={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED"].forEach((function(e){Qr[e]={value:e}})),Object.defineProperties(Yr,Qr),Object.defineProperty(Zr,"isAxiosError",{value:!0}),Yr.from=function(e,t,n,i,o,r){var a=Object.create(Zr);return Hr.toFlatObject(e,a,(function(e){return e!==Error.prototype})),Yr.call(a,e.message,t,n,i,o),a.name=e.name,r&&Object.assign(a,r),a};var ea=Yr,ta={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var na=function(e,t){t=t||new FormData;var n=[];function i(e){return null===e?"":Hr.isDate(e)?e.toISOString():Hr.isArrayBuffer(e)||Hr.isTypedArray(e)?"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}return function e(o,r){if(Hr.isPlainObject(o)||Hr.isArray(o)){if(-1!==n.indexOf(o))throw Error("Circular reference detected in "+r);n.push(o),Hr.forEach(o,(function(n,o){if(!Hr.isUndefined(n)){var a,s=r?r+"."+o:o;if(n&&!r&&"object"===J(n))if(Hr.endsWith(o,"{}"))n=JSON.stringify(n);else if(Hr.endsWith(o,"[]")&&(a=Hr.toArray(n)))return void a.forEach((function(e){!Hr.isUndefined(e)&&t.append(s,i(e))}));e(n,s)}})),n.pop()}else t.append(r,i(o))}(e),t},ia=Hr.isStandardBrowserEnv()?{write:function(e,t,n,i,o,r){var a=[];a.push(e+"="+encodeURIComponent(t)),Hr.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),Hr.isString(i)&&a.push("path="+i),Hr.isString(o)&&a.push("domain="+o),!0===r&&a.push("secure"),document.cookie=a.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(){}},oa=function(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t},ra=["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"],aa=Hr.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(e){var i=e;return t&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{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=Hr.isString(t)?i(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0};function sa(e){ea.call(this,null==e?"canceled":e,ea.ERR_CANCELED),this.name="CanceledError"}Hr.inherits(sa,ea,{__CANCEL__:!0});var ca=sa,ua=function(e){return new Promise((function(t,n){var i,o=e.data,r=e.headers,a=e.responseType;function s(){e.cancelToken&&e.cancelToken.unsubscribe(i),e.signal&&e.signal.removeEventListener("abort",i)}Hr.isFormData(o)&&Hr.isStandardBrowserEnv()&&delete r["Content-Type"];var c=new XMLHttpRequest;if(e.auth){var u=e.auth.username||"",l=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";r.Authorization="Basic "+btoa(u+":"+l)}var f=oa(e.baseURL,e.url);function d(){if(c){var i="getAllResponseHeaders"in c?function(e){var t,n,i,o={};return e?(Hr.forEach(e.split("\n"),(function(e){if(i=e.indexOf(":"),t=Hr.trim(e.substr(0,i)).toLowerCase(),n=Hr.trim(e.substr(i+1)),t){if(o[t]&&ra.indexOf(t)>=0)return;o[t]="set-cookie"===t?(o[t]?o[t]:[]).concat([n]):o[t]?o[t]+", "+n:n}})),o):o}(c.getAllResponseHeaders()):null;!function(e,t,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?t(new ea("Request failed with status code "+n.status,[ea.ERR_BAD_REQUEST,ea.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}((function(e){t(e),s()}),(function(e){n(e),s()}),{data:a&&"text"!==a&&"json"!==a?c.response:c.responseText,status:c.status,statusText:c.statusText,headers:i,config:e,request:c}),c=null}}if(c.open(e.method.toUpperCase(),$r(f,e.params,e.paramsSerializer),!0),c.timeout=e.timeout,"onloadend"in c?c.onloadend=d:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(d)},c.onabort=function(){c&&(n(new ea("Request aborted",ea.ECONNABORTED,e,c)),c=null)},c.onerror=function(){n(new ea("Network Error",ea.ERR_NETWORK,e,c,c)),c=null},c.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",i=e.transitional||ta;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new ea(t,i.clarifyTimeoutError?ea.ETIMEDOUT:ea.ECONNABORTED,e,c)),c=null},Hr.isStandardBrowserEnv()){var h=(e.withCredentials||aa(f))&&e.xsrfCookieName?ia.read(e.xsrfCookieName):void 0;h&&(r[e.xsrfHeaderName]=h)}"setRequestHeader"in c&&Hr.forEach(r,(function(e,t){void 0===o&&"content-type"===t.toLowerCase()?delete r[t]:c.setRequestHeader(t,e)})),Hr.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),a&&"json"!==a&&(c.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&c.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(i=function(e){c&&(n(!e||e&&e.type?new ca:e),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(i),e.signal&&(e.signal.aborted?i():e.signal.addEventListener("abort",i))),o||(o=null);var p,g=(p=/^([-+\w]{1,25})(:?\/\/|:)/.exec(f))&&p[1]||"";g&&-1===["http","https","file"].indexOf(g)?n(new ea("Unsupported protocol "+g+":",ea.ERR_BAD_REQUEST,e)):c.send(o)}))},la={"Content-Type":"application/x-www-form-urlencoded"};function fa(e,t){!Hr.isUndefined(e)&&Hr.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var da,ha={transitional:ta,adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(da=ua),da),transformRequest:[function(e,t){if(Xr(t,"Accept"),Xr(t,"Content-Type"),Hr.isFormData(e)||Hr.isArrayBuffer(e)||Hr.isBuffer(e)||Hr.isStream(e)||Hr.isFile(e)||Hr.isBlob(e))return e;if(Hr.isArrayBufferView(e))return e.buffer;if(Hr.isURLSearchParams(e))return fa(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();var n,i=Hr.isObject(e),o=t&&t["Content-Type"];if((n=Hr.isFileList(e))||i&&"multipart/form-data"===o){var r=this.env&&this.env.FormData;return na(n?{"files[]":e}:e,r&&new r)}return i||"application/json"===o?(fa(t,"application/json"),function(e,t,n){if(Hr.isString(e))try{return(t||JSON.parse)(e),Hr.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||ha.transitional,n=t&&t.silentJSONParsing,i=t&&t.forcedJSONParsing,o=!n&&"json"===this.responseType;if(o||i&&Hr.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(o){if("SyntaxError"===e.name)throw ea.from(e,ea.ERR_BAD_RESPONSE,this,null,this.response);throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:null},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};Hr.forEach(["delete","get","head"],(function(e){ha.headers[e]={}})),Hr.forEach(["post","put","patch"],(function(e){ha.headers[e]=Hr.merge(la)}));var pa=ha,ga=function(e,t,n){var i=this||pa;return Hr.forEach(n,(function(n){e=n.call(i,e,t)})),e},va=function(e){return!(!e||!e.__CANCEL__)};function ma(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ca}var _a=function(e){return ma(e),e.headers=e.headers||{},e.data=ga.call(e,e.data,e.headers,e.transformRequest),e.headers=Hr.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),Hr.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||pa.adapter)(e).then((function(t){return ma(e),t.data=ga.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return va(t)||(ma(e),t&&t.response&&(t.response.data=ga.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))},ya=function(e,t){t=t||{};var n={};function i(e,t){return Hr.isPlainObject(e)&&Hr.isPlainObject(t)?Hr.merge(e,t):Hr.isPlainObject(t)?Hr.merge({},t):Hr.isArray(t)?t.slice():t}function o(n){return Hr.isUndefined(t[n])?Hr.isUndefined(e[n])?void 0:i(void 0,e[n]):i(e[n],t[n])}function r(e){if(!Hr.isUndefined(t[e]))return i(void 0,t[e])}function a(n){return Hr.isUndefined(t[n])?Hr.isUndefined(e[n])?void 0:i(void 0,e[n]):i(void 0,t[n])}function s(n){return n in t?i(e[n],t[n]):n in e?i(void 0,e[n]):void 0}var c={url:r,method:r,data:r,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s};return Hr.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=c[e]||o,i=t(e);Hr.isUndefined(i)&&t!==s||(n[e]=i)})),n},ba="0.27.2",ka=ba,Ea={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){Ea[e]=function(n){return J(n)===e||"a"+(t<1?"n ":" ")+e}}));var wa={};Ea.transitional=function(e,t,n){function i(e,t){return"[Axios v"+ka+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,o,r){if(!1===e)throw new ea(i(o," has been removed"+(t?" in "+t:"")),ea.ERR_DEPRECATED);return t&&!wa[o]&&(wa[o]=!0,console.warn(i(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,r)}};var Sa={assertOptions:function(e,t,n){if("object"!==J(e))throw new ea("options must be an object",ea.ERR_BAD_OPTION_VALUE);for(var i=Object.keys(e),o=i.length;o-- >0;){var r=i[o],a=t[r];if(a){var s=e[r],c=void 0===s||a(s,r,e);if(!0!==c)throw new ea("option "+r+" must be "+c,ea.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new ea("Unknown option "+r,ea.ERR_BAD_OPTION)}},validators:Ea},Ca=Sa.validators;function xa(e){this.defaults=e,this.interceptors={request:new Wr,response:new Wr}}xa.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=ya(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var n=t.transitional;void 0!==n&&Sa.assertOptions(n,{silentJSONParsing:Ca.transitional(Ca.boolean),forcedJSONParsing:Ca.transitional(Ca.boolean),clarifyTimeoutError:Ca.transitional(Ca.boolean)},!1);var i=[],o=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(o=o&&e.synchronous,i.unshift(e.fulfilled,e.rejected))}));var r,a=[];if(this.interceptors.response.forEach((function(e){a.push(e.fulfilled,e.rejected)})),!o){var s=[_a,void 0];for(Array.prototype.unshift.apply(s,i),s=s.concat(a),r=Promise.resolve(t);s.length;)r=r.then(s.shift(),s.shift());return r}for(var c=t;i.length;){var u=i.shift(),l=i.shift();try{c=u(c)}catch(e){l(e);break}}try{r=_a(c)}catch(e){return Promise.reject(e)}for(;a.length;)r=r.then(a.shift(),a.shift());return r},xa.prototype.getUri=function(e){e=ya(this.defaults,e);var t=oa(e.baseURL,e.url);return $r(t,e.params,e.paramsSerializer)},Hr.forEach(["delete","get","head","options"],(function(e){xa.prototype[e]=function(t,n){return this.request(ya(n||{},{method:e,url:t,data:(n||{}).data}))}})),Hr.forEach(["post","put","patch"],(function(e){function t(t){return function(n,i,o){return this.request(ya(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}xa.prototype[e]=t(),xa.prototype[e+"Form"]=t(!0)}));var Aa=xa;function Ta(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;this.promise.then((function(e){if(n._listeners){var t,i=n._listeners.length;for(t=0;t0?2===c.length?J(c[1])==o?this[c[0]]=c[1].call(this,l):this[c[0]]=c[1]:3===c.length?J(c[1])!==o||c[1].exec&&c[1].test?this[c[0]]=l?l.replace(c[1],c[2]):i:this[c[0]]=l?c[1].call(this,l,c[2]):i:4===c.length&&(this[c[0]]=l?c[3].call(this,l.replace(c[1],c[2])):i):this[c]=l||i;f+=2}},H=function(e,t){for(var n in t)if(J(t[n])===a&&t[n].length>0){for(var o=0;o2&&(e.model="iPad",e.type=m),e},this.getEngine=function(){var e={};return e.name=i,e.version=i,K.call(e,l,d.engine),e},this.getOS=function(){var e={};return e.name=i,e.version=i,K.call(e,l,d.os),h&&!e.name&&f&&f.platform&&"Unknown"!=f.platform&&(e.name=f.platform.replace(/chrome os/i,G).replace(/macos/i,U)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return l},this.setUA=function(e){return l=J(e)===s&&e.length>500?F(e,500):e,this},this.setUA(l),this};W.VERSION="1.0.38",W.BROWSER=j([l,h,c]),W.CPU=j([p]),W.DEVICE=j([u,d,f,g,v,_,m,y,b]),W.ENGINE=W.OS=j([l,h]),e.exports&&(t=e.exports=W),t.UAParser=W;var X=J(n)!==r&&(n.jQuery||n.Zepto);if(X&&!X.ua){var Y=new W;X.ua=Y.getResult(),X.ua.get=function(){return Y.getUA()},X.ua.set=function(e){Y.setUA(e);var t=Y.getResult();for(var n in t)X.ua[n]=t[n]}}}("object"===("undefined"==typeof window?"undefined":J(window))?window:ci)}));Ia.UAParser;var Pa,Ba,Na,Ga,Ua,ja,La,Va,Fa={},Ka=function(){var e,t,n,i;if(Object.keys(Fa).length)return Fa;var o=(new Ia).getResult(),r=o.browser,a=o.os;return Fa={platform:"Web",browser:null!=(e=null==r?void 0:r.name)?e:"",browser_version:null!=(t=null==r?void 0:r.version)?t:"",os:null!=(n=null==a?void 0:a.name)?n:"",os_version:null!=(i=null==a?void 0:a.version)?i:""}},Ha="1.1.7",qa="_ccfs_".concat(Ha),$a="".concat(qa,"_consent"),Ja="".concat(qa,"_notifications"),Wa="pns_consent_system",Xa=function(e){return e.US_EAST="US-East",e.US_EASTRED="US-EastRed",e.SINGAPORE_CENTRAL="Singapore-Central",e.EU_TTP="EU-TTP",e.EU_TTP2="EU-TTP2",e.US_TTP="US-TTP",e.US_TTP2="US-TTP2",e}(Xa||{}),Ya=function(e){return e.PRODUCTION="production",e.DEV="dev",e.BOE="boe",e}(Ya||{}),Za=function(){function e(){H(this,e),this.region="",this.bid="",this.debug=!1}return $(e,[{key:"init",value:function(e){var t=null!=e?e:{},n=t.region,i=void 0===n?"":n,o=t.bid,r=void 0===o?"":o,a=t.debug,s=void 0!==a&&a;this.region=i,this.bid=r,this.debug=s}},{key:"send",value:function(e){}},{key:"info",value:function(e,t){}},{key:"warn",value:function(e,t){}},{key:"error",value:function(e,t){}},{key:"getMeta",value:function(){return{version:Ha,bid:this.bid,region:this.region}}},{key:"reportCUJ",value:function(e,t,n){}},{key:"destruct",value:function(){}}]),e}(),Qa=function(e){return e.beforeFetchUserInfo="beforeFetchUserInfo",e.afterFetchUserInfo="afterFetchUserInfo",e.beforeFetchConsentData="beforeFetchConsentData",e.afterFetchConsentData="afterFetchConsentData",e.beforeFetchNotificationData="beforeFetchNotificationData",e.afterFetchNotificationData="afterFetchNotificationData",e.beforeUpdateRecords="beforeUpdateRecords",e.afterUpdateRecords="afterUpdateRecords",e.beforeNotify="beforeNotify",e.afterNotify="afterNotify",e.beforeRemoveNotification="beforeRemoveNotification",e.afterRemoveNotification="afterRemoveNotification",e.beforeThirdPartyApprove="beforeThirdPartyApprove",e.afterThirdPartyApprove="afterThirdPartyApprove",e.beforeThirdPartyReject="beforeThirdPartyReject",e.afterThirdPartyReject="afterThirdPartyReject",e}(Qa||{}),es=function(e){return e.sessionStorage="sessionStorage",e.localStorage="localStorage",e.inMem="inMem",e}(es||{}),ts=function(e){return e.INFO="info",e.WARN="warn",e.ERROR="error",e}(ts||{}),ns=function(e){return e.UNSUPPORTED="Unsupported",e.APPROVE="Approve",e.REJECT="Reject",e.NOT_DETERMINED="NotDetermined",e.PENDING_REVIEW="PENDING_REVIEW",e.REVOKE="REVOKE",e}(ns||{}),is=(C(n={},"Unsupported",0),C(n,"Approve",1),C(n,"Reject",2),C(n,"NotDetermined",3),C(n,"PENDING_REVIEW",4),C(n,"REVOKE",5),n),os=function(e){return e.DEVICE_ID="DeviceID",e.USER_ID="UserID",e.ANY="Any",e.BOTH="Both",e}(os||{}),rs=function(e){return e.DEVICE_CONSENT="device",e.USER_CONSENT="user",e.BOTH_CONSENT="both",e.NOTIFICATION="notification",e}(rs||{}),as=function(e){return e.V1="v1",e.V2="v2",e}(as||{});(Ba=Pa||(Pa={})).CUSTOM="CUSTOM",Ba.ACTUAL_FMP="ACTUAL_FMP",(Ga=Na||(Na={})).ABORT="ABORT",Ga.CRASH="CRASH",(ja=Ua||(Ua={})).normal="normal",ja.noRecord="noRecord",ja.noInternet="noInternet",ja.error="error",(Va=La||(La={})).START="START",Va.IN_PROGRESS="IN_PROGRESS",Va.FAILURE="FAILURE",Va.FINISH="FINISH",Va.ABORT="ABORT";var ss=function(){if("undefined"==typeof window||void 0===window.performance||"function"!=typeof window.performance.getEntriesByType)return{};var e=window.performance.getEntriesByType("mark").filter((function(e){return e.name.startsWith("pns_privacy_product_mark")})),t=window.performance.getEntriesByType("measure").filter((function(e){return e.name.startsWith("pns_privacy_product_duration")}));return[].concat(D(e),D(t)).map((function(e){return{duration:e.duration,entryType:e.entryType,name:e.name,startTime:e.startTime}})).reduce((function(e,t){return e[t.name]="mark"===t.entryType?Math.floor(t.startTime):Math.floor(t.duration),e}),{})},cs=function(){if("undefined"==typeof window||void 0===window.performance||"function"!=typeof window.performance.measure||"function"!=typeof window.performance.getEntriesByName)return-1;window.performance.measure("DCL","fetchStart","domContentLoadedEventEnd");var e=window.performance.getEntriesByName("DCL");return e.length>0?e[0].duration:-1},us=function(e,t){e("sendCustomPerfMetric",{name:"actual_fmp",value:t})},ls=function(e,t){if(t){var n={method:e,params:t};if("undefined"!=typeof NativeModules){var i,o,r=null===(o=NativeModules)||void 0===o||null===(i=o.hybridMonitor)||void 0===i?void 0:i.request;null==r||r(n,(function(){}))}else{var a,s,c,u,l,f=function(){var e,t,n="unknown",i=null!==(t=null===(e=navigator)||void 0===e?void 0:e.userAgent)&&void 0!==t?t:"";return/android|Android/i.test(i)&&(n="Android"),/iPhone|iPad|iPod|iOS/i.test(i)&&(n="iOS"),{os:n,isAndroid:"Android"===n,isIOS:"iOS"===n}}();if(f.isIOS)null===(l=window)||void 0===l||null===(u=l.webkit)||void 0===u||null===(c=u.messageHandlers)||void 0===c||null===(s=c.bdhmRequest)||void 0===s||null===(a=s.postMessage)||void 0===a||a.call(s,n);else if(f.isAndroid){var d,h,p;null===(p=window)||void 0===p||null===(h=p.iesJsBridgeTransferMonitor)||void 0===h||null===(d=h.request)||void 0===d||d.call(h,JSON.stringify(n))}}}},fs=function(e,t,n){var i={key:e,value:void 0===t?Date.now():t,description:n||""};ls("timing.mark",i)},ds=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if("undefined"==typeof location||"undefined"==typeof URLSearchParams)return"";var n=new URLSearchParams(location.search);return n.get(e)||t},hs=function(){var e,t;return{scm_version:"undefined"==typeof window?"":null!==(t=null===(e=window.gfdatav1)||void 0===e?void 0:e.ver)&&void 0!==t?t:"",path:"undefined"==typeof location?"":location.pathname,enter_from:ds("enter_from"),host:"undefined"==typeof location?"":location.host}};function ps(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gs(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var ms,_s,ys,bs={pageCrash:!1,cuj:!1},ks=$((function e(){var t=this;H(this,e),this.slardarWindowGlobalName="",this.slardarHybridGlobalName="",this._shouldReportJSError={pageCrash:!1,cuj:!1},this.initSlardar=function(e){try{var n=null!=e?e:{},i=n.slardarContainer,o=n.slardarWindowGlobalName,r=n.slardarHybridGlobalName,a=n.sparkMonitor,s=n.reportActualFMP,c=n.shouldReportJSError;"string"==typeof o&&(t.slardarWindowGlobalName=o),"string"==typeof r&&(t.slardarHybridGlobalName=r),"function"==typeof s&&(t.reportTTAPActualFMP=s),void 0!==a&&(t.sparkMonitor=a),void 0!==i&&"function"==typeof i.sendEvent&&"function"==typeof i.reportActualFMP&&(t.slardarContainer=i),t._shouldReportJSError=gs({},bs,null!=c?c:{})}catch(e){}},this.initJSB=function(e){t.jsbBridge=e},this.sendEvent=function(e){try{var n,i;if(t.slardarWindowGlobalName&&"function"==typeof(null===(n=window)||void 0===n?void 0:n[t.slardarWindowGlobalName])&&window[t.slardarWindowGlobalName]("sendEvent",null!=e?e:{}),t.slardarHybridGlobalName&&"function"==typeof(null===(i=window)||void 0===i?void 0:i[t.slardarHybridGlobalName])){var o=null!=e?e:{},r=o.name,a=void 0===r?"":r,s=o.categories,c=vs(o,["name","categories"]);window[t.slardarHybridGlobalName]("emit","custom",gs({eventName:a,level:0,category:s},c))}t.slardarContainer&&t.slardarContainer.sendEvent(e)}catch(e){}},this._sendError=function(e,n){if(t._shouldReportJSError)try{var i,o;if(t.slardarWindowGlobalName&&"function"==typeof(null===(i=window)||void 0===i?void 0:i[t.slardarWindowGlobalName])&&window[t.slardarWindowGlobalName]("captureException",e,n),t.slardarHybridGlobalName&&"function"==typeof(null===(o=window)||void 0===o?void 0:o[t.slardarHybridGlobalName])){var r=null!=n?n:{},a=r.name,s=void 0===a?"":a,c=vs(r,["name"]);window[t.slardarHybridGlobalName]("captureException",e,gs({eventName:s,level:0},c))}t.slardarContainer&&"function"==typeof t.slardarContainer.captureException&&t.slardarContainer.captureException(e,n)}catch(e){}},this.sendPageCrashError=function(e,n){t._shouldReportJSError.pageCrash&&t._sendError(e,n)},this.sendCUJError=function(e,n){t._shouldReportJSError.cuj&&t._sendError(e,n)},this.teaReport=function(e){var n,i;"undefined"!=typeof window&&"function"==typeof(null===(n=window)||void 0===n?void 0:n.collectEvent)&&(null===(i=window)||void 0===i||i.collectEvent(e.name,gs({},e.metrics,e.categories,hs())));t.jsbBridge&&t.jsbBridge.x.reportAppLog({eventName:e.name,params:gs({},e.metrics,e.categories,hs())})},this.resetTeaModule=function(){t.jsbBridge=void 0},this.resetSlardarModule=function(){t.slardarContainer=void 0,t.slardarWindowGlobalName="",t.slardarHybridGlobalName="",t.sparkMonitor=void 0,t.reportTTAPActualFMP=void 0}}));(ys=_s||(_s={})).FBJS="pns_privacy_product_mark_fbjs",ys.AFMP="pns_privacy_product_mark_afmp";var Es=(null===(ms=performance.timing)||void 0===ms?void 0:ms.navigationStart)||performance.timeOrigin;function ws(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ss(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:Ua.normal;if(!n._hasReportedActualFMP){n._hasReportedActualFMP=!0;var a,s,c,u,l,f,d=[Ua.normal,Ua.noRecord],h=d.includes(r),p=Date.now();if(null===(t=performance)||void 0===t||null===(e=t.mark)||void 0===e||e.call(t,"pns_privacy_product_mark_afmp"),h)if("function"==typeof(null===(a=n._trackingContext.sparkMonitor)||void 0===a?void 0:a.mark)?n._trackingContext.sparkMonitor.mark("fmp"):n._trackingContext.slardarHybridGlobalName&&"function"==typeof(null===(s=window)||void 0===s?void 0:s[n._trackingContext.slardarHybridGlobalName])&&fs("fmp"),"function"==typeof(null===(c=n._trackingContext)||void 0===c?void 0:c.reportTTAPActualFMP))n._trackingContext.reportTTAPActualFMP();else if(n._trackingContext.slardarWindowGlobalName&&"function"==typeof(null===(u=window)||void 0===u?void 0:u[n._trackingContext.slardarWindowGlobalName])){var g;us(null===(g=window)||void 0===g?void 0:g[n._trackingContext.slardarWindowGlobalName],p-Es)}if(n._trackingContext.slardarHybridGlobalName&&"function"==typeof(null===(i=window)||void 0===i?void 0:i[n._trackingContext.slardarHybridGlobalName]))null===(f=window)||void 0===f||null===(l=f[n._trackingContext.slardarHybridGlobalName])||void 0===l||l.call(f,"sendCustomPerfMetric",{name:"actual_fmp",value:p-Es});n._trackingContext.sendEvent({name:_s.AFMP,metrics:Cs(Ss({costMs:p-Es},ss()),{pns_privacy_product_mark_dcl:cs()}),categories:Ss({isSuccess:h?"1":"0",scene:r},hs())}),n._trackingContext.teaReport({name:_s.AFMP,metrics:Cs(Ss({costMs:p-Es},ss()),{pns_privacy_product_mark_dcl:cs()}),categories:{isSuccess:h?"1":"0",scene:r}}),"function"==typeof(null===(o=n._trackingContext.slardarContainer)||void 0===o?void 0:o.reportActualFMP)&&n._trackingContext.slardarContainer.reportActualFMP()}},this._trackingContext=t}return $(e,[{key:"resetForSPA",value:function(){this._hasReportedActualFMP=!1}}]),e}(),As=function(){var e,t,n;return(null===(t=performance)||void 0===t||null===(e=t.timing)||void 0===e?void 0:e.navigationStart)||(null===(n=performance)||void 0===n?void 0:n.timeOrigin)},Ts=function(e){var t=0;try{performance.mark("error"),t=performance.measure("navigationStart_to_error","navigationStart","error").duration,performance.clearMarks("error"),performance.clearMeasures("navigationStart_to_error")}catch(e){t=Date.now()-As()}"object"===J(e)&&(e._triggerTime=t)},Ds=function(e){try{var t=e.error;Ts(t)}catch(e){}},Rs=function(){window._bound_error_time||(window._bound_error_time=!0,"development"===process.env.NODE_ENV?window.addEventListener("error",Ds,!0):function(){var e;if(null===(e=console)||void 0===e?void 0:e.error){var t=console.error;console.error=function(e){Ts(e);for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o1&&void 0!==arguments[1]&&arguments[1],a=arguments.length>2?arguments[2]:void 0;if(!n._hasReportedUserDrop&&!n._hasReportedPageCrash){n._hasReportedPageCrash=!0;var s=null!=e?e:{},c=s.name,u=void 0===c?"":c,l=s.message,f=s.stack,d=s._triggerTime,h=void 0===d?0:d,p=0;if(!p)try{performance.mark("pageCrashReporting"),p=performance.measure("navigationStart_to_pageCrashReporting","navigationStart","pageCrashReporting").duration}catch(e){p=Date.now()-As()}var g,v,m,_=r?h:p,y=_0&&void 0!==arguments[0]?arguments[0]:"",t=!1,n=function(){function e(){var n,i=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return H(this,e),this._pageReadyTiming=Pa.ACTUAL_FMP,this.init=function(e){try{if(t)return;t=!0;var n=null!=e?e:{},o=n.slardarContainer,r=n.slardarWindowGlobalName,a=n.slardarHybridGlobalName,s=n.sparkMonitor,c=n.reportActualFMP,u=n.pageReadyTiming,l=void 0===u?Pa.CUSTOM:u,f=n.jsbBridge,d=n.shouldReportJSError,h=void 0===d?{}:d,p=n.shouldRegisterUserDrop,g=void 0===p||p;i._pageReadyTiming=l,i._trackingContext.initSlardar({slardarContainer:o,slardarWindowGlobalName:r,slardarHybridGlobalName:a,sparkMonitor:s,reportActualFMP:c,shouldReportJSError:h}),f&&i._trackingContext.initJSB(f),Rs(),g&&i._registerUserDropEvent()}catch(e){}},this._registerUserDropEvent=function(){window.addEventListener("beforeunload",i.reportUserDrop,!0)},this.reportPageReady=function(e){i._stabilityTracker.reportPageReady(),i._pageReadyTiming===Pa.ACTUAL_FMP&&i._perfTracker.reportActualFMP(e)},this.reportUserDrop=function(){i._stabilityTracker.reportUserDrop()},this.reportPageCrash=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0;i._stabilityTracker.reportPageCrash(e,t,n)},this.reportFBJS=function(){i._perfTracker.reportFBJS()},this.reportActualFMP=function(e){i._perfTracker.reportActualFMP(e)},this.reportCUJ=function(e,t,n){i._stabilityTracker.reportCUJ(e,t,n)},o?(Ms[o]=this,n=this):(e._instance||(e._instance=this),n=e._instance),this._trackingContext=new ks,this._perfTracker=new xs(this._trackingContext),this._stabilityTracker=new Os(this._trackingContext),n}return $(e,[{key:"resetForSPA",value:function(){this._stabilityTracker.resetForSPA(),this._perfTracker.resetForSPA()}},{key:"reset",value:function(){this.resetForSPA(),t=!1,this._trackingContext.resetSlardarModule(),this._trackingContext.resetTeaModule()}},{key:"isInitialized",value:function(){return t}}]),e}();return e?(Ms[e]||(Ms[e]=new n(e)),Ms[e]):new n};zs();var Is=function(e){return e.SDK_INIT="sdk_init",e.FETCH_DATA="fetch_data",e.UPDATE_RECORD="update_record",e.GET_RECORD="get_record",e.GET_RECORDS="get_records",e.GET_ENTITY="get_entity",e.GET_ENTITIES="get_entities",e.SUBSCRIBE_EVENT="subscribe_event",e.UNSUBSCRIBE_EVENT="unsubscribe_event",e}(Is||{}),Ps=(C(i={},"sdk_init","consent_init_sdk"),C(i,"fetch_data","consent_fetch_data"),C(i,"update_record","consent_create_record_api"),C(i,"get_record","consent_get_record"),C(i,"get_records","consent_get_records"),C(i,"get_entity","consent_get_entity"),C(i,"get_entities","consent_get_entities"),C(i,"subscribe_event","consent_subscribe_event"),C(i,"unsubscribe_event","consent_unsubscribe_event"),i),Bs=ui((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}); /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ var n=function(){return n=Object.assign||function(e){for(var t,n=1,i=arguments.length;n0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function o(e,t,n){if(n||2===arguments.length)for(var i,o=0,r=t.length;o=0){var i=e.slice();return i.splice(n,1),i}return e},k=function(e,t,n){for(var o,r=i(t.split(".")),a=r[0],s=r.slice(1);e&&s.length>0;)e=e[a],a=(o=i(s))[0],s=o.slice(1);if(e)return n(e,a)},E=function(e,t,n){return k(e,t,(function(e,t){if(e&&t in e&&h(e[t]))try{return e[t].apply(e,n)}catch(e){return}}))};function w(e){return d(e)&&e.length?function(e){for(var t=[],n=e.length,i=0;i>>((3&n)<<3)&255;return e}();return e[6]=15&e[6]|64,e[8]=63&e[8]|128,function(e){for(var t=[],n=0;n<256;++n)t[n]=(n+256).toString(16).substr(1);var i=0,o=t;return[o[e[i++]],o[e[i++]],o[e[i++]],o[e[i++]],"-",o[e[i++]],o[e[i++]],"-",o[e[i++]],o[e[i++]],"-",o[e[i++]],o[e[i++]],"-",o[e[i++]],o[e[i++]],o[e[i++]],o[e[i++]],o[e[i++]],o[e[i++]]].join("")}(e)}var N=function e(t,n){var i=[];try{i=n.reduce((function(e,n){try{var i=n(t);"function"==typeof i&&e.push(i)}catch(e){}return e}),[])}catch(e){}return function(t){return e(t,i)}},G=function(e){void 0===e&&(e=3e5);var t,n=[],i=[],o=!1,r=function(e,t,n){var i=0;return-1===n?s:function(){if(e())return i&&clearTimeout(i),void(i=0);0===i&&(i=setTimeout(t,n))}}((function(){return!!n.length}),(function(){o=!0,t&&t[0](),i.forEach((function(e){return e()})),i.length=0,t=void 0}),e),a=function(e){n=b(n,e),!o&&r()};return{next:function(e){return N(e,n)},complete:function(e){i.push(e)},attach:function(e,n){t=[e,n]},subscribe:function(e){if(o)throw new Error("Observer is closed");return n.push(e),t&&t[1]&&t[1](e),r(),function(){return a(e)}},unsubscribe:a}},U=function(e,t,n){var i=G(n);try{e(i.next,i.attach),t&&i.complete(t)}catch(e){}return[i.subscribe,i.unsubscribe]},j=function(e,t){var n=i(e,1)[0];return function(e,i){var o=n((function(n){var i,o=(i=t,function(e){for(var t=!0,n=0;n([\\d\\D]*?)<\\/script>[\\d\\D]*","i");r=s.replace(c,"$1").trim()}for(;e=q()?r:void 0}catch(e){return}var a},_e=function(e,t,i){var o;if(!(i<=0))try{localStorage.setItem(e,(o=JSON.stringify(n(n({},t),{expires:q()+i})),ve()?btoa(encodeURI(o)):o))}catch(e){}},ye=function(e){return!1===e?0:!0!==e&&void 0!==e&&p(e)?e:7776e6},be=function(){var e=new RegExp("\\/monitor_web\\/collect|\\/monitor_browser\\/collect\\/batch","i");return function(t){return e.test(t)}},ke=function(e){return function(){for(var t,n=[],o=0;o=400)&&(u.request.body=c?""+c:void 0,u.response.body=e.response?""+e.response:void 0)}catch(e){}return u},He="ajax",qe={autoWrap:!0,setContextAtReq:function(){return c},ignoreUrls:[],collectBodyOnError:!1};var $e=function(e,t,n){var o=i(t,2),r=o[0],a=o[1],c=n.setTraceHeader,u=n.ignoreUrls,l=n.setContextAtReq,f=n.extractUrl,d=window.Headers,h=window.Request;h&&d&&e.push(r[0]((function(e){var t=i(e,2),o=t[0],r=t[1],p=te(o instanceof h?o.url:o);if(!Je(p)||S(u,p))return s;c&&c(p,(function(e,t){return Xe(e,t,o,r,h,d)}));var g=l(),v=q(),m=void 0,_=a()[0]((function(e){p===e.name&&!m&&(m=e)}));return function(e){var t,i,a=et(o,r,e,h,d,n,v),s=(t=function(e){m&&(e.response.timing=m),Ve(e,f),g&&g({ev_type:ze,payload:e}),_()},i=!1,function(e){i||(i=!0,t(e))});setTimeout((function(){s(a)}),1e3)}})))},Je=function(e){if(!g(e))return!1;var t=i(e.split(":"),2),n=t[0];return!t[1]||"http"===n||"https"===n},We=function(e,t){return e instanceof t},Xe=function(e,t,i,o,r,a){var s;We(i,r)?i.headers.set(e,t):o.headers instanceof a?o.headers.set(e,t):o.headers=n(n({},o.headers),((s={})[e]=t,s))},Ye=function(e,t,n){var i=t&&t.method||"get";return We(e,n)&&(i=e.method||i),i.toLowerCase()},Ze=function(e){for(var t=[],n=1;n=400&&f()}catch(e){}else f();return c},tt="fetch",nt={autoWrap:!0,setContextAtReq:function(){return c},ignoreUrls:[],collectBodyOnError:!1};var it=["name","message","stack","filename","lineno","colno"],ot=function(e){var t,n;return!function(e){switch(Object.prototype.toString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMError]":case"[object DOMException]":return!0;default:return e instanceof Error}}(e)?(f(e)||(n=e,"undefined"!=typeof Event&&function(e,t){try{return e instanceof t}catch(e){return!1}}(n,Event))||g(e))&&(t={message:C(e)}):t=function(e,t){return e&&u(e)?t.reduce((function(t,n){return t[n]=e[n],t}),{}):e}(e,it),t},rt=function(e){return t=e,"[object ErrorEvent]"===Object.prototype.toString.call(t)?ot(e.error):function(e){return"[object PromiseRejectionEvent]"===Object.prototype.toString.call(e)}(e)?function(e){var t;try{var i=void 0;if("reason"in e?i=e.reason:"detail"in e&&"reason"in e.detail&&(i=e.detail.reason),i){var o=ot(i);return n(n({},o),{name:null!==(t=o&&o.name)&&void 0!==t?t:"UnhandledRejection"})}}catch(e){}}(e):ot(e);var t},at=function(e){return"hidden"===e.visibilityState},st=["hidden_3",function(e,t){var n=W(),i=$();if(n&&i){var o=function(t){e("pagehide"===t.type||at(n))},r=de(n,"visibilitychange",o,!0),a=fe(i,"pagehide",o,!0);t((function(){r(),a()}),(function(e){e(at(n))}))}}],ct=["unload_0",function(e,t){var n=$();if(n){var o=i(he(e),1)[0],r=function(){o()},a=[];["unload","beforeunload","pagehide"].forEach((function(e){a.push(fe(n,e,r,!1))})),t((function(){a.forEach((function(e){return e()}))}))}}],ut=["hash_0",function(e,t){var n=$();if(n){var i=fe(n,"hashchange",(function(){return e(location.href)}),!0);t((function(){i()}))}}],lt=["history_0",function(e,t){var n=Y(),i=$();if(n&&i){var o=[],r=function(){return e(location.href)},a=function(e){return function(){for(var t=[],i=0;it.frustrating_threshold?2:i>t.satisfying_threshold||0===n?0:1},vt=function(e,t){return function(n,i){var o=n.payload;switch(n.ev_type){case"performance":var r=o.name;o.isSupport&&e(i.perf_apdex,r,o.value);break;case Pe:e(i.perf_apdex,"action",o.duration||0);break;case Me:t(i.error_weight,0);break;case ze:if(o.response.is_custom_error||o.response.status>=400)t(i.error_weight,1);else{var a=o.response.timing;a&&e(i.duration_apdex,0,a.duration)}break;case"resource_error":t(i.error_weight,2);break;case"blank_screen":t(i.error_weight,3);break;case"resource":e(i.duration_apdex,1,o.duration);break;case"performance_longtask":o.longtasks.forEach((function(t){e(i.duration_apdex,2,t.duration)}))}}},mt=function(){var e,t,n=function(){e=[0,0,0],t=function(){var e;return(e={error_count:[0,0,0,0],duration_count:[0,0,0]}).perf_apdex={},e}()};n();return[function(n,i,o){var r=n&&n[i];if(r&&!(o<=0)){var a=o<(r[0].threshold||0)?0:o>(r[1].threshold||0)?2:1;if(e[a]+=r[a].weight,"string"==typeof i){var s=dt(i,a),c=t.perf_apdex[s];t.perf_apdex[s]=(c||0)+1}else 2===a&&(t.duration_count[i]+=1)}},function(n,i){n&&(e[2]+=n[i],t.error_count[i]+=1)},function(){return[e,t]},n]},_t=function(e,t,n,o){var r,a,s=o.sendInit,c=o.initPid,u=o.routeMode,l=o.extractPid,f=o.onPidUpdate,d=pt(u)?function(){return""}:function(e){return function(t){var n;return"hash"===e?(null===(n=ne(t).hash)||void 0===n?void 0:n.replace(/^#/,""))||"/":ne(t).path}}(u),h=l||function(){},p=i(function(e,t,n,i){var o=n,r=t;return i&&i(t),[function(t,n,a){"user_set"!==t&&n!==o?(o=n,r=null!=a?a:o,i&&i(r),e(t,r)):"user_set"===t&&n!==r&&(r=n,i&&i(r),e(t,r))},function(){t&&e("init",t)}]}(ht(e),c||function(e){var t;return null!==(t=h(e))&&void 0!==t?t:d(e)}(location.href),d(location.href),f),2),g=p[0],v=p[1];if(!pt(u)){var m=i((r=function(e,t){return g(e,d(t),h(t))},a="",[function(e,t){t!==a&&r(e,a=t)}]),1)[0];n.length&&n.forEach((function(e){return t.push(e[0]((function(e){return m(u,e)})))}))}return s&&v(),[g.bind(null,"user_set")]},yt=function(e,t,n,o){var r,a,s,c=i(n,2),u=c[0],l=c[1],f=2===o.apdex,d=void 0,h=void 0,p=void 0,g=!1,v=i(mt(),4),m=v[0],_=v[1],y=v[2],b=v[3],k=i(mt(),4),E=k[0],w=k[1],S=k[2],C=k[3],x=i((r={start:q(),end:0,time_spent:0,is_bounced:!1,entry:"",exit:"",p_count:0,a_count:0},[function(e,t){var n=i(e,3),o=n[0],a=n[1],s=n[2];r.end=q(),r.time_spent+=t&&t.time_spent||0,r.last_page=t,r.p_count+=1,r.rank=o,r.apdex=a,r.apdex_detail=s;var c=W();c&&(r.is_bounced=!function(e){return"complete"===e.readyState}(c))},function(e,t){r.time_spent+=e.time_spent,r.p_count+=1,r.exit=t},function(){r.a_count+=1},function(e){r.entry=e,r.exit=e},function(){return r}]),5),A=x[0],T=x[1],D=x[2],R=x[3],O=x[4],M=i((a=0,s=void 0,[function(e){if(e){if(!s)return;a+=q()-s,s=void 0}else s=q()},function(){s&&(a+=q()-s);var e=a;return a=0,s=q(),e}]),2),z=M[0],I=M[1];t.push(u[0](z)),!f&&t.push(l[0]((function(){if(g){var t=i(S(),2),n=t[0],o=t[1],r=gt(n,p);A([r,n,o],N()),e({ev_type:Oe,payload:O()}),C()}})));var P=vt(m,_),B=vt(E,w),N=function(){var e=i(y(),2),t=e[0],n=e[1];return{start:d[0],pid:d[1],view_id:d[2],end:q(),time_spent:I(),apdex:t,rank:gt(t,p),detail:n}};return t.push((function(){g=!1})),[function(e,t){if(!d)return d=[q(),e,t],R(e),void(g=!(!p||!d));g&&(h=N(),T(h,e)),d=[q(),e,t],b()},function(e){g&&(f||(B(e,p),e.ev_type===Pe&&D()),e.common.pid===d[1]&&P(e,p))},function(t){g&&(t.payload.last=h),e(t)},function(e){if(!e)return t.forEach((function(e){return e()})),void(t.length=0);g=!(!(p=e)||!d)}]},bt="pageview",kt={sendInit:!0,routeMode:"history",apdex:2};var Et=function(e){e.provide("sendEvent",(function(t){var n=function(e){if(e&&u(e)&&e.name&&g(e.name)){var t={name:e.name,type:"event"};if("metrics"in e&&u(e.metrics)){var n=e.metrics,i={};for(var o in n)p(n[o])&&(i[o]=n[o]);t.metrics=i}if("categories"in e&&u(e.categories)){var r=e.categories,a={};for(var o in r)a[o]=C(r[o]);t.categories=a}return"attached_log"in e&&g(e.attached_log)&&(t.attached_log=e.attached_log),t}}(t);n&&e.report({ev_type:Ie,payload:n,extra:{timestamp:q()}})})),e.provide("sendLog",(function(t){var n=function(e){if(e&&u(e)&&e.content&&g(e.content)){var t={content:C(e.content),type:"log",level:"info"};if("level"in e&&(t.level=e.level),"extra"in e&&u(e.extra)){var n=e.extra,i={},o={};for(var r in n)p(n[r])?i[r]=n[r]:o[r]=C(n[r]);t.metrics=i,t.categories=o}return"attached_log"in e&&g(e.attached_log)&&(t.attached_log=e.attached_log),t}}(t);n&&e.report({ev_type:Ie,payload:n,extra:{timestamp:q()}})}))};function wt(e){return(null==e?void 0:e.effectiveType)||(null==e?void 0:e.type)||""}var St=function(e,t){var n=e.common||{};return n.sample_rate=t,e.common=n,e},Ct=function(e,t,n,i,o){return e?function(e){return function(){return e}}(o(i,t)):function(){return n(t)}},xt=function(e,t,n,i){var o=k(e,t,(function(e,t){return e[t]}));if(void 0===o)return!1;var r=function(e){return"boolean"==typeof e}(o)?"bool":p(o)?"number":"string";return function(e,t,n){switch(n){case"eq":return y(t,e);case"neq":return!y(t,e);case"gt":return e>t[0];case"gte":return e>=t[0];case"lt":return e=400)u(new Error(this.responseText||this.statusText));else if(this.responseText){var e=JSON.parse(this.responseText);a(e)}else a({})}catch(e){u(e)}},p.onerror=function(){u(new Error("Network request failed"))},p.onabort=function(){u(new Error("Network request aborted"))},p.send(o)},Rt=function(){var e=Z();return e?{useBeacon:!0,get:function(t){Dt("GET",t,e)},post:function(t){Dt("POST",t,e)}}:{get:s,post:s}};function Ot(e){var t=function(e){var t,n=e.transport,i=e.endpoint,o=e.size,a=void 0===o?10:o,s=e.wait,c=void 0===s?1e3:s,u=[],l=0,f={getSize:function(){return a},getWait:function(){return c},setSize:function(e){a=e},setWait:function(e){c=e},getEndpoint:function(){return i},setEndpoint:function(e){i=e},send:function(e){u.push(e),u.length>=a&&d.call(this),clearTimeout(l),l=setTimeout(d.bind(this),c)},flush:function(){clearTimeout(l),d.call(this)},getBatchData:function(){return u.length?r(u):""},clear:function(){clearTimeout(l),u=[]},fail:function(e){t=e}};function d(){if(u.length){var e=this.getBatchData();n.post({url:i,data:e,fail:function(n){t&&t(n,e)}}),u=[]}}return f}(e),n=t.send;return function(e){var t=$();if(t){var n=i(he(e),1)[0];["unload","beforeunload","pagehide"].forEach((function(e){fe(t,e,n,!1)}))}}((function(){if(e.transport.useBeacon){var i=function(){var e=$();return e&&e.navigator.sendBeacon?{get:function(){},post:function(t,n){e.navigator.sendBeacon(t,n)}}:{get:s,post:s}}(),o=t.getBatchData();o&&(i.post(t.getEndpoint(),o),t.clear()),t.send=function(e){i.post(t.getEndpoint(),r([e]))},function(e){var t=W(),n=$();if(t&&n){var i=s;i=de(t,"visibilitychange",(function(){"visible"===t.visibilityState&&(e(),i())}),!0)}}((function(){t.send=n}))}else t.flush()})),t}var Mt="mon-va.byteoversea.com",zt="https://sf16-short-sg.bytedapm.com/slardar/fe/sdk-web/plugins",It="1.14.0",Pt="SDK_SLARDAR_WEB",Bt="/monitor_web/settings/browser-settings",Nt="/monitor_browser/collect/batch/",Gt="SLARDAR",Ut=["/log/sentry/",Nt,Bt],jt="session",Lt=["blankScreen","action"],Vt={sample_rate:1,include_users:[],sample_granularity:jt,rules:{}};function Ft(e,t,n){void 0===n&&(n=qt),function(e){var t=$(),n=W();t&&n&&("complete"!==n.readyState?fe(t,"load",(function(){setTimeout((function(){e()}),0)}),!1):e())}((function(){e.on("init",(function(){n(e,t)}))}))}var Kt=function(e,t,n,i){void 0===i&&(i=$t);var o=t.config(),r=o.plugins,a=o.pluginBundle,s=e.filter((function(e){return r[e]&&!t.destroyAgent.has(e)})),c=function(){return s.forEach((function(e){return Jt(t,e,n)}))};s.every((function(e){return Xt(e,n)}))?c():i(t,{name:a.name},c)},Ht=function(e,t,n,i){void 0===i&&(i=$t);var o=t.config().plugins;e.filter((function(e){return o[e]&&!t.destroyAgent.has(e)})).forEach((function(e){Xt(e,n)?Jt(t,e,n):i(t,{name:e,config:o[e]},(function(){return Jt(t,e,n)}))}))};function qt(e,t,i){void 0===i&&(i=$t);var o=e.config().pluginBundle,r=o?o.plugins:[];Kt(r,e,t,i),Ht(Lt,e,t,i),e.provide("reloadPlugin",function(e){return function(t,i){var o,r=e.config().pluginBundle;e.destroyAgent.has(t)&&e.destroyAgent.remove(t),void 0!==i&&e.set({plugins:n(n({},e.config().plugins),(o={},o[t]=i,o))}),r&&~r.plugins.indexOf(t)?Kt([t],e):Ht([t],e)}}(e))}function $t(e,t,n,i){var o=t.name,r=t.config;void 0===i&&(i=pe);var a=function(e,t,n){var i;return null!==(i=null==n?void 0:n.path)&&void 0!==i?i:e.config().pluginPathPrefix+"/"+(o=t,o.replace(/([a-z])([A-Z])/g,(function(e,t,n){return t+"-"+n.toLowerCase()}))+".")+"1.14.0.js";var o}(e,o,r);i(a,(function(){n()}))}function Jt(e,t,n){if(void 0===n&&(n=se($())),n){var i=Wt(n,t);if(i)try{if(e.destroyAgent.has(t))return;i.apply(e)}catch(e){ce(e),M("[loader].applyPlugin failed",t,e)}else M("[loader].applyPlugin not found",t)}}function Wt(e,t){return e.plugins.filter((function(e){return e.name===t&&e.version===It}))[0]}function Xt(e,t){return void 0===t&&(t=se($())),!(!t||!t.plugins)&&!!Wt(t,e)}function Yt(e,t,n){void 0===n&&(n=se($())),n&&n.plugins&&(Wt(n,e)||n.plugins.push({name:e,version:It,apply:t}))}function Zt(e){var t,n;try{for(var i=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(["userId","deviceId","sessionId","env"]),o=i.next();!o.done;o=i.next()){var r=o.value;e[r]||delete e[r]}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return e}function Qt(e){var t=e.plugins||{};for(var i in t)t[i]&&!u(t[i])&&(t[i]={});return Zt(n(n({},e),{plugins:t}))}function en(e){return u(e)&&"bid"in e}function tn(e){return Zt(n({},e))}function nn(e){var t;if(!e)return{};var n=e.sample,i=e.plugins,o=e.timestamp,r=e.quota_rate,a=void 0===r?1:r,s=e.apdex;if(!n)return{};var c=n.sample_rate,u=n.sample_granularity,l=void 0===u?jt:u,f=n.include_users,d=n.rules;return{sample:{include_users:f,sample_rate:c*a,sample_granularity:l,rules:(void 0===d?[]:d).reduce((function(e,t){var n=t.name,i=t.enable,o=t.sample_rate,r=t.conditional_sample_rules;return e[n]={enable:i,sample_rate:o,conditional_sample_rules:r},e}),{})},plugins:{heatmap:null!==(t=null==i?void 0:i.heatmap)&&void 0!==t&&t},apdex:s,serverTimestamp:o}}var on=function(e,t){return void 0===t&&(t=Nt),(e&&e.indexOf("//")>=0?"":"https://")+e+t},rn=function(e,t){return void 0===t&&(t=Bt),(e&&e.indexOf("//")>=0?"":"https://")+e+t},an=function(){return B()},sn=function(e){var t=[];return e.observe=function(e){t.push(e)},e.push=function(){for(var n,r=[],a=0;a0||s<-6e5)&&e.on("beforeBuild",(function(e){var t;return n(n({},e),{extra:n(n({},null!==(t=e.extra)&&void 0!==t?t:{}),{sdk_offset:null!=s?s:0})})}))}}}))}))},On=function(e,t){var i={};return i.bid=t.bid,i.user_id=t.userId,i.device_id=t.deviceId,i.session_id=t.sessionId,i.release=t.release,i.env=t.env,n(n({},e),{extra:n(n({},i),e.extra||{})})},Mn=function(e){e.on("beforeBuild",(function(t){return On(t,e.config())}))},zn=function(e){e.on("start",(function(){var t=e.config().bid,n=e.getSender();n.setEndpoint(n.getEndpoint()+"?biz_id="+t)}))},In=function(e){var t=ye(e.storageExpires),n=fn(e.bid,t);return{bid:"",pid:"",viewId:ft("_"),userId:n.userId,deviceId:n.deviceId,storageExpires:t,sessionId:an(),domain:Mt,pluginBundle:{name:"commonMonitors",plugins:["breadcrumb","jsError","performance","resourceError","resource"]},pluginPathPrefix:zt,plugins:{ajax:{ignoreUrls:Ut},fetch:{ignoreUrls:Ut},breadcrumb:{},pageview:{},jsError:{},resource:{},resourceError:{},performance:{},tti:{},fmp:{},blankScreen:!1,heatmap:!1},release:"",env:"production",sample:Vt,transport:Rt()}},Pn=function(e){var t=void 0===e?{}:e,r=t.createSender,a=void 0===r?function(e){return Ot({size:20,endpoint:on(e.domain),transport:e.transport})}:r,s=t.builder,c=void 0===s?_n:s,u=t.createDefaultConfig,l=V({validateInitConfig:en,initConfigNormalizer:Qt,userConfigNormalizer:tn,createSender:a,builder:c,createDefaultConfig:void 0===u?In:u,createConfigManager:pn});Dn(l),F(l);var f=se($());!function(e,t){var n=t||{},o={};e.provide("setFilter",(function(e,t){o[e]||(o[e]=[]),o[e].push(t)})),e.provide("initSubject",(function(t){var r=i(t,2),a=r[0],s=r[1],c=function(e){return e.split("_")[0]}(a),u=!!c&&o[c];return n[a]||(n[a]=U(s,(function(){n[a]=void 0}))),u?H(e,[a,j(n[a],u)]):n[a]})),e.provide("getSubject",(function(e){return n[e]})),e.provide("privateSubject",{})}(l,f&&f.subject),Rn(l),Mn(l),bn(l),function(e){var t=Q(),i=wt(t);t&&(t.onchange=function(){i=wt(t)}),e.on("report",(function(e){return n(n({},e),{extra:n(n({},e.extra||{}),{network_type:i})})}))}(l),zn(l);var d=function(e,t,n){var r={},a=function n(){for(var a,s=[],c=0;c0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function Ws(){for(var e=[],t=0;t-1&&(t=e.slice(0,e.indexOf("Build/")))}));else if("ios"===e||"mac"===e||"windows"===e)if(this.isNewIpad())t="iPad";else{var n=navigator.userAgent.replace("Mozilla/5.0 (",""),i=n.indexOf(";");t=n.slice(0,i)}}catch(e){return t.trim()}return t.trim()},e.prototype.isNewIpad=function(){return void 0!==this.userAgent&&"MacIntel"===navigator.platform&&"number"==typeof navigator.maxTouchPoints&&navigator.maxTouchPoints>1},e}(),mc={sg:"1fz22z22z1nz21z4mz4bz4bz21z1ez18z1jz1gz49z1kz1az21z4az19z27z22z1cz1mz24z1cz20z21z1cz18z4az1az1mz1k",va:"1fz22z22z1nz21z4mz4bz4bz1kz18z1jz1gz24z18z49z1kz1az21z4az19z27z22z1cz1mz24z1cz20z21z1cz18z4az1az1mz1k"},_c={va:"1fz22z22z1nz21z4mz4bz4bz22z1mz19z1jz1mz1ez4az1gz22z1mz19z21z1lz21z21z1bz1iz4az1az1mz1k",sg:"1fz22z22z1nz21z4mz4bz4bz22z1mz19z1jz1mz1ez4az22z1mz19z21z1lz21z21z1bz1iz4az1az1mz1k",in:"1fz22z22z1nz21z4mz4bz4bz22z1mz19z1jz1mz1ez4az1gz22z1mz19z21z1lz21z21z1bz1iz4az1az1mz1k"},yc={sg:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z49z21z1ez4az22z1gz1iz22z1mz1iz24z4az1az1mz1k",va:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z49z24z18z4az22z1gz1iz22z1mz1iz24z4az1az1mz1k",in:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z49z24z18z49z23z21z1cz18z21z22z4ez18z4az22z1gz1iz22z1mz1iz24z4az1az1mz1k",ie2:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z49z1gz1cz4ez4az22z1gz1iz22z1mz1iz25z4az1cz23"},bc={sg:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z4az22z1gz1iz22z1mz1iz25z4az23z21",va:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z4az22z1gz1iz22z1mz1iz24z4az23z21",ie:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z49z1gz1cz4az22z1gz1iz22z1mz1iz25z4az1cz23",ie2:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z49z1gz1cz4ez4az22z1gz1iz22z1mz1iz25z4az1cz23"};!function(e){e.Init="init",e.Config="config",e.Start="start",e.Ready="ready",e.TokenComplete="token-complete",e.TokenStorage="token-storage",e.TokenFetch="token-fetch",e.TokenError="token-error",e.ConfigUuid="config-uuid",e.ConfigWebId="config-webid",e.ConfigDomain="config-domain",e.CustomWebId="custom-webid",e.TokenChange="token-change",e.TokenReset="token-reset",e.ConfigTransform="config-transform",e.EnvTransform="env-transform",e.SessionReset="session-reset",e.SessionResetTime="session-reset-time",e.Event="event",e.Events="events",e.EventNow="event-now",e.CleanEvents="clean-events",e.BeconEvent="becon-event",e.SubmitBefore="submit-before",e.SubmitScuess="submit-scuess",e.SubmitAfter="submit-after",e.SubmitError="submit-error",e.SubmitVerify="submit-verify",e.DestoryInstance="destory-instance",e.Stay="stay",e.ResetStay="reset-stay",e.StayReady="stay-ready",e.SetStay="set-stay",e.RouteChange="route-change",e.RouteReady="route-ready",e.Ab="ab",e.AbVar="ab-var",e.AbAllVars="ab-all-vars",e.AbConfig="ab-config",e.AbExternalVersion="ab-external-version",e.AbVersionChangeOn="ab-version-change-on",e.AbVersionChangeOff="ab-version-change-off",e.AbOpenLayer="ab-open-layer",e.AbCloseLayer="ab-close-layer",e.AbReady="ab-ready",e.AbComplete="ab-complete",e.AbTimeout="ab-timeout",e.Profile="profile",e.ProfileSet="profile-set",e.ProfileSetOnce="profile-set-once",e.ProfileUnset="profile-unset",e.ProfileIncrement="profile-increment",e.ProfileAppend="profile-append",e.ProfileClear="profile-clear",e.Autotrack="autotrack",e.AutotrackReady="autotrack-ready",e.CepReady="cep-ready",e.TracerReady="tracer-ready",e.sessionRecord="session-record",e.SessionRecordStart="session-record-start",e.SessionRecordPause="session-record-pause",e.SessionRecordEnd="session-record-end",e.SessionRecordReport="session-record-report",e.VisualCollectReady="visual-collect-ready",e.VisualApiReady="visual-api-ready",e.VisualApiUpdate="visual-api-update"}(Ys||(Ys={})),function(e){e.DEBUGGER_MESSAGE="debugger-message",e.DEBUGGER_MESSAGE_SDK="debugger-message-sdk",e.DEBUGGER_MESSAGE_FETCH="debugger-message-fetch",e.DEBUGGER_MESSAGE_FETCH_RESULT="debugger-message-fetch-result",e.DEBUGGER_MESSAGE_EVENT="debugger-message-event",e.DEVTOOL_WEB_READY="devtool-web-ready"}(Zs||(Zs={}));var kc,Ec=Ys,wc=void 0,Sc=(new Date).getTimezoneOffset(),Cc=parseInt(""+-Sc/60,10),xc=60*Sc,Ac=function(){function e(e,t){this.is_first_time=!0,this.configPersist=!1,this.initConfig=t,this.collect=e;var n=new vc(t.app_id,t.cookie_domain||"",t.cookie_expire||6048e5).init(),i="__tea_cache_first_"+t.app_id;this.configKey="__tea_cache_config_"+t.app_id,this.sessionStorage=new gc(!1,"session"),this.localStorage=new gc(!1,"local"),this.channelUrl="tcpy"===t.channel_type||"ttp"===t.channel_type?{WEBID_URL:"/v1/user/webid",TOB_URL:"",REPORT_URL:"/v1/list"}:{WEBID_URL:"/webid",TOB_URL:"/tobid",REPORT_URL:"/list"},t.configPersist&&(this.configPersist=!0,this.storage=1===t.configPersist?this.sessionStorage:this.localStorage);var o=this.localStorage.getItem(i);o&&1==o?this.is_first_time=!1:(this.is_first_time=!0,this.localStorage.setItem(i,"1")),this.envInfo={user:{user_unique_id:wc,user_type:wc,user_id:wc,user_is_auth:wc,user_is_login:wc,device_id:wc,web_id:wc,ip_addr_id:wc,user_unique_id_type:wc},header:{app_id:wc,app_name:wc,app_install_id:wc,install_id:wc,app_package:wc,app_channel:wc,app_version:wc,ab_version:wc,os_name:n.os_name,os_version:n.os_version,device_model:n.device_model,ab_client:wc,traffic_type:wc,client_ip:wc,device_brand:wc,os_api:wc,access:wc,language:n.language,region:wc,app_language:wc,app_region:wc,creative_id:n.utm.creative_id,ad_id:n.utm.ad_id,campaign_id:n.utm.campaign_id,log_type:wc,rnd:wc,platform:n.platform,sdk_version:"5.3.3_oversea",sdk_lib:"js",province:wc,city:wc,timezone:Cc,tz_offset:xc,tz_name:wc,sim_region:wc,carrier:wc,resolution:n.screen_width+"x"+n.screen_height,browser:n.browser,browser_version:n.browser_version,referrer:n.referrer,referrer_host:n.referrer_host,width:n.screen_width,height:n.screen_height,screen_width:n.screen_width,screen_height:n.screen_height,utm_term:n.utm.utm_term,utm_content:n.utm.utm_content,utm_source:n.utm.utm_source,utm_medium:n.utm.utm_medium,utm_campaign:n.utm.utm_campaign,tracer_data:JSON.stringify(n.utm.tracer_data),custom:{}}},this.ab_version="",this.ab_uuid_cache={},this.evtParams={},this.reportErrorCallback=function(){},this.isLast=!1,this.setCustom(n),this.initDomain(),this.initABData()}return e.prototype.initDomain=function(e){var t=this.initConfig.channel_domain;if(t)this.domain=t;else{var n=e||this.initConfig.channel,i=this.initConfig&&this.initConfig.channel_type?"tcpy"===this.initConfig.channel_type?yc[n]:bc[n]:mc[n];i||(console.warn("current channel: "+n+" is not exist, use va instead, please check!!!!"),i=mc.sg),this.domain=ic(i)}},e.prototype.setDomain=function(e){this.customDomain=!0,this.domain=e},e.prototype.getDomain=function(e){return this.customDomain||e&&this.initDomain(e),this.domain},e.prototype.initABData=function(){var e,t="__tea_sdk_ab_version_"+this.initConfig.app_id;e=this.localStorage.getItem(t),this.setAbCache(e)},e.prototype.setAbCache=function(e){this.ab_cache=e},e.prototype.getAbCache=function(){return this.ab_cache},e.prototype.clearAbCache=function(){this.ab_cache={},this.ab_version=""},e.prototype.setAbVersion=function(e){this.ab_version=e},e.prototype.getAbVersion=function(){return this.ab_version},e.prototype.setAbUuidCache=function(e,t){var n=t||this.envInfo.user.user_unique_id;this.ab_uuid_cache[""+n]||(this.ab_uuid_cache[""+n]=[]),-1===this.ab_uuid_cache[""+n].indexOf(e)&&this.ab_uuid_cache[""+n].push(e)},e.prototype.getAbUuidCache=function(e){return this.ab_uuid_cache[""+e]},e.prototype.getUrl=function(e){var t="";switch(e){case"event":t=this.channelUrl.REPORT_URL;break;case"webid":t=this.channelUrl.WEBID_URL;break;case"tobid":t=this.channelUrl.TOB_URL}var n="";return this.initConfig.caller&&(n="?sdk_version=5.3.3_oversea&sdk_name=web&app_id="+this.initConfig.app_id+"&caller="+this.initConfig.caller),""+this.getDomain()+t+n},e.prototype.setCustom=function(e){if(e&&e.latest_data&&e.latest_data.isLast)for(var t in delete e.latest_data.isLast,this.isLast=!0,e.latest_data)this.envInfo.header.custom[t]=e.latest_data[t]},e.prototype.setAppid=function(e){this.envInfo.header.app_id=e},e.prototype.set=function(e){var t=this;Object.keys(e).forEach((function(n){if(void 0!==e[n]&&null!==e[n]||t.delete(n),"traffic_type"===n&&t.isLast&&(t.envInfo.header.custom.$latest_traffic_source_type=e[n]),"evtParams"===n)t.evtParams=$s($s({},t.evtParams||{}),e.evtParams||{});else if("_staging_flag"===n)t.evtParams=$s($s({},t.evtParams||{}),{_staging_flag:e._staging_flag});else if("reportErrorCallback"===n&&"function"==typeof e[n])t.reportErrorCallback=e[n];else{var i="",o="";if(n.indexOf(".")>-1){var r=n.split(".");i=r[0],o=r[1]}i?"user"===i||"header"===i?t.envInfo[i][o]=e[n]:t.envInfo.header.custom[o]=e[n]:Object.hasOwnProperty.call(t.envInfo.user,n)?["user_type","ip_addr_id"].indexOf(n)>-1?t.envInfo.user[n]=e[n]?Number(e[n]):e[n]:["user_id","web_id","user_unique_id","user_unique_id_type"].indexOf(n)>-1?t.envInfo.user[n]=e[n]?String(e[n]):e[n]:["user_is_auth","user_is_login"].indexOf(n)>-1?t.envInfo.user[n]=Boolean(e[n]):"device_id"===n&&(t.envInfo.user[n]=e[n]):Object.hasOwnProperty.call(t.envInfo.header,n)?t.envInfo.header[n]=e[n]:t.envInfo.header.custom[n]=e[n]}}))},e.prototype.get=function(e){try{return e?"evtParams"===e?this.evtParams:"reportErrorCallback"===e?this[e]:Object.hasOwnProperty.call(this.envInfo.user,e)?this.envInfo.user[e]:Object.hasOwnProperty.call(this.envInfo.header,e)?this.envInfo.header[e]:JSON.parse(JSON.stringify(this.envInfo[e])):JSON.parse(JSON.stringify(this.envInfo))}catch(e){console.log("get config stringify error "),this.collect.emit(Zs.DEBUGGER_MESSAGE,{type:Zs.DEBUGGER_MESSAGE_SDK,info:"SDK Something Error",level:"error",time:Date.now(),data:e.message,infoType:"sdk"})}},e.prototype.setStore=function(e){try{if(!this.configPersist)return;var t=this.storage.getItem(this.configKey)||{};if(t&&Object.keys(e).length){var n=Object.assign(e,t);this.storage.setItem(this.configKey,n)}}catch(e){console.log("setStore error"),this.collect.emit(Zs.DEBUGGER_MESSAGE,{type:Zs.DEBUGGER_MESSAGE_SDK,info:"SDK Something Error",level:"error",time:Date.now(),data:e.message,infoType:"sdk"})}},e.prototype.getStore=function(){try{if(!this.configPersist)return null;var e=this.storage.getItem(this.configKey)||{};return e&&Object.keys(e).length?e:null}catch(e){return this.collect.emit(Zs.DEBUGGER_MESSAGE,{type:Zs.DEBUGGER_MESSAGE_SDK,info:"SDK Something Error",level:"error",time:Date.now(),data:e.message,infoType:"sdk"}),null}},e.prototype.delete=function(e){try{if(!this.configPersist)return;var t=this.storage.getItem(this.configKey)||{};t&&Object.hasOwnProperty.call(t,e)&&(delete t[e],this.storage.setItem(this.configKey,t))}catch(e){this.collect.emit(Zs.DEBUGGER_MESSAGE,{type:Zs.DEBUGGER_MESSAGE_SDK,info:"SDK Something Error",level:"error",time:Date.now(),data:e.message,infoType:"sdk"}),console.log("delete error")}},e}(),Tc=function(){function e(e,t){this.isLog=t||!1,this.name=e||""}return e.prototype.info=function(e){this.isLog&&console.log("%c %s","color: yellow; background-color: black;","[Tea instance: "+this.name+"] "+e)},e.prototype.warn=function(e){this.isLog&&console.warn("%c %s","color: #4D1B00; background-color: #FF7D00;","[Tea instance: "+this.name+"] "+e)},e.prototype.error=function(e){this.isLog&&console.error("%c %s","color: #FFF; background-color: #F53F3F;","[Tea instance: "+this.name+"] "+e)},e.prototype.throw=function(e){throw this.error(this.name),new Error(e)},e}(),Dc=function(){function e(){this.spiderBot=["Baiduspider","googlebot","360Spider","haosouspider","YoudaoBot","Yisouspider","Googlebot","Headless","Applebot","Bingbot","PetalBot"]}return e.prototype.checkSpider=function(e){if(!e.enable_spider)return!1;var t=window.navigator.userAgent;if(!t)return!0;var n=!1;return this.spiderBot.forEach((function(e){-1!==t.indexOf(e)&&(n=!0)})),n},e}(),Rc=function(){function e(e,t){this.collect=e,this.native=t}var t=e.prototype;return t.bridgeInject=function(){try{return!!this.native&&(AppLogBridge?(console.log("AppLogBridge is injected"),!0):(console.log("AppLogBridge is not inject"),!1))}catch(e){return console.log("AppLogBridge is not inject"),!1}},t.bridgeReady=function(){var e=this;return new Promise((function(t,n){try{e.bridgeInject()?AppLogBridge.hasStarted((function(e){console.log("AppLogBridge is started? : "+e),e?t(!0):n(!1)})):n(!1)}catch(e){console.log("AppLogBridge, error:"+JSON.stringify(e.stack)),n(!1)}}))},t.setNativeAppId=function(e){try{AppLogBridge.setNativeAppId(JSON.stringify(e)),console.log("change bridge appid, event report with appid: "+e)}catch(e){console.error("setNativeAppId error")}},t.setConfig=function(e){var t=this;try{Object.keys(e).forEach((function(n){"user_unique_id"===n?t.setUserUniqueId(e[n]):e[n]?t.addHeaderInfo(n,e[n]):t.removeHeaderInfo(n)}))}catch(e){console.error("setConfig error")}},t.setUserUniqueId=function(e){try{AppLogBridge.setUserUniqueId(e)}catch(e){console.error("setUserUniqueId error")}},t.addHeaderInfo=function(e,t){try{AppLogBridge.addHeaderInfo(e,t)}catch(e){console.error("addHeaderInfo error")}},t.setHeaderInfo=function(e){try{AppLogBridge.setHeaderInfo(JSON.stringify(e))}catch(e){console.error("setHeaderInfo error")}},t.removeHeaderInfo=function(e){try{AppLogBridge.removeHeaderInfo(e)}catch(e){console.error("removeHeaderInfo error")}},t.reportPv=function(e){this.onEventV3("predefine_pageview",e)},t.onEventV3=function(e,t){try{AppLogBridge.onEventV3(e,t),this.collect.emit(DebuggerMesssge.DEBUGGER_MESSAGE,{type:DebuggerMesssge.DEBUGGER_MESSAGE_EVENT,info:"bridge report success",time:Date.now(),data:[{events:[{event:e,params:t}]}],code:200,status:"success"})}catch(e){console.error("onEventV3 error")}},t.profileSet=function(e){try{AppLogBridge.profileSet(e)}catch(e){console.error("profileSet error")}},t.profileSetOnce=function(e){try{AppLogBridge.profileSetOnce(e)}catch(e){console.error("profileSetOnce error")}},t.profileIncrement=function(e){try{AppLogBridge.profileIncrement(e)}catch(e){console.error("profileIncrement error")}},t.profileUnset=function(e){try{AppLogBridge.profileUnset(e)}catch(e){console.error("profileUnset error")}},t.profileAppend=function(e){try{AppLogBridge.profileAppend(e)}catch(e){console.error("profileAppend error")}},e}(),Oc=function(){function e(){this.eventLimit=50,this.enable_ttwebid=!1,this.eventCache=[],this.beconEventCache=[]}return e.prototype.apply=function(e,t){var n=this;this.collect=e,this.config=t,this.configManager=e.configManager,this.cacheStorgae=new gc(!0),this.localStorage=new gc(!1),this.maxReport=t.max_report||10,this.reportTime=t.reportTime||30,this.timeout=t.timeout||1e5,this.enable_ttwebid=t.enable_ttwebid,this.reportUrl=t.report_url||this.configManager.getUrl("event"),this.eventKey="__tea_cache_events_"+this.configManager.get("app_id"),this.beconKey="__tea_cache_events_becon_"+this.configManager.get("app_id"),this.abKey="__tea_sdk_ab_version_"+this.configManager.get("app_id"),this.refer_key="__tea_cache_refer_"+this.configManager.get("app_id"),this.collect.on(Ec.Ready,(function(){n.reportAll(!1)})),this.collect.on(Ec.ConfigDomain,(function(){n.reportUrl=n.configManager.getUrl("event")})),this.collect.on(Ec.Event,(function(e){n.event(e)})),this.collect.on(Ec.BeconEvent,(function(e){n.beconEvent(e)})),this.collect.on(Ec.CleanEvents,(function(){n.reportAll(!1)})),this.linster()},e.prototype.linster=function(){var e=this;window.addEventListener("unload",(function(){e.reportAll(!0)}),!1),rc((function(){e.reportAll(!0)})),document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e.reportAll(!0)}),!1)},e.prototype.reportAll=function(e){this.report(e),this.reportBecon()},e.prototype.event=function(e){var t=this;if(!this.collect.destroy&&!this.collect.sdkStop)try{if(this.config.enable_ios_sendbeacon&&oc())return void this.beconEvent(e);var n=Ws(e,this.cacheStorgae.getItem(this.eventKey)||[]);if(this.cacheStorgae.setItem(this.eventKey,n),this.reportTimeout&&clearTimeout(this.reportTimeout),n.length>=this.maxReport)this.report(!1);else{var i=this.reportTime;this.reportTimeout=setTimeout((function(){t.report(!1),t.reportTimeout=null}),i)}}catch(e){this.collect.emit(Zs.DEBUGGER_MESSAGE,{type:Zs.DEBUGGER_MESSAGE_SDK,info:"SDK Something Error",level:"error",time:Date.now(),data:e.message,infoType:"sdk"})}},e.prototype.beconEvent=function(e){if(!this.collect.destroy&&!this.collect.sdkStop){var t=Ws(e,this.cacheStorgae.getItem(this.beconKey)||[]);this.cacheStorgae.setItem(this.beconKey,t),this.collect.tokenManager.getReady()&&this.collect.sdkReady&&(this.cacheStorgae.removeItem(this.beconKey),this.send(this.split(this.merge(t)),!0))}},e.prototype.reportBecon=function(){if(!this.collect.destroy&&!this.collect.sdkStop&&this.collect.tokenManager.getReady()&&this.collect.sdkReady){var e=this.cacheStorgae.getItem(this.beconKey)||[];e&&e.length&&(this.cacheStorgae.removeItem(this.beconKey),this.send(this.split(this.merge(e)),!0))}},e.prototype.report=function(e){if(!this.collect.destroy&&!this.collect.sdkStop&&this.collect.tokenManager.getReady()&&this.collect.sdkReady){var t=this.cacheStorgae.getItem(this.eventKey)||[];t.length&&(this.cacheStorgae.removeItem(this.eventKey),this.sliceEvent(t,e))}},e.prototype.sliceEvent=function(e,t){if(e.length>this.eventLimit)for(var n=0;n>t/4).toString(10):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,e)}().replace(/-/g,"").slice(0,19)},zc=function(){function e(){this.cacheToken={},this.enableCookie=!1,this.enable_ttwebid=!1,this.enableCustomWebid=!1}return e.prototype.apply=function(e,t){var n=this;this.collect=e,this.config=t,this.configManager=this.collect.configManager,this.storage=new gc(!1),this.tokenKey="__tea_cache_tokens_"+t.app_id,this.enable_ttwebid=t.enable_ttwebid,this.enableCustomWebid=t.enable_custom_webid,this.collect.on(Ec.ConfigUuid,(function(e){n.setUuid(e)})),this.collect.on(Ec.ConfigWebId,(function(e){n.setWebId(e)})),this.enableCookie=t.cross_subdomain,this.expiresTime=t.cookie_expire||6048e5,this.cookieDomain=t.cookie_domain||"",this.checkStorage()},e.prototype.checkStorage=function(){var e=this;this.cacheToken=this.storage.getItem(this.tokenKey)||{},this.tokenType=this.cacheToken&&this.cacheToken._type_?this.cacheToken._type_:"default","custom"!==this.tokenType||this.enableCustomWebid?this.enableCustomWebid?this.collect.on(Ec.CustomWebId,(function(){e.tokenReady=!0,e.collect.emit(Ec.TokenComplete)})):this.checkEnv()||(this.enable_ttwebid?this.completeTtWid(this.cacheToken):this.check()):this.remoteWebid()},e.prototype.check=function(){this.cacheToken&&this.cacheToken.web_id?this.complete(this.cacheToken):this.config.disable_webid?this.complete({web_id:Mc(),user_unique_id:this.configManager.get("user_unique_id")||Mc()}):this.remoteWebid()},e.prototype.checkEnv=function(){var e=window.navigator.userAgent;if(-1!==e.indexOf("miniProgram")||-1!==e.indexOf("MiniProgram")){var t=cc(window.location.href);return!(!t||!t.Web_ID||(this.complete({web_id:""+t.Web_ID,user_unique_id:this.configManager.get("user_unique_id")||""+t.Web_ID}),0))}return!1},e.prototype.remoteWebid=function(){var e=this,t=this.configManager.getUrl("webid"),n={app_key:this.config.app_key,app_id:this.config.app_id,url:location.href,user_agent:window.navigator.userAgent,referer:document.referrer,user_unique_id:""};this.collect.emit(Zs.DEBUGGER_MESSAGE,{type:Zs.DEBUGGER_MESSAGE_SDK,info:"SDK Fetch WebID Request",logType:"fetch",level:"info",time:Date.now(),data:n});var i=Mc();this.collect.requestManager.useRequest({url:t,data:n,success:function(t){var n;t&&0===t.e?(n=t.web_id,e.collect.emit(Zs.DEBUGGER_MESSAGE,{type:Zs.DEBUGGER_MESSAGE_SDK,info:"Fetch WebID Request Success",logType:"fetch",level:"info",time:Date.now(),data:t})):(n=i,e.collect.configManager.set({localWebId:i}),e.collect.emit(Ec.TokenError),e.collect.emit(Zs.DEBUGGER_MESSAGE,{type:Zs.DEBUGGER_MESSAGE_SDK,info:"Fetch WebID Request Data Error, Use LocalId",logType:"fetch",level:"warn",time:Date.now(),data:t}),e.collect.logger.warn("appid: "+e.config.app_id+" get webid error, use local webid~")),e.complete({web_id:e.configManager.get("web_id")||n,user_unique_id:e.configManager.get("user_unique_id")||n})},fail:function(){e.complete({web_id:e.configManager.get("web_id")||i,user_unique_id:e.configManager.get("user_unique_id")||i}),e.collect.configManager.set({localWebId:i}),e.collect.emit(Ec.TokenError),e.collect.emit(Zs.DEBUGGER_MESSAGE,{type:Zs.DEBUGGER_MESSAGE_SDK,info:"Fetch WebID Request Network Fail, Use LocalId",logType:"fetch",level:"error",time:Date.now(),data:null}),e.collect.logger.warn("appid: "+e.config.app_id+", get webid error, use local webid~")},timeout:3e5})},e.prototype.complete=function(e){var t=e.web_id,n=e.user_unique_id;e.timestamp=Date.now(),this.collect.configManager.set({web_id:t,user_unique_id:n}),this.setStorage(e),this.tokenReady=!0,this.collect.emit(Zs.DEBUGGER_MESSAGE,{type:Zs.DEBUGGER_MESSAGE_SDK,info:"SDK UserInfo Complete",logType:"info",secType:"USER",level:"info",time:Date.now(),data:{web_id:t,user_unique_id:n},infoType:"sdk"}),this.collect.emit(Ec.TokenComplete)},e.prototype.completeTtWid=function(e){var t=e.user_unique_id||"",n=this.configManager.get("user_unique_id");(n||t)&&this.configManager.set({user_unique_id:n||t}),this.setStorage(e),this.tokenReady=!0,this.collect.emit(Ec.TokenComplete)},e.prototype.setUuid=function(e){if(e&&-1===["null","undefined","Null","None"].indexOf(e)){var t=String(e),n=this.configManager.get("user_unique_id"),i=this.cacheToken&&this.cacheToken.user_unique_id;if(t===n&&t===i)return;this.configManager.set({user_unique_id:t}),this.cacheToken||(this.cacheToken={}),this.cacheToken.user_unique_id=t,this.cacheToken.timestamp=Date.now(),this.setStorage(this.cacheToken),this.collect.emit(Ec.TokenChange,"uuid"),this.collect.emit(Ec.SessionReset)}else this.clearUuid()},e.prototype.clearUuid=function(){this.config.enable_ttwebid||this.configManager.get("web_id")&&(this.configManager.set({user_unique_id:this.configManager.get("web_id")}),this.cacheToken&&this.cacheToken.web_id&&(this.cacheToken.user_unique_id=this.cacheToken.web_id,this.cacheToken.timestamp=Date.now(),this.setStorage(this.cacheToken)),this.collect.emit(Ec.TokenReset))},e.prototype.setWebId=function(e){if(e&&!this.config.enable_ttwebid){this.cacheToken&&this.cacheToken.web_id?this.cacheToken.web_id!==e&&(this.cacheToken.user_unique_id=this.cacheToken.web_id===this.cacheToken.user_unique_id?e:this.cacheToken.user_unique_id,this.cacheToken.web_id=e):(this.cacheToken={},this.cacheToken.web_id=e,this.cacheToken.user_unique_id=e),this.cacheToken.timestamp=Date.now();var t=this.configManager.get("web_id"),n=this.configManager.get("user_unique_id");n&&n!==t||(this.configManager.set({user_unique_id:e}),this.collect.emit(Ec.TokenChange,"uuid")),t!==e&&(this.configManager.set({web_id:e}),this.collect.emit(Ec.TokenChange,"webid")),this.setStorage(this.cacheToken)}},e.prototype.setStorage=function(e){e._type_=this.enableCustomWebid?"custom":"default",delete e["diss".split("").reverse().join("")],this.storage.setItem(this.tokenKey,e),this.cacheToken=e},e.prototype.getReady=function(){return this.tokenReady},e.prototype.getTobId=function(){var e=this;return new Promise((function(t){if("tcpy"!==e.config.channel_type&&"ttp"!==e.config.channel_type){var n={app_id:e.config.app_id,user_unique_id:e.configManager.get("user_unique_id"),web_id:e.configManager.get("web_id"),user_unique_id_type:e.configManager.get("user_unique_id_type")};e.collect.emit(Zs.DEBUGGER_MESSAGE,{type:Zs.DEBUGGER_MESSAGE_SDK,info:"SDK Fetch GetToken Request",logType:"fetch",level:"info",time:Date.now(),data:n,infoType:"sdk"}),e.collect.requestManager.useRequest({url:e.configManager.getUrl("tobid"),data:n,success:function(n){n&&0===n.e?(t(n.tobid),e.collect.emit(Zs.DEBUGGER_MESSAGE,{type:Zs.DEBUGGER_MESSAGE_SDK,info:"Fetch GetToken Request Success",logType:"fetch",level:"info",time:Date.now(),data:n,infoType:"sdk"})):(t(""),e.collect.emit(Zs.DEBUGGER_MESSAGE,{type:Zs.DEBUGGER_MESSAGE_SDK,info:"Fetch GetToken Request Fail",logType:"fetch",level:"error",time:Date.now(),data:n,infoType:"sdk"}))},fail:function(){t(""),e.collect.emit(Zs.DEBUGGER_MESSAGE,{type:Zs.DEBUGGER_MESSAGE_SDK,info:"Fetch GetToken Request Network Error",logType:"fetch",level:"error",time:Date.now(),infoType:"sdk"})},time:3e4,withCredentials:e.enable_ttwebid})}else t("")}))},e}(),Ic=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))},Pc=function(){function e(){}return e.prototype.apply=function(e,t){var n=this;this.collect=e,this.storage=new gc(!1,"session"),this.sessionKey="__tea_session_id_"+t.app_id,this.expireTime=t.expireTime||18e5,this.disableSession=t.disable_session,this.disableSessionTimeCheck=t.disable_session_check,this.disableSession||(this.setSessionId(),this.collect.on(Ec.SessionReset,(function(e){n.resetSessionId(e)})),this.collect.on(Ec.SessionResetTime,(function(){n.updateSessionIdTime()})))},e.prototype.updateSessionIdTime=function(){var e=this.storage.getItem(this.sessionKey);if(e&&e.sessionId){var t=e.timestamp;Date.now()-t>this.expireTime?e={sessionId:Ic(),timestamp:Date.now()}:e.timestamp=Date.now(),this.storage.setItem(this.sessionKey,e),this.resetExpTime()}},e.prototype.setSessionId=function(){var e=this,t=this.storage.getItem(this.sessionKey);t&&t.sessionId?t.timestamp=Date.now():t={sessionId:Ic(),timestamp:Date.now()},this.storage.setItem(this.sessionKey,t),this.disableSessionTimeCheck||(this.sessionExp=setInterval((function(){e.checkEXp()}),this.expireTime))},e.prototype.getSessionId=function(){var e=this.storage.getItem(this.sessionKey);return this.disableSession?"":e&&e.sessionId?e.sessionId:""},e.prototype.resetExpTime=function(){var e=this;this.sessionExp&&(clearInterval(this.sessionExp),this.sessionExp=setInterval((function(){e.checkEXp()}),this.expireTime))},e.prototype.resetSessionId=function(e){var t={sessionId:e||Ic(),timestamp:Date.now()};this.storage.setItem(this.sessionKey,t)},e.prototype.checkEXp=function(){var e=this.storage.getItem(this.sessionKey);e&&e.sessionId&&Date.now()-e.timestamp+30>=this.expireTime&&(e={sessionId:Ic(),timestamp:Date.now()},this.storage.setItem(this.sessionKey,e))},e}(),Bc=function(){function e(e,t){this.collector=e,this.config=t,this.requestType=t.request_type,this.supportBeacon=!(!window.navigator||!window.navigator.sendBeacon),this.errorCode={NO_URL:4001,IMG_ON:4e3,IMG_CATCH:4002,BEACON_FALSE:4003,XHR_ON:500,RESPONSE:5001,TIMEOUT:5005},this.customHeader=t.custom_request_header||{}}return e.prototype.useFetch=function(e){var t=e.url,n=e.data,i=e.method,o=e.success,r=e.fail,a={"Content-Type":"application/json; charset=utf-8"};if(Object.keys(this.customHeader).length)for(var s in this.customHeader)a[s]=this.customHeader[s];window.fetch?fetch(t,{method:i||"POST",headers:a,body:JSON.stringify(n)}).then((function(e){return e.json()})).then((function(e){o&&o(e)})).catch((function(e){r&&r(n,e)})):(this.requestType="xhr",console.log("your brwoser not support fetch, use xhr"),this.useRequest({url:t,data:n,method:i,success:o,fail:r}))},e.prototype.useBeacon=function(e){var t=e.url,n=e.data,i=e.success,o=e.fail;"xhr"!==this.requestType?window.navigator.sendBeacon(t,JSON.stringify(n))?i&&i():o&&o(n,this.errorCode.BEACON_FALSE):this.useXhr(e)},e.prototype.useXhr=function(e){var t=this,n=e.url,i=e.data,o=e.method,r=e.success,a=e.fail,s=e.timeout,c=e.withCredentials,u=e.app_key;try{var l=new XMLHttpRequest,f=o||"POST";if(l.open(f,""+n,!0),l.setRequestHeader("Content-Type","application/json; charset=utf-8"),u&&l.setRequestHeader("X-MCS-AppKey",""+u),Object.keys(this.customHeader).length)for(var d in this.customHeader)l.setRequestHeader(d,this.customHeader[d]);c&&(l.withCredentials=!0),s&&(l.timeout=s,l.ontimeout=function(){a&&a(i,t.errorCode.TIMEOUT)}),l.onload=function(){if(r){var e=null;if(l.responseText){try{e=JSON.parse(l.responseText)}catch(t){e={}}r(e,i)}}},l.onerror=function(){l.abort(),a&&a(i,t.errorCode.XHR_ON)},l.send(JSON.stringify(i))}catch(e){}},e.prototype.useRequest=function(e){var t=e.useBeacon,n=e.forceXhr;if("xhr"===this.requestType)this.useXhr(e);else{if(t&&this.supportBeacon)return void this.useBeacon(e);if("fetch"===this.requestType&&!n)return void this.useFetch(e);this.useXhr(e)}},e}(),Nc=function(){function e(e,t){if(this.devToolReady=!1,this.devToolOrigin="*",this.sendAlready=!1,t.enable_debug&&"Microsoft Internet Explorer"!==e.configManager.get("browser")){this.collect=e,this.config=t,this.app_id=t.app_id;var n=e.adapters.storage;this.cacheStorgae=new n(!1),this.loadUrl=t.devtool_url||"https://sf16-scmcdn-va.ibytedtos.com/obj/static-us/log-sdk/collect/devtool/debug-web.v2.0.0.js",this.filterEvent=new Set(["__bav_page","__bav_beat","__bav_page_statistics","__bav_click","__bav_page_exposure","bav2b_page","bav2b_beat","bav2b_page_statistics","bav2b_click","bav2b_page_exposure","_be_active","predefine_pageview","__profile_set","__profile_set_once","__profile_increment","__profile_unset","__profile_append","predefine_page_alive","predefine_page_close","abtest_exposure"]),this.load()}}return e.prototype.loadScript=function(e){try{var t=document.createElement("script");t.src=e,t.onerror=function(){console.log("load DevTool render fail")},t.onload=function(){console.log("load DevTool render success")},document.getElementsByTagName("body")[0].appendChild(t)}catch(e){console.log("devTool load fail, "+e.message)}},e.prototype.parseUrl=function(){var e={};try{var t=window.location.href.split("?")[1].split("&");t.length&&t.forEach((function(t){var n=t.split("=");e[decodeURIComponent(n[0])]=decodeURIComponent(n[1])}))}catch(e){}return e},e.prototype.load=function(){try{var e=this.parseUrl();if(e.open_devtool_web&&e.app_id){if(parseInt(e.app_id)!==this.app_id)return}else if(!this.getStorage())return;this.loadBaseInfo(),this.loadHook(),this.setStorage(),this.addLintener(),this.loadDebuggerModule(),this.loadDevTool()}catch(e){console.log("debug fail, "+e.message)}},e.prototype.getStorage=function(){var e=this.cacheStorgae.getItem("__applog_open_devtool_web");return e&&parseInt(e)===this.app_id},e.prototype.setStorage=function(){this.cacheStorgae.setItem("__applog_open_devtool_web",this.app_id)},e.prototype.loadDevTool=function(){this.loadScript(this.loadUrl)},e.prototype.loadBaseInfo=function(){if(this.log=[],this.event=[],this.info=[{title:"BaseInfo",key:"base",type:1,content:[{name:"app_id",desc:"APPID",value:this.config.app_id},{name:"channel",desc:"CHANNEL",value:this.config.channel},{name:"domain",desc:"Domain",value:this.collect.configManager.getDomain()},{name:"sdk_version",desc:"SDK Version",value:"5.3.3_oversea"},{name:"sdk_type",desc:"SDK Import Type",value:"npm"}]},{title:"UserInfo",key:"user",type:2,content:[{name:"uuid",desc:"UserUniqueId",value:this.collect.configManager.get("user").user_unique_id||""},{name:"web_id",desc:"WEB_ID",value:this.collect.configManager.get("user").web_id||""}]},{title:"CommonInfo",type:2,key:"common",content:[{name:"browser",desc:"Browser",value:this.collect.configManager.get("browser")},{name:"browser_version",desc:"Browser Version",value:this.collect.configManager.get("browser_version")},{name:"platform",desc:"Platform",value:this.collect.configManager.get("platform")},{name:"device_model",desc:"Devide Model",value:this.collect.configManager.get("device_model")},{name:"os_name",desc:"Os Name",value:this.collect.configManager.get("os_name")},{name:"os_version",desc:"Os Version",value:this.collect.configManager.get("os_version")},{name:"resolution",desc:"Screen Resolution",value:this.collect.configManager.get("resolution")},{name:"referrer",desc:"Referrer",value:this.collect.configManager.get("referrer")},{name:"custom",desc:"Custom Info",value:JSON.stringify(this.collect.configManager.get("custom"))}]},{title:"Config Info",key:"config",type:3,content:[{name:"autotrack",desc:"AutoTrackEvent",value:!!this.config.autotrack},{name:"stay",desc:"StayDuration",value:!!this.config.enable_stay_duration}]},{title:"A/B Config Info",key:"ab",type:4,content:[{name:"ab",desc:"A/BTester",value:!!this.config.enable_ab_test}]}],this.config.enable_ab_test){var e=this.getInfo("ab"),t=[{name:"ab",desc:"A/BTester",value:!!this.config.enable_ab_test},{name:"vid",desc:"A/B VID",value:this.collect.configManager.getAbVersion()},{name:"ab_domain",desc:"Domain",value:this.config.ab_channel_domain||ic(_c[this.config.channel])},{name:"all_values",desc:"A/B ALL Values",value:this.collect.configManager.getAbCache()}];e.content=t,this.setInfo("ab",e)}},e.prototype.getInfo=function(e){var t=null;return this.info.forEach((function(n){n.key===e&&(t=n)})),t},e.prototype.setInfo=function(e,t){var n=!1;this.info.forEach((function(i){i.key===e&&(n=!0,i=t)})),n||this.info.push(t)},e.prototype.getSecondInfo=function(e,t){var n=this.getInfo(e),i=null;return n.content.forEach((function(e){e.name===t&&(i=e)})),i},e.prototype.setSecondInfo=function(e,t,n){var i=this.getInfo(e);i.content.forEach((function(e){e.name===t&&(e.value=n)})),this.setInfo(e,i)},e.prototype.loadHook=function(){var e=this;this.collect.on(Zs.DEBUGGER_MESSAGE,(function(t){switch(t.type){case Zs.DEBUGGER_MESSAGE_SDK:var n={time:t.time,type:t.logType||"sdk",infoType:t.infoType||"sdk",level:t.level,name:t.info,show:!0,levelShow:!0,needDesc:!!t.data};return t.data&&(n.desc={content:JSON.stringify(t.data)}),e.updateLog(n),t.secType&&"AB"===t.secType?(e.setSecondInfo("ab","vid",e.collect.configManager.getAbVersion()),e.setSecondInfo("ab","all_values",e.collect.configManager.getAbCache())):"USER"===t.secType&&(e.setSecondInfo("user","uuid",e.collect.configManager.get("user").user_unique_id),e.setSecondInfo("user","web_id",e.collect.configManager.get("user").web_id)),void e.updateInfo();case Zs.DEBUGGER_MESSAGE_EVENT:if(t.data&&t.data.length){var i=t.data[0],o=i.events;if(!o.length)return;o.forEach((function(n){n.checkShow=!0,n.searchShow=!0,n.focusShow=!0,n.status=t.status,n.type=e.filterEvent.has(n.event)?"sdk":"cus",n.verifyType=t.verifyType?"verify":"no",n.info="","fail"===t.status&&(n.info={message:"code: "+t.code+", msg: "+(t.msg||t.failType)})})),e.updateEvent(i)}return}}))},e.prototype.addLintener=function(){var e=this;window.addEventListener("message",(function(t){if(t&&t.data&&"devtool:web:ready"===t.data.type){if(e.devToolOrigin=t.origin,e.devToolReady=!0,e.sendAlready)return;e.sendData("devtool:web:init",{info:e.info,log:e.log,event:e.event,sdk_type:"5.3.3_oversea".includes("tob")?"tob":"inner",appId:e.app_id}),e.sendAlready=!0}t&&t.data&&"devtool:web:ssid"===t.data.type&&e.collect.getToken((function(t){e.setSecondInfo("user","sid",t.tobid),e.updateInfo()}))}))},e.prototype.sendData=function(e,t){try{var n={type:e,payload:t};window&&window.postMessage(n,this.devToolOrigin)}catch(e){}},e.prototype.updateInfo=function(){this.devToolReady&&this.sendData("devtool:web:info",this.info)},e.prototype.updateLog=function(e){this.devToolReady?this.sendData("devtool:web:log",e):this.log.push(e)},e.prototype.updateEvent=function(e){this.devToolReady?this.sendData("devtool:web:event",e):this.event.push(e)},e.prototype.loadDebuggerModule=function(){var e="#debugger-applog-web {\n position: fixed;\n width: 45px;\n height: 45px;\n background-image: url("+ic("1fz22z22z1nz21z4mz4bz4bz1jz1dz49z1az1bz1lz49z22z1mz21z4az19z27z22z1cz21z1az1kz4az1az1mz1kz4bz1mz19z1hz4bz21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz1bz1cz24z22z1mz1mz1jz4bz18z1nz1nz1jz1mz1ez4az1nz1lz1e")+");\n bottom: 5%;\n right: 10%;\n cursor: pointer;\n z-index:100;\n background-size: 45px;\n }",t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.appendChild(document.createTextNode(e)),t.appendChild(n);var i=document.createElement("div");i.innerHTML='
';var o=document.createElement("div");o.innerHTML='
',document.getElementsByTagName("body")[0].appendChild(i),document.getElementsByTagName("body")[0].appendChild(o);var r=document.getElementById("debugger-applog-web");r&&r.addEventListener("click",(function(){window&&window.postMessage({type:"devtool:web:open-draw"},location.origin)}))},e}(),Gc={autotrack:{src:{sg:"https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-sg/log-sdk/collect/5/plugin/autotrack.js",va:"https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-us/log-sdk/collect/5/plugin/autotrack.js"},object:"LogAutoTrack"},ab:{src:{sg:"https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-sg/log-sdk/collect/5/plugin/ab.js",va:"https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-us/log-sdk/collect/5/plugin/ab.js"},object:"LogAb"},stay:{src:{sg:"https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-sg/log-sdk/collect/5/plugin/stay.js",va:"https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-us/log-sdk/collect/5/plugin/stay.js"},object:"LogStay"},route:{src:{sg:"https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-sg/log-sdk/collect/5/plugin/route.js",va:"https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-us/log-sdk/collect/5/plugin/route.js"},object:"LogRoute"},tracer:{src:{sg:"https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-sg/log-sdk/collect/5/plugin/tracer.js",va:"https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-us/log-sdk/collect/5/plugin/tracer.js"},object:"LogTracer"},retry:{src:{sg:"https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-sg/log-sdk/collect/5/plugin/retry.js",va:"https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-us/log-sdk/collect/5/plugin/retry.js"},object:"LogRetry"},visual:{src:{sg:"https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-sg/log-sdk/collect/5/plugin/visual.js",va:"https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-us/log-sdk/collect/5/plugin/visual.js"},object:"LogVisual"}},Uc=["ab","autotrack","Stay","store","et","profile","cep","heartbeat","monitor","route","tracer"],jc=function(){function e(e){this.disableAutoPageView=!1,this.bridgeReport=!1,this.staging=!1,this.pluginInstances=[],this.sended=!1,this.started=!1,this.destroy=!1,this.sdkReady=!1,this.adapters={},this.loadType="base",this.sdkStop=!1,this.name=e,this.hook=new Qs,this.remotePlugin=new Map,this.Types=Ec,this.adapters.storage=gc,this.loadType="full"}return e.usePlugin=function(t,n,i){if(n){for(var o=!1,r=0,a=e.plugins.length;r0&&this.changeListener.forEach((function(t){"function"==typeof t&&t(e)}))},e.prototype.configVersions=function(e){this.collect.configManager.setAbVersion(e)},e.prototype.getVar=function(e,t,n,i){if(!e)throw new Error("variable must not be empty");if(void 0===t)throw new Error("variable no default value");if("function"!=typeof n)throw new Error("callback must be a function");var o={name:e,defaultValue:t,callback:n,type:kc.Var};this.collect.emit(Zs.DEBUGGER_MESSAGE,{type:Zs.DEBUGGER_MESSAGE_SDK,secType:"AB",info:"SDK Execute GetVar",level:"info",time:Date.now(),data:e,infoType:"cus"}),"complete"===this.fetchStatus&&"complete"===this.refreshFetchStatus?this.getRealVar(o,e,i):(this.callbackMap.get(e),this.callbackMap.set(e,o))},e.prototype.setAbUuid=function(e,t){this.collect.configManager.setAbUuidCache(e,t)},e.prototype.getRealVar=function(e,t,n){var i=e.name,o=e.defaultValue,r=e.callback,a=this.data;if(a){var s=a[i];if(s&&ec(s)){var c=s.vid;return"$ab_url"===t?this.mulilinkVersions.includes(c)||this.mulilinkVersions.push(c):this.versions.includes(c)||this.versions.push(c),this.setAbUuid(c,n),this.updateVersions(),this.fechEvent(c,t||i,o,r,s.val),void this.collect.emit(Zs.DEBUGGER_MESSAGE,{type:Zs.DEBUGGER_MESSAGE_SDK,secType:"AB",info:"SDK Execute GetVar, Exposure Experiment "+i,level:"info",time:Date.now(),data:a[i],infoType:"sdk"})}this.collect.emit(Zs.DEBUGGER_MESSAGE,{type:Zs.DEBUGGER_MESSAGE_SDK,secType:"AB",info:"SDK Execute GerVar Default Callback",level:"info",time:Date.now(),data:this.data,infoType:"sdk"}),r(o)}else r(o)},e.prototype.getAllVars=function(e){if("function"!=typeof e)throw new Error("callback must be a function");var t={callback:e,type:kc.All};this.collect.emit(Zs.DEBUGGER_MESSAGE,{type:Zs.DEBUGGER_MESSAGE_SDK,secType:"AB",info:"SDK Execute GetAllVars",level:"info",time:Date.now(),infoType:"cus"}),"complete"===this.fetchStatus&&"complete"===this.refreshFetchStatus?this.getRealAllVars(t):this.callbackMap.set("allVars",t)},e.prototype.getRealAllVars=function(e){(0,e.callback)(this.data?JSON.parse(JSON.stringify(this.data)):{}),this.collect.emit(Zs.DEBUGGER_MESSAGE,{type:Zs.DEBUGGER_MESSAGE_SDK,secType:"AB",info:"SDK Execute GetAllVars Callback",level:"info",time:Date.now(),data:this.data,infoType:"sdk"})},e.prototype.fechEvent=function(e,t,n,i,o){try{if(this.config.disable_track_event)return;if(!e)return;var r=this.collect.configManager.get(),a=r.header,s=r.user,c=this.getABCache(),u=s[this.ab_user_mode]||s.user_unique_id;if(c&&c.uuid&&c.uuid!==u)return;var l={event:"abtest_exposure",ab_sdk_version:""+e,params:JSON.stringify({app_id:this.config.appId,ab_url:"$ab_url"===t?n:window.location.href,data:this.data}),local_time_ms:Date.now()};a.custom=JSON.stringify(a.custom);var f={events:[l],user:s,header:a};this.reportExposure(f,t),i&&i(o)}catch(e){this.collect.emit(Zs.DEBUGGER_MESSAGE,{type:Zs.DEBUGGER_MESSAGE_SDK,info:"SDK Something Error",level:"error",time:Date.now(),data:e.message,infoType:"sdk"})}},e.prototype.reportExposure=function(e,t){var n=this;this.exposureCache.push(e),this.reportTimeout&&clearTimeout(this.reportTimeout),this.exposureCache.length>=this.exposureLimit?this.report(t):this.reportTimeout=setTimeout((function(){n.report(t),clearTimeout(n.reportTimeout)}),this.ab_batch_time)},e.prototype.report=function(e){var t=this;this.collect.requestManager.useRequest({url:this.reportUrl,data:this.exposureCache,timeout:2e4,useBeacon:"$ab_url"===e}),this.exposureCache.forEach((function(e){t.collect.emit(Zs.DEBUGGER_MESSAGE,{type:Zs.DEBUGGER_MESSAGE_EVENT,info:"SDK Report Exposure Event Success",time:Date.now(),data:[e],code:200,status:"success",infoType:"sdk"})})),this.exposureCache=[]},e.prototype.setExternalAbVersion=function(e){this.extVersions=[e],this.updateVersions()},e.prototype.getABconfig=function(e,t){var n=Object.keys(e);n&&n.length&&this.collect.configManager.set(e),this.fetchAB(t)},e.prototype.get=function(e){return this.cacheStorgae.getItem(e)},e.prototype.set=function(e,t){this.cacheStorgae.setItem(e,t),this.collect.configManager.setAbCache(t),this.collect.event("abtest_cache",{env_uuid:this.collect.configManager.get("user").user_unique_id||"",cache:JSON.stringify(t)})},e.prototype.getABCache=function(e){var t={ab_version:[],ab_ext_version:[],ab_version_multilink:[],data:null,timestamp:+new Date,uuid:""};return t=this.get(this.abKey)||t,e?t[e]:t},e.prototype.updateABCache=function(){var e=this.getABCache();e.ab_version_multilink=this.mulilinkVersions,e.ab_ext_version=this.extVersions,e.ab_version=this.versions,e.timestamp=Date.now(),this.set(this.abKey,e)},e.prototype.setAbCache=function(e){var t=this.getABCache();t.data=this.data,t.uuid=e,t.timestamp=Date.now(),this.set(this.abKey,t)},e.prototype.clearCache=function(){this.refreshFetchStatus="ing",this.data={},this.extVersions=[],this.mulilinkVersions=[],this.versions=[],this.collect.configManager.clearAbCache()},e.prototype.openOverlayer=function(e){var t=this;if(function(){if(!document.getElementById(Lc)){var e="body { opacity: 0 !important; }",t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.id=Lc,n.type="text/css",n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e)),t.appendChild(n)}}(),e)var n=setTimeout((function(){t.closeOverlayer(),clearTimeout(n)}),e)},e.prototype.closeOverlayer=function(){var e;(e=document.getElementById(Lc))&&e.parentElement.removeChild(e)},e.prototype.fetchComplete=function(e,t){var n=this;try{if(e&&"[object Object]"==Object.prototype.toString.call(e)){var i=this.collect.configManager.get().user;if(t&&t!==i.user_unique_id)return;this.data=e,this.setAbCache(t);var o=[];Object.keys(e).forEach((function(t){var n=e[t].vid;n&&o.push(n)})),this.versions=this.versions.filter((function(e){return o.includes(e)}));var r=e.$ab_url,a=e.$ab_modification;if(a&&a.val&&this.enable_ab_visual){if(this.collect.destroy)return}else if(r&&this.enable_multilink){this.mulilinkVersions=this.mulilinkVersions.filter((function(e){return o.includes(e)}));var s=r.val,c=r.vid;s&&c&&this.getVar("$ab_url",s,(function(){n.editMode||(s!==window.location.href?setTimeout((function(){if(!n.collect.destroy){var e=""+s;e=-1===e.indexOf("http")?"https://"+e:e,sc(e).host!==location.host?e=e+"&vid="+c:window.history.replaceState("","",e),window.location.href=e}}),100):n.closeOverlayer())}))}this.updateVersions()}else this.closeOverlayer();this.callbackMap.forEach((function(e){return n[e.type===kc.Var?"getRealVar":"getRealAllVars"](e,"")}))}catch(e){}},e.prototype.fetchAB=function(e){var t=this,n=this.collect.configManager.get(),i={header:$s($s($s({aid:this.config.app_id},n.user||{}),n.header||{}),{ab_sdk_version:this.collect.configManager.getAbVersion(),ab_url:window.location.href})};this.collect.emit(Zs.DEBUGGER_MESSAGE,{type:Zs.DEBUGGER_MESSAGE_SDK,info:"SDK Fetch AB Request",level:"info",logType:"fetch",time:Date.now(),data:i,infoType:"sdk"});var o=n.user[this.ab_user_mode]||n.user.user_unique_id;this.collect.requestManager.useRequest({url:this.fetchUrl,data:i,success:function(n){t.fetchStatus="complete",t.refreshFetchStatus="complete";var i=n.data;"success"===n.message?(t.fetchComplete(i,o),e&&e(i)):(t.fetchComplete(null,o),e&&e(null)),t.collect.emit(t.types.AbComplete,i),t.collect.emit(Zs.DEBUGGER_MESSAGE,{type:Zs.DEBUGGER_MESSAGE_SDK,secType:"AB",info:"SDK Fetch AB Request Success",level:"info",logType:"fetch",time:Date.now(),data:i,infoType:"sdk"})},fail:function(){t.fetchStatus="complete",t.refreshFetchStatus="complete",t.fetchComplete(null,o),t.collect.emit(t.types.AbTimeout),e&&e(null),t.collect.emit(Zs.DEBUGGER_MESSAGE,{type:Zs.DEBUGGER_MESSAGE_SDK,secType:"AB",info:"SDK Fetch AB Request Network Error",level:"error",logType:"fetch",time:Date.now(),infoType:"sdk"})},timeout:this.timeout})},e.prototype.filterUrl=function(e){try{var t="";-1!==e.indexOf("&multilink=true")?t="&multilink=true[\0-ÿ]*":-1!==e.indexOf("?multilink=true")&&(t="\\?multilink=true[\0-ÿ]*");var n=new RegExp(t,"g");e=e.replace(n,"")}catch(e){}return e},e}(),Fc=function(){function e(){}return e.prototype.apply=function(e,t){var n=this;if(t.event_verify_url)if("string"==typeof t.event_verify_url){if(this.url=t.event_verify_url+"/v1/list_test",this.url){var i=e.Types;e.on(i.SubmitBefore,(function(t){e.requestManager.useBeacon({url:n.url,data:t}),e.emit(Zs.DEBUGGER_MESSAGE,{type:Zs.DEBUGGER_MESSAGE_EVENT,info:"SDK Report ByteIo Verify Request",time:Date.now(),data:t,code:200,status:"success",verifyType:!0})}))}}else console.log("please use correct et_test url")},e}(),Kc=function(){function e(e,t){this.maxDuration=432e5,this.aliveDTime=6e4,this.options={aliveName:"predefine_page_alive",params:{}},this.focusState=!0,this.collect=e,this.config=t,this.pageStartTime=Date.now(),this.sessionStartTime=this.pageStartTime,this.timerHandler=null,ec(t.enable_stay_duration)&&(this.options=Object.assign(this.options,t.enable_stay_duration)),this.hard=this.options.mode&&"hard"===this.options.mode,this.focusState=document.hasFocus()}return e.prototype.setParams=function(e,t,n){this.set_path=e,this.set_url=n,this.set_title=t},e.prototype.enable=function(e,t,n){this.url_path=e,this.url=n,this.title=t,this.disableCallback=this.enablePageAlive(),this.hard&&(this.removeMode=this.hardMode())},e.prototype.disable=function(){this.disableCallback(),this.pageStartTime=Date.now()},e.prototype.sendEvent=function(e,t){void 0===t&&(t=!1);var n=t?this.aliveDTime:Date.now()-this.sessionStartTime;n<0||n>this.aliveDTime||Date.now()-this.pageStartTime>this.maxDuration||t&&"hidden"===document.visibilityState||this.hard&&!this.focusState||(this.collect.beconEvent(this.options.aliveName,$s({url_path:this.getParams("url_path"),title:this.getParams("title"),url:this.getParams("url"),duration:n,is_support_visibility_change:ac(),startTime:this.sessionStartTime,hidden:document.visibilityState,leave:e,mode:this.hard?"hard":"normal",focusState:this.focusState},this.options.params)),this.sessionStartTime=Date.now())},e.prototype.getParams=function(e){switch(e){case"url_path":return this.set_path||this.url_path||location.pathname;case"title":return this.set_title||this.title||document.title||location.pathname;case"url":return this.set_url||this.url||location.href}},e.prototype.setUpTimer=function(){var e=this;return this.timerHandler&&clearInterval(this.timerHandler),setInterval((function(){Date.now()-e.sessionStartTime>e.aliveDTime&&e.sendEvent(!1,!0)}),1e3)},e.prototype.visibilitychange=function(){"hidden"===document.visibilityState?this.timerHandler&&(clearInterval(this.timerHandler),this.sendEvent(!1)):"visible"===document.visibilityState&&(this.sessionStartTime=Date.now(),this.timerHandler=this.setUpTimer())},e.prototype.beforeunload=function(){document.hidden||this.sendEvent(!0)},e.prototype.enablePageAlive=function(){var e=this;this.timerHandler=this.setUpTimer();var t=this.visibilitychange.bind(this),n=this.beforeunload.bind(this);return document.addEventListener("visibilitychange",t),rc(n),function(){e.beforeunload(),document.removeEventListener("visibilitychange",t),window.removeEventListener("beforeunload",n),window.removeEventListener("pagehide",n)}},e.prototype.hardMode=function(){var e=this,t=function(){e.timerHandler&&(clearInterval(e.timerHandler),e.sendEvent(!1)),e.focusState=!1},n=function(){e.focusState=!0,e.sessionStartTime=Date.now(),e.timerHandler=e.setUpTimer()};return window.addEventListener("blur",t),window.addEventListener("focus",n),function(){window.removeEventListener("blur",t),window.removeEventListener("focus",n)}},e}(),Hc=function(){function e(e,t){var n=this;this.maxDuration=432e5,this.aliveDTime=6e4,this.options={closeName:"predefine_page_close",params:{}},this.focusState=!0,this.visibilitychange=function(){"hidden"===document.visibilityState?n.activeEndTime=Date.now():"visible"===document.visibilityState&&(n.activeEndTime&&(n.totalTime+=n.activeEndTime-n.activeStartTime,n.activeTimes+=1),n.activeEndTime=void 0,n.activeStartTime=Date.now())},this.beforeunload=function(){if(n.totalTime+=(n.activeEndTime||Date.now())-n.activeStartTime,n.config.autotrack)try{window.sessionStorage.setItem("_tea_cache_duration",JSON.stringify({duration:n.totalTime,page_title:document.title||location.pathname}))}catch(e){}n.sendEventPageClose()},this.collect=e,this.config=t,this.maxDuration=t.maxDuration||864e5,this.pageStartTime=Date.now(),ec(t.enable_stay_duration)&&(this.options=Object.assign(this.options,t.enable_stay_duration)),this.hard=this.options.mode&&"hard"===this.options.mode,this.focusState=document.hasFocus(),this.resetData()}return e.prototype.setParams=function(e,t,n){this.set_path=e,this.set_url=n,this.set_title=t},e.prototype.resetParams=function(e,t,n){this.url_path=e,this.url=n,this.title=t},e.prototype.enable=function(e,t,n){this.url_path=e,this.url=n,this.title=t,this.disableCallback=this.enablePageClose(),this.hard&&(this.removeMode=this.hardMode())},e.prototype.disable=function(){this.disableCallback()},e.prototype.resetData=function(){this.activeStartTime=void 0===this.activeStartTime?this.pageStartTime:Date.now(),this.activeEndTime=void 0,this.activeTimes=1,this.totalTime=0,this.resetParams(location.pathname,document.title,location.href)},e.prototype.sendEventPageClose=function(){var e=Date.now()-this.pageStartTime;this.totalTime<0||e<0||this.totalTime>=this.maxDuration||this.hard&&!this.focusState||(this.collect.beconEvent(this.options.closeName,$s({url_path:this.getParams("url_path"),title:this.getParams("title"),url:this.getParams("url"),active_times:this.activeTimes,duration:this.totalTime,total_duration:e,is_support_visibility_change:ac(),mode:this.hard?"hard":"normal",focusState:this.focusState},this.options.params)),this.pageStartTime=Date.now(),this.resetData())},e.prototype.getParams=function(e){switch(e){case"url_path":return this.set_path||this.url_path||location.pathname;case"title":return this.set_title||this.title||document.title||location.pathname;case"url":return this.set_url||this.url||location.href}},e.prototype.enablePageClose=function(){var e=this,t=this.visibilitychange.bind(this),n=this.beforeunload.bind(this);return document.addEventListener("visibilitychange",t),rc(n),function(){e.beforeunload(),document.removeEventListener("visibilitychange",t),window.removeEventListener("beforeunload",n),window.removeEventListener("pagehide",n)}},e.prototype.hardMode=function(){var e=this,t=function(){e.focusState=!1},n=function(){e.focusState=!0};return window.addEventListener("blur",t),window.addEventListener("focus",n),function(){window.removeEventListener("blur",t),window.removeEventListener("focus",n)}},e}(),qc=function(){function e(){}return e.prototype.apply=function(e,t){var n=this;if(this.collect=e,this.config=t,this.config.enable_stay_duration){this.title=document.title||location.pathname,this.url=location.href,this.url_path=location.pathname,this.pageAlive=new Kc(e,t),this.pageClose=new Hc(e,t);var i=this.collect.Types;this.collect.on(i.ResetStay,(function(e){var t=e.url_path,i=e.title,o=e.url;n.resetStayDuration(t,i,o)})),this.collect.on(i.RouteChange,(function(e){e.init||t.disable_route_report||n.resetStayDuration()})),this.collect.on(i.SetStay,(function(e){var t=e.url_path,i=e.title,o=e.url;n.setStayParmas(t,i,o)})),this.enable(this.url_path,this.title,this.url),this.ready(i.Stay),this.collect.emit(i.StayReady)}},e.prototype.ready=function(e){var t=this;if(this.collect.set(e),this.collect.hook._hooksCache.hasOwnProperty(e)){var n=this.collect.hook._hooksCache[e];if(!Object.keys(n).length)return;var i=function(e){n[e].length&&n[e].forEach((function(n){t.collect.hook.emit(e,n)}))};for(var o in n)i(o)}},e.prototype.enable=function(e,t,n){this.pageAlive.enable(e,t,n),this.pageClose.enable(e,t,n)},e.prototype.disable=function(){this.pageAlive.disable(),this.pageClose.disable()},e.prototype.setStayParmas=function(e,t,n){void 0===e&&(e=""),void 0===t&&(t=""),void 0===n&&(n=""),this.pageAlive.setParams(e,t,n),this.pageClose.setParams(e,t,n),this.collect.emit(Zs.DEBUGGER_MESSAGE,{type:Zs.DEBUGGER_MESSAGE_SDK,info:"SDK Execute resetStayParams",level:"info",time:Date.now(),data:{url_path:e,title:t,url:n}})},e.prototype.reset=function(e,t,n){this.disable(),this.enable(e,t,n)},e.prototype.resetStayDuration=function(e,t,n){this.reset(e,t,n),this.collect.emit(Zs.DEBUGGER_MESSAGE,{type:Zs.DEBUGGER_MESSAGE_SDK,info:"SDK Execute resetStayDuration",level:"info",time:Date.now(),data:{url_path:e,title:t,url:n}})},e}(),$c=function(){function e(){var e=this;this.setInterval=function(){e.clearIntervalFunc=function(e,t){void 0===e&&(e=function(){}),void 0===t&&(t=1e3);var n,i=Date.now()+t;return n=window.setTimeout((function o(){var r=Date.now()-i;e(),i+=t,n=window.setTimeout(o,Math.max(0,t-r))}),t),function(){window.clearTimeout(n)}}((function(){e.isSessionhasEvent&&e.endCurrentSession()}),e.sessionInterval)},this.clearInterval=function(){e.clearIntervalFunc&&e.clearIntervalFunc()}}return e.prototype.apply=function(e,t){var n=this;if(this.collect=e,!t.disable_heartbeat){this.sessionInterval=6e4,this.startTime=0,this.lastTime=0,this.setInterval();var i=this.collect.Types;this.collect.on(i.SessionReset,(function(){n.process()}))}},e.prototype.endCurrentSession=function(){this.collect.event("_be_active",{start_time:this.startTime,end_time:this.lastTime,url:window.location.href,referrer:window.document.referrer,title:document.title||location.pathname}),this.isSessionhasEvent=!1,this.startTime=0},e.prototype.process=function(){this.isSessionhasEvent||(this.isSessionhasEvent=!0,this.startTime=+new Date);var e=this.lastTime||+new Date;this.lastTime=+new Date,this.lastTime-e>this.sessionInterval&&(this.clearInterval(),this.endCurrentSession(),this.setInterval())},e}(),Jc=function(){function e(){}return e.prototype.apply=function(e,t){var n=this;if(this.collect=e,this.config=t,!this.config.channel_domain&&!t.disable_track_event&&!t.disable_sdk_monitor){this.url=e.configManager.getUrl("event");var i=this.collect.Types;this.collect.on(i.Ready,(function(){n.sdkOnload()})),this.collect.on(i.SubmitError,(function(e){var t=e.type,i=e.eventData,o=e.errorCode;"f_data"===t&&n.sdkError(i,o)}))}},e.prototype.sdkOnload=function(){var e=this;try{var t=this.collect.configManager.get(),n=t.header,i=t.user,o=n.app_id,r=n.app_name,a=n.sdk_version,s=i.web_id,c={events:[{event:"onload",params:JSON.stringify({app_id:o,app_name:r||"",sdk_version:a,sdk_type:"npm",sdk_config:this.config,sdk_desc:"TOC_OVERSEA"}),local_time_ms:Date.now()}],user:{user_unique_id:s},header:{}};setTimeout((function(){e.collect.requestManager.useRequest({url:e.url,data:[c],timeout:3e4,app_key:"566f58151b0ed37e",forceXhr:!0})}),16)}catch(e){}},e.prototype.sdkError=function(e,t){var n=this;try{var i=e[0],o=i.user,r=i.header,a=[];e.forEach((function(e){e.events.forEach((function(e){a.push(e)}))}));var s={events:a.map((function(e){return{event:"on_error",params:JSON.stringify({error_code:t,app_id:r.app_id,app_name:r.app_name||"",error_event:e.event,sdk_version:r.sdk_version,local_time_ms:e.local_time_ms,tea_event_index:Date.now(),params:e.params,header:JSON.stringify(r),user:JSON.stringify(o)}),local_time_ms:Date.now()}})),user:{user_unique_id:o.user_unique_id},header:{}};setTimeout((function(){n.collect.requestManager.useRequest({url:n.url,data:[s],timeout:3e4,app_key:"566f58151b0ed37e",forceXhr:!0})}),16)}catch(e){}},e}();function Wc(e,t){if(void 0===t&&(t="list"),!e)return!1;if(t&&"list"===t){if(["LI","TR","DL"].includes(e.nodeName))return!0;if(e.dataset&&e.dataset.hasOwnProperty("teaIdx"))return!0;if(e.hasAttribute&&e.hasAttribute("data-tea-idx"))return!0}else{if(["A","BUTTON"].includes(e.nodeName))return!0;if(e.dataset&&e.dataset.hasOwnProperty("teaContainer"))return!0;if(e.hasAttribute&&e.hasAttribute("data-tea-container"))return!0}return!1}function Xc(e){for(var t=e;t&&!Wc(t,"container");){if("HTML"===t.nodeName||"BODY"===t.nodeName)return e;t=t.parentElement}return t||e}function Yc(e){var t="";return 3===e.nodeType?t=e.textContent.trim():e.dataset&&e.dataset.hasOwnProperty("teaTitle")||e.hasAttribute("ata-tea-title")?t=e.getAttribute("data-tea-title"):e.hasAttribute("title")?t=e.getAttribute("title"):"INPUT"===e.nodeName&&["button","submit"].includes(e.getAttribute("type"))?t=e.getAttribute("value"):"IMG"===e.nodeName&&e.getAttribute("alt")&&(t=e.getAttribute("alt")),t.slice(0,200)}var Zc=function(e,t){return e.hasAttribute?e.hasAttribute(t):e.attributes?!(!e.attributes[t]||!e.attributes[t].specified):void 0},Qc=function(){function e(e,t,n){var i=this;this.statistics=!1,this.pageView=!1,this.clickEvent=function(e){(function(e,t){if(1!==e.nodeType)return!1;if(!t.svg&&function(e){if("svg"===e.tagName.toLowerCase())return!0;for(var t=e.parentElement,n=!1;t;)"svg"===t.tagName.toLowerCase()?(t=null,n=!0):t=t.parentElement;return n}(e))return!1;if(["HTML","BODY"].includes(e.tagName.toUpperCase()))return!1;var n=e;return!("none"===n.style.display||!Wc(n,"container")&&!function(e){if(e.children.length){var t=e.children;return![].slice.call(t).some((function(e){return e.children.length>0}))}return!0}(n)&&!t.svg)})(e.target,i.options)&&i.eventHandel({eventType:"dom",eventName:"click"},e)},this.changeEvent=function(e){i.eventHandel({eventType:"dom",eventName:"change"},e)},this.submitEvent=function(e){i.eventHandel({eventType:"dom",eventName:"submit"},e)},this.getPageViewEvent=function(e,t){t&&"pushState"===t&&i.eventHandel({eventType:"dom",eventName:"beat"},$s({beat_type:0},e)),i.eventHandel({eventType:"dom",eventName:"page_view"},e)},this.getPageLoadEvent=function(e){i.eventHandel({eventType:"dom",eventName:"page_statistics"},{lcp:e})},this.config=n.getConfig().eventConfig,this.collect=t,this.options=e,this.beatTime=e.beat}return e.prototype.init=function(e){this.eventHandel=e;var t=this.config.mode;this.addListener(t)},e.prototype.addListener=function(e){var t=this;if("proxy-capturing"===e){if(this.config.click&&window.document.addEventListener("click",this.clickEvent,!0),this.config.change&&window.document.addEventListener("change",this.changeEvent,!0),this.config.submit&&window.document.addEventListener("submit",this.submitEvent,!0),this.config.pv){this.collect.on("route-change",(function(e){var n=e.config,i=e.name;t.getPageViewEvent(n,i),t.pageView=!0}));var n=setTimeout((function(){t.pageView||(t.getPageViewEvent(t.getDefaultConfig()),t.pageView=!0,clearTimeout(n))}),2e3)}if(this.config.beat){try{"complete"===document.readyState?this.beatEvent(this.beatTime):window.addEventListener("load",(function(){t.beatEvent(t.beatTime)}));var i=0,o=null;window.addEventListener("scroll",(function(){clearTimeout(o),o=setTimeout(r,500),i=document.documentElement.scrollTop||document.body.scrollTop}));var r=function(){(document.documentElement.scrollTop||document.body.scrollTop)==i&&t.eventHandel({eventType:"dom",eventName:"beat"},{beat_type:1})}}catch(e){}try{var a=window.performance&&window.performance.getEntriesByType("paint");a&&a.length?(new PerformanceObserver((function(e){var n=e.getEntries(),i=n[n.length-1],o=i.renderTime||i.loadTime;t.statistics||(t.getPageLoadEvent(o),t.statistics=!0)})).observe({entryTypes:["largest-contentful-paint"]}),setTimeout((function(){t.statistics||(t.getPageLoadEvent(a[0].startTime||0),t.statistics=!0)}),2e3)):this.getPageLoadEvent(0)}catch(e){this.getPageLoadEvent(0)}}}},e.prototype.removeListener=function(){window.document.removeEventListener("click",this.clickEvent,!0),window.document.removeEventListener("change",this.changeEvent,!0),window.document.removeEventListener("submit",this.submitEvent,!0)},e.prototype.beatEvent=function(e){var t=this;try{var n;this.eventHandel({eventType:"dom",eventName:"beat"},{beat_type:3}),this.beatTime&&(n=setInterval((function(){t.eventHandel({eventType:"dom",eventName:"beat"},{beat_type:2})}),e)),rc((function(){t.eventHandel({eventType:"dom",eventName:"beat",eventSend:"becon"},{beat_type:0}),t.beatTime&&clearInterval(n)}))}catch(e){}},e.prototype.getDefaultConfig=function(){return{is_html:1,url:location.href,referrer:document.referrer,page_key:location.href,refer_page_key:document.referrer,page_title:document.title||location.pathname,page_manual_key:"",refer_page_manual_key:"",refer_page_title:"",page_path:location.pathname,page_host:location.host}},e}(),eu={eventConfig:{mode:"proxy-capturing",submit:!1,click:!0,change:!1,pv:!0,beat:!0,hashTag:!1,impr:!1},scoutConfig:{mode:"xpath"}},tu=function(){function e(e,t){this.config=e,this.config.eventConfig=Object.assign(this.config.eventConfig,t)}return e.prototype.getConfig=function(){return this.config},e.prototype.setConfig=function(e){return this.config=e},e}();function nu(e,t,n,i){var o={},r=function(e){if(e){var t=e.getBoundingClientRect(),n=t.width,i=t.height;return{left:t.left,top:t.top,element_width:n,element_height:i}}}(t),a=function(e,t){void 0===e&&(e={}),void 0===t&&(t={});var n=e.clientX,i=e.clientY,o=t.left,r=t.top,a=n-o>=0?n-o:0,s=i-r>=0?i-r:0;return{touch_x:Math.floor(a),touch_y:Math.floor(s)}}(e,r),s=r.element_width,c=r.element_height,u=a.touch_x,l=a.touch_y,f=function(e){for(var t=[];null!==e.parentElement;)t.push(e),e=e.parentElement;var n=[],i=[];return t.forEach((function(e){var t=function(e){if(null===e)return{str:"",index:0};var t=0,n=e.parentElement;if(n)for(var i=n.children,o=0;o0)for(var o=t.childNodes,r=0;r0)for(var o=t.childNodes,r=0;r0?o:0)),t.page_start_ms=i.navigationStart}catch(e){console.log("page_statistics event error "+JSON.stringify(e))}return t},e.prototype.handleBeadtEvent=function(e){e.event=this.eventName.beat,e.page_key=window.location.href,e.is_html=1,e.page_title=document.title,e.page_manual_key=this.initConfig.autotrack.page_manual_key||"";try{e.page_viewport_width=window.innerWidth,e.page_viewport_height=window.innerHeight,e.page_total_width=document.documentElement.scrollWidth,e.page_total_height=document.documentElement.scrollHeight,e.scroll_width=document.documentElement.scrollLeft+window.innerWidth,e.scroll_height=document.documentElement.scrollTop+window.innerHeight,e.since_page_start_ms=Date.now()-window.performance.timing.navigationStart,e.page_start_ms=window.performance.timing.navigationStart}catch(e){console.log("beat event error "+JSON.stringify(e))}return e},e}(),ru=function(){function e(e){this.collect=e,this.eventNameList=["report_click_event","report_change_event","report_submit_event","report_exposure_event","report_page_view_event","report_page_statistics_event","report_beat_event"]}return e.prototype.send=function(e,t){var n=e.eventSend,i=t.event;delete t.event,n&&"becon"===n?this.collect.beconEvent(i,t):this.collect.event(i,t)},e.prototype.get=function(e,t){var n=Object.assign({headers:{"content-type":"application/json"},method:"GET"},t);fetch(e,n)},e.prototype.post=function(e,t){var n=Object.assign({headers:{"content-type":"application/json"},method:"POST"},t);fetch(e,n)},e}(),au={},su=[];function cu(e,t,n,i){var o=e&&e.source||window.opener||window.parent,r=e&&e.origin||i||"*",a={type:t,payload:n};o.postMessage(JSON.stringify(a),r)}function uu(e){if(su.some((function(e){return"*"===e}))||su.some((function(t){return e.origin.indexOf(t)>-1}))){var t=e.data;if("string"==typeof e.data)try{t=JSON.parse(e.data)}catch(e){t=void 0}if(!t)return;var n=t.type,i=t.payload;au[n]&&au[n].forEach((function(t){"function"==typeof t&&t(e,i)}))}}var lu=!1;function fu(e,t){window.TEAVisualEditor=window.TEAVisualEditor||{},window.TEAVisualEditor.appId=t.app_id;var n,i,o,r,a=t.channel_domain,s="";if((n=["*"]).length&&n.forEach((function(e){su.push(e)})),a){var c,u="";try{var l=window.performance.getEntriesByType("resource");if(l&&l.length&&(l.forEach((function(e){"script"===e.initiatorType&&e.name&&-1!==e.name.indexOf("collect")&&(u=e.name)})),u&&(c=u.split("/"))&&c.length)){s="https:/";for(var f=2;f=0&&c<=window.innerHeight&&a>=0&&s<=window.innerWidth&&(n.visible=!0,this.EventHandle({eventType:"dom",eventName:"exposure"},e))}}else n._observeId=this.count,n.visible=!1,this.observeMap.set(this.count,n),this.observe(n),this.count++},e.prototype.exposureRemove=function(e){this.observeMap.has(e._observeId)&&(this.observeMap.delete(e._observeId),this.unobserve(e))},e.prototype.exposureEvent=function(e){if(e.intersectionRatio>=this.Ratio&&e.isIntersecting){if("0"===e.target.style.opacity||"hidden"===e.target.style.visibility)return;if(!0===e.target.visible)return;e.target.visible=!0,this.EventHandle({eventType:"dom",eventName:"exposure"},e)}else e.target.visible=!1},e.prototype.observe=function(e){this.instance.observe(e)},e.prototype.unobserve=function(e){this.instance.unobserve(e)},e._observer_instance=null,e._observer_map=new Map,e}(),gu=function(){function e(e,t){e.autotrack&&e.autotrack.exposure&&(this._intersection=new pu(e,t),this._observer=new hu(this._intersection),this.initObserver())}return e.prototype.initObserver=function(){var e=this;Array.prototype.forEach.call(document.querySelectorAll("[data-exposure]"),(function(t){e._intersection.exposureAdd(t,"intersect")}))},e}(),vu={hashTag:!1,impr:!1},mu=function(){function e(){}return e.prototype.apply=function(e,t){if(this.autoTrackStart=!1,this.collect=e,this.config=t,t.autotrack){var n=e.Types;t.autotrack&&t.autotrack.collect_url&&!t.autotrack.collect_url()||(this.ready(n.Autotrack),this.collect.emit(n.AutotrackReady))}},e.prototype.ready=function(e){this.collect.set(e);var t=this.config.autotrack;t="object"==J(t)?t:{},t=Object.assign(vu,t),this.destroyed=!1,this.options=t,this.Config=new tu(eu,this.options),this.Exposure=new gu(this.config,this.handle.bind(this)),this.Listener=new Qc(t,this.collect,this.Config),this.EventHandle=new ou(this.config,t),this.Request=new ru(this.collect),this.autoTrackStart=!0,this.init(),fu(this,this.config)},e.prototype.init=function(){this.Listener.init(this.handle.bind(this)),"base"===this.collect.loadType&&(window.opener||window.parent).postMessage("[tea-sdk]ready","*")},e.prototype.handle=function(e,t){"dom"===e.eventType&&this.handleDom(e,t)},e.prototype.handleDom=function(e,t){try{var n=e.eventName;if("click"===n||"exposure"===n||"change"===n||"submit"===n){var i=this.EventHandle.handleEvent(t,n);null!==i&&this.Request.send({eventType:"custom",eventName:"report_"+n+"_event",extra:{methods:"GET"}},i)}else if("page_view"===n||"page_statistics"===n){var o;o="page_view"===n?this.EventHandle.handleViewEvent(t):this.EventHandle.handleStatisticsEvent(t),this.Request.send({eventType:"custom",eventName:"report_${eventName}_event",extra:{methods:"GET"}},o)}else if("beat"===n){var r=this.EventHandle.handleBeadtEvent(t),a=e.eventSend;this.Request.send({eventType:"custom",eventName:"report_${eventName}_event",extra:{methods:"GET"},eventSend:a},r)}}catch(e){console.log("handel dom event error "+JSON.stringify(e))}},e.prototype.destroy=function(){if(!this.autoTrackStart)return console.warn("engine is undefined, make sure you have called autoTrack.start()");this.autoTrackStart=!1,this.Listener.removeListener()},e}();!function(e){e.Net="net",e.FailNet="f_net",e.FailData="f_data"}(du||(du={}));var _u={pv:["predefine_pageview"],sdk:["_be_active","predefine_page_alive","predefine_page_close","__profile_set","__profile_set_once","__profile_increment","__profile_unset","__profile_append"],autotrack:["bav2b_click","bav2b_page","bav2b_beat","bav2b_page_statistics","__bav_click","__bav_page","__bav_beat","__bav_page_statistics"]},yu=function(){function e(){}return e.prototype.apply=function(e,t){var n=this;if(this.ready=t.app_id&&t.enable_tracer&&!t.disable_track_event,this.ready){this.limit={pv:1,sdk:3,autotrack:3,log:3},this.errorCode={f_net:0,f_data:0},this.tracerCache=new Map,this.collect=e,this.appid=t.app_id,this.reportUrl=e.configManager.getUrl("event");var i=this.collect.Types;e.adapters.fetch,this.collect.on(i.Event,(function(e){tc(e)?e.forEach((function(e){n.addCount("log")})):n.addCount("log")})),this.collect.on(i.SubmitError,(function(e){var t=e.type,i=e.eventDate,o=e.errorCode,r=e.response;n.addErrorCount(i,t,o,r)})),this.listener(),this.collect.emit(i.TracerReady)}},e.prototype.addCount=function(e,t,n){void 0===t&&(t="net"),void 0===n&&(n=1);try{this.tracerCache||(this.tracerCache=new Map);var i=void 0;if(this.tracerCache.has(e))(o=this.tracerCache.get(e)).has(t)?(i=o.get(t).params.count,i++,o.set(t,this.processTracer(i,e,t))):(i=n,o.set(t,this.processTracer(n,e,t)));else{var o=new Map;i=n,o.set(t,this.processTracer(n,e,t)),this.tracerCache.set(e,o)}"net"===t&&i>=this.limit[e]&&this.report(!1)}catch(e){console.log(e)}},e.prototype.addErrorCount=function(e,t,n,i){var o=this;try{if(e&&e.length){var r=e[0].events;r&&r.length&&("f_data"===t?(i&&i.hasOwnProperty("sc")?this.addCount("log",t,r.length-i.sc):this.addCount("log",t,r.length),this.errorCode[t]=n):r.forEach((function(e){var i="log";for(var r in _u)if(-1!==_u[r].indexOf(e.event)){i=r;break}o.addCount(i,t,1),o.errorCode[t]=n})))}}catch(e){}},e.prototype.report=function(e){if(this.tracerCache){var t=[];this.tracerCache.forEach((function(e){console.log(e),e.forEach((function(e){t.push(e)}))})),t&&t.length&&this.sendTracer(t,e)}},e.prototype.sendTracer=function(e,t){try{var n=this.collect.eventManager.merge(e);this.collect.requestManager.useRequest({url:this.reportUrl,data:n,useBeacon:t}),this.tracerCache=null}catch(e){}},e.prototype.processTracer=function(e,t,n){try{var i={count:e,state:n,key:t,params_for_special:"applog_trace",aid:this.appid,platform:"web",_staging_flag:1,sdk_version:"5.3.3_oversea"};"f_net"!==n&&"f_data"!==n||(i.errorCode=this.errorCode[n]);var o=this.collect.processEvent("applog_trace",i);if(o&&o.event)return delete o.is_bav,o}catch(e){console.warn("something error")}},e.prototype.listener=function(){var e=this;document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e.leavePage()})),rc((function(){e.leavePage()}))},e.prototype.leavePage=function(){this.report(!0)},e}(),bu="undefined"!=typeof window?(window.LogPluginObject||(window.LogPluginObject={}),window.LogPluginObject):null,ku=function(){function e(){}return e.prototype.apply=function(e,t){this._plugin={},this.config=t,this.collect=e,this.channel=t.channel||"cn",this.loadExtend()},e.prototype.loadExtend=function(){var e=this;try{this.collect.remotePlugin.forEach((function(t,n){if("sdk"===t)if(Gc.hasOwnProperty(n)){var i=Gc[n].object,o=""+Gc[n].src[e.channel];e.exist(n,i,o)}else console.warn("your "+n+" is not exist,please check plugin name");else"object"==J(t)&&(t.src?e.exist(n,t.call,t.src):e.process(n,t.instance,"INSTANCE"))}))}catch(e){this.collect.emit(Zs.DEBUGGER_MESSAGE,{type:Zs.DEBUGGER_MESSAGE_SDK,info:"LoadExtend Fail",level:"error",time:Date.now(),data:e.message}),console.log("load extend error")}},e.prototype.exist=function(e,t,n){var i=this;bu[t]?(this.process(e,bu[t]),console.log("already has "+e+" plugin~")):this.loadPlugin(e,n,(function(){i.process(e,bu[t]),console.log(" %c %s %s %s","color: yellow; background-color: black;","–","load plugin:"+e+" success","-")}),(function(){console.log(" %c %s %s %s","color: red; background-color: yellow;","–","load plugin:"+e+" error","-")}))},e.prototype.process=function(e,t,n){try{if(n){var i=new t;i.apply&&i.apply(this.collect,this.config),console.log("excude "+e+" success")}else t&&t(this.collect,this.config)}catch(t){this.collect.emit(Zs.DEBUGGER_MESSAGE,{type:Zs.DEBUGGER_MESSAGE_SDK,info:"Extend Process Fail",level:"error",time:Date.now(),data:t.message}),console.log("excude "+e+" error, message:"+t.message)}},e.prototype.loadPlugin=function(e,t,n,i){var o=this;try{var r=document.createElement("script");r.src=t,this._plugin[e]||(this._plugin[e]=[]),this._plugin[e].push(n),r.onerror=function(){i(t)},r.onload=function(){o._plugin[e].forEach((function(e){e()}))},document.getElementsByTagName("head")[0].appendChild(r)}catch(e){this.collect.emit(Zs.DEBUGGER_MESSAGE,{type:Zs.DEBUGGER_MESSAGE_SDK,info:"Extend LoadPlugin Fail",level:"error",time:Date.now(),data:e.message})}},e}(),Eu=function(){function e(){this.autotrack=!1,this.spa=!1,this.cache={},this.allowHash=!1}return e.prototype.apply=function(e,t){if(t.spa||t.autotrack){var n=e.Types;this.collect=e,this.config=t,this.appid=t.app_id,this.allowHash=t.allow_hash,this.fncArray=new Map,this.setKey(),this.setLocation(),this.hack(),this.init(),this.listener(),e.emit(n.RouteReady)}},e.prototype.setKey=function(){var e=this.collect.adapters.storage;this.storage=new e(!1),this.cache_key="__tea_cache_refer_"+this.appid,this.cache={refer_key:"",refer_title:document.title||location.pathname,refer_manual_key:"",routeChange:!1},this.config.autotrack&&"object"==J(this.config.autotrack)&&this.config.autotrack.page_manual_key&&(this.cache.refer_manual_key=this.config.autotrack.page_manual_key),this.storage.setItem(this.cache_key,this.cache)},e.prototype.hack=function(){var e=this,t=window.history.pushState;history.pushState=function(n){for(var i=[],o=1;o0&&void 0!==arguments[0]?arguments[0]:"BaseStorageWrapper",i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];H(this,e),this.insertDataByStorageName=function(e,n,i,o){Ku.info("[".concat(t.name,"]: insertDataByStorageName"),{data:i,storageName:n,timestamp:o});var r=e[n],a=r.data,s=void 0===a?{}:a,c=r.timestamp;if((void 0===c?0:c)=h?i[e]=l:c&&(i[e]=f)}}))}catch(i){Ku.error("[".concat(t.name,"]: getConsentData Error"),{userInfo:e,keys:n,error:i})}return i},this.getNotificationData=function(e){return Ku.info("[".concat(t.name,"]: getNotificationData"),{userInfo:e}),t.getNotificationStore(e).notification.data},this.splitConsentEntityData=function(e,n){Ku.info("[".concat(t.name,"]: splitConsentEntityData"),{userInfo:n,data:e});var i={},o={},r={},a={},s=null!=n?n:{},c=s.device_id,u=void 0===c?"":c,l=s.user_id,f=void 0===l?"":l;return e&&"object"===J(e)&&Object.keys(e).forEach((function(t){var n=e[t];if(n)switch(a[t]=n.validator,n.validator){case os.ANY:u&&(i[t]=n),f&&(o[t]=n);break;case os.DEVICE_ID:u&&(i[t]=n);break;case os.USER_ID:f&&(o[t]=n);break;case os.BOTH:f&&u&&(r[t]=n)}})),{deviceConsentData:i,userConsentData:o,bothRequiredConsentData:r,consentEntityValidationMap:a}},this.insertDataIntoStore=function(e,n,i){Ku.info("[".concat(t.name,"]: insertDataIntoStore"),{userInfo:i,data:e,timestamp:n});var o=t.getConsentStore(i),r=t.splitConsentEntityData(e,i),a=r.deviceConsentData,s=r.userConsentData,c=r.bothRequiredConsentData,u=r.consentEntityValidationMap;return t.insertDataByStorageName(o,rs.DEVICE_CONSENT,a,n),t.insertDataByStorageName(o,rs.USER_CONSENT,s,n),t.insertDataByStorageName(o,rs.BOTH_CONSENT,c,n),o.consentEntityValidationMap=kf({},u,o.consentEntityValidationMap),o},this._formatConsentRecord=function(e){var t=null!=e?e:{},n=t.key,i=t.type,o=t.name,r=t.category,a=t.validator,s=t.record;return s&&i&&o&&r&&a&&n?Rf(Df({},s),{entity_key:n,entity_type:i,entity_name:o,entity_category:r,entity_validator:a}):null},this.getRecord=function(e,n){Ku.info("[".concat(t.name,"]: getRecord"),{userInfo:n,key:e});var i=t.getConsentData(n,[e]),o=t._formatConsentRecord(null==i?void 0:i[e]);return o?t.shouldClone?tf(o):o:(Ku.info("[".concat(t.name,"]: getRecord - no record for ").concat(e),{key:e}),null)},this.getEntity=function(e,n){var i;Ku.info("[".concat(t.name,"]: getEntity"),{userInfo:n,key:e});var o=t.getConsentData(n,[e]),r=null!=(i=null==o?void 0:o[e])?i:null;return r||Ku.info("[".concat(t.name,"]: getEntity - no entity for ").concat(e),{key:e}),t.shouldClone?tf(r):r},this.getEntities=function(e,n){var i;Ku.info("[".concat(t.name,"]: getEntities"),{userInfo:n,keys:e});var o=[],r=null!=(i=t.getConsentData(n,e))?i:{};if(null==e?void 0:e.length){var a=[];e.forEach((function(e){var n,i=null!=(n=null==r?void 0:r[e])?n:null;i?o.push(t.shouldClone?tf(i):i):a.push(e)})),a.length&&Ku.info("[".concat(t.name,"]: getEntities - missing some entities"),{entityKeys:a})}else Object.keys(null!=r?r:{}).forEach((function(e){var n,i=null!=(n=null==r?void 0:r[e])?n:null;i&&o.push(t.shouldClone?tf(i):i)}));return o},this.getRecords=function(e,n){Ku.info("[".concat(t.name,"]: getRecords"),{userInfo:n,keys:e});var i=[],o=t.getConsentData(n,e);if(null==e?void 0:e.length){var r=[];e.forEach((function(e){var n=t._formatConsentRecord(null==o?void 0:o[e]);n?i.push(t.shouldClone?tf(n):n):r.push(e)})),r.length&&Ku.info("[".concat(t.name,"]: getRecords - missing some records"),{entityKeys:r})}else Object.keys(null!=o?o:{}).forEach((function(e){var n=t._formatConsentRecord(null==o?void 0:o[e]);n&&i.push(t.shouldClone?tf(n):n)}));return i},this.clean=function(){t.cleanConsentData(),t.cleanNotificationData()},this.destruct=function(){t.clean()},this.name=n,this.shouldClone=i})),zf=Mf,If=(C(o={consentEntityValidationMap:{}},rs.USER_CONSENT,tf(Of)),C(o,rs.DEVICE_CONSENT,tf(Of)),C(o,rs.BOTH_CONSENT,tf(Of)),o),Pf=C({},rs.NOTIFICATION,tf(Of)),Bf=function(e){z(n,e);var t=I(n);function n(){var e;return H(this,n),(e=t.call(this,"InMemStorageWrapper",!0))._updateUserInfo=function(t,n){Ku.info("[".concat(e.name,"]: _updateUserInfo"),{userId:n,deviceId:t}),e._did=t,e._uid=n},e.insertConsentData=function(t,n,i){Ku.info("[".concat(e.name,"]: insertConsentData"),{data:t,timestamp:n,userInfo:i});try{e.insertDataIntoStore(t,n,i)}catch(t){Ku.error("[".concat(e.name,"]: insert - ").concat(t.message),t)}},e.insertNotificationData=function(t,n,i){Ku.info("[".concat(e.name,"]: insertNotificationData"),{data:t,timestamp:n,userInfo:i});try{var o=e.getNotificationStore(i);e.insertDataByStorageName(o,rs.NOTIFICATION,t,n)}catch(t){Ku.error("[".concat(e.name,"]: insert - ").concat(t.message),t)}},e.getConsentStore=function(t){return e._cleanUpUnrelatedUserData(t),e._consentStore},e.getNotificationStore=function(t){return e._notificationStore},e._cleanUpUnrelatedUserData=function(t){var n=null!=t?t:{},i=n.device_id,o=void 0===i?"":i,r=n.user_id,a=void 0===r?"":r;o!==e._did&&(e._consentStore[rs.DEVICE_CONSENT]=tf(Of),e._consentStore[rs.BOTH_CONSENT]=tf(Of)),a!==e._uid&&(e._consentStore[rs.USER_CONSENT]=tf(Of),e._consentStore[rs.BOTH_CONSENT]=tf(Of)),e._updateUserInfo(o,a)},e.cleanConsentData=function(){e._consentStore.consentEntityValidationMap={},e._consentStore[rs.USER_CONSENT]=tf(Of),e._consentStore[rs.DEVICE_CONSENT]=tf(Of),e._consentStore[rs.BOTH_CONSENT]=tf(Of)},e.cleanNotificationData=function(){e._notificationStore[rs.NOTIFICATION]=tf(Of)},e.clean=function(){e._consentStore=tf(If),e._notificationStore=tf(Pf)},e.destruct=function(){e.clean()},e.clean(),e}return $(n)}(zf),Nf=Bf,Gf=function(e){return e&&e.default||e}(Object.freeze({__proto__:null,default:{}})),Uf=ui((function(e,t){var n;e.exports=(n=n||function(e,t){var n;if("undefined"!=typeof window&&window.crypto&&(n=window.crypto),"undefined"!=typeof self&&self.crypto&&(n=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(n=globalThis.crypto),!n&&"undefined"!=typeof window&&window.msCrypto&&(n=window.msCrypto),!n&&void 0!==ci&&ci.crypto&&(n=ci.crypto),!n)try{n=Gf}catch(e){}var i=function(){if(n){if("function"==typeof n.getRandomValues)try{return n.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof n.randomBytes)try{return n.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},o=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),r={},a=r.lib={},s=a.Base={extend:function(e){var t=o(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},c=a.WordArray=s.extend({init:function(e,n){e=this.words=e||[],this.sigBytes=n!=t?n:4*e.length},toString:function(e){return(e||l).stringify(this)},concat:function(e){var t=this.words,n=e.words,i=this.sigBytes,o=e.sigBytes;if(this.clamp(),i%4)for(var r=0;r>>2]>>>24-r%4*8&255;t[i+r>>>2]|=a<<24-(i+r)%4*8}else for(var s=0;s>>2]=n[s>>>2];return this.sigBytes+=o,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=s.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n>>2]>>>24-o%4*8&255;i.push((r>>>4).toString(16)),i.push((15&r).toString(16))}return i.join("")},parse:function(e){for(var t=e.length,n=[],i=0;i>>3]|=parseInt(e.substr(i,2),16)<<24-i%8*4;return new c.init(n,t/2)}},f=u.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,i=[],o=0;o>>2]>>>24-o%4*8&255;i.push(String.fromCharCode(r))}return i.join("")},parse:function(e){for(var t=e.length,n=[],i=0;i>>2]|=(255&e.charCodeAt(i))<<24-i%4*8;return new c.init(n,t)}},d=u.Utf8={stringify:function(e){try{return decodeURIComponent(escape(f.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return f.parse(unescape(encodeURIComponent(e)))}},h=a.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=d.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n,i=this._data,o=i.words,r=i.sigBytes,a=this.blockSize,s=r/(4*a),u=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*a,l=e.min(4*u,r);if(u){for(var f=0;f>>2]|=e[o]<<24-o%4*8;t.call(this,i,n)}else t.apply(this,arguments)};i.prototype=e}}(),n.lib.WordArray)})),ui((function(e,t){var n;e.exports=(n=Uf,function(){var e=n,t=e.lib.WordArray,i=e.enc;function o(e){return e<<8&4278255360|e>>>8&16711935}i.Utf16=i.Utf16BE={stringify:function(e){for(var t=e.words,n=e.sigBytes,i=[],o=0;o>>2]>>>16-o%4*8&65535;i.push(String.fromCharCode(r))}return i.join("")},parse:function(e){for(var n=e.length,i=[],o=0;o>>1]|=e.charCodeAt(o)<<16-o%2*16;return t.create(i,2*n)}},i.Utf16LE={stringify:function(e){for(var t=e.words,n=e.sigBytes,i=[],r=0;r>>2]>>>16-r%4*8&65535);i.push(String.fromCharCode(a))}return i.join("")},parse:function(e){for(var n=e.length,i=[],r=0;r>>1]|=o(e.charCodeAt(r)<<16-r%2*16);return t.create(i,2*n)}}}(),n.enc.Utf16)})),ui((function(e,t){var n;e.exports=(n=Uf,function(){var e=n,t=e.lib.WordArray;function i(e,n,i){for(var o=[],r=0,a=0;a>>6-a%4*2;o[r>>>2]|=s<<24-r%4*8,r++}return t.create(o,r)}e.enc.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,i=this._map;e.clamp();for(var o=[],r=0;r>>2]>>>24-r%4*8&255)<<16|(t[r+1>>>2]>>>24-(r+1)%4*8&255)<<8|t[r+2>>>2]>>>24-(r+2)%4*8&255,s=0;s<4&&r+.75*s>>6*(3-s)&63));var c=i.charAt(64);if(c)for(;o.length%4;)o.push(c);return o.join("")},parse:function(e){var t=e.length,n=this._map,o=this._reverseMap;if(!o){o=this._reverseMap=[];for(var r=0;r>>6-a%4*2;o[r>>>2]|=s<<24-r%4*8,r++}return t.create(o,r)}e.enc.Base64url={stringify:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=e.words,i=e.sigBytes,o=t?this._safe_map:this._map;e.clamp();for(var r=[],a=0;a>>2]>>>24-a%4*8&255)<<16|(n[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|n[a+2>>>2]>>>24-(a+2)%4*8&255,c=0;c<4&&a+.75*c>>6*(3-c)&63));var u=o.charAt(64);if(u)for(;r.length%4;)r.push(u);return r.join("")},parse:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=e.length,o=t?this._safe_map:this._map,r=this._reverseMap;if(!r){r=this._reverseMap=[];for(var a=0;a>>24)|4278255360&(o<<24|o>>>8)}var r=this._hash.words,a=e[t+0],c=e[t+1],h=e[t+2],p=e[t+3],g=e[t+4],v=e[t+5],m=e[t+6],_=e[t+7],y=e[t+8],b=e[t+9],k=e[t+10],E=e[t+11],w=e[t+12],S=e[t+13],C=e[t+14],x=e[t+15],A=r[0],T=r[1],D=r[2],R=r[3];A=u(A,T,D,R,a,7,s[0]),R=u(R,A,T,D,c,12,s[1]),D=u(D,R,A,T,h,17,s[2]),T=u(T,D,R,A,p,22,s[3]),A=u(A,T,D,R,g,7,s[4]),R=u(R,A,T,D,v,12,s[5]),D=u(D,R,A,T,m,17,s[6]),T=u(T,D,R,A,_,22,s[7]),A=u(A,T,D,R,y,7,s[8]),R=u(R,A,T,D,b,12,s[9]),D=u(D,R,A,T,k,17,s[10]),T=u(T,D,R,A,E,22,s[11]),A=u(A,T,D,R,w,7,s[12]),R=u(R,A,T,D,S,12,s[13]),D=u(D,R,A,T,C,17,s[14]),A=l(A,T=u(T,D,R,A,x,22,s[15]),D,R,c,5,s[16]),R=l(R,A,T,D,m,9,s[17]),D=l(D,R,A,T,E,14,s[18]),T=l(T,D,R,A,a,20,s[19]),A=l(A,T,D,R,v,5,s[20]),R=l(R,A,T,D,k,9,s[21]),D=l(D,R,A,T,x,14,s[22]),T=l(T,D,R,A,g,20,s[23]),A=l(A,T,D,R,b,5,s[24]),R=l(R,A,T,D,C,9,s[25]),D=l(D,R,A,T,p,14,s[26]),T=l(T,D,R,A,y,20,s[27]),A=l(A,T,D,R,S,5,s[28]),R=l(R,A,T,D,h,9,s[29]),D=l(D,R,A,T,_,14,s[30]),A=f(A,T=l(T,D,R,A,w,20,s[31]),D,R,v,4,s[32]),R=f(R,A,T,D,y,11,s[33]),D=f(D,R,A,T,E,16,s[34]),T=f(T,D,R,A,C,23,s[35]),A=f(A,T,D,R,c,4,s[36]),R=f(R,A,T,D,g,11,s[37]),D=f(D,R,A,T,_,16,s[38]),T=f(T,D,R,A,k,23,s[39]),A=f(A,T,D,R,S,4,s[40]),R=f(R,A,T,D,a,11,s[41]),D=f(D,R,A,T,p,16,s[42]),T=f(T,D,R,A,m,23,s[43]),A=f(A,T,D,R,b,4,s[44]),R=f(R,A,T,D,w,11,s[45]),D=f(D,R,A,T,x,16,s[46]),A=d(A,T=f(T,D,R,A,h,23,s[47]),D,R,a,6,s[48]),R=d(R,A,T,D,_,10,s[49]),D=d(D,R,A,T,C,15,s[50]),T=d(T,D,R,A,v,21,s[51]),A=d(A,T,D,R,w,6,s[52]),R=d(R,A,T,D,p,10,s[53]),D=d(D,R,A,T,k,15,s[54]),T=d(T,D,R,A,c,21,s[55]),A=d(A,T,D,R,y,6,s[56]),R=d(R,A,T,D,x,10,s[57]),D=d(D,R,A,T,m,15,s[58]),T=d(T,D,R,A,S,21,s[59]),A=d(A,T,D,R,g,6,s[60]),R=d(R,A,T,D,E,10,s[61]),D=d(D,R,A,T,h,15,s[62]),T=d(T,D,R,A,b,21,s[63]),r[0]=r[0]+A|0,r[1]=r[1]+T|0,r[2]=r[2]+D|0,r[3]=r[3]+R|0},_doFinalize:function(){var t=this._data,n=t.words,i=8*this._nDataBytes,o=8*t.sigBytes;n[o>>>5]|=128<<24-o%32;var r=e.floor(i/4294967296),a=i;n[15+(o+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),n[14+(o+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),t.sigBytes=4*(n.length+1),this._process();for(var s=this._hash,c=s.words,u=0;u<4;u++){var l=c[u];c[u]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return s},clone:function(){var e=r.clone.call(this);return e._hash=this._hash.clone(),e}});function u(e,t,n,i,o,r,a){var s=e+(t&n|~t&i)+o+a;return(s<>>32-r)+t}function l(e,t,n,i,o,r,a){var s=e+(t&i|n&~i)+o+a;return(s<>>32-r)+t}function f(e,t,n,i,o,r,a){var s=e+(t^n^i)+o+a;return(s<>>32-r)+t}function d(e,t,n,i,o,r,a){var s=e+(n^(t|~i))+o+a;return(s<>>32-r)+t}t.MD5=r._createHelper(c),t.HmacMD5=r._createHmacHelper(c)}(Math),n.MD5)})),ui((function(e,t){var n;e.exports=(n=Uf,function(){var e=n,t=e.lib,i=t.WordArray,o=t.Hasher,r=e.algo,a=[],s=r.SHA1=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=this._hash.words,i=n[0],o=n[1],r=n[2],s=n[3],c=n[4],u=0;u<80;u++){if(u<16)a[u]=0|e[t+u];else{var l=a[u-3]^a[u-8]^a[u-14]^a[u-16];a[u]=l<<1|l>>>31}var f=(i<<5|i>>>27)+c+a[u];f+=u<20?1518500249+(o&r|~o&s):u<40?1859775393+(o^r^s):u<60?(o&r|o&s|r&s)-1894007588:(o^r^s)-899497514,c=s,s=r,r=o<<30|o>>>2,o=i,i=f}n[0]=n[0]+i|0,n[1]=n[1]+o|0,n[2]=n[2]+r|0,n[3]=n[3]+s|0,n[4]=n[4]+c|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,i=8*e.sigBytes;return t[i>>>5]|=128<<24-i%32,t[14+(i+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(i+64>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});e.SHA1=o._createHelper(s),e.HmacSHA1=o._createHmacHelper(s)}(),n.SHA1)})),ui((function(e,t){var n;e.exports=(n=Uf,function(e){var t=n,i=t.lib,o=i.WordArray,r=i.Hasher,a=t.algo,s=[],c=[];!function(){function t(t){for(var n=e.sqrt(t),i=2;i<=n;i++)if(!(t%i))return!1;return!0}function n(e){return 4294967296*(e-(0|e))|0}for(var i=2,o=0;o<64;)t(i)&&(o<8&&(s[o]=n(e.pow(i,.5))),c[o]=n(e.pow(i,1/3)),o++),i++}();var u=[],l=a.SHA256=r.extend({_doReset:function(){this._hash=new o.init(s.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,i=n[0],o=n[1],r=n[2],a=n[3],s=n[4],l=n[5],f=n[6],d=n[7],h=0;h<64;h++){if(h<16)u[h]=0|e[t+h];else{var p=u[h-15],g=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,v=u[h-2],m=(v<<15|v>>>17)^(v<<13|v>>>19)^v>>>10;u[h]=g+u[h-7]+m+u[h-16]}var _=i&o^i&r^o&r,y=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),b=d+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&l^~s&f)+c[h]+u[h];d=f,f=l,l=s,s=a+b|0,a=r,r=o,o=i,i=b+(y+_)|0}n[0]=n[0]+i|0,n[1]=n[1]+o|0,n[2]=n[2]+r|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0,n[5]=n[5]+l|0,n[6]=n[6]+f|0,n[7]=n[7]+d|0},_doFinalize:function(){var t=this._data,n=t.words,i=8*this._nDataBytes,o=8*t.sigBytes;return n[o>>>5]|=128<<24-o%32,n[14+(o+64>>>9<<4)]=e.floor(i/4294967296),n[15+(o+64>>>9<<4)]=i,t.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var e=r.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=r._createHelper(l),t.HmacSHA256=r._createHmacHelper(l)}(Math),n.SHA256)})),ui((function(e,t){var n;e.exports=(n=Uf,function(){var e=n,t=e.lib.WordArray,i=e.algo,o=i.SHA256,r=i.SHA224=o.extend({_doReset:function(){this._hash=new t.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=o._doFinalize.call(this);return e.sigBytes-=4,e}});e.SHA224=o._createHelper(r),e.HmacSHA224=o._createHmacHelper(r)}(),n.SHA224)})),ui((function(e,t){var n;e.exports=(n=Uf,function(){var e=n,t=e.lib.Hasher,i=e.x64,o=i.Word,r=i.WordArray,a=e.algo;function s(){return o.create.apply(o,arguments)}var c=[s(1116352408,3609767458),s(1899447441,602891725),s(3049323471,3964484399),s(3921009573,2173295548),s(961987163,4081628472),s(1508970993,3053834265),s(2453635748,2937671579),s(2870763221,3664609560),s(3624381080,2734883394),s(310598401,1164996542),s(607225278,1323610764),s(1426881987,3590304994),s(1925078388,4068182383),s(2162078206,991336113),s(2614888103,633803317),s(3248222580,3479774868),s(3835390401,2666613458),s(4022224774,944711139),s(264347078,2341262773),s(604807628,2007800933),s(770255983,1495990901),s(1249150122,1856431235),s(1555081692,3175218132),s(1996064986,2198950837),s(2554220882,3999719339),s(2821834349,766784016),s(2952996808,2566594879),s(3210313671,3203337956),s(3336571891,1034457026),s(3584528711,2466948901),s(113926993,3758326383),s(338241895,168717936),s(666307205,1188179964),s(773529912,1546045734),s(1294757372,1522805485),s(1396182291,2643833823),s(1695183700,2343527390),s(1986661051,1014477480),s(2177026350,1206759142),s(2456956037,344077627),s(2730485921,1290863460),s(2820302411,3158454273),s(3259730800,3505952657),s(3345764771,106217008),s(3516065817,3606008344),s(3600352804,1432725776),s(4094571909,1467031594),s(275423344,851169720),s(430227734,3100823752),s(506948616,1363258195),s(659060556,3750685593),s(883997877,3785050280),s(958139571,3318307427),s(1322822218,3812723403),s(1537002063,2003034995),s(1747873779,3602036899),s(1955562222,1575990012),s(2024104815,1125592928),s(2227730452,2716904306),s(2361852424,442776044),s(2428436474,593698344),s(2756734187,3733110249),s(3204031479,2999351573),s(3329325298,3815920427),s(3391569614,3928383900),s(3515267271,566280711),s(3940187606,3454069534),s(4118630271,4000239992),s(116418474,1914138554),s(174292421,2731055270),s(289380356,3203993006),s(460393269,320620315),s(685471733,587496836),s(852142971,1086792851),s(1017036298,365543100),s(1126000580,2618297676),s(1288033470,3409855158),s(1501505948,4234509866),s(1607167915,987167468),s(1816402316,1246189591)],u=[];!function(){for(var e=0;e<80;e++)u[e]=s()}();var l=a.SHA512=t.extend({_doReset:function(){this._hash=new r.init([new o.init(1779033703,4089235720),new o.init(3144134277,2227873595),new o.init(1013904242,4271175723),new o.init(2773480762,1595750129),new o.init(1359893119,2917565137),new o.init(2600822924,725511199),new o.init(528734635,4215389547),new o.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var n=this._hash.words,i=n[0],o=n[1],r=n[2],a=n[3],s=n[4],l=n[5],f=n[6],d=n[7],h=i.high,p=i.low,g=o.high,v=o.low,m=r.high,_=r.low,y=a.high,b=a.low,k=s.high,E=s.low,w=l.high,S=l.low,C=f.high,x=f.low,A=d.high,T=d.low,D=h,R=p,O=g,M=v,z=m,I=_,P=y,B=b,N=k,G=E,U=w,j=S,L=C,V=x,F=A,K=T,H=0;H<80;H++){var q,$,J=u[H];if(H<16)$=J.high=0|e[t+2*H],q=J.low=0|e[t+2*H+1];else{var W=u[H-15],X=W.high,Y=W.low,Z=(X>>>1|Y<<31)^(X>>>8|Y<<24)^X>>>7,Q=(Y>>>1|X<<31)^(Y>>>8|X<<24)^(Y>>>7|X<<25),ee=u[H-2],te=ee.high,ne=ee.low,ie=(te>>>19|ne<<13)^(te<<3|ne>>>29)^te>>>6,oe=(ne>>>19|te<<13)^(ne<<3|te>>>29)^(ne>>>6|te<<26),re=u[H-7],ae=re.high,se=re.low,ce=u[H-16],ue=ce.high,le=ce.low;$=($=($=Z+ae+((q=Q+se)>>>0>>0?1:0))+ie+((q+=oe)>>>0>>0?1:0))+ue+((q+=le)>>>0>>0?1:0),J.high=$,J.low=q}var fe,de=N&U^~N&L,he=G&j^~G&V,pe=D&O^D&z^O&z,ge=R&M^R&I^M&I,ve=(D>>>28|R<<4)^(D<<30|R>>>2)^(D<<25|R>>>7),me=(R>>>28|D<<4)^(R<<30|D>>>2)^(R<<25|D>>>7),_e=(N>>>14|G<<18)^(N>>>18|G<<14)^(N<<23|G>>>9),ye=(G>>>14|N<<18)^(G>>>18|N<<14)^(G<<23|N>>>9),be=c[H],ke=be.high,Ee=be.low,we=F+_e+((fe=K+ye)>>>0>>0?1:0),Se=me+ge;F=L,K=V,L=U,V=j,U=N,j=G,N=P+(we=(we=(we=we+de+((fe+=he)>>>0>>0?1:0))+ke+((fe+=Ee)>>>0>>0?1:0))+$+((fe+=q)>>>0>>0?1:0))+((G=B+fe|0)>>>0>>0?1:0)|0,P=z,B=I,z=O,I=M,O=D,M=R,D=we+(ve+pe+(Se>>>0>>0?1:0))+((R=fe+Se|0)>>>0>>0?1:0)|0}p=i.low=p+R,i.high=h+D+(p>>>0>>0?1:0),v=o.low=v+M,o.high=g+O+(v>>>0>>0?1:0),_=r.low=_+I,r.high=m+z+(_>>>0>>0?1:0),b=a.low=b+B,a.high=y+P+(b>>>0>>0?1:0),E=s.low=E+G,s.high=k+N+(E>>>0>>0?1:0),S=l.low=S+j,l.high=w+U+(S>>>0>>0?1:0),x=f.low=x+V,f.high=C+L+(x>>>0>>0?1:0),T=d.low=T+K,d.high=A+F+(T>>>0>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,i=8*e.sigBytes;return t[i>>>5]|=128<<24-i%32,t[30+(i+128>>>10<<5)]=Math.floor(n/4294967296),t[31+(i+128>>>10<<5)]=n,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=t.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});e.SHA512=t._createHelper(l),e.HmacSHA512=t._createHmacHelper(l)}(),n.SHA512)})),ui((function(e,t){var n;e.exports=(n=Uf,function(){var e=n,t=e.x64,i=t.Word,o=t.WordArray,r=e.algo,a=r.SHA512,s=r.SHA384=a.extend({_doReset:function(){this._hash=new o.init([new i.init(3418070365,3238371032),new i.init(1654270250,914150663),new i.init(2438529370,812702999),new i.init(355462360,4144912697),new i.init(1731405415,4290775857),new i.init(2394180231,1750603025),new i.init(3675008525,1694076839),new i.init(1203062813,3204075428)])},_doFinalize:function(){var e=a._doFinalize.call(this);return e.sigBytes-=16,e}});e.SHA384=a._createHelper(s),e.HmacSHA384=a._createHmacHelper(s)}(),n.SHA384)})),ui((function(e,t){var n;e.exports=(n=Uf,function(e){var t=n,i=t.lib,o=i.WordArray,r=i.Hasher,a=t.x64.Word,s=t.algo,c=[],u=[],l=[];!function(){for(var e=1,t=0,n=0;n<24;n++){c[e+5*t]=(n+1)*(n+2)/2%64;var i=(2*e+3*t)%5;e=t%5,t=i}for(e=0;e<5;e++)for(t=0;t<5;t++)u[e+5*t]=t+(2*e+3*t)%5*5;for(var o=1,r=0;r<24;r++){for(var s=0,f=0,d=0;d<7;d++){if(1&o){var h=(1<>>24)|4278255360&(r<<24|r>>>8),a=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),(T=n[o]).high^=a,T.low^=r}for(var s=0;s<24;s++){for(var d=0;d<5;d++){for(var h=0,p=0,g=0;g<5;g++)h^=(T=n[d+5*g]).high,p^=T.low;var v=f[d];v.high=h,v.low=p}for(d=0;d<5;d++){var m=f[(d+4)%5],_=f[(d+1)%5],y=_.high,b=_.low;for(h=m.high^(y<<1|b>>>31),p=m.low^(b<<1|y>>>31),g=0;g<5;g++)(T=n[d+5*g]).high^=h,T.low^=p}for(var k=1;k<25;k++){var E=(T=n[k]).high,w=T.low,S=c[k];S<32?(h=E<>>32-S,p=w<>>32-S):(h=w<>>64-S,p=E<>>64-S);var C=f[u[k]];C.high=h,C.low=p}var x=f[0],A=n[0];for(x.high=A.high,x.low=A.low,d=0;d<5;d++)for(g=0;g<5;g++){var T=n[k=d+5*g],D=f[k],R=f[(d+1)%5+5*g],O=f[(d+2)%5+5*g];T.high=D.high^~R.high&O.high,T.low=D.low^~R.low&O.low}T=n[0];var M=l[s];T.high^=M.high,T.low^=M.low}},_doFinalize:function(){var t=this._data,n=t.words;this._nDataBytes;var i=8*t.sigBytes,r=32*this.blockSize;n[i>>>5]|=1<<24-i%32,n[(e.ceil((i+1)/r)*r>>>5)-1]|=128,t.sigBytes=4*n.length,this._process();for(var a=this._state,s=this.cfg.outputLength/8,c=s/8,u=[],l=0;l>>24)|4278255360&(d<<24|d>>>8),h=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8),u.push(h),u.push(d)}return new o.init(u,s)},clone:function(){for(var e=r.clone.call(this),t=e._state=this._state.slice(0),n=0;n<25;n++)t[n]=t[n].clone();return e}});t.SHA3=r._createHelper(d),t.HmacSHA3=r._createHmacHelper(d)}(Math),n.SHA3)})),ui((function(e,t){var n;e.exports=(n=Uf, /** @preserve (c) 2012 by Cédric Mesnil. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ function(e){var t=n,i=t.lib,o=i.WordArray,r=i.Hasher,a=t.algo,s=o.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),c=o.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),u=o.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),l=o.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),f=o.create([0,1518500249,1859775393,2400959708,2840853838]),d=o.create([1352829926,1548603684,1836072691,2053994217,0]),h=a.RIPEMD160=r.extend({_doReset:function(){this._hash=o.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var i=t+n,o=e[i];e[i]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}var r,a,h,b,k,E,w,S,C,x,A,T=this._hash.words,D=f.words,R=d.words,O=s.words,M=c.words,z=u.words,I=l.words;for(E=r=T[0],w=a=T[1],S=h=T[2],C=b=T[3],x=k=T[4],n=0;n<80;n+=1)A=r+e[t+O[n]]|0,A+=n<16?p(a,h,b)+D[0]:n<32?g(a,h,b)+D[1]:n<48?v(a,h,b)+D[2]:n<64?m(a,h,b)+D[3]:_(a,h,b)+D[4],A=(A=y(A|=0,z[n]))+k|0,r=k,k=b,b=y(h,10),h=a,a=A,A=E+e[t+M[n]]|0,A+=n<16?_(w,S,C)+R[0]:n<32?m(w,S,C)+R[1]:n<48?v(w,S,C)+R[2]:n<64?g(w,S,C)+R[3]:p(w,S,C)+R[4],A=(A=y(A|=0,I[n]))+x|0,E=x,x=C,C=y(S,10),S=w,w=A;A=T[1]+h+C|0,T[1]=T[2]+b+x|0,T[2]=T[3]+k+E|0,T[3]=T[4]+r+w|0,T[4]=T[0]+a+S|0,T[0]=A},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,i=8*e.sigBytes;t[i>>>5]|=128<<24-i%32,t[14+(i+64>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),e.sigBytes=4*(t.length+1),this._process();for(var o=this._hash,r=o.words,a=0;a<5;a++){var s=r[a];r[a]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return o},clone:function(){var e=r.clone.call(this);return e._hash=this._hash.clone(),e}});function p(e,t,n){return e^t^n}function g(e,t,n){return e&t|~e&n}function v(e,t,n){return(e|~t)^n}function m(e,t,n){return e&n|t&~n}function _(e,t,n){return e^(t|~n)}function y(e,t){return e<>>32-t}t.RIPEMD160=r._createHelper(h),t.HmacRIPEMD160=r._createHmacHelper(h)}(),n.RIPEMD160)})),ui((function(e,t){var n;e.exports=(n=Uf,void function(){var e=n,t=e.lib.Base,i=e.enc.Utf8;e.algo.HMAC=t.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=i.parse(t));var n=e.blockSize,o=4*n;t.sigBytes>o&&(t=e.finalize(t)),t.clamp();for(var r=this._oKey=t.clone(),a=this._iKey=t.clone(),s=r.words,c=a.words,u=0;u>>2];e.sigBytes-=t}};i.BlockCipher=l.extend({cfg:l.cfg.extend({mode:h,padding:p}),reset:function(){var e;l.reset.call(this);var t=this.cfg,n=t.iv,i=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=i.createEncryptor:(e=i.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,n&&n.words):(this._mode=e.call(i,this,n&&n.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4});var g=i.CipherParams=o.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),v=(t.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,n=e.salt;return(n?r.create([1398893684,1701076831]).concat(n).concat(t):t).toString(c)},parse:function(e){var t,n=c.parse(e),i=n.words;return 1398893684==i[0]&&1701076831==i[1]&&(t=r.create(i.slice(2,4)),i.splice(0,4),n.sigBytes-=16),g.create({ciphertext:n,salt:t})}},m=i.SerializableCipher=o.extend({cfg:o.extend({format:v}),encrypt:function(e,t,n,i){i=this.cfg.extend(i);var o=e.createEncryptor(n,i),r=o.finalize(t),a=o.cfg;return g.create({ciphertext:r,key:n,iv:a.iv,algorithm:e,mode:a.mode,padding:a.padding,blockSize:e.blockSize,formatter:i.format})},decrypt:function(e,t,n,i){return i=this.cfg.extend(i),t=this._parse(t,i.format),e.createDecryptor(n,i).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),_=(t.kdf={}).OpenSSL={execute:function(e,t,n,i){i||(i=r.random(8));var o=u.create({keySize:t+n}).compute(e,i),a=r.create(o.words.slice(t),4*n);return o.sigBytes=4*t,g.create({key:o,iv:a,salt:i})}},y=i.PasswordBasedCipher=m.extend({cfg:m.cfg.extend({kdf:_}),encrypt:function(e,t,n,i){var o=(i=this.cfg.extend(i)).kdf.execute(n,e.keySize,e.ivSize);i.iv=o.iv;var r=m.encrypt.call(this,e,t,o.key,i);return r.mixIn(o),r},decrypt:function(e,t,n,i){i=this.cfg.extend(i),t=this._parse(t,i.format);var o=i.kdf.execute(n,e.keySize,e.ivSize,t.salt);return i.iv=o.iv,m.decrypt.call(this,e,t,o.key,i)}})}())})),ui((function(e,t){var n;e.exports=((n=Uf).mode.CFB=function(){var e=n.lib.BlockCipherMode.extend();function t(e,t,n,i){var o,r=this._iv;r?(o=r.slice(0),this._iv=void 0):o=this._prevBlock,i.encryptBlock(o,0);for(var a=0;a>24&255)){var t=e>>16&255,n=e>>8&255,i=255&e;255===t?(t=0,255===n?(n=0,255===i?i=0:++i):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=i}else e+=1<<24;return e}function i(e){return 0===(e[0]=t(e[0]))&&(e[1]=t(e[1])),e}var o=e.Encryptor=e.extend({processBlock:function(e,t){var n=this._cipher,o=n.blockSize,r=this._iv,a=this._counter;r&&(a=this._counter=r.slice(0),this._iv=void 0),i(a);var s=a.slice(0);n.encryptBlock(s,0);for(var c=0;c>>2]|=o<<24-r%4*8,e.sigBytes+=o},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},n.pad.Ansix923)})),ui((function(e,t){var n;e.exports=((n=Uf).pad.Iso10126={pad:function(e,t){var i=4*t,o=i-e.sigBytes%i;e.concat(n.lib.WordArray.random(o-1)).concat(n.lib.WordArray.create([o<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},n.pad.Iso10126)})),ui((function(e,t){var n;e.exports=((n=Uf).pad.Iso97971={pad:function(e,t){e.concat(n.lib.WordArray.create([2147483648],1)),n.pad.ZeroPadding.pad(e,t)},unpad:function(e){n.pad.ZeroPadding.unpad(e),e.sigBytes--}},n.pad.Iso97971)})),ui((function(e,t){var n;e.exports=((n=Uf).pad.ZeroPadding={pad:function(e,t){var n=4*t;e.clamp(),e.sigBytes+=n-(e.sigBytes%n||n)},unpad:function(e){var t=e.words,n=e.sigBytes-1;for(n=e.sigBytes-1;n>=0;n--)if(t[n>>>2]>>>24-n%4*8&255){e.sigBytes=n+1;break}}},n.pad.ZeroPadding)})),ui((function(e,t){var n;e.exports=((n=Uf).pad.NoPadding={pad:function(){},unpad:function(){}},n.pad.NoPadding)})),ui((function(e,t){var n;e.exports=(n=Uf,function(e){var t=n,i=t.lib.CipherParams,o=t.enc.Hex;t.format.Hex={stringify:function(e){return e.ciphertext.toString(o)},parse:function(e){var t=o.parse(e);return i.create({ciphertext:t})}}}(),n.format.Hex)})),ui((function(e,t){var n;e.exports=(n=Uf,function(){var e=n,t=e.lib.BlockCipher,i=e.algo,o=[],r=[],a=[],s=[],c=[],u=[],l=[],f=[],d=[],h=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var n=0,i=0;for(t=0;t<256;t++){var p=i^i<<1^i<<2^i<<3^i<<4;p=p>>>8^255&p^99,o[n]=p,r[p]=n;var g=e[n],v=e[g],m=e[v],_=257*e[p]^16843008*p;a[n]=_<<24|_>>>8,s[n]=_<<16|_>>>16,c[n]=_<<8|_>>>24,u[n]=_,_=16843009*m^65537*v^257*g^16843008*n,l[p]=_<<24|_>>>8,f[p]=_<<16|_>>>16,d[p]=_<<8|_>>>24,h[p]=_,n?(n=g^e[e[e[m^g]]],i^=e[e[i]]):n=i=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],g=i.AES=t.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,n=e.sigBytes/4,i=4*((this._nRounds=n+6)+1),r=this._keySchedule=[],a=0;a6&&a%n==4&&(u=o[u>>>24]<<24|o[u>>>16&255]<<16|o[u>>>8&255]<<8|o[255&u]):(u=o[(u=u<<8|u>>>24)>>>24]<<24|o[u>>>16&255]<<16|o[u>>>8&255]<<8|o[255&u],u^=p[a/n|0]<<24),r[a]=r[a-n]^u);for(var s=this._invKeySchedule=[],c=0;c>>24]]^f[o[u>>>16&255]]^d[o[u>>>8&255]]^h[o[255&u]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,a,s,c,u,o)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,l,f,d,h,r),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,i,o,r,a,s){for(var c=this._nRounds,u=e[t]^n[0],l=e[t+1]^n[1],f=e[t+2]^n[2],d=e[t+3]^n[3],h=4,p=1;p>>24]^o[l>>>16&255]^r[f>>>8&255]^a[255&d]^n[h++],v=i[l>>>24]^o[f>>>16&255]^r[d>>>8&255]^a[255&u]^n[h++],m=i[f>>>24]^o[d>>>16&255]^r[u>>>8&255]^a[255&l]^n[h++],_=i[d>>>24]^o[u>>>16&255]^r[l>>>8&255]^a[255&f]^n[h++];u=g,l=v,f=m,d=_}g=(s[u>>>24]<<24|s[l>>>16&255]<<16|s[f>>>8&255]<<8|s[255&d])^n[h++],v=(s[l>>>24]<<24|s[f>>>16&255]<<16|s[d>>>8&255]<<8|s[255&u])^n[h++],m=(s[f>>>24]<<24|s[d>>>16&255]<<16|s[u>>>8&255]<<8|s[255&l])^n[h++],_=(s[d>>>24]<<24|s[u>>>16&255]<<16|s[l>>>8&255]<<8|s[255&f])^n[h++],e[t]=g,e[t+1]=v,e[t+2]=m,e[t+3]=_},keySize:8});e.AES=t._createHelper(g)}(),n.AES)})),ui((function(e,t){var n;e.exports=(n=Uf,function(){var e=n,t=e.lib,i=t.WordArray,o=t.BlockCipher,r=e.algo,a=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],s=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],c=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],u=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],l=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],f=r.DES=o.extend({_doReset:function(){for(var e=this._key.words,t=[],n=0;n<56;n++){var i=a[n]-1;t[n]=e[i>>>5]>>>31-i%32&1}for(var o=this._subKeys=[],r=0;r<16;r++){var u=o[r]=[],l=c[r];for(n=0;n<24;n++)u[n/6|0]|=t[(s[n]-1+l)%28]<<31-n%6,u[4+(n/6|0)]|=t[28+(s[n+24]-1+l)%28]<<31-n%6;for(u[0]=u[0]<<1|u[0]>>>31,n=1;n<7;n++)u[n]=u[n]>>>4*(n-1)+3;u[7]=u[7]<<5|u[7]>>>27}var f=this._invSubKeys=[];for(n=0;n<16;n++)f[n]=o[15-n]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,n){this._lBlock=e[t],this._rBlock=e[t+1],d.call(this,4,252645135),d.call(this,16,65535),h.call(this,2,858993459),h.call(this,8,16711935),d.call(this,1,1431655765);for(var i=0;i<16;i++){for(var o=n[i],r=this._lBlock,a=this._rBlock,s=0,c=0;c<8;c++)s|=u[c][((a^o[c])&l[c])>>>0];this._lBlock=a,this._rBlock=r^s}var f=this._lBlock;this._lBlock=this._rBlock,this._rBlock=f,d.call(this,1,1431655765),h.call(this,8,16711935),h.call(this,2,858993459),d.call(this,16,65535),d.call(this,4,252645135),e[t]=this._lBlock,e[t+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function d(e,t){var n=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=n,this._lBlock^=n<>>e^this._lBlock)&t;this._lBlock^=n,this._rBlock^=n<192.");var t=e.slice(0,2),n=e.length<4?e.slice(0,2):e.slice(2,4),o=e.length<6?e.slice(0,2):e.slice(4,6);this._des1=f.createEncryptor(i.create(t)),this._des2=f.createEncryptor(i.create(n)),this._des3=f.createEncryptor(i.create(o))},encryptBlock:function(e,t){this._des1.encryptBlock(e,t),this._des2.decryptBlock(e,t),this._des3.encryptBlock(e,t)},decryptBlock:function(e,t){this._des3.decryptBlock(e,t),this._des2.encryptBlock(e,t),this._des1.decryptBlock(e,t)},keySize:6,ivSize:2,blockSize:2});e.TripleDES=o._createHelper(p)}(),n.TripleDES)})),ui((function(e,t){var n;e.exports=(n=Uf,function(){var e=n,t=e.lib.StreamCipher,i=e.algo,o=i.RC4=t.extend({_doReset:function(){for(var e=this._key,t=e.words,n=e.sigBytes,i=this._S=[],o=0;o<256;o++)i[o]=o;o=0;for(var r=0;o<256;o++){var a=o%n,s=t[a>>>2]>>>24-a%4*8&255;r=(r+i[o]+s)%256;var c=i[o];i[o]=i[r],i[r]=c}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=r.call(this)},keySize:8,ivSize:0});function r(){for(var e=this._S,t=this._i,n=this._j,i=0,o=0;o<4;o++){n=(n+e[t=(t+1)%256])%256;var r=e[t];e[t]=e[n],e[n]=r,i|=e[(e[t]+e[n])%256]<<24-8*o}return this._i=t,this._j=n,i}e.RC4=t._createHelper(o);var a=i.RC4Drop=o.extend({cfg:o.cfg.extend({drop:192}),_doReset:function(){o._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)r.call(this)}});e.RC4Drop=t._createHelper(a)}(),n.RC4)})),ui((function(e,t){var n;e.exports=(n=Uf,function(){var e=n,t=e.lib.StreamCipher,i=e.algo,o=[],r=[],a=[],s=i.Rabbit=t.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,n=0;n<4;n++)e[n]=16711935&(e[n]<<8|e[n]>>>24)|4278255360&(e[n]<<24|e[n]>>>8);var i=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],o=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(this._b=0,n=0;n<4;n++)c.call(this);for(n=0;n<8;n++)o[n]^=i[n+4&7];if(t){var r=t.words,a=r[0],s=r[1],u=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),l=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),f=u>>>16|4294901760&l,d=l<<16|65535&u;for(o[0]^=u,o[1]^=f,o[2]^=l,o[3]^=d,o[4]^=u,o[5]^=f,o[6]^=l,o[7]^=d,n=0;n<4;n++)c.call(this)}},_doProcessBlock:function(e,t){var n=this._X;c.call(this),o[0]=n[0]^n[5]>>>16^n[3]<<16,o[1]=n[2]^n[7]>>>16^n[5]<<16,o[2]=n[4]^n[1]>>>16^n[7]<<16,o[3]=n[6]^n[3]>>>16^n[1]<<16;for(var i=0;i<4;i++)o[i]=16711935&(o[i]<<8|o[i]>>>24)|4278255360&(o[i]<<24|o[i]>>>8),e[t+i]^=o[i]},blockSize:4,ivSize:2});function c(){for(var e=this._X,t=this._C,n=0;n<8;n++)r[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0,n=0;n<8;n++){var i=e[n]+t[n],o=65535&i,s=i>>>16,c=((o*o>>>17)+o*s>>>15)+s*s,u=((4294901760&i)*i|0)+((65535&i)*i|0);a[n]=c^u}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}e.Rabbit=t._createHelper(s)}(),n.Rabbit)})),ui((function(e,t){var n;e.exports=(n=Uf,function(){var e=n,t=e.lib.StreamCipher,i=e.algo,o=[],r=[],a=[],s=i.RabbitLegacy=t.extend({_doReset:function(){var e=this._key.words,t=this.cfg.iv,n=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],i=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(var o=0;o<4;o++)c.call(this);for(o=0;o<8;o++)i[o]^=n[o+4&7];if(t){var r=t.words,a=r[0],s=r[1],u=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),l=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),f=u>>>16|4294901760&l,d=l<<16|65535&u;for(i[0]^=u,i[1]^=f,i[2]^=l,i[3]^=d,i[4]^=u,i[5]^=f,i[6]^=l,i[7]^=d,o=0;o<4;o++)c.call(this)}},_doProcessBlock:function(e,t){var n=this._X;c.call(this),o[0]=n[0]^n[5]>>>16^n[3]<<16,o[1]=n[2]^n[7]>>>16^n[5]<<16,o[2]=n[4]^n[1]>>>16^n[7]<<16,o[3]=n[6]^n[3]>>>16^n[1]<<16;for(var i=0;i<4;i++)o[i]=16711935&(o[i]<<8|o[i]>>>24)|4278255360&(o[i]<<24|o[i]>>>8),e[t+i]^=o[i]},blockSize:4,ivSize:2});function c(){for(var e=this._X,t=this._C,n=0;n<8;n++)r[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0,n=0;n<8;n++){var i=e[n]+t[n],o=65535&i,s=i>>>16,c=((o*o>>>17)+o*s>>>15)+s*s,u=((4294901760&i)*i|0)+((65535&i)*i|0);a[n]=c^u}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}e.RabbitLegacy=t._createHelper(s)}(),n.RabbitLegacy)})),ui((function(e,t){e.exports=Uf}))),Lf=function(e){z(n,e);var t=I(n);function n(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"WebStorageWrapper",o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:es.sessionStorage;return H(this,n),(e=t.call(this,i,!1))._decrypt=function(t,n,i){Ku.info("[".concat(e.name,"]: _decrypt"));var o=null;if(n||i){var r="".concat(null!=n?n:"","_").concat(null!=i?i:"");try{var a=jf.AES.decrypt(t,r).toString(jf.enc.Utf8),s=JSON.parse(a);(null==s?void 0:s.data)&&"number"==typeof(null==s?void 0:s.timestamp)&&(o=s)}catch(t){Ku.info("[".concat(e.name,"]: _decrypt - ").concat(t.message),t)}}return Ku.info("[".concat(e.name,"]: _decrypt - finish"),o),o},e._encrypt=function(t,n,i){Ku.info("[".concat(e.name,"]: _encrypt"));var o="";if(n||i){var r="".concat(null!=n?n:"","_").concat(null!=i?i:"");o=jf.AES.encrypt(JSON.stringify(t),r).toString()}return o},e._encryptConsentStorage=function(t){var n,i,o,r,a;return C(n={consentEntityValidationMap:t.consentEntityValidationMap},rs.BOTH_CONSENT,e._encrypt(t[rs.BOTH_CONSENT],null!=(i=e._did)?i:"",null!=(o=e._uid)?o:"")),C(n,rs.DEVICE_CONSENT,e._encrypt(t[rs.DEVICE_CONSENT],null!=(r=e._did)?r:"","")),C(n,rs.USER_CONSENT,e._encrypt(t[rs.USER_CONSENT],"",null!=(a=e._uid)?a:"")),n},e._updateUserInfo=function(t,n){e._did=t,e._uid=n},e._setConsentWebStorage=function(t){var n=e._encryptConsentStorage(t);window[e._storageName].setItem($a,JSON.stringify(n))},e.insertConsentData=function(t,n,i){Ku.info("[".concat(e.name,"]: insertConsentData"),{data:t,timestamp:n,userInfo:i});try{var o=e.insertDataIntoStore(t,n,i);e._setConsentWebStorage(o)}catch(t){throw Ku.error("[".concat(e.name,"]: insertConsentData - ").concat(t.message),t),t}},e.insertNotificationData=function(t,n,i){Ku.info("[".concat(e.name,"]: insertNotificationData"),{data:t,timestamp:n,userInfo:i});try{var o=e.getNotificationStore(i);e.insertDataByStorageName(o,rs.NOTIFICATION,t,n),window[e._storageName].setItem(Ja,JSON.stringify(o))}catch(t){throw Ku.error("[".concat(e.name,"]: insertNotificationData - ").concat(t.message),t),t}},e.getConsentStore=function(t){var n,i,o,r=null!=t?t:{},a=r.device_id,s=void 0===a?"":a,c=r.user_id,u=void 0===c?"":c,l={},f=tf(Of),d=tf(Of),h=tf(Of);try{var p=null!=(i=window[e._storageName].getItem($a))?i:"{}",g=null!=(o=JSON.parse(p))?o:{};l=g.consentEntityValidationMap,h=e._retrieveConsentData(g,rs.BOTH_CONSENT,s,u),d=e._retrieveConsentData(g,rs.USER_CONSENT,"",u),f=e._retrieveConsentData(g,rs.DEVICE_CONSENT,s,""),e._updateUserInfo(s,u)}catch(t){Ku.error("[".concat(e.name,"]: getConsentStore - ").concat(t.message),t)}var v=(C(n={consentEntityValidationMap:l},rs.DEVICE_CONSENT,f),C(n,rs.USER_CONSENT,d),C(n,rs.BOTH_CONSENT,h),n);return e._setConsentWebStorage(v),v},e.getNotificationStore=function(t){var n,i,o=tf(Of);try{var r=null!=(n=window[e._storageName].getItem(Ja))?n:"{}";o=null!=(i=JSON.parse(r))?i:{}}catch(t){Ku.error("[".concat(e.name,"]: getNotificationStore - ").concat(t.message),t)}return C({},rs.NOTIFICATION,o)},e.cleanConsentData=function(){window[e._storageName].removeItem($a)},e.cleanNotificationData=function(){window[e._storageName].removeItem(Ja)},e.clean=function(){window[e._storageName].removeItem($a),window[e._storageName].removeItem(Ja)},e.destruct=function(){e.clean()},e._storageName=o,e}return $(n,[{key:"_retrieveConsentData",value:function(e,t,n,i){var o=!1,r=tf(Of);switch(t){case rs.BOTH_CONSENT:o=n===this._did&&i===this._uid;break;case rs.USER_CONSENT:o=i===this._uid;break;case rs.DEVICE_CONSENT:o=n===this._did}if(o){var a=this._decrypt(e[t],n,i);if(a)return a}return r}}]),n}(zf),Vf=function(e){z(n,e);var t=I(n);function n(){return H(this,n),t.call(this,"LocalStorageWrapper",es.localStorage)}return $(n)}(Lf),Ff=function(e){z(n,e);var t=I(n);function n(){return H(this,n),t.call(this,"SessionStorageWrapper",es.sessionStorage)}return $(n)}(Lf),Kf=(C(r={},es.inMem,Nf),C(r,es.localStorage,Vf),C(r,es.sessionStorage,Ff),r),Hf=function(){function e(){return H(this,e),e._instance||(e._instance=this),e._instance}return $(e,[{key:"init",value:function(e){Ku.info("[StorageModule]: init");var t=(null!=e?e:{}).storageType,n=void 0===t?es.sessionStorage:t;n&&(Object.values(es).includes(n)||Ku.error("[StorageModule]: init - Invalid Storage Type ".concat(n),{storageType:n}),this._setupStorage(n))}},{key:"getRecord",value:function(e,t){return Ku.info("[StorageModule]: getRecord",{key:e}),this._store.getRecord(e,t)}},{key:"getRecords",value:function(e,t){return Ku.info("[StorageModule]: getRecords",{keys:e}),this._store.getRecords(e,t)}},{key:"getEntity",value:function(e,t){return Ku.info("[StorageModule]: getEntity",{key:e}),this._store.getEntity(e,t)}},{key:"getEntities",value:function(e,t){return Ku.info("[StorageModule]: getEntities",{keys:e}),this._store.getEntities(e,t)}},{key:"insertConsentData",value:function(e,t,n){Ku.info("[StorageModule]: insertConsentData",{data:e,timestamp:t});try{this._inMemStore.insertConsentData(e,t,n),this._store.insertConsentData(e,t,n)}catch(e){e instanceof DOMException&&"QuotaExceededError"===e.name?Ku.error("[StorageModule]: insertConsentData - Storage limit exceeded, switch to in mem storage",e):Ku.error("[StorageModule]: insertConsentData - Error",e),this._store.destruct(),this._store=this._inMemStore}}},{key:"insertNotificationData",value:function(e,t,n){Ku.info("[StorageModule]: insertNotificationData",{data:e,timestamp:t});try{this._inMemStore.insertNotificationData(e,t,n),this._store.insertNotificationData(e,t,n)}catch(e){e instanceof DOMException&&"QuotaExceededError"===e.name?Ku.error("[StorageModule]: insertNotificationData - Storage limit exceeded, switch to in mem storage",e):Ku.error("[StorageModule]: insertNotificationData - Error",e),this._store.destruct(),this._store=this._inMemStore}}},{key:"_checkStorage",value:function(e){return Ku.info("[StorageModule]: checkStorage",{storageType:e}),e===es.inMem||!("undefined"==typeof window||!window[e])}},{key:"_setupStorage",value:function(e){if(Ku.info("[StorageModule]: setupStorage",{storageType:e}),this._inMemStore=new Nf,e&&this._checkStorage(e)){var t=Kf[e];this._store=new t}else this._checkStorage(es.sessionStorage)?this._store=new Ff:this._checkStorage(es.localStorage)?this._store=new Vf:this._store=this._inMemStore}},{key:"clean",value:function(){Ku.info("[StorageModule]: clean"),this._store&&this._store.clean(),this._inMemStore&&this._inMemStore.clean()}},{key:"destruct",value:function(){Ku.info("[StorageModule]: destruct"),this.clean()}}]),e}(),qf=new Hf,$f=function(){function e(){H(this,e),this.userInfo={}}return $(e,[{key:"init",value:function(e){Ku.info("[BaseInfoModule]: init")}},{key:"getUserInfo",value:function(){return Ku.info("[BaseInfoModule]: getUserInfo"),this.userInfo}},{key:"setUserInfo",value:function(e){Ku.info("[BaseInfoModule]: setUserInfo"),this.userInfo=e}},{key:"fetchUserInfo",value:function(){return Ku.info("[BaseInfoModule]: fetchUserInfo"),Promise.resolve({})}}]),e}(),Jf=function(){function e(){H(this,e)}return $(e,[{key:"getName",value:function(){return this.constructor.name}},{key:"getLifeCycleEvents",value:function(){var e=this;return Object.values(Qa).filter((function(t){return"function"==typeof(null==e?void 0:e[t])}))}}]),e}(),Wf=Object.defineProperty,Xf=Object.getOwnPropertySymbols,Yf=Object.prototype.hasOwnProperty,Zf=Object.prototype.propertyIsEnumerable,Qf=function(e,t,n){return t in e?Wf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},ed=function(e,t){for(var n in t||(t={}))Yf.call(t,n)&&Qf(e,n,t[n]);if(Xf){var i,o=V(Xf(t));try{for(o.s();!(i=o.n()).done;){n=i.value;Zf.call(t,n)&&Qf(e,n,t[n])}}catch(e){o.e(e)}finally{o.f()}}return e},td=function(e,t){var n={};for(var i in e)Yf.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&Xf){var o,r=V(Xf(e));try{for(r.s();!(o=r.n()).done;){i=o.value;t.indexOf(i)<0&&Zf.call(e,i)&&(n[i]=e[i])}}catch(e){r.e(e)}finally{r.f()}}return n},nd=Object.keys(Qa).reduce((function(e,t){return e[Qa[t]]={},e}),{}),id=function(e){z(n,e);var t=I(n);function n(){var e;return H(this,n),(e=t.apply(this,arguments)).addEventListener=function(t,n,i){var o,r;Ku.info("[DefaultEventPlugin]: addEventListener"),(null==(r=null==(o=e._registeredCallbackMap)?void 0:o[t])?void 0:r[n])?Ku.error("[DefaultEventPlugin]: addEventListener - id for this event callback has been used"):e._registeredCallbackMap[t][n]=i},e.removeEventListener=function(t,n){var i,o;Ku.info("[DefaultEventPlugin]: removeEventListener"),(null==(o=null==(i=e._registeredCallbackMap)?void 0:i[t])?void 0:o[n])&&delete e._registeredCallbackMap[t][n]},e[nf]=function(t){Ku.info("[DefaultEventPlugin]: ".concat(Qa.beforeFetchUserInfo)),e._triggerEvent(Qa.beforeFetchUserInfo,t)},e[of]=function(t){Ku.info("[DefaultEventPlugin]: ".concat(Qa.afterFetchUserInfo)),e._triggerEvent(Qa.afterFetchUserInfo,t)},e[rf]=function(t){Ku.info("[DefaultEventPlugin]: ".concat(Qa.beforeFetchConsentData)),e._triggerEvent(Qa.beforeFetchConsentData,t)},e[af]=function(t){Ku.info("[DefaultEventPlugin]: ".concat(Qa.afterFetchConsentData)),e._triggerEvent(Qa.afterFetchConsentData,t)},e[sf]=function(t){Ku.info("[DefaultEventPlugin]: ".concat(Qa.beforeFetchNotificationData)),e._triggerEvent(Qa.beforeFetchNotificationData,t)},e[cf]=function(t){Ku.info("[DefaultEventPlugin]: ".concat(Qa.afterFetchNotificationData)),e._triggerEvent(Qa.afterFetchNotificationData,t)},e[uf]=function(t){Ku.info("[DefaultEventPlugin]: ".concat(Qa.beforeUpdateRecords)),e._triggerEvent(Qa.beforeUpdateRecords,t)},e[lf]=function(t){Ku.info("[DefaultEventPlugin]: ".concat(Qa.afterUpdateRecords)),e._triggerEvent(Qa.afterUpdateRecords,t)},e[ff]=function(t){Ku.info("[DefaultEventPlugin]: ".concat(Qa.beforeNotify)),e._triggerEvent(Qa.beforeNotify,t)},e[df]=function(t){Ku.info("[DefaultEventPlugin]: ".concat(Qa.afterNotify)),e._triggerEvent(Qa.afterNotify,t)},e[hf]=function(t){Ku.info("[DefaultEventPlugin]: ".concat(Qa.beforeRemoveNotification)),e._triggerEvent(Qa.beforeRemoveNotification,t)},e[pf]=function(t){Ku.info("[DefaultEventPlugin]: ".concat(Qa.afterRemoveNotification)),e._triggerEvent(Qa.afterRemoveNotification,t)},e[gf]=function(t){Ku.info("[DefaultEventPlugin]: ".concat(Qa.beforeThirdPartyApprove)),e._triggerEvent(Qa.beforeThirdPartyApprove,t)},e[vf]=function(t){Ku.info("[DefaultEventPlugin]: ".concat(Qa.afterThirdPartyApprove)),e._triggerEvent(Qa.afterThirdPartyApprove,t)},e[mf]=function(t){Ku.info("[DefaultEventPlugin]: ".concat(Qa.beforeThirdPartyReject)),e._triggerEvent(Qa.beforeThirdPartyReject,t)},e[_f]=function(t){Ku.info("[DefaultEventPlugin]: ".concat(Qa.afterThirdPartyReject)),e._triggerEvent(Qa.afterThirdPartyReject,t)},e.destruct=function(){Object.keys(Qa).forEach((function(t){var n=Qa[t];Object.keys(e._registeredCallbackMap[n]).forEach((function(t){delete e._registeredCallbackMap[n][t]})),e._registeredCallbackMap[n]={}}))},e}return $(n,[{key:"init",value:function(){this._registeredCallbackMap=tf(nd)}},{key:"_triggerEvent",value:function(e,t){return n=this,i=null,o=R().mark((function n(){var i;return R().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return Ku.info("[DefaultEventPlugin]: triggerEvent"),i=[],Object.values(this._registeredCallbackMap[e]).forEach((function(e){if("function"==typeof e){var n=t,o=n.plugin,r=td(n,["plugin"]);i.push(e(ed({plugin:o},tf(r))))}})),n.prev=3,n.next=6,Promise.all(i);case 6:n.next=11;break;case 8:n.prev=8,n.t0=n.catch(3),Ku.warn("[DefaultEventPlugin]: plugin callback error",n.t0);case 11:case"end":return n.stop()}}),n,this,[[3,8]])})),new Promise((function(e,t){var r=function(e){try{s(o.next(e))}catch(e){t(e)}},a=function(e){try{s(o.throw(e))}catch(e){t(e)}},s=function(t){return t.done?e(t.value):Promise.resolve(t.value).then(r,a)};s((o=o.apply(n,i)).next())}));var n,i,o}}]),n}(Jf);nf=Qa.beforeFetchUserInfo,of=Qa.afterFetchUserInfo,rf=Qa.beforeFetchConsentData,af=Qa.afterFetchConsentData,sf=Qa.beforeFetchNotificationData,cf=Qa.afterFetchNotificationData,uf=Qa.beforeUpdateRecords,lf=Qa.afterUpdateRecords,ff=Qa.beforeNotify,df=Qa.afterNotify,hf=Qa.beforeRemoveNotification,pf=Qa.afterRemoveNotification,gf=Qa.beforeThirdPartyApprove,vf=Qa.afterThirdPartyApprove,mf=Qa.beforeThirdPartyReject,_f=Qa.afterThirdPartyReject;var od=id;var rd=function(e,t,n){var i=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var r=Array(o);++i3){var t=e.length-1;return".".concat(e.slice(-t).join("."))}return".".concat(e.slice(-2).join("."))}function eh(){ht.remove(st,{domain:Qd()}),ht.remove(st),ht.remove(st,{domain:window.location.hostname})}function th(e){return e?"1":"0"}var nh=function(){function e(){H(this,e),this.isRequestInflight=!1,this.pendingTasks=[],this.entityKeys={}}return $(e,[{key:"getSettings",value:function(){var e,t;return(null===(t=null===(e=this.value)||void 0===e?void 0:e.settings)||void 0===t?void 0:t.length)?this.value.settings:(console.error("`CookieConfigManager.getSettings` returned undefined."),[])}},{key:"getSettingItemKeys",value:function(e,t){var n=Object.keys(e||{});return n.length?n:(null==t?void 0:t.length)?t.map((function(e){return e.entityKey})):[]}},{key:"getCategoryConsents",value:function(e){var t=e.groupName,n=e.value,i=this.getSettings().find((function(e){return e.groupName===t}));return i?this.getSettingItemKeys(i.items,i.groupEntityKeys).reduce((function(e,t){return e[t]=n,e}),{}):(console.error("`CookieConfigManager.getCategoryConsents` returned category undefined."),{})}},{key:"setFullConsents",value:function(){var e=this.getFullConsents();return this.setCookieConsents(e)}},{key:"getFullConsents",value:function(){var e=this,t=this.getSettings(),n={};return t.forEach((function(t){var i=e.getCategoryConsents({groupName:t.groupName,value:!0});n=S(S({},n),i)})),n}},{key:"setEmptyConsents",value:function(){var e=this.getEmptyConsents();return this.setCookieConsents(e)}},{key:"getEmptyConsents",value:function(){var e=this,t=this.getSettings(),n={};return t.forEach((function(t){var i=e.getCategoryConsents({groupName:t.groupName,value:!1});n=S(S({},n),i)})),n}},{key:"setCookieConsents",value:function(e){var t,n=this.getSettings();if(!n.length)return{};n.forEach((function(t){for(var n=0,i=Object.keys(t.items);nNumber(o[1]):e!==t}((null===(t=this.value)||void 0===t?void 0:t.version)||"",i))}},{key:"setCookieConfig",value:function(e){var t=e.entityKeys,n=E(e,y);this.value=n,this.entityKeys=t||{}}}]),e}(),ih=new nh;function oh(e,t){var n,i,o,r,a;try{r=null===(n=document.getElementById(e))||void 0===n?void 0:n.textContent;var s=JSON.parse(r),c=s.i18n,u=void 0===c?{}:c,l=s.appProps,f=(l=void 0===l?{}:l).region,d=void 0===f?"":f,h=l.user,p=(h=void 0===h?{}:h).ftcUser,g=void 0!==p&&p,v=l.idcRegion,m=void 0===v?"":v,_=s.cookieBanner,y=(_=void 0===_?{}:_).disabled,b=void 0!==y&&y,k=_.isEffective,E=void 0!==k&&k,w=_.settings,C=void 0===w?{}:w,x=_.version,A=void 0===x?"":x,T=_.disabledAccessKeys,D=void 0===T?[]:T,R=_.resource,O=void 0===R?{}:R,M=s.consent,z=s.consentApiDomain,I=s.customTheme,P=void 0===I?[]:I;return function(e){if(!qn&&Hn){qn=!0;var t=null!=e?e:ft;Hn.init(S({app_id:345918,log:!1},t)),Hn.start()}}(s.tea),ih.setCookieConfig({settings:C,version:A,entityKeys:M.entityKeys}),a={locale:t,region:d,js_version:null!==(i=null==O?void 0:O.version)&&void 0!==i?i:"default"},qn&&Hn&&Hn.config({evtParams:a}),{region:d,isFTC:g,i18n:u,disabled:b,isEffective:E,consent:M,disabledAccessKeys:D,consentApiDomain:z,customTheme:P.join(";")||"",idcRegion:m,disableTea:null===(o=null==O?void 0:O.esm)||void 0===o?void 0:o.includes("no-tea")}}catch(e){return console.error(e),null}} /** * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: BSD-3-Clause */var rh=function e(t,n){var i,o,r=t._$AN;if(void 0===r)return!1;var a,s=V(r);try{for(s.s();!(a=s.n()).done;){var c=a.value;null===(o=(i=c)._$AO)||void 0===o||o.call(i,n,!1),e(c,n)}}catch(e){s.e(e)}finally{s.f()}return!0},ah=function(e){var t,n;do{if(void 0===(t=e._$AM))break;(n=t._$AN).delete(e),e=t}while(0===(null==n?void 0:n.size))},sh=function(e){for(var t;t=e._$AM;e=t){var n=t._$AN;if(void 0===n)t._$AN=n=new Set;else if(n.has(e))break;n.add(e),lh(t)}}; /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */function ch(e){void 0!==this._$AN?(ah(this),this._$AM=e,sh(this)):this._$AM=e}function uh(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=this._$AH,o=this._$AN;if(void 0!==o&&0!==o.size)if(t)if(Array.isArray(i))for(var r=n;r1&&void 0!==arguments[1])||arguments[1];e!==this.isConnected&&(this.isConnected=e,e?null===(t=this.reconnected)||void 0===t||t.call(this):null===(n=this.disconnected)||void 0===n||n.call(this)),i&&(rh(this,e),ah(this))}},{key:"setValue",value:function(e){if(function(e){return void 0===e.strings}(this._$Ct))this._$Ct._$AI(e,this);else{var t=D(this._$Ct._$AH);t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}},{key:"disconnected",value:function(){}},{key:"reconnected",value:function(){}}]),n}(tt),dh=function(){return new hh},hh=$((function e(){H(this,e)})),ph=new WeakMap,gh=et(function(e){z(n,e);var t=I(n);function n(){return H(this,n),t.apply(this,arguments)}return $(n,[{key:"render",value:function(e){return ze}},{key:"update",value:function(e,t){var n,i=T(t,1)[0],o=i!==this.Y;return o&&void 0!==this.Y&&this.rt(void 0),(o||this.lt!==this.dt)&&(this.Y=i,this.ct=null===(n=e.options)||void 0===n?void 0:n.host,this.rt(this.dt=e.element)),ze}},{key:"rt",value:function(e){var t;if("function"==typeof this.Y){var n=null!==(t=this.ct)&&void 0!==t?t:globalThis,i=ph.get(n);void 0===i&&(i=new WeakMap,ph.set(n,i)),void 0!==i.get(this.Y)&&this.Y.call(this.ct,void 0),i.set(this.Y,e),void 0!==e&&this.Y.call(this.ct,e)}else this.Y.value=e}},{key:"lt",get:function(){var e,t,n;return"function"==typeof this.Y?null===(t=ph.get(null!==(e=this.ct)&&void 0!==e?e:globalThis))||void 0===t?void 0:t.get(this.Y):null===(n=this.Y)||void 0===n?void 0:n.value}},{key:"disconnected",value:function(){this.lt===this.dt&&this.rt(void 0)}},{key:"reconnected",value:function(){this.rt(this.dt)}}]),n}(fh)),vh=[],mh=[];function _h(e,t){if(e&&"undefined"!=typeof document){var n,i=!0===t.prepend?"prepend":"append",o=!0===t.singleTag,r="string"==typeof t.container?document.querySelector(t.container):document.getElementsByTagName("head")[0];if(o){var a=vh.indexOf(r);-1===a&&(a=vh.push(r)-1,mh[a]={}),n=mh[a]&&mh[a][i]?mh[a][i]:mh[a][i]=s()}else n=s();65279===e.charCodeAt(0)&&(e=e.substring(1)),n.styleSheet?n.styleSheet.cssText+=e:n.appendChild(document.createTextNode(e))}function s(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),t.attributes)for(var n=Object.keys(t.attributes),o=0;o',""])),gh(this.wrapperRef),nt({"cookie-banner-toast":!0,show:this.visible}),this.text)}}]),n}(We);function Eh(e){if(bh)bh.setAttribute("text",e),bh.setAttribute("text-id",Date.now().toString(36));else{(bh=document.createElement("tiktok-cookie-banner-toast")).setAttribute("text",e),bh.setAttribute("text-id",Date.now().toString(36));bh.addEventListener("fadeOutComplete",(function e(){bh&&(bh.removeEventListener("fadeOutComplete",e),document.body.removeChild(bh),bh=null)})),document.body.appendChild(bh)}}kh.styles=ie(yh),W([ot()],kh.prototype,"text",void 0),W([ot({attribute:"text-id"})],kh.prototype,"textId",void 0),W([rt()],kh.prototype,"visible",void 0),kh=W([it("tiktok-cookie-banner-toast")],kh);var wh='.tiktok-cookie-banner {\n font-family: "tiktok-text-regular", PingFangSC, sans-serif;\n font-weight: 400;\n font-size: 18px;\n line-height: 130%;\n letter-spacing: -0.16%;\n position: fixed;\n left: 0;\n bottom: 0;\n right: 0;\n background: var(--banner-background-color--, #10a2c5);\n z-index: 10001;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n color: #fff;\n padding: 24px 64px 32px;\n box-sizing: border-box;\n box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);\n -moz-text-size-adjust: 100%;\n text-size-adjust: 100%;\n -webkit-text-size-adjust: 100%;\n -ms-text-size-adjust: 100%;\n -webkit-font-smoothing: antialiased;\n}\n.tiktok-cookie-banner .cookie-content .cookie-title {\n font-family: "tiktok-display-bold", PingFangSC, sans-serif;\n font-weight: 700;\n font-size: 24px;\n line-height: 125%;\n letter-spacing: 1%;\n margin-top: 0;\n margin-bottom: 0;\n color: var(--banner-title-color--, #fff);\n}\n.tiktok-cookie-banner .cookie-content .cookie-desc {\n font-family: "tiktok-text-regular", PingFangSC, sans-serif;\n font-weight: 400;\n font-size: 16px;\n line-height: 130%;\n letter-spacing: 0.19%;\n margin-top: 8px;\n margin-bottom: 0;\n color: var(--banner-desc-color--, #fff);\n}\n.tiktok-cookie-banner .cookie-content .cookie-desc a {\n font-family: "tiktok-text-medium", PingFangSC, sans-serif;\n font-weight: 600;\n font-size: 16px;\n line-height: 130%;\n letter-spacing: 0.19%;\n text-decoration: none;\n color: var(--banner-link-color--, #fff);\n}\n.tiktok-cookie-banner .cookie-content .cookie-desc a:hover {\n text-decoration: underline;\n color: var(--banner-link-hover-color--, #fff);\n}\n.tiktok-cookie-banner .button-wrapper {\n display: flex;\n margin-left: 64px;\n}\n.tiktok-cookie-banner .button-wrapper a,\n.tiktok-cookie-banner .button-wrapper button {\n font-family: "tiktok-text-bold", PingFangSC, sans-serif;\n font-weight: 700;\n font-size: 16px;\n line-height: 130%;\n letter-spacing: 0.19%;\n box-sizing: border-box;\n padding: 0 24px;\n height: 46px;\n min-width: 153px;\n white-space: nowrap;\n border-radius: 4px;\n border: 1px solid rgba(22, 24, 35, 0.12);\n display: flex;\n justify-content: center;\n align-items: center;\n text-align: center;\n cursor: pointer;\n background: #fff;\n color: #161823;\n outline: none;\n text-decoration: none;\n border: 1px solid rgba(22, 24, 35, 0.12);\n}\n.tiktok-cookie-banner .button-wrapper a:hover,\n.tiktok-cookie-banner .button-wrapper button:hover {\n background: #f8f8f8;\n}\n.tiktok-cookie-banner .button-wrapper button {\n margin-left: 16px;\n background: var(--banner-button-background-color--, #fff);\n color: var(--banner-button-text-color--, #161823);\n}\n.tiktok-cookie-banner .button-wrapper button:hover {\n background: var(--banner-button-hover-background-color--, #f8f8f8);\n}\n@media (min-width: 768px) and (max-width: 1200px) {\n .tiktok-cookie-banner .special-button-wrapper button {\n height: auto;\n min-height: 44px;\n white-space: pre-wrap;\n }\n}\n.tiktok-cookie-banner.is-rtl {\n direction: rtl;\n}\n.tiktok-cookie-banner.is-rtl .button-wrapper {\n margin-left: unset;\n margin-right: 64px;\n}\n.tiktok-cookie-banner.is-rtl .button-wrapper button {\n margin-left: unset;\n margin-right: 16px;\n}\n@media (max-width: 991px) {\n .tiktok-cookie-banner.is-rtl .button-wrapper button {\n margin-right: 8px;\n }\n}\n@media (max-width: 991px) {\n .tiktok-cookie-banner {\n flex-direction: column;\n height: auto;\n padding: 16px 16px 20px;\n box-shadow: none;\n }\n .tiktok-cookie-banner .cookie-content .cookie-title {\n font-family: "tiktok-text-bold", PingFangSC, sans-serif;\n font-weight: 700;\n font-size: 16px;\n line-height: 130%;\n letter-spacing: 0.19%;\n text-align: center;\n color: var(--banner-title-color--, #fff);\n }\n .tiktok-cookie-banner .cookie-content .cookie-desc {\n font-family: "tiktok-text-regular", PingFangSC, sans-serif;\n font-weight: 400;\n font-size: 12px;\n line-height: 130%;\n letter-spacing: 1.34%;\n width: auto;\n text-align: center;\n color: var(--banner-desc-color--, #fff);\n }\n .tiktok-cookie-banner .cookie-content .cookie-desc a {\n font-family: "tiktok-text-medium", PingFangSC, sans-serif;\n font-weight: 600;\n font-size: 12px;\n line-height: 130%;\n letter-spacing: 1.34%;\n text-decoration: none;\n color: var(--banner-link-color--, #fff);\n }\n .tiktok-cookie-banner .cookie-content .cookie-desc a:hover {\n text-decoration: underline;\n color: var(--banner-link-hover-color--, #fff);\n }\n .tiktok-cookie-banner .button-wrapper {\n align-self: flex-end;\n margin-top: 16px;\n margin-left: 0;\n margin-right: 0;\n width: 100%;\n }\n .tiktok-cookie-banner .button-wrapper a,\n .tiktok-cookie-banner .button-wrapper button {\n font-family: "tiktok-text-medium", PingFangSC, sans-serif;\n font-weight: 600;\n font-size: 15px;\n line-height: 130%;\n letter-spacing: 0.4%;\n min-width: unset;\n padding: 0 6px;\n width: 100%;\n height: 44px;\n border-radius: 2px;\n white-space: pre-wrap;\n margin: 0;\n }\n .tiktok-cookie-banner .button-wrapper button {\n margin-left: 8px;\n height: auto;\n min-height: 44px;\n }\n}';_h(wh,{}); /** * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ var Sh=et(function(e){z(n,e);var t=I(n);function n(e){var i,o;if(H(this,n),i=t.call(this,e),e.type!==Ze||"style"!==e.name||(null===(o=e.strings)||void 0===o?void 0:o.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.");return P(i)}return $(n,[{key:"render",value:function(e){return Object.keys(e).reduce((function(t,n){var i=e[n];return null==i?t:t+"".concat(n=n.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase(),":").concat(i,";")}),"")}},{key:"update",value:function(e,t){var n=this,i=T(t,1)[0],o=e.element.style;if(void 0===this.vt){for(var r in this.vt=new Set,i)this.vt.add(r);return this.render(i)}for(var a in this.vt.forEach((function(e){null==i[e]&&(n.vt.delete(e),e.includes("-")?o.removeProperty(e):o[e]="")})),i){var s=i[a];null!=s&&(this.vt.add(a),a.includes("-")?o.setProperty(a,s):o[a]=s)}return Me}}]),n}(tt)),Ch=':root body.disable-scroll {\n overflow: hidden;\n}\n\n.tiktok-cookie-setting-portal {\n font-family: "tiktok-text-regular", PingFangSC, sans-serif;\n font-weight: 400;\n font-size: 14px;\n line-height: 130%;\n letter-spacing: 0.67%;\n position: fixed;\n left: 0;\n top: 0;\n width: 0;\n height: 0;\n color: rgb(22, 24, 35);\n -webkit-font-smoothing: antialiased;\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-backdrop {\n background-color: rgba(0, 0, 0, 0.5);\n transition: opacity 300ms linear;\n opacity: 0;\n position: fixed;\n inset: 0;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-backdrop.visible {\n opacity: 1;\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-modal-container {\n position: fixed;\n inset: 0;\n left: 0;\n top: 32px;\n bottom: 32px;\n left: 16px;\n right: 16px;\n display: flex;\n justify-content: center;\n align-items: center;\n opacity: 0;\n transform: scale(0.8);\n transition: opacity 300ms cubic-bezier(0.65, 0, 0.35, 1), transform 300ms cubic-bezier(0.65, 0, 0.35, 1);\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-modal-container.visible {\n opacity: 1;\n transform: scale(1);\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-modal-container .tiktok-cookie-setting-modal {\n position: relative;\n max-width: 700px;\n max-height: 100%;\n background-color: var(--setting-modal-background-color--, #fff);\n border-radius: 8px;\n overflow: hidden;\n box-shadow: rgba(0, 0, 0, 0.12) 0 2px 12px;\n outline: 0;\n display: flex;\n flex-direction: column;\n align-items: stretch;\n}\n@media (max-width: 700px) {\n .tiktok-cookie-setting-portal .tiktok-cookie-setting-modal-container .tiktok-cookie-setting-modal {\n width: calc(100vw - 32px);\n }\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-header-container {\n font-family: "tiktok-display-bold", PingFangSC, sans-serif;\n font-weight: 700;\n font-size: 24px;\n line-height: 125%;\n letter-spacing: 1%;\n padding: 24px 29px 16px 24px;\n color: var(--setting-modal-title-color--, #161823);\n border-bottom: 0.5px solid rgba(22, 24, 35, 0.2);\n display: flex;\n justify-content: space-between;\n align-items: center;\n flex: 0;\n}\n@media (max-width: 468px) {\n .tiktok-cookie-setting-portal .tiktok-cookie-setting-header-container {\n border-bottom: none;\n padding: 32px 24px 24px;\n font-family: "tiktok-display-bold", PingFangSC, sans-serif;\n font-weight: 700;\n font-size: 20px;\n line-height: 125%;\n letter-spacing: 1.5%;\n justify-content: center;\n }\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-modal-close {\n width: 24px;\n height: 24px;\n cursor: pointer;\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-modal-close svg {\n fill: var(--setting-modal-close-icon-color--, rgba(22, 24, 35, 0.6));\n}\n@media (max-width: 468px) {\n .tiktok-cookie-setting-portal .tiktok-cookie-setting-modal-close {\n position: absolute;\n top: 14px;\n right: 14px;\n transform: scale(0.8);\n }\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-modal-description-container {\n background-color: rgba(22, 24, 35, 0.03);\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-modal-description-container .tiktok-cookie-setting-modal-description {\n font-family: "tiktok-text-regular", PingFangSC, sans-serif;\n font-weight: 400;\n font-size: 16px;\n line-height: 130%;\n letter-spacing: 0.19%;\n margin: 20px 24px;\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-content {\n padding: 12px 40px 12px 24px;\n overflow-y: auto;\n flex: 1 1 auto;\n}\n@media (max-width: 700px) {\n .tiktok-cookie-setting-portal .tiktok-cookie-setting-content {\n width: calc(100% - 48px);\n }\n}\n@media (max-width: 468px) {\n .tiktok-cookie-setting-portal .tiktok-cookie-setting-content {\n padding: 6px 16px 0 16px;\n }\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-content::-webkit-scrollbar {\n width: 6px;\n margin-right: 8px;\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-content:hover::-webkit-scrollbar-thumb {\n background: rgba(0, 0, 0, 0.15);\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-content::-webkit-scrollbar-track {\n background: transparent;\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-content::-webkit-scrollbar-thumb {\n border-radius: 3px;\n background: rgba(0, 0, 0, 0.15);\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-content .tiktok-cookie-setting-info-icon {\n margin-left: auto;\n justify-content: flex-end;\n height: 48px;\n cursor: pointer;\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-content .tiktok-cookie-setting-info-icon.hide {\n transform: rotate(180deg);\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-content .tiktok-cookie-setting-info-icon svg {\n width: 14px;\n display: flex;\n justify-content: flex-end;\n align-items: center;\n padding: 17px;\n fill: var(--setting-modal-arrow-icon-color--, #161823);\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-content .tiktok-cookie-vertical-info-icon {\n margin-left: auto;\n margin-right: 20px;\n display: flex;\n justify-content: flex-end;\n align-items: center;\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-content .tiktok-cookie-vendor-group-name {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n font-family: "tiktok-text-medium", PingFangSC, sans-serif;\n font-weight: 600;\n font-size: 16px;\n line-height: 130%;\n letter-spacing: 0.19%;\n margin-top: 0;\n margin-bottom: 0;\n color: var(--setting-modal-text-color--, #161823);\n flex: 1 1 0;\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-content .tiktok-cookie-vendor-group-name .tiktok-cookie-vendor-group-name-outside {\n display: flex;\n align-items: center;\n flex-shrink: 1;\n flex-grow: 1;\n}\n@media (max-width: 468px) {\n .tiktok-cookie-setting-portal .tiktok-cookie-setting-content .tiktok-cookie-vendor-group-name {\n font-family: "tiktok-text-medium", PingFangSC, sans-serif;\n font-weight: 600;\n font-size: 15px;\n line-height: 130%;\n letter-spacing: 0.4%;\n }\n}\n.tiktok-cookie-setting-portal cookie-setting-switch {\n line-height: 0;\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-footer {\n padding: 24px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n border-top: 0.5px solid rgba(22, 24, 35, 0.2);\n flex: 0 0 auto;\n}\n@media (max-width: 468px) {\n .tiktok-cookie-setting-portal .tiktok-cookie-setting-footer {\n border-top: none;\n padding: 20px;\n flex-direction: column-reverse;\n justify-content: center;\n align-items: stretch;\n }\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-footer .tiktok-cookie-setting-footer-btn-text,\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-footer .tiktok-cookie-setting-footer-btn-primary {\n font-family: "tiktok-text-medium", PingFangSC, sans-serif;\n font-weight: 600;\n font-size: 16px;\n line-height: 130%;\n letter-spacing: 0.19%;\n min-width: 100px;\n border-radius: 4px;\n display: flex;\n position: relative;\n align-items: center;\n justify-content: center;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n cursor: pointer;\n box-sizing: border-box;\n height: 36px;\n outline: none;\n border: none;\n text-align: center;\n}\n@media (max-width: 468px) {\n .tiktok-cookie-setting-portal .tiktok-cookie-setting-footer .tiktok-cookie-setting-footer-btn-text,\n .tiktok-cookie-setting-portal .tiktok-cookie-setting-footer .tiktok-cookie-setting-footer-btn-primary {\n height: 44px;\n margin-left: 0;\n border-radius: 2px;\n }\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-footer .tiktok-cookie-setting-footer-btn-text {\n color: #fe2c55;\n background-color: #fff;\n text-decoration: none;\n padding-left: 0;\n padding-right: 0;\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-footer .tiktok-cookie-setting-footer-btn-primary {\n background-color: var(--setting-modal-button-background-color--, rgb(254, 44, 85));\n color: var(--setting-modal-button-text-color--, #fff);\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-footer .tiktok-cookie-setting-footer-btn-primary:hover {\n background: var(--setting-modal-button-hover-background-color--, linear-gradient(0deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.06)), #fe2c55);\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-vendor-group {\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-vendor-group.show-detail {\n margin-bottom: 16px;\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-vendor {\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-vendor .tiktok-cookie-vendor-label-outside {\n display: flex;\n flex-shrink: 1;\n flex-grow: 1;\n color: var(--setting-modal-text-color--, #161823);\n cursor: pointer;\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-vendor .tiktok-cookie-vendor-label-outside .tiktok-cookie-vendor-label {\n margin-left: 16px;\n display: flex;\n align-items: center;\n justify-content: flex-start;\n flex: 1 1 0;\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-manage-tip-context {\n padding: 0;\n margin: 0;\n margin-bottom: 8px;\n padding-left: -16px;\n color: var(--setting-modal-desc-color--, rgba(0, 0, 0, 0.7));\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-manage-tip-context .tiktok-cookie-manage-tip-context-ref {\n text-decoration: none;\n color: var(--setting-modal-link-color--, #fe2c55);\n font-weight: bold;\n text-decoration: none;\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-manage-tip-context .tiktok-cookie-manage-tip-context-ref:hover {\n text-decoration: underline;\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-vendor-context-ref {\n text-decoration: none;\n color: var(--setting-modal-link-color--, #fe2c55);\n font-weight: bold;\n text-decoration: none;\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-vendor-context-ref:hover {\n text-decoration: underline;\n color: var(--setting-modal-link-hover-color--, #fe2c55);\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-vendor-context {\n padding: 0;\n margin-top: 4px;\n margin-bottom: 8px;\n padding-left: 16px;\n color: var(--setting-modal-text-color--, rgba(0, 0, 0, 0.56));\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-vendor-group p,\n.tiktok-cookie-setting-portal .tiktok-cookie-vendor p {\n font-family: "tiktok-text-regular", PingFangSC, sans-serif;\n font-weight: 400;\n font-size: 16px;\n line-height: 130%;\n letter-spacing: 0.19%;\n margin-top: 0;\n margin-bottom: 0;\n}\n@media (max-width: 468px) {\n .tiktok-cookie-setting-portal .tiktok-cookie-vendor-group p,\n .tiktok-cookie-setting-portal .tiktok-cookie-vendor p {\n font-family: "tiktok-text-regular", PingFangSC, sans-serif;\n font-weight: 400;\n font-size: 15px;\n line-height: 130%;\n letter-spacing: 0.4%;\n }\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-desc {\n color: var(--setting-modal-text-color--, rgba(0, 0, 0, 0.56));\n font-family: "tiktok-text-regular", PingFangSC, sans-serif;\n font-weight: 400;\n font-size: 14px;\n line-height: 130%;\n letter-spacing: 0.67%;\n margin-bottom: 24px;\n}\n.tiktok-cookie-setting-portal .cookie-setting-switch {\n line-height: 0;\n padding-left: 36px;\n flex-grow: 0;\n flex-shrink: 0;\n}\n.tiktok-cookie-setting-portal .cookie-setting-switch.checked {\n background-color: var(--setting-modal-switch-toggle-color--, #0be09b);\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-footer-desc {\n font-family: "tiktok-text-medium", PingFangSC, sans-serif;\n font-weight: 600;\n font-size: 16px;\n line-height: 130%;\n letter-spacing: 0.19%;\n padding: 0;\n margin: 0 16px 0 0;\n color: var(--setting-modal-link-color--, #fe2c55);\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-footer-desc a {\n font-family: "tiktok-text-medium", PingFangSC, sans-serif;\n font-weight: 600;\n font-size: 16px;\n line-height: 130%;\n letter-spacing: 0.19%;\n text-decoration: none;\n color: var(--setting-modal-link-color--, #fe2c55);\n}\n.tiktok-cookie-setting-portal .tiktok-cookie-setting-footer-desc a:hover {\n text-decoration: underline;\n color: var(--setting-modal-link-color--, #fe2c55);\n}\n@media (max-width: 468px) {\n .tiktok-cookie-setting-portal .tiktok-cookie-setting-footer-desc {\n margin: 16px 0 0 0;\n text-align: center;\n }\n}\n.tiktok-cookie-setting-portal.is-rtl {\n direction: rtl;\n}\n.tiktok-cookie-setting-portal.is-rtl .tiktok-cookie-setting-content {\n padding: 12px 24px 12px 40px;\n}\n.tiktok-cookie-setting-portal.is-rtl .tiktok-cookie-vertical-info-icon {\n margin-left: 20px;\n margin-right: auto;\n}\n.tiktok-cookie-setting-portal.is-rtl .tiktok-cookie-setting-info-icon {\n margin-right: auto;\n margin-left: 0;\n}\n.tiktok-cookie-setting-portal.is-rtl .tiktok-cookie-vendor .tiktok-cookie-vendor-label-outside .tiktok-cookie-vendor-label {\n margin-left: 0;\n margin-right: 16px;\n}\n.tiktok-cookie-setting-portal.is-rtl .tiktok-cookie-vendor-context {\n padding-left: 0;\n padding-right: 16px;\n}\n.tiktok-cookie-setting-portal.is-rtl .tiktok-cookie-setting-footer-desc {\n margin: 0 0 0 16px;\n}\n@media (max-width: 468px) {\n .tiktok-cookie-setting-portal.is-rtl .tiktok-cookie-setting-footer-desc {\n margin: 16px 0 0 0;\n text-align: center;\n }\n}'; /** * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause */_h(Ch,{});var xh="global_module_disableScroll__472ccca3";_h(":root body.global_module_disableScroll__472ccca3 {\n overflow: hidden;\n}",{});var Ah=".tiktok-cookie-setting-switch {\n box-sizing: border-box;\n display: inline-block;\n border-radius: 12px;\n border: 1px rgba(0, 0, 0, 0) solid;\n position: relative;\n cursor: pointer;\n background-color: var(--setting-modal-switch-toggle-color--, rgba(46, 50, 56, 0.05));\n transition: background-color 200ms ease-in-out;\n width: 40px;\n height: 24px;\n}\n.tiktok-cookie-setting-switch.checked {\n background-color: var(--setting-modal-switch-toggle-checked-color--, #0be09b);\n}\n.tiktok-cookie-setting-switch.checked .tiktok-cookie-setting-switch-knob {\n transform: translateX(18px);\n}\n.tiktok-cookie-setting-switch.disabled {\n opacity: 0.34;\n cursor: not-allowed;\n}\n\n.tiktok-cookie-setting-switch-knob {\n box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.08);\n cursor: pointer;\n border-radius: 9px;\n background-color: #fff;\n box-sizing: border-box;\n position: absolute;\n left: 0;\n right: auto;\n transition: transform 200ms ease-in-out, width 200ms ease-in-out;\n width: 18px;\n height: 18px;\n top: 2px;\n transform: translateX(2px);\n}\n\n.tiktok-cookie-setting-switch-native-control {\n width: 100%;\n height: 100%;\n opacity: 0;\n cursor: inherit;\n pointer-events: auto;\n margin: 0;\n position: absolute;\n top: 0;\n left: 0;\n}";_h(Ah,{});var Th=function(e){z(n,e);var t=I(n);function n(){var e;return H(this,n),(e=t.apply(this,arguments)).value=!1,e.name="",e.disabled=!1,e}return $(n,[{key:"handleCheck",value:function(e){var t=e.target.checked;this.dispatchEvent(new CustomEvent("checkedChange",{detail:t}))}},{key:"render",value:function(){return Oe(s||(s=k(['
'])),nt({"tiktok-cookie-setting-switch":!0,checked:this.value,disabled:this.disabled}),this.value,this.handleCheck,this.value,this.name)}}]),n}(We);Th.styles=ie(Ah),W([ot({converter:function(e){return"true"===e}})],Th.prototype,"value",void 0),W([ot()],Th.prototype,"name",void 0),W([ot({converter:function(e){return"true"===e}})],Th.prototype,"disabled",void 0),Th=W([it("cookie-setting-switch")],Th);var Dh=["touchstart","touchmove","touchend","scroll"],Rh=function(e){z(n,e);var t=I(n);function n(){var e;return H(this,n),(e=t.apply(this,arguments)).zIndex=10002,e.visible=!1,e.settingModalCloseDisabled=!1,e.deferredVisible=!1,e.cookieConsent={},e.customTheme="",e.modalBackdropRef=dh(),e.scrollableListRef=dh(),e}return $(n,[{key:"connectedCallback",value:function(){var e=this;if(x(L(n.prototype),"connectedCallback",this).call(this),this.initUserConfig(),this.userConfig){this.cookieConsent=ih.getCookieConsents(this.userConfig);var t=this.userConfig;Xd({config:t.consent,region:t.region,consentApiDomain:t.consentApiDomain,idcRegion:t.idcRegion,disableTea:t.disableTea})}this.visible&&requestAnimationFrame((function(){return e.deferredVisible=!0}))}},{key:"willUpdate",value:function(e){var t,n=this;if((e.has("userConfigEleId")||e.has("locale"))&&this.initUserConfig(),e.has("visible"))if(this.visible)this.cookieConsent=this.userConfig?ih.getCookieConsents(this.userConfig):{},requestAnimationFrame((function(){return n.deferredVisible=!0})),this.lockScroll(),$n("cookie_setting_show"),this.dispatchEvent(new CustomEvent("customBannerEvents",{detail:{eventName:"onSettingShow"},bubbles:!0,composed:!0}));else{var i=this.modalBackdropRef.value;null==i||i.addEventListener("transitionend",(function e(){null==i||i.removeEventListener("transitionend",e),n.deferredVisible=!1})),this.unlockScroll();var o,r=V(Dh);try{for(r.s();!(o=r.n()).done;){var a=o.value;null===(t=this.scrollableListRef.value)||void 0===t||t.removeEventListener(a,this.stopTouchEventPropagation)}}catch(e){r.e(e)}finally{r.f()}}}},{key:"updated",value:function(e){if(e.has("visible")&&this.visible&&this.scrollableListRef.value){var t,n=V(Dh);try{for(n.s();!(t=n.n()).done;){var i=t.value;this.scrollableListRef.value.addEventListener(i,this.stopTouchEventPropagation)}}catch(e){n.e(e)}finally{n.f()}}}},{key:"stopTouchEventPropagation",value:function(e){e.stopPropagation()}},{key:"lockScroll",value:function(){document.body.classList.add(xh)}},{key:"unlockScroll",value:function(){document.body.classList.remove(xh)}},{key:"initUserConfig",value:function(){var e=oh(this.userConfigEleId,this.locale);e&&(this.userConfig=e,this.customTheme=e.customTheme)}},{key:"handleClose",value:function(){$n("cookie_setting_close"),this.dispatchEvent(new Event("close"))}},{key:"disagreeToAll",value:function(e){var t=e.value,n=e.groupName,i=ih.getCategoryConsents({groupName:n,value:t});this.cookieConsent=S(S({},this.cookieConsent||{}),i),$n("cookie_setting_toggle",{state:t?1:0,type:"category",name:n})}},{key:"disagreeToOne",value:function(e){var t=this.cookieConsent[e];this.cookieConsent=S(S({},this.cookieConsent),{},C({},e,!t)),$n("cookie_setting_toggle",{state:t?0:1,type:"vendor",name:e})}},{key:"handleSave",value:function(){var e=this;ih.setCookieConsents(this.cookieConsent),this.dispatchEvent(new Event("close")),this.dispatchEvent(new CustomEvent("save",{detail:this.cookieConsent})),$n("cookie_setting_save",{result:Object.keys(this.cookieConsent).filter((function(t){return e.cookieConsent[t]})).join(",")})}},{key:"renderVendorDescription",value:function(e){for(var t,n=[],i=new RegExp("\\[([^\\]]+)\\]\\(([^)]+)\\)","g");null!==(t=i.exec(e));){var o=e.slice(0,t.index);o&&n.push({type:"normalText",value:o}),n.push({type:"linkText",value:t[1],ref:t[2]}),e=e.slice(t.index+t[0].length)}return e&&n.push({type:"normalText",value:e}),n.map((function(e){var t,n=e.type,i=e.value,o=e.ref;switch(n){case"normalText":return Oe(c||(c=k(["",""])),i);case"linkText":return Oe(u||(u=k(['',""])),null!=(t=o)?t:ze,i);default:return ze}}))}},{key:"render",value:function(){var e,t,n=this,i=this.locale,o=void 0===i?"en":i,r=null!==(t=null===(e=this.userConfig)||void 0===e?void 0:e.i18n)&&void 0!==t?t:{},a=r.cookieSettingsTitle,s=void 0===a?"":a,c=r.cookieSettingSaveBtn,u=void 0===c?"":c,v=r.cookieSettingsSubTitle,m=void 0===v?"":v,_=r.cookieSettingsFooter,y=void 0===_?"":_;if(!this.deferredVisible&&!this.visible)return ze;var b=ih.getSettings();return Oe(l||(l=k(["
"])),this.customTheme,nt({"tiktok-cookie-setting-portal":!0,"is-rtl":at.includes(o)}),Sh({zIndex:"".concat(this.zIndex)}),gh(this.modalBackdropRef),nt({"tiktok-cookie-setting-backdrop":!0,visible:this.visible&&this.deferredVisible}),nt({"tiktok-cookie-setting-modal-container":!0,visible:this.visible&&this.deferredVisible}),s,this.settingModalCloseDisabled?ze:Oe(f||(f=k([''])),this.handleClose,''),this.renderVendorDescription(m),gh(this.scrollableListRef),b.map((function(e){return Oe(d||(d=k([''," ",""])),e.groupName,ut,!!e.disabled||function(e){var t=e.reduce((function(e,t){return S(S({},e),{},C({},t,n.cookieConsent[t]))}),{});return Object.values(t).every((function(e){return Boolean(e)}))}(ih.getSettingItemKeys(e.items,e.groupEntityKeys)),e.disabled,(function(t){e.disabled||n.disagreeToAll({value:t.detail,groupName:e.groupName})}),Oe(h||(h=k(['"])),e.groupDescription),ih.getSettingItemKeys(e.items).map((function(t){var i,o;return Oe(p||(p=k(['"])),(null===(i=e.items[t])||void 0===i?void 0:i.vendorName)||"",ut,Boolean(n.cookieConsent[t]),e.disabled,(function(){e.disabled||n.disagreeToOne(t)}),Oe(g||(g=k(['"])),n.renderVendorDescription(null===(o=e.items[t])||void 0===o?void 0:o.description)))})))})),y,this.handleSave,u)}}]),n}(We);function Oh(){for(var e=arguments.length,t=new Array(e),n=0;n
','
"])),nt({"tiktok-cookie-banner":!0,"is-rtl":at.includes(n)}),r,this._handleDescClick,s,nt({"button-wrapper":!0,"special-button-wrapper":(null==u?void 0:u.length)>30||(null==f?void 0:f.length)>30}),h?Oe(m||(m=k(['"])),this.openSettingModal,h):ze,this._handleDecline,u,this._handleConfirm,f):ze;return Oe(_||(_=k(["",''])),this.customTheme,p,this.settingVisible,this.settingModalCloseDisabled,this.userConfigEleId,this.locale,(function(){e.settingModalCloseDisabled||(e.settingVisible=!1)}),this._handleSave)}}]),i}(We);Ih.styles=ie(wh),W([ot()],Ih.prototype,"locale",void 0),W([ot({attribute:"user-config-ele-id"})],Ih.prototype,"userConfigEleId",void 0),W([ot({converter:function(e){return"true"===e}})],Ih.prototype,"disabled",void 0),W([ot({attribute:"disabled-access-key"})],Ih.prototype,"disabledAccessKey",void 0),W([rt()],Ih.prototype,"i18n",void 0),W([rt()],Ih.prototype,"userConfig",void 0),W([rt()],Ih.prototype,"cookieConsent",void 0),W([rt()],Ih.prototype,"disabledByPolicy",void 0),W([rt()],Ih.prototype,"settingVisible",void 0),W([rt()],Ih.prototype,"settingModalCloseDisabled",void 0),W([rt()],Ih.prototype,"forceUpdater",void 0),W([rt()],Ih.prototype,"disabledAccessKeyConfig",void 0),W([rt()],Ih.prototype,"customTheme",void 0),Ih=W([it("tiktok-cookie-banner")],Ih)}(this.reactJsxRuntime,this.react); //# sourceMappingURL=default.eu-ttp.esm.js.map