!function(){"use strict";function t(){t=function(){return e};var e={},r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var o=e&&e.prototype instanceof p?e:p,i=Object.create(o.prototype),a=new I(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return T()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=g(a,r);if(c){if(c===s)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=f(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===s)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var s={};function p(){}function h(){}function y(){}var d={};u(d,i,(function(){return this}));var _=Object.getPrototypeOf,v=_&&_(_(S([])));v&&v!==r&&n.call(v,i)&&(d=v);var m=y.prototype=p.prototype=Object.create(d);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function r(o,i,a,c){var u=f(t[o],t,i);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==typeof s&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var o;this._invoke=function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}}function g(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,g(t,e),"throw"===e.method))return s;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var n=f(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,s;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,s):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,s)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function S(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),s}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:S(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),s}},e}function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function r(t,e){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},r(t,e)}function n(){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(t){return!1}}function o(t,e,i){return o=n()?Reflect.construct.bind():function(t,e,n){var o=[null];o.push.apply(o,e);var i=new(Function.bind.apply(t,o));return n&&r(i,n.prototype),i},o.apply(null,arguments)}function i(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return a(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];try{var o=s(),i=o.getPlugin&&o.getPlugin("Monitor")||null;i&&i.error&&"function"==typeof i.error?i.error.call(i,t,e,r,n):p("Monitor")&&h.error.push({event:t,err:e,detail:r,withoutJSB:n})}catch(t){}}(u.INIT_ERROR,t)}}(); !function(){"use strict";function e(){e=function(){return t};var t={},n=Object.prototype,r=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var i=t&&t.prototype instanceof d?t:d,o=Object._ttq_create(i.prototype),a=new O(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return N()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var c=b(a,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var s=l(e,t,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===f)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg)}}}(e,n,a),o}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var f={};function d(){}function h(){}function p(){}var v={};s(v,o,(function(){return this}));var _=Object.getPrototypeOf,g=_&&_(_(S([])));g&&g!==n&&r.call(g,o)&&(v=g);var y=p.prototype=d.prototype=Object._ttq_create(v);function m(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function n(i,o,a,c){var s=l(e[i],e,o);if("throw"!==s.type){var u=s.arg,f=u.value;return f&&"object"==typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,a,c)}),(function(e){n("throw",e,a,c)})):t.resolve(f).then((function(e){u.value=e,a(u)}),(function(e){return n("throw",e,a,c)}))}c(s.arg)}var i;this._invoke=function(e,r){function o(){return new t((function(t,i){n(e,r,t,i)}))}return i=i?i.then(o,o):o()}}function b(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,b(e,t),"throw"===t.method))return f;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var r=l(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,f;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function I(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(I,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),s=r.call(o,"finallyLoc");if(c&&s){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}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),f}},t}function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function n(e,t,n,r,i,o,a){try{var c=e[o](a),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(r,i)}function r(e){return function(){var t=this,r=arguments;return new Promise((function(i,o){var a=e.apply(t,r);function c(e){n(a,i,o,c,s,"next",e)}function s(e){n(a,i,o,c,s,"throw",e)}c(void 0)}))}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw o}}}}var S,N="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};!function(e){!function(t){var n="object"==typeof N?N:"object"==typeof self?self:"object"==typeof this?this:Function("return this;")(),r=i(e);function i(e,t){return function(n,r){"function"!=typeof e[n]&&Object.defineProperty(e,n,{configurable:!0,writable:!0,value:r}),t&&t(n,r)}}void 0===n.Reflect?n.Reflect=e:r=i(n.Reflect,r),function(e){var t=Object.prototype.hasOwnProperty,n="function"==typeof Symbol,r=n&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",i=n&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",o="function"==typeof Object.create,a={__proto__:[]}instanceof Array,c=!o&&!a,s={create:o?function(){return re(Object._ttq_create(null))}:a?function(){return re({__proto__:null})}:function(){return re({})},has:c?function(e,n){return t.call(e,n)}:function(e,t){return t in e},get:c?function(e,n){return t.call(e,n)?e[n]:void 0}:function(e,t){return e[t]}},u=Object.getPrototypeOf(Function),l="object"==typeof process&&process.env&&"true"===process.env.REFLECT_METADATA_USE_MAP_POLYFILL,f=l||"function"!=typeof Map||"function"!=typeof Map.prototype.entries?ee():Map,d=l||"function"!=typeof Set||"function"!=typeof Set.prototype.entries?te():Set,h=new(l||"function"!=typeof WeakMap?ne():WeakMap);function p(e,t,n,r){if(D(n)){if(!J(e))throw new TypeError;if(!K(t))throw new TypeError;return O(e,t)}if(!J(e))throw new TypeError;if(!U(t))throw new TypeError;if(!U(r)&&!D(r)&&!x(r))throw new TypeError;return x(r)&&(r=void 0),S(e,t,n=G(n),r)}function v(e,t){function n(n,r){if(!U(n))throw new TypeError;if(!D(r)&&!Y(r))throw new TypeError;w(e,t,n,r)}return n}function _(e,t,n,r){if(!U(n))throw new TypeError;return D(r)||(r=G(r)),w(e,t,n,r)}function g(e,t,n){if(!U(t))throw new TypeError;return D(n)||(n=G(n)),R(e,t,n)}function y(e,t,n){if(!U(t))throw new TypeError;return D(n)||(n=G(n)),A(e,t,n)}function m(e,t,n){if(!U(t))throw new TypeError;return D(n)||(n=G(n)),P(e,t,n)}function E(e,t,n){if(!U(t))throw new TypeError;return D(n)||(n=G(n)),C(e,t,n)}function b(e,t){if(!U(e))throw new TypeError;return D(t)||(t=G(t)),k(e,t)}function I(e,t){if(!U(e))throw new TypeError;return D(t)||(t=G(t)),M(e,t)}function T(e,t,n){if(!U(t))throw new TypeError;D(n)||(n=G(n));var r=N(t,n,!1);if(D(r))return!1;if(!r.delete(e))return!1;if(r.size>0)return!0;var i=h.get(t);return i.delete(n),i.size>0||h.delete(t),!0}function O(e,t){for(var n=e.length-1;n>=0;--n){var r=(0,e[n])(t);if(!D(r)&&!x(r)){if(!K(r))throw new TypeError;t=r}}return t}function S(e,t,n,r){for(var i=e.length-1;i>=0;--i){var o=(0,e[i])(t,n,r);if(!D(o)&&!x(o)){if(!U(o))throw new TypeError;r=o}}return r}function N(e,t,n){var r=h.get(e);if(D(r)){if(!n)return;r=new f,h.set(e,r)}var i=r.get(t);if(D(i)){if(!n)return;i=new f,r.set(t,i)}return i}function R(e,t,n){if(A(e,t,n))return!0;var r=$(t);return!x(r)&&R(e,r,n)}function A(e,t,n){var r=N(t,n,!1);return!D(r)&&H(r.has(e))}function P(e,t,n){if(A(e,t,n))return C(e,t,n);var r=$(t);return x(r)?void 0:P(e,r,n)}function C(e,t,n){var r=N(t,n,!1);if(!D(r))return r.get(e)}function w(e,t,n,r){N(n,r,!0).set(e,t)}function k(e,t){var n=M(e,t),r=$(e);if(null===r)return n;var i=k(r,t);if(i.length<=0)return n;if(n.length<=0)return i;for(var o=new d,a=[],c=0,s=n;c=0&&e=this._keys.length?(this._index=-1,this._keys=t,this._values=t):this._index++,{value:n,done:!1}}return{value:void 0,done:!0}},e.prototype.throw=function(e){throw this._index>=0&&(this._index=-1,this._keys=t,this._values=t),e},e.prototype.return=function(e){return this._index>=0&&(this._index=-1,this._keys=t,this._values=t),{value:e,done:!0}},e}();return function(){function t(){this._keys=[],this._values=[],this._cacheKey=e,this._cacheIndex=-2}return Object.defineProperty(t.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),t.prototype.has=function(e){return this._find(e,!1)>=0},t.prototype.get=function(e){var t=this._find(e,!1);return t>=0?this._values[t]:void 0},t.prototype.set=function(e,t){var n=this._find(e,!0);return this._values[n]=t,this},t.prototype.delete=function(t){var n=this._find(t,!1);if(n>=0){for(var r=this._keys.length,i=n+1;i= than the number of constructor arguments of its base class."},U.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT="Invalid Container constructor argument. Container options must be an object.",U.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE="Invalid Container option. Default scope must be a string ('singleton' or 'transient').",U.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE="Invalid Container option. Auto bind injectable must be a boolean",U.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK="Invalid Container option. Skip base check must be a boolean",U.MULTIPLE_POST_CONSTRUCT_METHODS="Cannot apply @postConstruct decorator multiple times in the same class";U.POST_CONSTRUCT_ERROR=function(){for(var e=[],t=0;t0,p=d.length>i.length,v=function(e,t,n,r,i){for(var o=[],a=0;a0?l:e(t,r)}return 0}}(oe);var Ne={};Object.defineProperty(Ne,"__esModule",{value:!0}),Ne.Request=void 0;var Re=M,Ae=function(){function e(e,t,n,r,i){this.id=Re.id(),this.serviceIdentifier=e,this.parentContext=t,this.parentRequest=n,this.target=i,this.childRequests=[],this.bindings=Array.isArray(r)?r:[r],this.requestScope=null===n?new window[window.TiktokAnalyticsObject || "ttq"]._ttq_map:null}return e.prototype.addChildRequest=function(t,n,r){var i=new e(t,this.parentContext,this,n,r);return this.childRequests.push(i),i},e}();Ne.Request=Ae,Object.defineProperty(V,"__esModule",{value:!0}),V.getBindingDictionary=V.createMockRequest=V.plan=void 0;var Pe=G,Ce=U,we=k,ke=P,Me=J,Le=K,De=z,xe=ee,je=re,Ue=oe,Be=Ne,Fe=ye;function He(e){return e._bindingDictionary}function Ve(e,t,n,r,i){var o=Je(n.container,i.serviceIdentifier),a=[];return o.length===Pe.BindingCount.NoBindingsAvailable&&n.container.options.autoBindInjectable&&"function"==typeof i.serviceIdentifier&&e.getConstructorMetadata(i.serviceIdentifier).compilerGeneratedMetadata&&(n.container.bind(i.serviceIdentifier).toSelf(),o=Je(n.container,i.serviceIdentifier)),a=t?o:o.filter((function(e){var t=new Be.Request(e.serviceIdentifier,n,r,e,i);return e.constraint(t)})),function(e,t,n,r){switch(t.length){case Pe.BindingCount.NoBindingsAvailable:if(n.isOptional())return t;var i=Le.getServiceIdentifierAsString(e),o=Ce.NOT_REGISTERED;throw o+=Le.listMetadataForTarget(i,n),o+=Le.listRegisteredBindingsForServiceIdentifier(r,i,Je),new Error(o);case Pe.BindingCount.OnlyOneBindingAvailable:if(!n.isArray())return t;case Pe.BindingCount.MultipleBindingsAvailable:default:if(n.isArray())return t;i=Le.getServiceIdentifierAsString(e),o=Ce.AMBIGUOUS_MATCH+" "+i;throw o+=Le.listRegisteredBindingsForServiceIdentifier(r,i,Je),new Error(o)}}(i.serviceIdentifier,a,i,n.container),a}function Ge(e,t,n,r,i,o){var a,c;if(null===i){a=Ve(e,t,r,null,o),c=new Be.Request(n,r,null,a,o);var s=new je.Plan(r,c);r.addPlan(s)}else a=Ve(e,t,r,i,o),c=i.addChildRequest(o.serviceIdentifier,a,o);a.forEach((function(t){var n=null;if(o.isArray())n=c.addChildRequest(t.serviceIdentifier,t,o);else{if(t.cache)return;n=c}if(t.type===we.BindingTypeEnum.Instance&&null!==t.implementationType){var i=Ue.getDependencies(e,t.implementationType);if(!r.container.options.skipBaseClassChecks){var a=Ue.getBaseClassDependencyCount(e,t.implementationType);if(i.length0){var a=t.filter((function(e){return null!==e.target&&e.target.type===Xe.TargetTypeEnum.ConstructorArgument})).map(n);i=a,o=function(e,t,n){var r=t.filter((function(e){return null!==e.target&&e.target.type===Xe.TargetTypeEnum.ClassProperty})),i=r.map(n);return r.forEach((function(t,n){var r;r=t.target.name.value();var o=i[n];e[r]=o})),e}(o=new((r=e)._ttq_bind.apply(r,Ye([void 0],i))),t,n)}else o=new e;return function(e,t){if(Reflect.ttq_hasMetadata(Qe.POST_CONSTRUCT,e)){var n=Reflect.ttq_getMetadata(Qe.POST_CONSTRUCT,e);try{t[n.value]()}catch(t){throw new Error(qe.POST_CONSTRUCT_ERROR(e.name,t.message))}}}(e,o),o},Object.defineProperty(We,"__esModule",{value:!0}),We.resolve=void 0;var ze=U,Ze=k,$e=J,et=K,tt=Ke,nt=function(e,t,n){try{return n()}catch(n){throw $e.isStackOverflowExeption(n)?new Error(ze.CIRCULAR_DEPENDENCY_IN_FACTORY(e,t.toString())):n}},rt=function(e){return function(t){t.parentContext.setCurrentRequest(t);var n=t.bindings,r=t.childRequests,i=t.target&&t.target.isArray(),o=!(t.parentRequest&&t.parentRequest.target&&t.target&&t.parentRequest.target.matchesArray(t.target.serviceIdentifier));if(i&&o)return r.map((function(t){return rt(e)(t)}));var a=null;if(!t.target.isOptional()||0!==n.length){var c=n[0],s=c.scope===Ze.BindingScopeEnum.Singleton,u=c.scope===Ze.BindingScopeEnum.Request;if(s&&c.activated)return c.cache;if(u&&null!==e&&e.has(c.id))return e.get(c.id);if(c.type===Ze.BindingTypeEnum.ConstantValue)a=c.cache,c.activated=!0;else if(c.type===Ze.BindingTypeEnum.Function)a=c.cache,c.activated=!0;else if(c.type===Ze.BindingTypeEnum.Constructor)a=c.implementationType;else if(c.type===Ze.BindingTypeEnum.DynamicValue&&null!==c.dynamicValue)a=nt("toDynamicValue",c.serviceIdentifier,(function(){return c.dynamicValue(t.parentContext)}));else if(c.type===Ze.BindingTypeEnum.Factory&&null!==c.factory)a=nt("toFactory",c.serviceIdentifier,(function(){return c.factory(t.parentContext)}));else if(c.type===Ze.BindingTypeEnum.Provider&&null!==c.provider)a=nt("toProvider",c.serviceIdentifier,(function(){return c.provider(t.parentContext)}));else{if(c.type!==Ze.BindingTypeEnum.Instance||null===c.implementationType){var l=et.getServiceIdentifierAsString(t.serviceIdentifier);throw new Error(ze.INVALID_BINDING_TYPE+" "+l)}a=tt.resolveInstance(c.implementationType,r,rt(e))}return"function"==typeof c.onActivation&&(a=c.onActivation(t.parentContext,a)),s&&(c.cache=a,c.activated=!0),u&&null!==e&&!e.has(c.id)&&e.set(c.id,a),a}}};We.resolve=function(e){return rt(e.plan.rootRequest.requestScope)(e.plan.rootRequest)};var it={},ot={},at={},ct={},st={},ut={},lt={};Object.defineProperty(lt,"__esModule",{value:!0}),lt.typeConstraint=lt.namedConstraint=lt.taggedConstraint=lt.traverseAncerstors=void 0;var ft=P,dt=ee,ht=function(e,t){var n=e.parentRequest;return null!==n&&(!!t(n)||ht(n,t))};lt.traverseAncerstors=ht;var pt=function(e){return function(t){var n=function(n){return null!==n&&null!==n.target&&n.target.matchesTag(e)(t)};return n.metaData=new dt.Metadata(e,t),n}};lt.taggedConstraint=pt;var vt=pt(ft.NAMED_TAG);lt.namedConstraint=vt;lt.typeConstraint=function(e){return function(t){var n=null;if(null!==t){if(n=t.bindings[0],"string"==typeof e)return n.serviceIdentifier===e;var r=t.bindings[0].implementationType;return e===r}return!1}},Object.defineProperty(ut,"__esModule",{value:!0}),ut.BindingWhenSyntax=void 0;var _t=st,gt=lt,yt=function(){function e(e){this._binding=e}return e.prototype.when=function(e){return this._binding.constraint=e,new _t.BindingOnSyntax(this._binding)},e.prototype.whenTargetNamed=function(e){return this._binding.constraint=gt.namedConstraint(e),new _t.BindingOnSyntax(this._binding)},e.prototype.whenTargetIsDefault=function(){return this._binding.constraint=function(e){return null!==e.target&&!e.target.isNamed()&&!e.target.isTagged()},new _t.BindingOnSyntax(this._binding)},e.prototype.whenTargetTagged=function(e,t){return this._binding.constraint=gt.taggedConstraint(e)(t),new _t.BindingOnSyntax(this._binding)},e.prototype.whenInjectedInto=function(e){return this._binding.constraint=function(t){return gt.typeConstraint(e)(t.parentRequest)},new _t.BindingOnSyntax(this._binding)},e.prototype.whenParentNamed=function(e){return this._binding.constraint=function(t){return gt.namedConstraint(e)(t.parentRequest)},new _t.BindingOnSyntax(this._binding)},e.prototype.whenParentTagged=function(e,t){return this._binding.constraint=function(n){return gt.taggedConstraint(e)(t)(n.parentRequest)},new _t.BindingOnSyntax(this._binding)},e.prototype.whenAnyAncestorIs=function(e){return this._binding.constraint=function(t){return gt.traverseAncerstors(t,gt.typeConstraint(e))},new _t.BindingOnSyntax(this._binding)},e.prototype.whenNoAncestorIs=function(e){return this._binding.constraint=function(t){return!gt.traverseAncerstors(t,gt.typeConstraint(e))},new _t.BindingOnSyntax(this._binding)},e.prototype.whenAnyAncestorNamed=function(e){return this._binding.constraint=function(t){return gt.traverseAncerstors(t,gt.namedConstraint(e))},new _t.BindingOnSyntax(this._binding)},e.prototype.whenNoAncestorNamed=function(e){return this._binding.constraint=function(t){return!gt.traverseAncerstors(t,gt.namedConstraint(e))},new _t.BindingOnSyntax(this._binding)},e.prototype.whenAnyAncestorTagged=function(e,t){return this._binding.constraint=function(n){return gt.traverseAncerstors(n,gt.taggedConstraint(e)(t))},new _t.BindingOnSyntax(this._binding)},e.prototype.whenNoAncestorTagged=function(e,t){return this._binding.constraint=function(n){return!gt.traverseAncerstors(n,gt.taggedConstraint(e)(t))},new _t.BindingOnSyntax(this._binding)},e.prototype.whenAnyAncestorMatches=function(e){return this._binding.constraint=function(t){return gt.traverseAncerstors(t,e)},new _t.BindingOnSyntax(this._binding)},e.prototype.whenNoAncestorMatches=function(e){return this._binding.constraint=function(t){return!gt.traverseAncerstors(t,e)},new _t.BindingOnSyntax(this._binding)},e}();ut.BindingWhenSyntax=yt,Object.defineProperty(st,"__esModule",{value:!0}),st.BindingOnSyntax=void 0;var mt=ut,Et=function(){function e(e){this._binding=e}return e.prototype.onActivation=function(e){return this._binding.onActivation=e,new mt.BindingWhenSyntax(this._binding)},e}();st.BindingOnSyntax=Et,Object.defineProperty(ct,"__esModule",{value:!0}),ct.BindingWhenOnSyntax=void 0;var bt=st,It=ut,Tt=function(){function e(e){this._binding=e,this._bindingWhenSyntax=new It.BindingWhenSyntax(this._binding),this._bindingOnSyntax=new bt.BindingOnSyntax(this._binding)}return e.prototype.when=function(e){return this._bindingWhenSyntax.when(e)},e.prototype.whenTargetNamed=function(e){return this._bindingWhenSyntax.whenTargetNamed(e)},e.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},e.prototype.whenTargetTagged=function(e,t){return this._bindingWhenSyntax.whenTargetTagged(e,t)},e.prototype.whenInjectedInto=function(e){return this._bindingWhenSyntax.whenInjectedInto(e)},e.prototype.whenParentNamed=function(e){return this._bindingWhenSyntax.whenParentNamed(e)},e.prototype.whenParentTagged=function(e,t){return this._bindingWhenSyntax.whenParentTagged(e,t)},e.prototype.whenAnyAncestorIs=function(e){return this._bindingWhenSyntax.whenAnyAncestorIs(e)},e.prototype.whenNoAncestorIs=function(e){return this._bindingWhenSyntax.whenNoAncestorIs(e)},e.prototype.whenAnyAncestorNamed=function(e){return this._bindingWhenSyntax.whenAnyAncestorNamed(e)},e.prototype.whenAnyAncestorTagged=function(e,t){return this._bindingWhenSyntax.whenAnyAncestorTagged(e,t)},e.prototype.whenNoAncestorNamed=function(e){return this._bindingWhenSyntax.whenNoAncestorNamed(e)},e.prototype.whenNoAncestorTagged=function(e,t){return this._bindingWhenSyntax.whenNoAncestorTagged(e,t)},e.prototype.whenAnyAncestorMatches=function(e){return this._bindingWhenSyntax.whenAnyAncestorMatches(e)},e.prototype.whenNoAncestorMatches=function(e){return this._bindingWhenSyntax.whenNoAncestorMatches(e)},e.prototype.onActivation=function(e){return this._bindingOnSyntax.onActivation(e)},e}();ct.BindingWhenOnSyntax=Tt,Object.defineProperty(at,"__esModule",{value:!0}),at.BindingInSyntax=void 0;var Ot=k,St=ct,Nt=function(){function e(e){this._binding=e}return e.prototype.inRequestScope=function(){return this._binding.scope=Ot.BindingScopeEnum.Request,new St.BindingWhenOnSyntax(this._binding)},e.prototype.inSingletonScope=function(){return this._binding.scope=Ot.BindingScopeEnum.Singleton,new St.BindingWhenOnSyntax(this._binding)},e.prototype.inTransientScope=function(){return this._binding.scope=Ot.BindingScopeEnum.Transient,new St.BindingWhenOnSyntax(this._binding)},e}();at.BindingInSyntax=Nt,Object.defineProperty(ot,"__esModule",{value:!0}),ot.BindingInWhenOnSyntax=void 0;var Rt=at,At=st,Pt=ut,Ct=function(){function e(e){this._binding=e,this._bindingWhenSyntax=new Pt.BindingWhenSyntax(this._binding),this._bindingOnSyntax=new At.BindingOnSyntax(this._binding),this._bindingInSyntax=new Rt.BindingInSyntax(e)}return e.prototype.inRequestScope=function(){return this._bindingInSyntax.inRequestScope()},e.prototype.inSingletonScope=function(){return this._bindingInSyntax.inSingletonScope()},e.prototype.inTransientScope=function(){return this._bindingInSyntax.inTransientScope()},e.prototype.when=function(e){return this._bindingWhenSyntax.when(e)},e.prototype.whenTargetNamed=function(e){return this._bindingWhenSyntax.whenTargetNamed(e)},e.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},e.prototype.whenTargetTagged=function(e,t){return this._bindingWhenSyntax.whenTargetTagged(e,t)},e.prototype.whenInjectedInto=function(e){return this._bindingWhenSyntax.whenInjectedInto(e)},e.prototype.whenParentNamed=function(e){return this._bindingWhenSyntax.whenParentNamed(e)},e.prototype.whenParentTagged=function(e,t){return this._bindingWhenSyntax.whenParentTagged(e,t)},e.prototype.whenAnyAncestorIs=function(e){return this._bindingWhenSyntax.whenAnyAncestorIs(e)},e.prototype.whenNoAncestorIs=function(e){return this._bindingWhenSyntax.whenNoAncestorIs(e)},e.prototype.whenAnyAncestorNamed=function(e){return this._bindingWhenSyntax.whenAnyAncestorNamed(e)},e.prototype.whenAnyAncestorTagged=function(e,t){return this._bindingWhenSyntax.whenAnyAncestorTagged(e,t)},e.prototype.whenNoAncestorNamed=function(e){return this._bindingWhenSyntax.whenNoAncestorNamed(e)},e.prototype.whenNoAncestorTagged=function(e,t){return this._bindingWhenSyntax.whenNoAncestorTagged(e,t)},e.prototype.whenAnyAncestorMatches=function(e){return this._bindingWhenSyntax.whenAnyAncestorMatches(e)},e.prototype.whenNoAncestorMatches=function(e){return this._bindingWhenSyntax.whenNoAncestorMatches(e)},e.prototype.onActivation=function(e){return this._bindingOnSyntax.onActivation(e)},e}();ot.BindingInWhenOnSyntax=Ct,Object.defineProperty(it,"__esModule",{value:!0}),it.BindingToSyntax=void 0;var wt=U,kt=k,Mt=ot,Lt=ct,Dt=function(){function e(e){this._binding=e}return e.prototype.to=function(e){return this._binding.type=kt.BindingTypeEnum.Instance,this._binding.implementationType=e,new Mt.BindingInWhenOnSyntax(this._binding)},e.prototype.toSelf=function(){if("function"!=typeof this._binding.serviceIdentifier)throw new Error(""+wt.INVALID_TO_SELF_VALUE);var e=this._binding.serviceIdentifier;return this.to(e)},e.prototype.toConstantValue=function(e){return this._binding.type=kt.BindingTypeEnum.ConstantValue,this._binding.cache=e,this._binding.dynamicValue=null,this._binding.implementationType=null,this._binding.scope=kt.BindingScopeEnum.Singleton,new Lt.BindingWhenOnSyntax(this._binding)},e.prototype.toDynamicValue=function(e){return this._binding.type=kt.BindingTypeEnum.DynamicValue,this._binding.cache=null,this._binding.dynamicValue=e,this._binding.implementationType=null,new Mt.BindingInWhenOnSyntax(this._binding)},e.prototype.toConstructor=function(e){return this._binding.type=kt.BindingTypeEnum.Constructor,this._binding.implementationType=e,this._binding.scope=kt.BindingScopeEnum.Singleton,new Lt.BindingWhenOnSyntax(this._binding)},e.prototype.toFactory=function(e){return this._binding.type=kt.BindingTypeEnum.Factory,this._binding.factory=e,this._binding.scope=kt.BindingScopeEnum.Singleton,new Lt.BindingWhenOnSyntax(this._binding)},e.prototype.toFunction=function(e){if("function"!=typeof e)throw new Error(wt.INVALID_FUNCTION_BINDING);var t=this.toConstantValue(e);return this._binding.type=kt.BindingTypeEnum.Function,this._binding.scope=kt.BindingScopeEnum.Singleton,t},e.prototype.toAutoFactory=function(e){return this._binding.type=kt.BindingTypeEnum.Factory,this._binding.factory=function(t){return function(){return t.container.get(e)}},this._binding.scope=kt.BindingScopeEnum.Singleton,new Lt.BindingWhenOnSyntax(this._binding)},e.prototype.toProvider=function(e){return this._binding.type=kt.BindingTypeEnum.Provider,this._binding.provider=e,this._binding.scope=kt.BindingScopeEnum.Singleton,new Lt.BindingWhenOnSyntax(this._binding)},e.prototype.toService=function(e){this.toDynamicValue((function(t){return t.container.get(e)}))},e}();it.BindingToSyntax=Dt;var xt={};Object.defineProperty(xt,"__esModule",{value:!0}),xt.ContainerSnapshot=void 0;var jt=function(){function e(){}return e.of=function(t,n){var r=new e;return r.bindings=t,r.middleware=n,r},e}();xt.ContainerSnapshot=jt;var Ut={};Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.Lookup=void 0;var Bt=U,Ft=function(){function e(){this._map=new window[window.TiktokAnalyticsObject || "ttq"]._ttq_map}return e.prototype.getMap=function(){return this._map},e.prototype.add=function(e,t){if(null==e)throw new Error(Bt.NULL_ARGUMENT);if(null==t)throw new Error(Bt.NULL_ARGUMENT);var n=this._map.get(e);void 0!==n?(n.push(t),this._map.set(e,n)):this._map.set(e,[t])},e.prototype.get=function(e){if(null==e)throw new Error(Bt.NULL_ARGUMENT);var t=this._map.get(e);if(void 0!==t)return t;throw new Error(Bt.KEY_NOT_FOUND)},e.prototype.remove=function(e){if(null==e)throw new Error(Bt.NULL_ARGUMENT);if(!this._map.delete(e))throw new Error(Bt.KEY_NOT_FOUND)},e.prototype.removeByCondition=function(e){var t=this;this._map.forEach((function(n,r){var i=n.filter((function(t){return!e(t)}));i.length>0?t._map.set(r,i):t._map.delete(r)}))},e.prototype.hasKey=function(e){if(null==e)throw new Error(Bt.NULL_ARGUMENT);return this._map.has(e)},e.prototype.clone=function(){var t=new e;return this._map.forEach((function(e,n){e.forEach((function(e){return t.add(n,e.clone())}))})),t},e.prototype.traverse=function(e){this._map.forEach((function(t,n){e(n,t)}))},e}();Ut.Lookup=Ft;var Ht=N&&N.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{s(r.next(e))}catch(e){o(e)}}function c(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}s((r=r.apply(e,t||[])).next())}))},Vt=N&&N.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(o){return function(c){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]2&&void 0!==arguments[2]?arguments[2]:"-";return"".concat(e).concat(n).concat(t)},ir=function(){return new Date(Date.now()+864e5).toUTCString()};function or(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=-1;return function(){var r=Array.prototype.slice.apply(arguments),i=Date.now();i-n>=t&&(e.apply(void 0,y(r)),n=Date.now())}}var ar,cr,sr,ur,lr,fr="tt_adInfo",dr="tt_appInfo",hr="_tt_enable_cookie",pr="_ttp",vr="messageId",_r="tt_sessionId",gr="tt_pixel_session_index",yr="default_eventId",mr="::";!function(e){e.MUSICAL_LY="musical_ly",e.MUSICALLY_GO="musically_go",e.TRILL="trill"}(ar||(ar={})),function(e){e[e.OFFSITE=0]="OFFSITE",e[e.ONSITE=1]="ONSITE"}(cr||(cr={})),function(e){e.INIT_START="initStart",e.INIT_END="initEnd",e.CONTEXT_INIT_START="contextInitStart",e.CONTEXT_INIT_END="contextInitEnd",e.PAGE_URL_WILL_CHANGE="pageUrlWillChange",e.PAGE_URL_DID_CHANGE="pageUrlDidChange",e.PAGE_DID_LOAD="pageDidLoad",e.PAGE_WILL_LEAVE="pageWillLeave",e.AD_INFO_INIT_START="adInfoInitStart",e.AD_INFO_INIT_END="adInfoInitEnd",e.BEFORE_AD_INFO_INIT_START="beforeAdInfoInitStart",e.BEFORE_SHOPIFY_PIXEL_SEND="beforeShopifyPixelSend",e.PIXEL_SEND="pixelSend",e.PIXEL_DID_MOUNT="pixelDidMount"}(sr||(sr={})),function(e){e.UNKNOWN="-1",e.LOADING="0",e.INTERACTIVE="1",e.COMPLETE="2"}(ur||(ur={})),function(e){e.EXTERNAL="external",e.APP="app",e.TIKTOK="tiktok"}(lr||(lr={}));var Er,br={ID:Symbol.for("ID"),Type:Symbol.for("type"),Partner:Symbol.for("partner"),Options:Symbol.for("Options"),Plugins:Symbol.for("Plugins"),Rules:Symbol.for("Rules"),Info:Symbol.for("Info"),ExtraParams:Symbol.for("extraParams"),WebLibraryInfo:Symbol.for("WebLibraryInfo"),SignalType:Symbol.for("SignalType"),IsOnsitePage:Symbol.for("IsOnsitePage")},Ir="Pageview",Tr=[],Or={TTQ:Symbol.for("TTQ"),GLOBAL_TTQ:Symbol.for("GLOBAL_TTQ"),SHOPIFY_TTQ:Symbol.for("SHOPIFY_TTQ"),ENV:Symbol.for("ENV"),CONTEXT:Symbol.for("CONTEXT"),REPORTER:Symbol.for("REPORTER"),REPORTERS:Symbol.for("REPORTERS"),PLUGIN:Symbol.for("PLUGIN"),PLUGINS:Symbol.for("PLUGINS"),TTQ_GLOBAL_OPTIONS:Symbol.for("TTQ_GLOBAL_OPTIONS"),PERFORMANCE_PLUGIN:Symbol.for("PERFORMANCE_PLUGIN"),INTERACTION_PLUGIN:Symbol.for("INTERACTION_PLUGIN"),INTERACTION_PLUGIN_MONITOR:Symbol.for("INTERACTION_PLUGIN_MONITOR"),PERFORMANCE_PLUGIN_MONITOR:Symbol.for("PERFORMANCE_PLUGIN_MONITOR"),ADVANCED_MATCHING_PLUGIN:Symbol.for("ADVANCED_MATCHING_PLUGIN"),AUTO_ADVANCED_MATCHING_PLUGIN:Symbol.for("AUTO_ADVANCED_MATCHING_PLUGIN"),CALLBACK_PLUGIN:Symbol.for("CALLBACK_PLUGIN"),IDENTIFY_PLUGIN:Symbol.for("IDENTIFY_PLUGIN"),MONITOR_PLUGIN:Symbol.for("MONITOR_PLUGIN"),PERFORMANCE_INTERACTION_PLUGIN:Symbol.for("PERFORMANCE_INTERACTION_PLUGIN"),WEB_FL_PLUGIN:Symbol.for("WEB_FL_PLUGIN"),SHOPIFY_PLUGIN:Symbol.for("SHOPIFY_PLUGIN"),AUTO_CONFIG_PLUGIN:Symbol.for("AUTO_CONFIG_PLUGIN"),DIAGNOSTICS_CONSOLE_PLUGIN:Symbol.for("DIAGNOSTICS_CONSOLE_PLUGIN"),COMPETITOR_INSIGHT_PLUGIN:Symbol.for("COMPETITOR_INSIGHT_PLUGIN"),PANGLE_COOKIE_MATCHING_PLUGIN:Symbol.for("PANGLE_COOKIE_MATCHING_PLUGIN"),EVENT_BUILDER_PLUGIN:Symbol.for("EVENT_BUILDER_PLUGIN"),ENRICH_IPV6_PLUGIN:Symbol.for("ENRICH_IPV6_PLUGIN"),PAGE_PERFORMANCE_MONITOR:Symbol.for("PAGE_PERFORMANCE_MONITOR"),PAGE_INTERACTION_MONITOR:Symbol.for("PAGE_INTERACTION_MONITOR"),PAGEDATA_PLUGIN:Symbol.for("PAGEDATA_PLUGIN"),HISTORY_OBSERVER:Symbol.for("HISTORY_OBSERVER"),BATCH_SERVICE:Symbol.for("BATCH_SERVICE"),REPORT_SERVICE:Symbol.for("REPORT_SERVICE"),AD_SERVICE:Symbol.for("AD_SERVICE"),APP_SERVICE:Symbol.for("APP_SERVICE"),BRIDGE_SERVICE:Symbol.for("BRIDGE"),HTTP_SERVICE:Symbol.for("HTTP_SERVICE"),COOKIE_SERVICE:Symbol.for("COOKIE_SERVICE"),CONSENT_SERVICE:Symbol.for("CONSENT_SERVICE"),JS_BRIDGE:Symbol.for("JS_BRIDGE"),TTQ_REPORTERS:Symbol.for("TTQ_REPORTERS"),INTERACTION_MONITOR:Symbol.for("INTERACTION_MONITOR"),PERFORMANCE_MONITOR:Symbol.for("PERFORMANCE_MONITOR"),SANDBOX_PIXEL_API:Symbol("SANDBOX_PIXEL_API")};!function(e){e.TRACK="track",e.PERFORMANCE="performance",e.INTERACTION="interaction",e.PCM="PCM",e.PERFORMANCE_INTERACTION="performance_interaction",e.SELFHOST="selfhost",e.AUTO_CONFIG="auto_config",e.PAGE="Pf"}(Er||(Er={}));var Sr,Nr,Rr=["EnrichAM"],Ar="https://analytics.tiktok.com/api/v2",Pr="".concat(Ar,"/pixel"),Cr="".concat(Ar,"/performance"),wr="".concat(Ar,"/interaction"),kr="".concat(Ar,"/performance_interaction"),Mr="".concat(Ar,"/pixel/act"),Lr="ttclid",Dr="_toutiao_params",xr=["phone_number","email","external_id"],jr="email_is_hashed",Ur="phone_is_hashed",Br="sha256_email",Fr="sha256_phone",Hr="auto_trigger_type";!function(e){e.LOAD_START="load_start",e.LOAD_END="load_end",e.BEFORE_INIT="before_init",e.INIT_START="init_start",e.INIT_END="init_end",e.JSB_INIT_START="jsb_init_start",e.JSB_INIT_END="jsb_init_end",e.BEFORE_AD_INFO_INIT_START="before_ad_info_init_start",e.AD_INFO_INIT_START="ad_info_init_start",e.AD_INFO_INIT_END="ad_info_init_end",e.IDENTIFY_INIT_START="identify_init_start",e.IDENTIFY_INIT_END="identify_init_end",e.PLUGIN_INIT_START="_init_start",e.PLUGIN_INIT_END="_init_end",e.PIXEL_SEND="pixel_send",e.PIXEL_SEND_PCM="pixel_send_PCM",e.JSB_SEND="jsb_send",e.HTTP_SEND="http_send",e.HANDLE_CACHE="handle_cache",e.INIT_ERROR="init_error",e.PIXEL_EMPTY="pixel_empty",e.JSB_ERROR="jsb_error",e.API_ERROR="api_error",e.PLUGIN_ERROR="plugin_error",e.CUSTOM_INFO="custom_info",e.CUSTOM_ERROR="custom_error",e.CUSTOM_TIMER="custom_timer"}(Sr||(Sr={})),function(e){e.EMPTY_EVENT_TYPE_NAME="EMPTY_EVENT_TYPE_NAME",e.MISMATCHED_EVENT_TYPE_NAME_FOR_CUSTOM_EVENT="MISMATCHED_EVENT_TYPE_NAME_FOR_CUSTOM_EVENT",e.LONG_EVENT_TYPE_NAME="LONG_EVENT_TYPE_NAME",e.MISSING_VALUE_PARAMETER="MISSING_VALUE_PARAMETER",e.MISSING_CURRENCY_PARAMETER="MISSING_CURRENCY_PARAMETER",e.MISSING_CONTENT_ID="MISSING_CONTENT_ID",e.MISSING_EMAIL_AND_PHONE="MISSING_EMAIL_AND_PHONE",e.INVALID_EVENT_PARAMETER_VALUE="INVALID_EVENT_PARAMETER_VALUE",e.INVALID_CURRENCY_CODE="INVALID_CURRENCY_CODE",e.INVALID_CONTENT_ID="INVALID_CONTENT_ID",e.INVALID_CONTENT_TYPE="INVALID_CONTENT_TYPE",e.INVALID_EMAIL_FORMAT="INVALID_EMAIL_FORMAT",e.INVALID_PHONE_NUMBER_FORMAT="INVALID_PHONE_NUMBER_FORMAT",e.INVALID_EMAIL_INFORMATION="INVALID_EMAIL_INFORMATION",e.INVALID_PHONE_NUMBER_INFORMATION="INVALID_PHONE_NUMBER_INFORMATION",e.DUPLICATE_PIXEL_CODE="DUPLICATE_PIXEL_CODE",e.MISSING_PIXEL_CODE="MISSING_PIXEL_CODE",e.INVALID_PIXEL_CODE="INVALID_PIXEL_CODE"}(Nr||(Nr={}));var Vr=null,Gr=function(){return"undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof global?global:new Function("return this")()},Jr=function(){return Gr().TiktokAnalyticsObject||"ttq"},Wr=function(){var e=Gr();return Vr||e[Jr()]},Kr=function(){return!!Wr()._is_onsite},Yr=function(){var e=Gr();return("object"===("undefined"==typeof navigator?"undefined":t(navigator))&&navigator.userAgent?navigator.userAgent:"")||e._userAgent},qr=function(e){try{var t=Wr();return t&&t._self_host_config&&t._self_host_config[e]||""}catch(e){return""}},Xr=function(){var e=Wr();return e._partner?e._partner:""},Qr=function(e){try{var t=Wr()._plugins||{};return null==t[e]||!!t[e]}catch(e){return!0}};var zr=function(e){return Boolean(e)},Zr=function(e){var t;return Object.keys((null===(t=null==e?void 0:e.context)||void 0===t?void 0:t.user)||{}).some((function(e){return-1!==xr.indexOf(e)}))};function $r(e,t){var n,r=e;return function(){if(r){for(var i=arguments.length,o=new Array(i),a=0;acrypto.getRandomValues(new Uint8Array(e)).reduce(((e,t)=>e+((t&=63)<36?t.toString(36):t<62?(t-26).toString(36).toUpperCase():t>62?"-":"_")),""))(e)};function ti(e,t){var n=Object.assign({},e);return t.forEach((function(e){null!==n[e]&&void 0!==n[e]&&delete n[e]})),n}var ni=function(e,t){if(!e)return{};var n={};return Object.keys(e).forEach((function(r){t[r]&&(n[r]=e[r])})),n};function ri(e,t,n){var r;return function(){for(var i=arguments.length,o=new Array(i),a=0;a0&&void 0!==r[0]?r[0]:500,e.abrupt("return",new Promise((function(e){setTimeout((function(){e(!0)}),n)})));case 2:case"end":return e.stop()}}),t)}))),oi.apply(this,arguments)}var ai=["input[type='button']","input[type='image']","input[type='submit']","button","[class*=btn]","[class*=Btn]","[class*=button]","[class*=Button]","[role*=button]","[id*=btn]","[id*=Btn]","[id*=button]","[id*=Button]","a"],ci=["[href^='tel:']","[href^='callto:']","[href^='sms:']","[href^='skype:']","[href^='whatsapp:']","[href^='mailto:']"],si=function(e){var t=ai.some((function(t){return e.matches(t)})),n=ci.some((function(t){return e.matches(t)}));return t&&!n};function ui(e,n){var r={};for(var i in e)if(e.hasOwnProperty(i)&&!n.hasOwnProperty(i))r[i]=e[i];else if(e.hasOwnProperty(i)&&n.hasOwnProperty(i)&&e[i]!==n[i])if("object"===t(e[i])&&"object"===t(n[i])){var o=ui(e[i],n[i]);Object.keys(o).length>0&&(r[i]=o)}else r[i]=e[i];for(var a in n)n.hasOwnProperty(a)&&!e.hasOwnProperty(a)&&(r[a]=n[a]);return r}function li(e,t){return Object.keys(ui(e,t)).length>0}function fi(e,t){var n={};return e&&(function(e){return"string"==typeof e}(e)||function(e){return"number"==typeof e}(e)?n.external_id=e.toString():er(e)&&(n=e)),t&&er(t)&&Object.assign(n,t),n}var di=function(e){try{var t=e&&function(e){for(var t=Array.prototype.slice.call(document.getElementsByTagName("script")),n=0;n-1)return r}}(e);if(t){if(hi(t))return"isInHead";if(pi(t))return"isInBodyTop10"}return"unknown"}catch(e){return"unknown"}},hi=function e(t){var n=t.parentElement;return!!n&&("HEAD"===n.tagName||e(n))},pi=function(e){return function(e,n){for(var r,i=[document.body],o=0;o<=e&&i.length;){var a=i.pop();if(a===n)return!0;if(!("script"===(null==a?void 0:a.tagName.toLowerCase())&&(null===(r=a.src)||void 0===r?void 0:r.indexOf("analytics.tiktok.com"))>-1)&&(o++,"object"===t(a)&&a.children))for(var c=a.children.length-1;c>=0;c--)i.push(a.children[c])}return!1}(10,e)},vi=function(){var e,t;return(null===(t=null===(e=Wr())||void 0===e?void 0:e._env)||void 0===t?void 0:t.env)||lr.EXTERNAL},_i=function(){var e,t;return null!==(t=null===(e=Wr())||void 0===e?void 0:e._is_onsite)&&void 0!==t?t:cr.OFFSITE},gi=function(e){return(e||vi())!==lr.EXTERNAL},yi=function(e){return(e||vi())===lr.TIKTOK},mi=function(){var e=Yr();return/windows phone/i.test(e)?"Windows Phone":/android/i.test(e)?"android":/iPad|iPhone|iPod/.test(e)?"ios":"pc"},Ei=function(){try{return navigator.userAgentData.getHighEntropyValues(["model","platformVersion"])}catch(e){return Promise.resolve({})}},bi=function(){return"android"===mi()},Ii=function(){return"ios"===mi()},Ti=$r((function(){return/open_news/i.test(Yr())})),Oi=$r((function(){return/ultralite/i.test(Yr())}));function Si(){var e;return[zn.INVOKE_METHOD_ENABLED,zn.INVOKE_METHOD_NOT_ENABLED,zn.TOUTIAO_BRIDGE_NOT_ENABLED][[!!(null===(e=null===window||void 0===window?void 0:window.ToutiaoJSBridge)||void 0===e?void 0:e.invokeMethod),!!(null===window||void 0===window?void 0:window.ToutiaoJSBridge),!0].findIndex((function(e){return e}))]}var Ni=function(){return(void 0!==(e=Gr()).DedicatedWorkerGlobalScope?e instanceof e.DedicatedWorkerGlobalScope:"DedicatedWorkerGlobalScope"===e.constructor.name)?Hn.WebWorker:globalThis.self&&globalThis.self!==globalThis.self.top?Hn.Iframe:Hn.Normal;var e},Ri=function(){var e=Ii()?function(){for(var e=Yr(),t=0,n=Object.keys(ar);ta)return!1}return!0},Pi={info:[],error:[]};function Ci(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];try{var r=Wr(),i=r.getPlugin&&r.getPlugin("Monitor")||null;i&&i.info&&"function"==typeof i.info?i.info.call(i,e,t,n):Qr("Monitor")&&Pi.info.push({event:e,detail:t,withoutJSB:n})}catch(e){}}function wi(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];try{var i=Wr(),o=i.getPlugin&&i.getPlugin("Monitor")||null;o&&o.error&&"function"==typeof o.error?o.error.call(o,e,t,n,r):Qr("Monitor")&&Pi.error.push({event:e,err:t,detail:n,withoutJSB:r})}catch(e){}}function ki(e,t){try{var n=Wr(),r=n.getPlugin&&n.getPlugin("DiagnosticsConsole")||null;r&&r.warn.apply(r,[e,t])}catch(e){}}function Mi(){try{0;var e=document&&document.currentScript,t=e&&e.src||"http://emptyURLSrc";return{pixelCode:new URL(t).searchParams.get("sdkid")||e&&e.getAttribute("data-id")||"",lib:Jr()||"ttq"}}catch(e){return{lib:"ttq",pixelCode:""}}}var Li=function(e,t){if("selfhost"===e&&t&&qr(t))return"https://".concat(qr(t),"/api/v2/pixel");var n={track:Pr,performance:Cr,interaction:wr,performance_interaction:kr,auto_config:Mr}[e];return n||null},Di=function(e){try{var t=window.sessionStorage.getItem(e);return t?JSON.parse(t):null}catch(e){return null}},xi=function(e,t){try{var n=JSON.stringify(t);window.sessionStorage.setItem(e,n)}catch(e){}};function ji(e,t){try{return new URL(e).searchParams.get(t)||""}catch(e){return""}}var Ui=function(e,t,n){try{var r=ji(t||window.location.href,e);return r||ji(n||document.referrer,e)}catch(e){}return""},Bi="",Fi=function(e){if(0===document.cookie.length)return"";var t,n,r=(t=e,n={},document.cookie.split(";").forEach((function(e){var t=e.split("="),r=t[0].trim();n[r]=t.slice(1).join("=")})),n[t]||"");return r?unescape(r):""},Hi=function(e,t,n){try{if(n){if(Bi)return n.domain=Bi,void(document.cookie="".concat(e,"=").concat(t).concat(Gi(n)));for(var r=(n.domain||window.location.hostname).split("."),i=r.length,o="",a=0;a2&&void 0!==arguments[2]?arguments[2]:"/",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:ir(),i={path:n,expires:r};Hi(e,t,i)};function Wi(){try{var e=document.readyState;return"loading"==e?ur.LOADING:"interactive"==e?ur.INTERACTIVE:"complete"==e?ur.COMPLETE:ur.UNKNOWN}catch(e){return ur.UNKNOWN}}function Ki(e){return new Promise((function(t,n){var r=document.createElement("script");r.type="text/javascript",r.async=!0,r.src=e;var i=document.getElementsByTagName("script")[0];i&&i.parentNode?i.parentNode.insertBefore(r,i):n("none element"),r.onload=function(){t(!0)},r.onerror=n}))}var Yi=function(){var t=r(e().mark((function t(n){var r,i=arguments;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!((r=i.length>1&&void 0!==i[1]?i[1]:1)>=0)){e.next=13;break}return e.prev=2,e.next=5,Ki(n);case 5:return e.abrupt("return",Promise.resolve(!0));case 8:return e.prev=8,e.t0=e.catch(2),e.abrupt("return",Yi.call(null,n,r-1));case 11:e.next=14;break;case 13:throw Error;case 14:case"end":return e.stop()}}),t,null,[[2,8]])})));return function(e){return t.apply(this,arguments)}}(),qi=function(e){return"function"==typeof Promise.allSettled?Promise.allSettled(e):function(e){var t=new Array(e.length),n=0;return new Promise((function(r,i){for(var o=function(i){var o=e[i];o&&"function"==typeof o.then?o.then((function(o){t[i]={status:"fulfilled",value:o},++n===e.length&&r(t)})).catch((function(o){t[i]={status:"rejected",reason:o},++n===e.length&&r(t)})):(t[i]={status:"fulfilled",value:o},++n===e.length&&r(t))},a=0;a1&&void 0!==arguments[1]?arguments[1]:null,n=t||Xi;return n.includes(e)}function zi(e){return!isNaN(e)&&e>=0}var Zi,$i=String.fromCharCode.bind(String),eo=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),to=function(e){if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?$i(192|t>>>6)+$i(128|63&t):$i(224|t>>>12&15)+$i(128|t>>>6&63)+$i(128|63&t)}var n=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return $i(240|n>>>18&7)+$i(128|n>>>12&63)+$i(128|n>>>6&63)+$i(128|63&n)},no=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,ro=function(e){return function(e){return e.replace(/=/g,"").replace(/[+\/]/g,(function(e){return"+"===e?"-":"_"}))}(function(e){for(var t,n,r,i,o="",a=e.length%3,c=0;c255||(r=e.charCodeAt(c++))>255||(i=e.charCodeAt(c++))>255)throw new TypeError("invalid character found");o+=eo[(t=n<<16|r<<8|i)>>18&63]+eo[t>>12&63]+eo[t>>6&63]+eo[63&t]}return a?o.slice(0,a-3)+"===".substring(a):o}(function(e){return e.replace(no,to)}(e)))},io=function(e){return t=JSON.stringify(e),ro(t);var t},oo={};function ao(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];t&&oo["".concat(e)]||(oo["".concat(e)]={start:performance.now()})}function co(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!(t&&oo["".concat(e)]&&oo["".concat(e)].end)){var n=oo["".concat(e)];n&&(n.end=performance.now());var r=n.end-n.start;return Ci(Sr.CUSTOM_TIMER,{custom_name:e,latency:Math.ceil(1e3*r)}),r}}!function(e){e.AUTO_CONFIG_CONTENT="auto_config_content",e.AUTO_CONFIG_FORM="auto_config_form",e.AUTO_CONFIG_CLICK="auto_config_click",e.EB_RULE_COMPUTE_TOKENIZE_TEXT="eb_rule_compute_tokenize_text",e.EB_RULE_COMPUTE_IMG_SRC="eb_rule_compute_img_src",e.EB_RULE_COMPUTE_ELEMENT_XPATH="eb_rule_compute_element_xpath",e.EB_PARAMETER_V2="eb_parameter_v2",e.EB_PARAMETER_V1="eb_parameter_v1"}(Zi||(Zi={}));var so=function(){var e=Wr();return"object"===t(e)&&e._i?e._i:{}},uo=function(e,t){var n=so()||{};Object.keys(n).forEach((function(r){var i=n[r];i._init||i.push([e].concat(t))}))},lo=function(e,t,n){var r=(so()||{})[e];if(r){if(r._init)return;r.push([t].concat(n))}},fo=function(e,t){try{var n=Ui(Lr,e,t)||void 0,r=Ui("ext_params",e,t)||void 0,i=Ui(Dr,e,t)||void 0,o=parseInt(Ui("ttuts",e,t),10)||void 0,a=i?JSON.parse(i):{},c=a.log_extra,s=void 0===c?void 0:c,u=a.idc,l=void 0===u?void 0:u,f=a.cid,d=void 0===f?void 0:f;return{callback:n,ext_params:r,log_extra:s,creative_id:d,idc:l,ttuts:o,ad_info_from:(s||l||d)&&"url"}}catch(e){return{}}},ho=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},po=function(){function e(t){i(this,e),this.userFormatInfo={},this.userFormatInfoV2={},this.enableAdTracking=!0,this.offsiteAdInfo={},this.tt_test_id="",this.signalDiagnosticLabels=Object.assign({},$n),this.init(t)}return a(e,[{key:"init",value:function(e){this.userInfo={},this.adInfo={},this.appInfo={},this.pageInfo={url:"",referrer:""},this.pageSign={sessionId:"",pageId:""},this.libraryInfo=e}},{key:"getAllData",value:function(){return{userInfo:this.userInfo,adInfo:this.adInfo,appInfo:this.appInfo,libraryInfo:this.libraryInfo,pageInfo:this.pageInfo,pageSign:this.pageSign,signalType:this.signalType,userFormatInfo:this.userFormatInfo,userFormatInfoV2:this.userFormatInfoV2,enableAdTracking:this.enableAdTracking,offsiteAdInfo:this.offsiteAdInfo,tt_test_id:this.tt_test_id}}},{key:"getLibraryInfo",value:function(){return this.libraryInfo}},{key:"setSignalType",value:function(e){this.signalType=e}},{key:"getSignalType",value:function(){return this.signalType}},{key:"setTestID",value:function(e){this.tt_test_id=e}},{key:"getTestID",value:function(){return this.tt_test_id}},{key:"setEnableAdTracking",value:function(e){this.enableAdTracking=e}},{key:"getEnableAdTracking",value:function(){return this.enableAdTracking}},{key:"setOffsiteAdInfo",value:function(e){this.offsiteAdInfo=Object.assign({},this.offsiteAdInfo,e)}},{key:"getOffsiteAdInfo",value:function(){return this.offsiteAdInfo}},{key:"getUserFormatInfo",value:function(){return this.userFormatInfo}},{key:"setUserFormatInfo",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.assign(this.userFormatInfo,e)}},{key:"getUserFormatInfoV2",value:function(){return this.userFormatInfoV2}},{key:"setUserFormatInfoV2",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.assign(this.userFormatInfoV2,e)}},{key:"setUserInfo",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.assign(this.userInfo,e)}},{key:"setUserInfoWithoutIdentifyPlugin",value:function(e){e&&Object.assign(this.userInfo,e)}},{key:"getUserInfo",value:function(){return this.userInfo}},{key:"getAdInfo",value:function(){return this.adInfo}},{key:"setAdInfo",value:function(e){e&&(this.adInfo?this.adInfo=Object.assign({},this.adInfo,e):this.adInfo=e)}},{key:"getAppInfo",value:function(){return this.appInfo}},{key:"setAppInfo",value:function(e){e&&(this.appInfo=Object.assign({},this.appInfo,e))}},{key:"getPageInfo",value:function(){return this.pageInfo}},{key:"getPageSign",value:function(){return this.pageSign}},{key:"setPageInfo",value:function(e,t){var n=Object.assign({},this.pageInfo),r=Object.assign({},this.pageSign);if(n.url!==e){var i=n.url;if(void 0!==n.url&&(n.referrer=n.url),void 0!==t&&(n.referrer=t),void 0!==r.pageIndex){var o=r.pageIndex,a=o.index,c=o.sub,s=o.main;r.pageIndex={index:++a,sub:++c,main:s}}return n.url=e,this.pageInfo=n,this.pageSign=r,{from:i,pageIndex:r.pageIndex}}}},{key:"setPageInfoData",value:function(e){this.pageInfo=Object.assign({},this.pageInfo,e)}},{key:"getSessionIdFromCache",value:function(){return null}},{key:"setSessionIdToCache",value:function(e){}},{key:"setSignalDiagnosticLabels",value:function(e){Object.assign(this.signalDiagnosticLabels,e)}},{key:"getSignalDiagnosticLabels",value:function(){return this.signalDiagnosticLabels}},{key:"getPageId",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"".concat(Date.now());return"".concat(e,"-").concat(ei(5))}},{key:"getPageViewId",value:function(){var e=this.pageSign,t=e.pageId,n=e.pageIndex;return"".concat(t).concat(n?".".concat(n.main,".").concat(n.sub):"")}},{key:"getVariationId",value:function(){return""}},{key:"isLegacyPixel",value:function(e){return!1}},{key:"initPageSign",value:function(){var e=this.getSessionIdFromCache();null===e&&(e=nr("sessionId"),this.setSessionIdToCache(e));var t={sessionId:e,pageId:nr("pageId")};this.pageSign=t}}]),e}();po=ho([A.injectable()],po);var vo=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},_o=function(){function e(){i(this,e),this.events={}}return a(e,[{key:"on",value:function(e,t){var n=this.events[e]||[];n.push(t),this.events[e]=n}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=0;s--)(o=e[s])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},mo=function(e){s(n,e);var t=h(n);function n(e,r){var o;return i(this,n),(o=t.call(this)).reporterInfo={},o.options={},o.plugins={},o.rules=[],o.reportEventHistory={},o.reportResultSet=[],o.selfHostConfig={},o.currentHref="",o.advancedMatchingAvailableProperties={external_id:!0},o.reportService=r,o.context=e,o}return a(n,[{key:"getParameterInfo",value:function(){var e=this;return this.getInstance().then((function(){var t=e.reporterInfo,n=t.name,r=void 0===n?"":n,i=t.status,o=void 0===i?1:i,a=t.setupMode,c=void 0===a?0:a,s=t.advertiserID,u=void 0===s?"":s,l=t.is_onsite,f=void 0!==l&&l;return{pixelCode:e.getReporterId(),name:r,status:o,setupMode:c,advertiserID:u.toString(),partner:e.getReporterPartner()||"",is_onsite:f,advancedMatchingAvailableProperties:e.advancedMatchingAvailableProperties,rules:e.rules}}))}},{key:"getInstance",value:function(){return this.pixelPromise=Promise.resolve(this)}},{key:"getReporterId",value:function(){return""}},{key:"getReporterUniqueLoadId",value:function(){return"".concat(this.getReporterId())}},{key:"getReporterPartner",value:function(){}},{key:"getReporterInfo",value:function(){return{pixel:{code:this.getReporterId()}}}},{key:"setAdvancedMatchingAvailableProperties",value:function(e){this.advancedMatchingAvailableProperties=Object.assign({},this.advancedMatchingAvailableProperties,e)}},{key:"isOnsite",value:function(){return!1}},{key:"isPartnerReporter",value:function(){return!1}},{key:"getReportResultSet",value:function(){return this.reportResultSet}},{key:"getUserInfo",value:function(e){return{}}},{key:"getReporterMatchedUserFormatInfo",value:function(){return{}}},{key:"getReporterMatchedUserFormatInfoV2",value:function(){return{}}},{key:"getReportEventHistoryKey",value:function(e){return"tiktok"}},{key:"clearHistory",value:function(){this.reportEventHistory={}}},{key:"pushReport",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"tiktok";this.reportEventHistory[t]||(this.reportEventHistory[t]=[]),this.reportEventHistory[t].push(e)}},{key:"hasReportEventHistory",value:function(e,t){var n=this.getReportEventHistoryKey(t);return this.reportEventHistory[n]?!(!Tr.includes(e)||!this.reportEventHistory[n].includes(e)):(this.reportEventHistory[n]=[],!1)}},{key:"page",value:function(){}},{key:"track",value:function(e,t,n,r,i){var o=this,a=r||Er.TRACK,c=i||Fn.defaultReport;return!this.reportService||this.hasReportEventHistory(e,c)?Promise.resolve(null):(this.pushReport(e,this.getReportEventHistoryKey(c)),qi(this.reportService.reportPreposition||[]).then((function(){var r=o.getReporterId(),i=o.trackSync(r,e,t,n,a,c);if(o.trackPostTask({reporterId:r,eventType:e,properties:t,eventConfig:n,type:a,reportType:c,reportData:i})&&i){var s={reporterId:r,eventType:e,properties:t,eventConfig:n,type:a,reportType:c,reportData:i};return Promise.resolve(s)}return Promise.resolve(null)})))}},{key:"getEventType",value:function(e){return e}},{key:"trackPostTask",value:function(e){return!0}},{key:"trackSync",value:function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Er.TRACK,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:Fn.defaultReport,a=arguments.length>6?arguments[6]:void 0,c=i!==Er.SELFHOST?this.assemblyData(e,t,n,r,i):this.assemblySelfHostData(e,t,n,r,i),s=a||Li(i,e);if(null!==s&&this.reportService)return this.emit("beforeReport",e,t,c,r,i),this.reportResultSet.push(this.reportService.report(s,c,o)),c}},{key:"handlePropertiesToOptions",value:function(e,t){var n={};return t.forEach((function(t){n[t]=e[t],delete e[t]})),n}},{key:"assemblyData",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};arguments.length>4&&void 0!==arguments[4]||Er.TRACK;var i=this.context.getAllData(),o=i.adInfo,a=i.userInfo,c=i.appInfo,s=i.pageSign,u=i.libraryInfo,l=i.pageInfo,f=i.signalType,d=s.sessionId,h=s.variationId,p=Object.assign({},n),v=p&&p.pixelMethod||"";p&&p.pixelMethod&&delete p.pixelMethod;var _=Object.assign({},u,{version:this.context.isLegacyPixel(e)?"legacy-".concat(u.version):u.version}),g=ti(o,Xn),y=Object.assign({},g,{device_id:c.device_id,uid:c.user_id}),m=this.handlePropertiesToOptions(p,[Bn.LDU,Bn.EVENTID,Bn.EVENT_ID]),E=this.options.limited_data_use,b=null!==m.limited_data_use&&void 0!==m.limited_data_use?m.limited_data_use:E;null==b?delete m.limited_data_use:m.limited_data_use=!!b;var I=r&&(r.event_id||r.eventID)||"";m.event_id=I||m.event_id||m.eventID||"",delete m.eventID;var T=this.getReporterInfo();T.pixel&&(T.pixel.runtime=Ni(),v&&(T.pixel.mode=v));var O=this.getUserInfo(Jn.Manual)||{},S=this.getUserInfo(Jn.ManualV2)||{},N=this.getReporterMatchedUserFormatInfoV2()||{},R=this.getUserInfo(Jn.Auto)||{};R.auto_trigger_type&&(Object.assign(p,{auto_trigger_type:R.auto_trigger_type}),delete R.auto_trigger_type),bi()&&Object.assign(p,{android_version:c.android_version,device_model:c.device_model});var A={};a.anonymous_id&&(A.anonymous_id=a.anonymous_id);var P=this.getEventType(t),C={event:P,event_id:I,message_id:rr(nr(vr),e),is_onsite:!!f,timestamp:(new Date).toJSON(),context:Object.assign(Object.assign({ad:y,device:{platform:c.platform},user:Object.assign({},A,O,S,R)},T),{page:Object.assign({},l),library:Object.assign({},_),session_id:rr(d,e),pageview_id:rr(this.context.getPageViewId(),this.getReporterUniqueLoadId(),mr),variation_id:h||""}),_inspection:N,properties:p};return Object.assign(C,m)}},{key:"assemblySelfHostData",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=arguments.length>4?arguments[4]:void 0;return this.assemblyData(e,t,n,r,i)}}]),n}(_o);mo=yo([A.injectable()],mo);var Eo=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},bo=function(){function e(t){var n=t.name,r=t.context,o=t.reporters;i(this,e),this.reporters=[],this.context=r,this.reporters=o,this.name=n}return a(e,[{key:"initStart",value:function(){}},{key:"initEnd",value:function(){}},{key:"adInfoInitStart",value:function(){}},{key:"adInfoInitEnd",value:function(){}},{key:"contextInitStart",value:function(){}},{key:"contextInitEnd",value:function(){}},{key:"pageUrlWillChange",value:function(e,t){}},{key:"pageUrlDidChange",value:function(e,t){}},{key:"pageDidLoad",value:function(){}},{key:"pageWillLeave",value:function(e){}},{key:"pixelSend",value:function(e,t,n,r,i){}},{key:"pixelDidMount",value:function(e){}}]),e}(),Io=function(e){s(n,e);var t=h(n);function n(){return i(this,n),t.apply(this,arguments)}return a(n)}(bo=Eo([A.injectable()],bo)),To=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},Oo=function(){function e(t,n){i(this,e),this.initialize=!1,this.plugins=[],this.observers=[],this.reporters=[],this.context=t,this.reportService=n}return a(e,[{key:"init",value:function(e){this.initContextInfo(e),this.initialize=!0}},{key:"initContextInfo",value:function(e){var t=this;this.dispatch(sr.CONTEXT_INIT_START);var n=e&&e.href?e.href:"";Ri()||this.initAdInfo(n),this.initAppInfo(n),this.reportService.pushPreposition(Promise.resolve().then((function(){return t.initUserInfo()}))),this.initTestId(n),this.dispatch(sr.CONTEXT_INIT_END)}},{key:"setPageIndex",value:function(e){}},{key:"setPageInfo",value:function(e,t){var n=this.context.getPageInfo();if(n.url!==e){this.dispatch(sr.PAGE_URL_WILL_CHANGE,n.url,e);var r=this.context.setPageInfo(e,t);r&&(r.pageIndex&&this.setPageIndex(r.pageIndex),this.dispatch(sr.PAGE_URL_DID_CHANGE,e,r.from||""))}}},{key:"initAdInfo",value:function(e){}},{key:"initOffsiteAdInfo",value:function(e){}},{key:"initAppInfo",value:function(e){}},{key:"initUserInfo",value:function(){}},{key:"initTestId",value:function(e){}},{key:"usePlugin",value:function(e){try{if(!this.plugins.find((function(t){return t.name===e.name}))){this.plugins.push(e);var t=e.name;if(t)this["".concat(t[0].toLowerCase()+t.slice(1),"Plugin")]=e}}catch(e){}}},{key:"useObserver",value:function(e){try{if(!this.observers.find((function(t){return t.name===e.name}))){this.observers.push(e);var t=e.name;if(t)this["".concat(t[0].toLowerCase()+t.slice(1))]=e}}catch(e){}}},{key:"getPlugin",value:function(e){return this.plugins.find((function(t){return t.name===e}))||null}},{key:"getReporter",value:function(e){return this.reporters.find((function(t){return t.getReporterId()===e}))}},{key:"instance",value:function(e){var t=this.getReporter(e);return t||(wi(Sr.PIXEL_EMPTY,new Error(""),{pixelCode:e}),new go(e))}},{key:"instances",value:function(){return this.reporters}},{key:"identify",value:function(e,t){var n=fi(e,t);this.context.setUserInfo(n)}},{key:"page",value:function(e){e.url!==this.context.getPageInfo().url&&(this.setPageInfo(e.url,e.referrer),this.reporters.forEach((function(e){e.clearHistory()})));var t=Object.assign({},e);delete t.url,delete t.referrer,this.reporters.forEach((function(e){e.page(t)}))}},{key:"isOnsitePage",value:function(){return this.context.getSignalType()===cr.ONSITE||this.reporters.every((function(e){return e.isOnsite()}))}},{key:"track",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.instances().forEach((function(r,i){r.track(e,t,Object.assign({_i:i},n))}))}},{key:"dispatch",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=0;s--)(o=e[s])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},No=function(){function t(e,n){i(this,t),this.reportPreposition=[],this.httpService=e,this.bridgeService=n}var n;return a(t,[{key:"pushPreposition",value:function(e){this.reportPreposition.push(e)}},{key:"report",value:(n=r(e().mark((function t(n,r,i){return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.resolve());case 1:case"end":return e.stop()}}),t)}))),function(e,t,r){return n.apply(this,arguments)})}]),t}();No=So([A.injectable()],No);var Ro,Ao=function(e){s(n,e);var t=h(n);function n(e){var r;return i(this,n),(r=t.call(this,e)).observers=new Set([]),r}return a(n,[{key:"addObserver",value:function(e){this.observers.add(e)}},{key:"removeObserver",value:function(e){this.observers.delete(e)}},{key:"notifyObservers",value:function(e,t){this.observers.forEach((function(n){return n.call(t,e)}))}}]),n}(bo);!function(e){e[e.Live=0]="Live",e[e.NoRecord=1]="NoRecord"}(Ro||(Ro={}));var Po,Co=function(e,t,n){e.isBound(t)?e.rebind(t).toConstantValue(n):e.bind(t).toConstantValue(n)},wo=function(e,t){var n=t.id,r=t.type,i=void 0===r?Zn.PIXEL_CODE:r,o=t.info,a=t.options,s=void 0===a?{}:a,u=t.plugins,l=void 0===u?{}:u,f=t.rules,d=void 0===f?[]:f,h=e.get(Or.TTQ),p=e.get(Or.TTQ_REPORTERS);if(!p.some((function(e){return e.getReporterId()===n}))){Co(e,br.ID,n),Co(e,br.Type,i),Co(e,br.Info,o||c({},i,n)),Co(e,br.Options,s),Co(e,br.Plugins,l),Co(e,br.Rules,d),h.enableFirstPartyCookie((null==o?void 0:o.firstPartyCookieEnabled)||!1);var v=e.get(Or.REPORTER);if(l){var _=l.AdvancedMatching,g=l.AutoAdvancedMatching,y={};_&&Object.assign(y,_),g&&Object.assign(y,g),v.setAdvancedMatchingAvailableProperties(y)}return v.on("beforeReport",(function(e,t,n,r,i){h.dispatch(sr.PIXEL_SEND,e,t,n,r,i)})),p.push(v),e.rebind(Or.TTQ_REPORTERS).toConstantValue(p),h.dispatch(sr.PIXEL_DID_MOUNT,v),v}},ko=function(e){var t=Gr(),n=Jr(),r=Wr(),i=Mi().pixelCode,o=void 0===i?"":i,a=["holdConsent","revokeConsent","grantConsent"];["instance","instances","loadPixel","enableCookie","disableCookie","holdConsent","revokeConsent","grantConsent"].forEach((function(t){Object.defineProperty(r,t,{get:function(){return function(){try{var n=Array.prototype.slice.call(arguments);return a.indexOf(t)>-1&&setTimeout((function(){Ci(Sr.CUSTOM_INFO,{pixelCode:o,custom_name:t,custom_enum:JSON.stringify(n)})})),e[t].apply(e,n)}catch(e){return wi(Sr.API_ERROR,e,{extJSON:{api:t}}),{}}}},set:function(){}})})),["page","track","identify"].forEach((function(t){Object.defineProperty(r,t,{get:function(){return function(){try{var n=1===arguments.length&&void 0===arguments[0]?[]:Array.prototype.slice.call(arguments);return a.indexOf(t)>-1&&setTimeout((function(){var e=JSON.stringify(n.map((function(e){return er(e)?Object.keys(e):e})));Ci(Sr.CUSTOM_INFO,{pixelCode:o,custom_name:t,custom_enum:e})})),uo(t,n),e[t].apply(e,n)}catch(e){return wi(Sr.API_ERROR,e,{extJSON:{api:t}}),{}}}},set:function(){}})})),t[n]._mounted=!0,t[n].initialize=!0,function(e){Vr=e}(t[n])},Mo=function(e,t,n){var r=Wr(),i=function(){var e=Wr();return e&&e._i||{}}();if(Object.entries(i).forEach((function(r){var i=_(r,2),o=i[0],a=i[1];if(!a._init&&("Tealium"===Xr()||Kr()||a.info)){if(t.getReporter(o))ki(Nr.DUPLICATE_PIXEL_CODE);else(n||wo)(e,{id:o,type:Zn.PIXEL_CODE,info:a.info,options:a.options,rules:a.rules,plugins:a.plugins});if(a._init=!0,a.length>0)for(;a.length;){var c=a.shift();if(c){var s=g(c),u=s[0],l=s.slice(1),f=t.instance(o);if(f)switch(u){case"identify":t.identify(l[0],l[1]);break;case"page":t.page(l[0]);break;case"track":f.track(l[0],l[1],l[2]||{});break;default:f[u]?f[u](l[0],l[1],l[2]||{}):wi(Sr.CUSTOM_ERROR,new Error("action not find: ".concat(f[u])))}}}}})),r.length>0)for(;r.length;){var o=r.shift();if(o){var a=g(o),c=a[0],s=a.slice(1);switch("Tealium"!==Xr()&&uo(c,s),c){case"identify":t.identify(s[0],s[1]);break;case"page":t.page(s[0]);break;case"track":t.track(s[0],s[1],s[2]||{});break;case"enableCookie":t.enableCookie();break;case"disableCookie":t.disableCookie();break;case"holdConsent":t.holdConsent();break;case"revokeConsent":t.revokeConsent();break;case"grantConsent":t.grantConsent()}}}},Lo={ViewForm:"ViewContent",ViewConsultationPage:"ViewContent",ViewDownloadPage:"ViewContent",Checkout:"PlaceAnOrder",Purchase:"CompletePayment",Registration:"CompleteRegistration",AddBilling:"AddPaymentInfo",StartCheckout:"InitiateCheckout",ClickInDownloadPage:"ClickButton",ClickInConsultationPage:"ClickButton",ClickForm:"ClickButton",ClickToDownload:"Download",Consult:"Contact",ConsultByPhone:"Contact"},Do=["event_experiment","dynamic_parameter_config","eb_version"],xo=function(e){var t;return e.context.ad={},Object.keys((null===(t=null==e?void 0:e.context)||void 0===t?void 0:t.user)||{}).forEach((function(t){e.context.user[t]=""})),e},jo=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e.forEach((function(e){t.hasOwnProperty(e)&&(n[e]=t[e],delete t[e])})),n},Uo=function(e){s(r,e);var n=h(r);function r(e){var t;i(this,r);var o=e.id,a=e.type,s=e.isOnsitePage,u=e.context,l=e.reporterInfo,f=e.ttqOptions,d=e.reportService,h=e.plugins,p=void 0===h?{}:h,v=e.rules,_=void 0===v?[]:v,g=e.options,y=void 0===g?{}:g;return(t=n.call(this,u,d)).ttp="",t.loaded=!1,t.id=o,t.pixelCode=o,t.type=a,t.isOnsitePage=s,t.options=y||{},t.plugins=p||{},t.rules=_||[],t.reporterInfo=Object.assign(l||{},c({},a,o)),t.ttp=f.ttp||"",t.currency_list=f.currency_list||null,t.ttqPartner=f.partner||"",t.selfHostConfig=f.self_host_config||{},t.pixelPromise=t.getInstance(),t}return a(r,[{key:"identify",value:function(e,t){var n=fi(e,t);this.context.setUserInfo(n)}},{key:"getReporterId",value:function(){return this.id||""}},{key:"getReporterUniqueLoadId",value:function(){return"".concat(this.reporterInfo.loadId,"-").concat(this.getReporterId())}},{key:"getReporterPartner",value:function(){var e;return(null===(e=this.reporterInfo)||void 0===e?void 0:e.partner)||""}},{key:"setPixelInfo",value:function(e,t,n){var r=this.type;this.reporterInfo=Object.assign(this.reporterInfo,Object.assign({},e),c({},r,this.getReporterId())),t&&(this.rules=t),n&&(this.plugins=n)}},{key:"getInstance",value:function(){var e=this;if(this.pixelPromise)return this.pixelPromise;var t=function(e){return so()[e]||{}}(this.id);return Kr()||t&&t.info?(this.loaded=!0,this.pixelPromise=Promise.resolve(this)):(this.pixelPromise=new Promise((function(t,n){var r,i;Yi((r=e.id,i=location&&location.hostname,"".concat("https://analytics.tiktok.com/i18n/pixel/config.js","?sdkid=").concat(r,"&hostname=").concat(i))).then((function(){e.loaded=!0,t(e)})).catch((function(t){e.pixelPromise=null,n(t)}))})),this.pixelPromise)}},{key:"getReporterInfo",value:function(){return this.reporterInfo.pixelCode?v(u(r.prototype),"getReporterInfo",this).call(this):{shop_id:this.reporterInfo.shopId,eventSourceId:this.reporterInfo.eventSourceId}}},{key:"getUserInfo",value:function(e){var t=this.context.getUserInfo(),n=ni(t,Object.assign({},this.advancedMatchingAvailableProperties));switch(e){case Jn.Manual:return ni(this.isPartnerReporter()?n:t,{external_id:!0,email:!0,phone_number:!0});case Jn.ManualV2:return ni(n,{first_name:!0,last_name:!0,city:!0,state:!0,country:!0,zip_code:!0});case Jn.Auto:var r=ni(n,{external_id:!0,auto_email:!0,auto_phone_number:!0});return Object.assign(r,(r.auto_email||r.auto_phone_number)&&t.auto_trigger_type?{auto_trigger_type:t.auto_trigger_type}:{});default:return n}}},{key:"getReporterMatchedUserFormatInfo",value:function(){var e=this.context.getUserFormatInfo(),t=function(e,t){var n={identity_params:{}};return 0===Object.keys(e).length?{}:(Object.entries(t).forEach((function(t){var r=_(t,2),i=r[0];if(r[1])if(e[i]&&e[i].length){var o=e[i]||[Vn.EMPTY_VALUE];n.identity_params[i]=y(o)}else n.identity_params[i]=[Vn.EMPTY_VALUE]})),n)}(e,this.isPartnerReporter()?this.advancedMatchingAvailableProperties:{external_id:!0,email:!0,phone_number:!0}),n=ni(e,{auto_email:!0,auto_phone_number:!0});return Object.keys(n).length>0&&(t.identity_params||(t.identity_params={}),Object.assign(t.identity_params,n)),t}},{key:"getReporterMatchedUserFormatInfoV2",value:function(){var e,t=this.context.getUserFormatInfoV2(),n=this.isPartnerReporter()?this.advancedMatchingAvailableProperties:{external_id:!0,email:!0,phone_number:!0};return n.zip_code=(null===(e=this.advancedMatchingAvailableProperties)||void 0===e?void 0:e.zip_code)||!1,function(e,t){if(0===Object.keys(e).length)return{};var n={identity_params:{}},r={email:["email_is_hashed","sha256_email"],phone_number:["phone_is_hashed","sha256_phone"],zip_code:["zip_code"]};return Object.entries(t).forEach((function(t){var i=_(t,2),o=i[0];i[1]&&r[o]&&r[o].forEach((function(t){if(n.identity_params[t]=[Vn.EMPTY_VALUE],e[t]){var r=e[t]||[Vn.EMPTY_VALUE];n.identity_params&&(n.identity_params[t]=y(r))}}))})),n}(t,n)}},{key:"isOnsite",value:function(){var e;return!!(null===(e=this.reporterInfo)||void 0===e?void 0:e.is_onsite)}},{key:"isPartnerReporter",value:function(){var e=this.getReporterPartner();return!(!e||"None"===e)}},{key:"getSignalDiagnosticLabels",value:function(){var e=this.context.getSignalDiagnosticLabels();if(!e)return Object.assign({},$n);var t=this.advancedMatchingAvailableProperties,n=t.email,r=t.phone_number,i=t.auto_email,o=t.auto_phone_number;n=!this.isPartnerReporter()||n,r=!this.isPartnerReporter()||r;var a=ni(e,{raw_email:n,raw_phone:r,hashed_email:n,hashed_phone:r,raw_auto_email:i,raw_auto_phone:o});return Object.assign({},$n,a)}},{key:"assemblyData",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Er.TRACK,a=v(u(r.prototype),"assemblyData",this).call(this,e,t,n,i,o);a.is_onsite=this.isOnsitePage.value;var c=this.ttqPartner;c&&(a.partner=c),a.signal_diagnostic_labels=this.getSignalDiagnosticLabels();var s=Yr();s&&(a.context.userAgent=s);var l=Wi();return l&&(a.context.page.load_progress=l),a._inspection=jo(Do,a.properties,a._inspection),a.context.ad.sdk_env=vi(),a.context.ad.jsb_status=Si(),o!==Er.INTERACTION&&o!==Er.PERFORMANCE&&o!==Er.PERFORMANCE_INTERACTION||!1!==this.context.getEnableAdTracking()||this.isOnsitePage.value||(a.context.user={},a.context.ad=this.context.getOffsiteAdInfo(),a.context.ad=ti(a.context.ad,Xn)),a}},{key:"page",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};window.location.href!==this.currentHref&&(this.currentHref=window.location.href,this.track(Ir,e,{}))}},{key:"track",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Er.TRACK,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Fn.defaultReport;return i&&i.pixel_code&&this.getReporterId()!==i.pixel_code?Promise.resolve(null):this.getInstance().then((function(){var c=t.getReporterId();if(Rr.includes(e))return v(u(r.prototype),"track",t).call(t,e,n,i,o,a);var s=Object.assign({},i);return t.selfHostConfig[c]&&!i.eventID&&(s=Object.assign({},s,{eventID:rr(nr(yr),c)})),v(u(r.prototype),"track",t).call(t,e,n,s,o,a)}))}},{key:"getEventType",value:function(e){return Lo[e]||e}},{key:"trackSync",value:function(e,n){var i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Er.TRACK,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:Fn.defaultReport,l=arguments.length>6?arguments[6]:void 0;if("track"===c&&Ci(Sr.PIXEL_SEND,{pixelCode:e,extJSON:{event:n}}),c===Er.TRACK){o&&"string"==typeof o.currency&&(o.currency=o.currency.toUpperCase());var f=this.context.getTestID();if(f){var d=this.assemblyData(e,n,o,a);d.tt_test_id=f;var h=xo(d);return null===(i=null==this?void 0:this.reportService)||void 0===i||i.report(l||Pr,h,Fn.httpReport),h}if(o&&"object"===t(o)){var p=o.value,_=o.currency;void 0===p||zi(p)||Ci(Sr.CUSTOM_ERROR,{pixelCode:e,custom_name:"invalid_value",extJSON:{event:n,value:p,currency:_}}),void 0===_||Qi(_,this.currency_list)||Ci(Sr.CUSTOM_ERROR,{pixelCode:e,custom_name:"invalid_currency",extJSON:{event:n,value:p,currency:_}})}return v(u(r.prototype),"trackSync",this).call(this,e,n,o,a,c,s,l)}v(u(r.prototype),"trackSync",this).call(this,e,n,o,a,c,s,l)}},{key:"trackPostTask",value:function(e){var t=e.reporterId,n=e.eventType,r=e.properties,i=e.eventConfig;return!Rr.includes(n)&&(this.selfHostConfig[t]&&!this.hasReportEventHistory(n,Fn.htmlHttpReport)&&(this.pushReport(n,this.getReportEventHistoryKey(Fn.htmlHttpReport)),this.trackSync(t,n,r,i,Er.SELFHOST,Fn.htmlHttpReport)),!0)}},{key:"getReportEventHistoryKey",value:function(e){return e===Fn.htmlHttpReport?this.selfHostConfig[this.getReporterId()]:"tiktok"}},{key:"assemblySelfHostData",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=arguments.length>4?arguments[4]:void 0,o=this.assemblyData(e,t,n,r,i),a=this.ttp;return a&&(o.context.user.ttp=a),o}}]),r}(mo),Bo=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},Fo=function(e,t){return function(n,r){t(n,r,e)}},Ho=function(e){s(n,e);var t=h(n);function n(e,r,o,a,c,s,u,l,f,d){return i(this,n),t.call(this,{id:e,type:r,isOnsitePage:o,context:a,reporterInfo:c,ttqOptions:s,reportService:u,plugins:l,rules:f,options:d})}return a(n,[{key:"getInstance",value:function(){return Promise.resolve(this)}}]),n}(Uo),Vo=function(e){s(n,e);var t=h(n);function n(){return i(this,n),t.apply(this,arguments)}return a(n,[{key:"getInstance",value:function(){return this.pixelPromise=Promise.resolve(this),this.pixelPromise}},{key:"track",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return lo(this.getReporterId(),"track",[e,t,n]),Promise.resolve(null)}}]),n}(Ho=Bo([A.injectable(),Fo(0,A.inject(br.ID)),Fo(1,A.inject(br.Type)),Fo(2,A.inject(br.IsOnsitePage)),Fo(3,A.inject(Or.CONTEXT)),Fo(4,A.inject(br.Info)),Fo(5,A.inject(Or.TTQ_GLOBAL_OPTIONS)),Fo(6,A.inject(Or.REPORT_SERVICE)),Fo(6,A.optional()),Fo(7,A.inject(br.Plugins)),Fo(7,A.optional()),Fo(8,A.inject(br.Rules)),Fo(8,A.optional()),Fo(9,A.inject(br.Options)),Fo(9,A.optional())],Ho)),Go=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},Jo=function(e,t){return function(n,r){t(n,r,e)}},Wo=function(t){s(c,t);var n,o=h(c);function c(e,t,n,r,a,s,u,l,f,d,h,p,v,_,g,y,m,E,b,I,T,O,S){var N;return i(this,c),(N=o.call(this,e,a)).env=l,N.reporters=t,N.cookieService=s,N.consentService=u,N.adService=n,N.appService=r,N.historyObserver=S,N.autoAdvancedMatchingPlugin=d,N.callbackPlugin=h,N.identifyPlugin=p,N.monitorPlugin=f,N.performanceInteractionPlugin=v,N.webFLPlugin=_,N.shopifyPlugin=g,N.autoConfigPlugin=y,N.diagnosticsConsolePlugin=m,N.competitorInsightPlugin=E,N.pangleCookieMatchingPlugin=b,N.eventBuilderPlugin=I,N.pagedataPlugin=O,N.enrichIpv6Plugin=T,N.enrichIpv6Plugin=T,N.historyObserver&&N.useObserver(N.historyObserver),N.autoAdvancedMatchingPlugin&&N.usePlugin(N.autoAdvancedMatchingPlugin),N.callbackPlugin&&N.usePlugin(N.callbackPlugin),N.identifyPlugin&&N.usePlugin(N.identifyPlugin),N.monitorPlugin&&N.usePlugin(N.monitorPlugin),N.performanceInteractionPlugin&&N.usePlugin(N.performanceInteractionPlugin),N.webFLPlugin&&N.usePlugin(N.webFLPlugin),N.shopifyPlugin&&N.usePlugin(N.shopifyPlugin),N.autoConfigPlugin&&N.usePlugin(N.autoConfigPlugin),N.diagnosticsConsolePlugin&&N.usePlugin(N.diagnosticsConsolePlugin),N.competitorInsightPlugin&&N.usePlugin(N.competitorInsightPlugin),N.pangleCookieMatchingPlugin&&N.usePlugin(N.pangleCookieMatchingPlugin),N.eventBuilderPlugin&&N.usePlugin(N.eventBuilderPlugin),N.enrichIpv6Plugin&&N.usePlugin(N.enrichIpv6Plugin),N.monitorPlugin&&(Pi.info.forEach((function(e){var t;null===(t=N.monitorPlugin)||void 0===t||t.info(e.event,e.detail,e.withoutJSB)})),Pi.error.forEach((function(e){var t;null===(t=N.monitorPlugin)||void 0===t||t.error(e.event,e.err,e.detail,e.withoutJSB)})),Pi.info=[],Pi.error=[]),N.dispatch(sr.INIT_START),N.pagedataPlugin&&N.usePlugin(N.pagedataPlugin),N.onPageLoaded(),N.onPageLeave(),N.init(window.location),N.setPageInfo(location.href,document.referrer),N.dispatch(sr.INIT_END),N}return a(c,[{key:"initAdInfo",value:function(e){var t=Di(fr);this.dispatch(sr.BEFORE_AD_INFO_INIT_START),t?this.initAdCache(t):this.initBaseAdInfo(e)}},{key:"initAdCache",value:function(e){this.dispatch(sr.AD_INFO_INIT_START),e.ad_info_from="cache",e.ad_info_status="fulfilled(cache)",this.setAdInfo(e),this.initOffsiteAdInfo(e)}},{key:"initBaseAdInfo",value:function(t){var n=this;this.adService.webBridgeService.jsbridge&&this.dispatch(sr.AD_INFO_INIT_START),this.reportService.pushPreposition(r(e().mark((function r(){var i;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,n.adService.getAdInfo(t);case 3:i=e.sent,n.context.setAdInfo(i),n.initOffsiteAdInfo(i),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),wi(Sr.INIT_ERROR,e.t0,{extJSON:{position:"initAdInfo"}});case 11:case"end":return e.stop()}}),r,null,[[0,8]])})))())}},{key:"initOffsiteAdInfo",value:function(e){var t=function(e,t){var n={};try{var r=e.creative_id,i=(e.callback,e.idc),o=e.convert_id,a=e.ad_info_from,c=e.ad_info_status,s=e.log_extra,u=e.ext_params,l=e.ATTStatus;if(r&&(n.creative_id=r),i&&(n.idc=i),o&&(n.convert_id=o),a&&(n.ad_info_from=a),c&&(n.ad_info_status=c),u&&(n.ext_params=u),l&&(n.ATTStatus=l),s){var f=JSON.parse(s),d=f.ad_user_agent,h=f.ad_id,p=f.rit,v=f.ocbs,_=f.vid,g=f.idc,y=f.country_id;h&&(n.ad_id=h),p&&(n.rit=p),d&&(n.ad_user_agent=d),v&&(n.ocbs=v),_&&(n.vid=_),g&&(n.idc=g),y&&(n.country_id=y)}return n}catch(e){return t&&t(e),n}}(e,(function(e){wi(Sr.INIT_ERROR,e,{extJSON:{position:"handleAdInfoOfficial"}})}));this.context.setOffsiteAdInfo(t);var n=function(e,t){try{var n=e.log_extra,r=e.ttuts;return!Ii()||(yi(t)?n?1!==JSON.parse(n).user_tracking_status:null===e.ATTStatus||void 0===e.ATTStatus||3===e.ATTStatus:null==r||1!==r)}catch(e){return!1}}(e,this.env);this.context.setEnableAdTracking(n),this.dispatch(sr.AD_INFO_INIT_END,{extJSON:{enabledAdTracking:n}})}},{key:"initAppInfo",value:function(t){var n=this,i=Di(dr);i?this.context.setAppInfo(i):this.reportService.pushPreposition(r(e().mark((function r(){var i;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.initBaseAppInfo(t);case 2:return i=e.sent,e.abrupt("return",i);case 4:case"end":return e.stop()}}),r)})))())}},{key:"initBaseAppInfo",value:(n=r(e().mark((function t(n){var r;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.appService.getAppInfo(n);case 2:return r=e.sent,this.context.setAppInfo(r),e.abrupt("return",r);case 5:case"end":return e.stop()}}),t,this)}))),function(e){return n.apply(this,arguments)})},{key:"initTestId",value:function(e){if(!this.context.getTestID()){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";try{var n=Ui("tt_test_id",e);return n&&n!==t&&Ji("tt_test_id",n,void 0,"session"),n||t}catch(e){return""}}(e,Fi("tt_test_id"));this.context.setTestID(t)}}},{key:"initUserInfo",value:function(){this.setCookieInfo()}},{key:"setPageIndex",value:function(e){e&&Vi(e)}},{key:"instance",value:function(e){var t=this.getReporter(e);return t||new Vo(e,Zn.PIXEL_CODE,{value:!1},this.context,{pixelCode:e},{})}},{key:"instances",value:function(){return this.reporters}},{key:"page",value:function(e){v(u(c.prototype),"page",this).call(this,Object.assign({url:(null==e?void 0:e.page)||location.href,referrer:(null==e?void 0:e.referrer)||document.referrer},e))}},{key:"track",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.pixel_code;if(void 0===r)v(u(c.prototype),"track",this).call(this,e,t,n);else{var i=this.instance(r);if(i instanceof Vo)return;i.track(e,t,n)}}},{key:"setAdInfo",value:function(e){this.context.setAdInfo(e)}},{key:"enableFirstPartyCookie",value:function(e){this.cookieService.enableFirstPartyCookie(e),e&&this.setCookieInfo()}},{key:"enableCookie",value:function(){this.cookieService.enableFirstPartyCookie(!0),this.setCookieInfo(),this.cookieService.enableCookie()}},{key:"disableCookie",value:function(){this.cookieService.disableCookie(),this.context.setUserInfoWithoutIdentifyPlugin({anonymous_id:void 0}),this.disablePangleCookie()}},{key:"holdConsent",value:function(){this.consentService.setConsentMode(Qn.HOLD)}},{key:"revokeConsent",value:function(){this.consentService.setConsentMode(Qn.REVOKE)}},{key:"grantConsent",value:function(){this.consentService.setConsentMode(Qn.GRANT)}},{key:"disablePangleCookie",value:function(){this.pangleCookieMatchingPlugin&&this.pangleCookieMatchingPlugin.disablePangleCookie()}},{key:"setAnonymousId",value:function(e){this.cookieService.setAnonymousId(e),this.initUserInfo()}},{key:"resetCookieExpires",value:function(){this.cookieService.resetExpires()}},{key:"setCookieInfo",value:function(){if(this.cookieService.canUseCookie()){var e=this.cookieService.getAnonymousId();if(e){var t={anonymous_id:e};this.context.setUserInfoWithoutIdentifyPlugin(t)}}}},{key:"onPageLoaded",value:function(){var e=this;window.addEventListener("load",(function(){e.dispatch(sr.PAGE_DID_LOAD)}),{once:!0})}},{key:"onPageLeave",value:function(){var e=this,t=function(){var t=Date.now();e.dispatch(sr.PAGE_WILL_LEAVE,t),e.consentService.updateCache()};window.addEventListener("beforeunload",t,{once:!0}),Ii()&&window.addEventListener("onpagehide"in window?"pagehide":"unload",t)}},{key:"loadPixel",value:function(e,t){e&&(this.reporters.find((function(t){return t.getReporterId()===e}))?ki(Nr.DUPLICATE_PIXEL_CODE):Wr().load(e,t||{}))}}]),c}(Oo),Ko=Wo=Go([A.injectable(),Jo(0,A.inject(Or.CONTEXT)),Jo(1,A.inject(Or.TTQ_REPORTERS)),Jo(2,A.inject(Or.AD_SERVICE)),Jo(3,A.inject(Or.APP_SERVICE)),Jo(4,A.inject(Or.REPORT_SERVICE)),Jo(5,A.inject(Or.COOKIE_SERVICE)),Jo(6,A.inject(Or.CONSENT_SERVICE)),Jo(7,A.inject(Or.ENV)),Jo(8,A.inject(Or.MONITOR_PLUGIN)),Jo(8,A.optional()),Jo(9,A.inject(Or.AUTO_ADVANCED_MATCHING_PLUGIN)),Jo(9,A.optional()),Jo(10,A.inject(Or.CALLBACK_PLUGIN)),Jo(10,A.optional()),Jo(11,A.inject(Or.IDENTIFY_PLUGIN)),Jo(11,A.optional()),Jo(12,A.inject(Or.PERFORMANCE_INTERACTION_PLUGIN)),Jo(12,A.optional()),Jo(13,A.inject(Or.WEB_FL_PLUGIN)),Jo(13,A.optional()),Jo(14,A.inject(Or.SHOPIFY_PLUGIN)),Jo(14,A.optional()),Jo(15,A.inject(Or.AUTO_CONFIG_PLUGIN)),Jo(15,A.optional()),Jo(16,A.inject(Or.DIAGNOSTICS_CONSOLE_PLUGIN)),Jo(16,A.optional()),Jo(17,A.inject(Or.COMPETITOR_INSIGHT_PLUGIN)),Jo(17,A.optional()),Jo(18,A.inject(Or.PANGLE_COOKIE_MATCHING_PLUGIN)),Jo(18,A.optional()),Jo(19,A.inject(Or.EVENT_BUILDER_PLUGIN)),Jo(19,A.optional()),Jo(20,A.inject(Or.ENRICH_IPV6_PLUGIN)),Jo(20,A.optional()),Jo(21,A.inject(Or.PAGEDATA_PLUGIN)),Jo(21,A.optional()),Jo(22,A.inject(Or.HISTORY_OBSERVER)),Jo(22,A.optional())],Wo);!function(e){e.BIND="bind",e.REBIND="rebind"}(Po||(Po={}));var Yo=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},qo=function(e,t){return function(n,r){t(n,r,e)}},Xo=function(e){s(n,e);var t=h(n);function n(e,r,o,a,c){var s;return i(this,n),(s=t.call(this,e)).setSignalType(c||cr.OFFSITE),s.pageSign={sessionId:"",pageId:"",variationId:"",pageIndex:{main:-1,sub:-1,index:-1}},s.legacy=o.legacy||[],s.variationId=o.variation_id||"",s.serverUniqueId=o.server_unqiue_id||"",s.reportService=r,s.initPageSign(),yi(a)&&Ii()&&(s.enableAdTracking=!1),s.data=f(s),s}return a(n,[{key:"getSessionIdFromCache",value:function(){var e=null;try{e=JSON.parse(sessionStorage.getItem(_r)||"")}catch(e){}return e}},{key:"setSessionIdToCache",value:function(e){xi(_r,e)}},{key:"getVariationId",value:function(){return this.variationId}},{key:"isLegacyPixel",value:function(e){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];try{return t.includes(e)}catch(e){return!1}}(e,this.legacy)}},{key:"assignPageInfo",value:function(e){Object.assign(this.pageInfo,e)}},{key:"getSessionIndex",value:function(){var e={main:-1,sub:-1,index:-1};try{var t=JSON.parse(sessionStorage.getItem(gr)||"{}");if(t)return Object.assign({},e,t)}catch(e){}return e}},{key:"setUserInfo",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(0!==Object.keys(t).length){var n={};Object.entries(t).forEach((function(t){var r=_(t,2),i=r[0],o=r[1];o&&(i!==Hr?n[i]=String(o).trim():e.setUserInfoWithoutIdentifyPlugin(c({},Hr,o)))}));var r=Wr(),i=null==r?void 0:r.getPlugin("Identify");i&&this.reportService.pushPreposition(i.handleUserProperties(n,t).then((function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.userProperties,o=t.userDataFormat,a=t.userDataFormatV2;if(r){Object.assign(e.userInfo,r);var c=e.getUserFormatInfo()||{},s=e.getUserFormatInfoV2()||{},u=e.getSignalDiagnosticLabels()||{};if(e.setUserFormatInfo(Object.assign({},c,o)),e.setUserFormatInfoV2(Object.assign({},s,a)),e.setSignalDiagnosticLabels(Object.assign({},u,t.identifierLabel||{})),0===Object.keys(e.userInfo).length||1===Object.keys(n).length&&Object.keys(n).includes("external_id"))return;var l=i.reporters[0]||null,f=l?Object.keys(Object.assign({},l.getUserInfo(Jn.Manual),l.getUserInfo(Jn.Auto))):[];l&&f.length&&l.track("EnrichAM",{},{},Er.TRACK)}})).catch((function(e){wi(Sr.API_ERROR,e,{extJSON:{api:"identify"}})})))}}},{key:"initPageSign",value:function(){var e,t=this.getSessionIdFromCache();null===t&&(t=(e=this.serverUniqueId)?"".concat(e).concat(mr).concat(ei(20)):nr("sessionId"),this.setSessionIdToCache(t));var n,r=this.getPageId((n=t)?n.split(mr)[0]:""),i=this.getVariationId(),o=this.getSessionIndex();o.main++,this.pageSign={sessionId:t,pageId:r,variationId:i,pageIndex:o}}}]),n}(po);Xo=Yo([A.injectable(),qo(0,A.inject(br.WebLibraryInfo)),qo(1,A.inject(Or.REPORT_SERVICE)),qo(2,A.inject(Or.TTQ_GLOBAL_OPTIONS)),qo(3,A.inject(Or.ENV)),qo(3,A.optional()),qo(4,A.inject(br.SignalType)),qo(4,A.optional())],Xo);var Qo=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},zo=function(e,t){return function(n,r){t(n,r,e)}},Zo=function(){function t(e){i(this,t),this.webBridgeService=e}var n;return a(t,[{key:"getAdInfo",value:(n=r(e().mark((function t(){var n,r,i,o,a=arguments;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=a.length>0&&void 0!==a[0]?a[0]:window.location.href,r=this.getAdInfoFromURL(n),!this.webBridgeService.jsbridge){e.next=8;break}return e.next=5,this.webBridgeService.getAdInfo();case 5:e.t0=e.sent,e.next=9;break;case 8:e.t0={};case 9:return i=e.t0,(o=Object.assign({},r,i))&&(o.creative_id&&o.log_extra||o.callback)&&xi(fr,o),e.abrupt("return",o);case 13:case"end":return e.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"getAdInfoFromURL",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location.href;return fo(e)}}]),t}();Zo=Qo([A.injectable(),zo(0,A.inject(Or.BRIDGE_SERVICE))],Zo);var $o=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},ea=function(e,t){return function(n,r){t(n,r,e)}},ta=function(){function t(e){i(this,t),this.webBridgeService=e}var n;return a(t,[{key:"getAppInfo",value:(n=r(e().mark((function t(n){var r,i,o,a,c;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=n||window.location.href,(i=this.getAppInfoFromURL(r)).platform=mi(),!bi()){e.next=11;break}return e.next=6,Ei();case 6:o=e.sent,a=o.model,c=o.platformVersion,i.device_model=a,i.android_version=c;case 11:return tr(i)||xi(dr,i),e.abrupt("return",i);case 13:case"end":return e.stop()}}),t,this)}))),function(e){return n.apply(this,arguments)})},{key:"getAppInfoFromURL",value:function(e){try{var t=Ui(Dr,e||window.location.href),n=t&&JSON.parse(t);return{device_id:n.device_id,user_id:n.uid}}catch(e){return{}}}}]),t}();ta=$o([A.injectable(),ea(0,A.inject(Or.BRIDGE_SERVICE))],ta);var na="ad_analytics_msg",ra="insight_log",ia=function(e){return!!(e.code&&e.data&&e.ret)};function oa(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n={};try{if("string"==typeof e)n.data=JSON.parse(e);else if(ia(e))(n=e).__data&&(n.data=n.__data);else if(void 0!==e.code){var r=Object.assign({},e),i=r.code;n.code=i,delete r.code,r.data?n.data=r.data:n.data=r}else n.data=e}catch(e){t&&wi(Sr.JSB_ERROR,e,{extJSON:{position:"getCallPromise bridge.call"}})}return n}var aa,ca=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},sa=function(e,t){return function(n,r){t(n,r,e)}},ua=function(){function t(e,n){i(this,t),this.env=e,gi(this.env)&&(this.jsbridge=n),this.bridgeTimeout=400}var n,o,c,s,u,l,f;return a(t,[{key:"getAdInfo",value:(f=r(e().mark((function t(){var n=this;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.jsbridge){t.next=3;break}return wi(Sr.JSB_ERROR,new Error("tt bridge error when getting ad info"),{extJSON:{position:"getAdInfo"}}),t.abrupt("return",Promise.resolve({}));case 3:return t.abrupt("return",new Promise(function(){var t=r(e().mark((function t(r){var i;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,n.callAdInfo();case 3:(i=e.sent).ad_info_from="jsb",i.ad_info_status=i.ad_info_status||"fulfilled",r(i),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(0),r({}),wi(Sr.JSB_ERROR,e.t0,{extJSON:{position:"getAdInfo"}});case 13:case"end":return e.stop()}}),t,null,[[0,9]])})));return function(e){return t.apply(this,arguments)}}()));case 4:case"end":return t.stop()}}),t,this)}))),function(){return f.apply(this,arguments)})},{key:"callAdInfo",value:(l=r(e().mark((function t(){var n,r;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.call("adInfo",{},window.top!==window?3500:5e3);case 3:if((n=e.sent).data){e.next=6;break}return e.abrupt("return",Promise.reject("adInfo no data"));case 6:return r={creative_id:n.data.cid,log_extra:n.data.log_extra},e.abrupt("return",r);case 10:if(e.prev=10,e.t0=e.catch(0),"JSBRIDGE TIMEOUT"!==e.t0){e.next=17;break}return Ci(Sr.CUSTOM_INFO,{custom_name:"ad_info_init_timeout"}),e.abrupt("return",{ad_info_status:"timeout"});case 17:return wi(Sr.JSB_ERROR,e.t0,{extJSON:{position:"getAdInfo"}}),e.abrupt("return",{});case 19:case"end":return e.stop()}}),t,this,[[0,10]])}))),function(){return l.apply(this,arguments)})},{key:"getAppInfo",value:(u=r(e().mark((function t(){return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.resolve({}));case 1:case"end":return e.stop()}}),t)}))),function(){return u.apply(this,arguments)})},{key:"send",value:(s=r(e().mark((function t(n,r){var i,o,a,c,s,u,l,f,d,h;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.jsbridge){e.next=2;break}return e.abrupt("return",Promise.resolve());case 2:return a=(null===(o=null===(i=null==n?void 0:n.context)||void 0===i?void 0:i.ad)||void 0===o?void 0:o.creative_id)||"0",c=io(n),s={analytics_message:c,trackLogData:JSON.stringify(n),category:"ad_analytics_msg",tag:na,label:ra},f={eventName:na,labelName:ra,value:a,extValue:"0",extJson:s},Ri()?(l="sendLog",u=this.call("sendLog",f,this.bridgeTimeout)):yi(this.env)?Ii()&&r?(d={eventName:ra,params:s},l="sendLogWithAdInfo",u=this.call("sendLogWithAdInfo",d,this.bridgeTimeout)):(l="sendLog",u=this.call("sendLog",f,this.bridgeTimeout)):(h={event_name:ra,version:2,properties:s},l="track_event",u=this.call("track_event",h,400)),Ci(Sr.CUSTOM_INFO,{custom_name:"send_report_data",extJSON:{api_name:l}}),e.abrupt("return",u);case 9:case"end":return e.stop()}}),t,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"call",value:(c=r(e().mark((function t(n){var r,i,o,a=this,c=arguments;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=c.length>1&&void 0!==c[1]?c[1]:{},i=c.length>2&&void 0!==c[2]?c[2]:400,o=!(c.length>3&&void 0!==c[3])||c[3],e.abrupt("return",new Promise((function(e,t){if(!a.jsbridge)return t("JSBRIDGE ERROR"),void(o&&wi(Sr.JSB_ERROR,new Error("JSBRIDGE ERROR"),{extJSON:{position:"getCallPromise"}}));var c;i>0&&(c=window.setTimeout((function(){t("JSBRIDGE TIMEOUT"),o&&wi(Sr.JSB_ERROR,new Error("JSBRIDGE TIMEOUT"),{extJSON:{position:"getCallPromise",method:n}})}),i)),a.jsbridge&&a.jsbridge.call&&a.jsbridge.call(n,r,(function(t){var n=oa(t,o);e(n),window.clearTimeout(c)}))})));case 4:case"end":return e.stop()}}),t)}))),function(e){return c.apply(this,arguments)})},{key:"sendAnalyticsEvent",value:(o=r(e().mark((function t(n){var r,i,o,a,c;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.method,i=n.path,o=n.params,a=n.data,e.next=3,this.call("sendAnalyticsEvent",{method:r,path:i,params:o,data:a,header:{"Content-Type":"application/json"}},0,!1);case 3:return c=e.sent,e.abrupt("return",null==c?void 0:c.code);case 5:case"end":return e.stop()}}),t,this)}))),function(e){return o.apply(this,arguments)})},{key:"updateWebFlData",value:(n=r(e().mark((function t(n){return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!yi(this.env)||!Ii()){e.next=2;break}return e.abrupt("return",this.call("updateFLLocalConv",n,this.bridgeTimeout));case 2:case"end":return e.stop()}}),t,this)}))),function(e){return n.apply(this,arguments)})}]),t}();ua=ca([A.injectable(),sa(0,A.inject(Or.ENV)),sa(0,A.optional()),sa(1,A.inject(Or.JS_BRIDGE)),sa(1,A.optional())],ua),function(e){e[e.P0=4]="P0",e[e.P1=3]="P1",e[e.P2=2]="P2",e[e.P3=1]="P3"}(aa||(aa={}));var la=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},fa="tt_hold_events",da=function(e){s(n,e);var t=h(n);function n(){var e;return i(this,n),(e=t.apply(this,arguments)).consentMode=Qn.UNKNOWN,e.queue=[],e.debounceUpdateCache=ri((function(){e.updateCache()}),200,f(e)),e.handleHistoryQueue=$r((function(){var t=Di(fa);Array.isArray(t)&&(e.queue=e.queue.concat(t),e.changeQueueWithConsent())})),e}return a(n,[{key:"on",value:function(e,t){v(u(n.prototype),"on",this).call(this,e,t),this.handleHistoryQueue()}},{key:"setConsentMode",value:function(e){this.consentMode=e,this.changeQueueWithConsent()}},{key:"changeQueueWithConsent",value:function(){switch(this.consentMode){case Qn.REVOKE:this.cleanQueue();break;case Qn.GRANT:this.releaseQueue(),this.cleanQueue();case Qn.HOLD:case Qn.UNKNOWN:}}},{key:"getConsentMode",value:function(){return this.consentMode}},{key:"cacheReportTask",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Fn.defaultReport;this.queue.push({url:e,data:t,type:n}),this.debounceUpdateCache()}},{key:"cleanQueue",value:function(){this.queue=[],function(e){try{window.sessionStorage.removeItem(e)}catch(e){}}(fa)}},{key:"updateCache",value:function(){this.queue&&this.queue.length>0&&xi(fa,this.queue)}},{key:"releaseQueue",value:function(){var e=this;this.queue.sort((function(t,n){return e.getEventPriority(n.data)-e.getEventPriority(t.data)})),this.emit("queue",this.queue)}},{key:"getEventPriority",value:function(e){return e.event&&e.event.length>0?aa.P0:e.action&&e.action.length>0?aa.P1:""===e.event?aa.P2:aa.P3}}]),n}(_o);da=la([A.injectable()],da);var ha=function(e){return Boolean(e)},pa=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},va=function(){function t(){i(this,t)}var n;return a(t,[{key:"send",value:(n=r(e().mark((function t(n,r){var i,o,a=arguments;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=a.length>2&&void 0!==a[2]?a[2]:0,e.prev=1,navigator&&navigator.sendBeacon){e.next=4;break}return e.abrupt("return",!1);case 4:if((o=navigator.sendBeacon(n,JSON.stringify(r)))||"number"!=typeof i||!(i>0)){e.next=10;break}return i--,e.next=9,ii(200);case 9:return e.abrupt("return",this.send(n,r,i));case 10:return e.abrupt("return",o);case 13:return e.prev=13,e.t0=e.catch(1),e.abrupt("return",!1);case 16:case"end":return e.stop()}}),t,this,[[1,13]])}))),function(e,t){return n.apply(this,arguments)})},{key:"sendByImage",value:function(e,t){(new Image).src=function(e,t){var n=new URL(e);return Object.keys(t).forEach((function(e){var r=t[e].toJSON?t[e].toJSON():String(t[e]);n.searchParams.set(e,r)})),n.toString()}(e,t)}}]),t}();va=pa([A.injectable()],va);var _a=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},ga=function(e,t){return function(n,r){t(n,r,e)}},ya=function(t){s(f,t);var n,o,c,u,l=h(f);function f(e,t,n,r){var o;return i(this,f),(o=l.call(this,e,t)).supportSendAnalyticsEvent=!0,o.consentService=n,o.consentService.on("queue",(function(e){e.forEach((function(e){var t=e.url,n=e.data,r=e.type;o.report(t,n,r)}))})),o.env=r,o}return a(f,[{key:"send",value:(u=r(e().mark((function t(n,r,i){var o,a,c,s,u,l;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.bridgeService.jsbridge){e.next=2;break}return e.abrupt("return");case 2:return u=!!r.context&&"timeout"===(null===(a=null===(o=r.context)||void 0===o?void 0:o.ad)||void 0===a?void 0:a.ad_info_status),l={},e.prev=4,e.next=7,this.bridgeService.send(r,u);case 7:if((l=e.sent)&&1===l.code){e.next=10;break}throw new Error("[fetch bridge] sendLog error: code ".concat(l&&l.code,", data: ").concat(l&&JSON.stringify(l)));case 10:return zr(r.event)&&Ci(Sr.JSB_SEND,{pixelCode:null===(c=r.context.pixel)||void 0===c?void 0:c.code,app_name:Oi()?"ultralite":"",extJSON:{event:r.event,event_id:r.event_id,need_inject_ad_info:u}}),e.abrupt("return",l);case 14:e.prev=14,e.t0=e.catch(4),zr(r.event)&&wi(Sr.JSB_ERROR,e.t0,{pixelCode:null===(s=r.context.pixel)||void 0===s?void 0:s.code,custom_name:"sendReportData",custom_enum:l&&l.code?"".concat(l.code):"non",app_name:Oi()?"ultralite":"",extJSON:{position:"sendReportData"}}),Oi()&&bi()&&this.sendHttpReport(n,r,i);case 18:case"end":return e.stop()}}),t,this,[[4,14]])}))),function(e,t,n){return u.apply(this,arguments)})},{key:"sendHttpReport",value:(c=r(e().mark((function t(n,r,i){var o,a,c,s=arguments;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=!(s.length>3&&void 0!==s[3])||s[3],a=s.length>4?s[4]:void 0,e.next=4,this.httpService.send(n,r,a);case 4:e.sent||this.httpService.sendByImage(n,{analytics_message:i}),o&&Ci(Sr.HTTP_SEND,{pixelCode:null===(c=r.context.pixel)||void 0===c?void 0:c.code,extJSON:{event:r.event,event_id:r.event_id}});case 7:case"end":return e.stop()}}),t,this)}))),function(e,t,n){return c.apply(this,arguments)})},{key:"beforeReport",value:(o=r(e().mark((function t(n,r){var i,o,a=arguments;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=a.length>2&&void 0!==a[2]?a[2]:Fn.defaultReport,(o=this.consentService.getConsentMode())!==Qn.REVOKE){e.next=4;break}return e.abrupt("return",!1);case 4:if(o!==Qn.HOLD){e.next=7;break}return this.consentService.cacheReportTask(n,r,i),e.abrupt("return",!1);case 7:return e.abrupt("return",!0);case 8:case"end":return e.stop()}}),t,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"report",value:(n=r(e().mark((function t(n,r){var i,o,a,c,s,u=arguments;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=u.length>2&&void 0!==u[2]?u[2]:Fn.defaultReport,e.next=3,this.beforeReport(n,r,i);case 3:if(e.sent){e.next=6;break}return e.abrupt("return");case 6:if(o=io(r),i!==Fn.defaultReport||!this.bridgeService.jsbridge){e.next=11;break}return e.next=10,this.send(n,r,o);case 10:return e.abrupt("return",e.sent);case 11:if(i!==Fn.httpReport||!this.bridgeService.jsbridge||!yi(this.env)||Ti()||!this.supportSendAnalyticsEvent){e.next=30;break}return a=n,e.prev=13,a=new URL(n).pathname,e.next=17,this.bridgeService.sendAnalyticsEvent({path:a,method:"POST",data:r});case 17:if(c=e.sent,s=new Error("sendAnalyticsEvent not support: code ".concat(c,", path: ").concat(a,", data: ").concat(JSON.stringify(r))),null!=c&&-2!==c){e.next=22;break}throw this.supportSendAnalyticsEvent=!1,s;case 22:if(1!==c){e.next=24;break}return e.abrupt("return");case 24:throw s;case 27:e.prev=27,e.t0=e.catch(13),wi(Sr.CUSTOM_ERROR,e.t0,{custom_name:"sendAnalyticsEvent",custom_enum:String(c)},!0);case 30:this.sendHttpReport(n,r,o,!(!zr(r.event)||!Zr(r)),ha(r.action)?3:void 0);case 31:case"end":return e.stop()}}),t,this,[[13,27]])}))),function(e,t){return n.apply(this,arguments)})},{key:"reportFL",value:function(e){this.bridgeService.jsbridge&&this.bridgeService.updateWebFlData(e)}}]),f}(No);ya=_a([A.injectable(),ga(0,A.inject(Or.HTTP_SERVICE)),ga(1,A.inject(Or.BRIDGE_SERVICE)),ga(2,A.inject(Or.CONSENT_SERVICE)),ga(3,A.inject(Or.ENV)),ga(3,A.optional())],ya);var ma={expires:390},Ea=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},ba=function(){function t(){i(this,t)}var n;return a(t,[{key:"genCookieID",value:function(){return ei(27)}},{key:"enableCookie",value:(n=r(e().mark((function t(){return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Hi(hr,"1",ma),e.abrupt("return",Yi("https://analytics.tiktok.com/i18n/pixel/enable_cookie"));case 2:case"end":return e.stop()}}),t)}))),function(){return n.apply(this,arguments)})},{key:"enableFirstPartyCookie",value:function(e){if(e){Hi(hr,"1",ma);var t=this.genCookieID(),n=this.getAnonymousId();this.setAnonymousId(n||t)}}},{key:"disableCookie",value:function(){Hi(hr,"0",ma),Hi(pr,"",Object.assign(ma,{expires:-1})),Yi("https://analytics.tiktok.com/i18n/pixel/disable_cookie")}},{key:"setAnonymousId",value:function(e){var t=this.getAnonymousId()||e;t&&Hi(pr,t,ma)}},{key:"getAnonymousId",value:function(){return Fi(pr)||""}},{key:"canUseCookie",value:function(){try{return"0"!==Fi(hr)}catch(e){}return!1}},{key:"resetExpires",value:function(){var e=Fi(hr);e&&Hi(hr,e,ma);var t=this.getAnonymousId();t&&this.setAnonymousId(t)}}]),t}();ba=Ea([A.injectable()],ba);var Ia=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},Ta=function(e,t){return function(n,r){t(n,r,e)}},Oa=function(e){s(n,e);var t=h(n);function n(e,r){return i(this,n),t.call(this,{name:"Callback",reporters:r,context:e})}return a(n,[{key:"pixelDidMount",value:function(e){var t=Ui("ttclid");t&&Ji("ttclid",t)}},{key:"beforeShopifyPixelSend",value:function(e,t){var n=ji(e,"ttclid");n||(n=ji(t,"ttclid")),n&&Ji("ttclid",n)}}]),n}(Io);Oa=Ia([A.injectable(),Ta(0,A.inject(Or.CONTEXT)),Ta(1,A.inject(Or.TTQ_REPORTERS))],Oa);var Sa={isHash:function(e){return!1},genIdentifierLabelByUserProperties:function(e){return{}}},Na={validatePhoneNumberLength:function(e){},parsePhoneNumberFromString:function(e){}},Ra={tryDecodeHashedBase64String:function(e){return null},tryDecodeHashedBase64Hex:function(e){return null}},Aa=function(e){var t,n=e.parsePhoneNumberFromString,r=e.validatePhoneNumberLength,i=e.isHash,o=e.genIdentifierLabelByUserProperties,a=e.tryDecodeHashedBase64String,c=e.tryDecodeHashedBase64Hex,s=e.checkEmailFormat,u=e.checkMDNEmailFormat;e.sha256,t={checkEmailFormat:s,checkMDNEmailFormat:u},t.checkMDNEmailFormat,function(e){var t=e.tryDecodeHashedBase64String,n=e.tryDecodeHashedBase64Hex;Ra.tryDecodeHashedBase64String=t,Ra.tryDecodeHashedBase64Hex=n}({tryDecodeHashedBase64String:a,tryDecodeHashedBase64Hex:c}),function(e){var t=e.isHash,n=e.genIdentifierLabelByUserProperties;Sa.isHash=t,Sa.genIdentifierLabelByUserProperties=n}({isHash:i,genIdentifierLabelByUserProperties:o}),function(e){var t=e.parsePhoneNumberFromString,n=e.validatePhoneNumberLength;Na.parsePhoneNumberFromString=t,Na.validatePhoneNumberLength=n}({parsePhoneNumberFromString:n,validatePhoneNumberLength:r})},Pa=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Na.parsePhoneNumberFromString,r=e,i=t?n(e,t):n(e);return i?r="86"===i.countryCallingCode?i.nationalNumber:i.number:e.replace(/[^0-9]/g,"").length>0&&(r=e.replace(/[^0-9]/g,"")),r},Ca=["(null)","","''\"",void 0,"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","eb045d78d273107348b0300c01d29b7552d622abbc6faf81b3ec55359aa9950c","not set",null,"6181738008c985a1b5f106b796c98e719efcc3c0ff68ddcd14a049825f4900a8","2a539d6520266b56c3b0c525b9e6128858baeccb5ee9b694a2906e123c8d6dd3","c6e52c372287175a895926604fa738a0ad279538a67371cd56909c7917e69ea1","None","74234e98afe7498fb5daf1f36ac2d78acc339464f950703b8c019892f982b90b","f24f02d3c35894296522abac8c4b2439b1c1b650e1fb4c97c0f3c50b580b0a3c","no","a683c5c5349f6f7fb903ba8a9e7e55d0ba1b8f03579f95be83f4954c33e81098","f18a2548c063c5a2b1560c6f2b9ec44bf9ed9017884404016d74f330119aaefe","449f06574cd639e1826848ff5d70ba95904574be84f34e61baa526d517dfb493","fcbcf165908dd18a9e49f7ff27810176db8e9f63b4352213741664245224f8aa","NA","bc857c49633bbc75644c51f36b16b2f768cc0ee13f65402ec7c32c96308272dd","42cbf37902c6911d7b4e371fe8f8708a0ceda6946249d4a3e23de8d5e60ae8b7"],wa=function(e){s(n,e);var t=h(n);function n(e){var r=e.name,o=e.context,a=e.reporters;return i(this,n),t.call(this,{name:r,reporters:a,context:o})}return a(n,[{key:"setIdentifyUtils",value:function(e){var t=e.isHash,n=e.sha256,r=e.genIdentifierLabelByUserProperties,i=e.tryDecodeHashedBase64String,o=e.tryDecodeHashedBase64Hex,a=e.validatePhoneNumberLength,c=e.parsePhoneNumberFromString,s=e.checkEmailFormat,u=e.checkMDNEmailFormat,l=e.getCookieDeprecationLabel,f=void 0===l?function(){}:l,d=e.getAllTopics,h=void 0===d?function(){}:d;Aa({isHash:t,sha256:n,genIdentifierLabelByUserProperties:r,tryDecodeHashedBase64String:i,tryDecodeHashedBase64Hex:o,validatePhoneNumberLength:a,parsePhoneNumberFromString:c,checkEmailFormat:s,checkMDNEmailFormat:u}),this.parsePhoneNumberFromString=c,this.checkMDNEmailFormat=u,this.checkEmailFormat=s,this.sha256=n,this.getCookieDeprecationLabel=f,this.getAllTopics=h}},{key:"baseHandleUserProperties",value:function(e,t){var n=this;if(e){var r=this.identifyParamsFormattedInfo(e),i=this.identifyParamsFormattedInfoV2(e),o=Sa.genIdentifierLabelByUserProperties(t);return this.handlePIIDiagnostics(i),Object.entries(e).forEach((function(t){var r=_(t,2),o=r[0],a=r[1],c=void 0===a?"":a;if(c){var s=String(c);if(["email","phone_number","sha256_email","sha256_phone_number"].includes(o)){var u=n.getUserDataFormatInfoV2KeyName(o),l=Ra.tryDecodeHashedBase64Hex(s);if(null!==l)e[o]=l,null!==u&&(i=n.updateUserDataFormatV2Label(u,Gn.BASE64_HEX_HASHED,i));else{var f=Ra.tryDecodeHashedBase64String(s);f&&(e[o]=f,null!==u&&(i=n.updateUserDataFormatV2Label(u,Gn.BASE64_STRING_HASHED,i)))}}switch("zip_code"===o&&s&&(Sa.isHash(s)?i=n.updateUserDataFormatV2Label("zip_code",Gn.ZIP_CODE_IS_HASHED,i):(i=n.updateUserDataFormatV2Label("zip_code",Gn.ZIP_CODE_IS_NOT_HASHED,i),n.isZipFromUs(e)?(e.zip_code=n.sha256(n.truncateString(s,5)),i=n.updateUserDataFormatV2Label("zip_code",Gn.ZIP_CODE_IS_US,i)):(e.zip_code=n.sha256(s),i=n.updateUserDataFormatV2Label("zip_code",Gn.ZIP_CODE_IS_NOT_US,i)))),o){case"email":e.email=Sa.isHash(s)&&!n.checkEmailFormat(s)?s:n.sha256(n.handleEmail(s));break;case"phone_number":e.phone_number=Sa.isHash(s)?s:n.sha256(n.handlePhoneNumber(s));break;case"auto_email":e.auto_email=n.sha256(n.handleEmail(s));break;case"auto_phone_number":e.auto_phone_number=n.sha256(n.handlePhoneNumber(s));break;case"first_name":e.first_name=Sa.isHash(s)?s:n.sha256(s);break;case"last_name":e.last_name=Sa.isHash(s)?s:n.sha256(s);break;case"city":e.city=n.truncateString(s,80);break;case"state":e.state=n.truncateString(s,80);break;case"country":e.country=n.truncateString(s,80);break;default:return}}})),e.sha256_email&&(e.email=this.handleCheckHashedEmailValue(String(e.sha256_email),r)),e.sha256_phone_number&&(e.phone_number=this.handleCheckHashedPhoneValue(String(e.sha256_phone_number),r)),{userProperties:e,userDataFormat:r,userDataFormatV2:i,identifierLabel:o}}}},{key:"identifyParamsFormattedInfo",value:function(e){var t=this,n={},r=/^sha256_(.*)$/;return Object.entries(e).forEach((function(e){var i=_(e,2),o=i[0],a=i[1],c=String(void 0===a?"":a),s=o.match(r);switch(o){case"email":t.handleEmailFormat(c,"email",n);break;case"phone_number":t.handlePhoneNumberFormat(c,"phone_number",n);break;case"auto_email":t.handleEmailFormat(c,"auto_email",n);break;case"auto_phone_number":t.handlePhoneNumberFormat(c,"auto_phone_number",n);break;case(s||{}).input:var u=null==s?void 0:s.pop();u&&xr.includes(u)&&(n[u]=[Vn.HASHED]);break;case"first_name":case"last_name":case"city":case"state":case"country":case"zip_code":t.handleNewPiisFormat(c,o,n);break;default:n[o]=[Vn.CORRECT_FORMAT]}})),n}},{key:"identifyParamsFormattedInfoV2",value:function(e){var t=this,n={};return Object.entries(e).forEach((function(e){var r=_(e,2),i=r[0],o=r[1],a=String(void 0===o?"":o);switch(i){case"email":t.handlePixelValidation(a,jr,n);break;case"phone_number":t.handlePixelValidation(a,Ur,n);break;case"sha256_email":t.handlePixelValidation(a,Br,n);break;case"sha256_phone_number":t.handlePixelValidation(a,Fr,n);break;case"first_name":case"last_name":case"city":case"state":case"country":case"zip_code":break;default:n[i]=[Gn.UNKNOWN_INVALID]}})),n}},{key:"updateUserDataFormatV2Label",value:function(e,t,n){var r,i;return(null===n[e]||void 0===n[e]||(null===(r=n[e])||void 0===r?void 0:r.includes(Gn.UNKNOWN_INVALID)))&&(n[e]=[]),null===(i=n[e])||void 0===i||i.push(t),n}},{key:"getUserDataFormatInfoV2KeyName",value:function(e){return{email:"email_is_hashed",phone_number:"phone_is_hashed",sha256_email:"sha256_email",sha256_phone_number:"sha256_phone",zip_code:"zip_code"}[e]||null}},{key:"handlePIIDiagnostics",value:function(e){}},{key:"handleEmail",value:function(e){return e.toLowerCase()}},{key:"handlePhoneNumber",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.parsePhoneNumberFromString;return Pa(e,"",t)}},{key:"handleCheckHashedEmailValue",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.checkEmailFormat;return t.email=t.email||[],Sa.isHash(e)?(null==t||t.email.push(Vn.HASHED_CORRECT),e):n(e)?(null==t||t.email.push(Vn.PLAINTEXT_EMAIL),this.sha256(this.handleEmail(String(e)))):(null==t||t.email.push(Vn.HASHED_ERR),this.sha256(e))}},{key:"handleCheckHashedPhoneValue",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.parsePhoneNumberFromString;return t.phone_number=t.phone_number||[],Sa.isHash(e)?(null==t||t.phone_number.push(Vn.HASHED_CORRECT),e):n(e)?(t.phone_number.push(Vn.PLAINTEXT_PHONE),this.sha256(this.handlePhoneNumber(String(e),n))):(null==t||t.phone_number.push(Vn.HASHED_ERR),this.sha256(e))}},{key:"handlePixelValidation",value:function(e,t,n){n[t]=[],Ca.includes(e)&&n[t].push(Gn.FILTER_EVENTS),e&&Sa.isHash(e)&&n[t].push(Gn.HASHED),e&&this.checkEmailFormat(e)&&n[t].push(Gn.PLAIN_EMAIL),e&&this.checkMDNEmailFormat(e)&&n[t].push(Gn.PLAIN_MDN_EMAIL),e&&this.parsePhoneNumberFromString(e)&&n[t].push(Gn.PLAIN_PHONE),e&&0===n[t].length&&n[t].push(Gn.UNKNOWN_INVALID)}},{key:"isZipFromUs",value:function(e){var t;return"us"===(null===(t=e.country)||void 0===t?void 0:t.toLowerCase())||!1}},{key:"truncateString",value:function(e,t){var n=Array.from(e);return n.length<=t?e:n.slice(0,t).join("")}},{key:"handlePhoneNumberFormat",value:function(e,t,n){var r=this.handleCheckPhoneNumber(String(e),this.parsePhoneNumberFromString);n[t]=r}},{key:"handleCheckPhoneNumber",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.parsePhoneNumberFromString,n=[];if(!e)return n.push(Vn.EMPTY_VALUE),n;if(Sa.isHash(e))return n.push(Vn.HASHED),n;var r=t(e);return r?(n.push(Vn.CORRECT_FORMAT),n):(n.push(Vn.WRONG_FORMAT),n)}},{key:"handleCheckEmail",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.checkEmailFormat,n=[];return e?Sa.isHash(e)?(n.push(Vn.HASHED),n):t(e)?(n.push(Vn.CORRECT_FORMAT),n):(n.push(Vn.WRONG_FORMAT),n):(n.push(Vn.EMPTY_VALUE),n)}},{key:"handleEmailFormat",value:function(e,t,n){var r=this.handleCheckEmail(String(e),this.checkEmailFormat);n&&n[t]&&(n[t]||[]).includes(Vn.HASHED)||(n[t]=r)}},{key:"handleNewPiisFormat",value:function(e,t,n){e&&(n[t]=[Vn.CORRECT_FORMAT])}}]),n}(Io),ka=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},Ma=function(e,t){return function(n,r){t(n,r,e)}},La=function(t){s(u,t);var n,o,c=h(u);function u(e,t){var n;return i(this,u),(n=c.call(this,{name:"Identify",reporters:t,context:e})).init(),n}return a(u,[{key:"init",value:function(){var e=this;return this.pluginPromise||(Ci(Sr.IDENTIFY_INIT_START),this.pluginPromise=Yi("https://analytics.tiktok.com/i18n/pixel/static/identify_c2008b8c.js").then((function(){e.detectTopics(),Ci(Sr.IDENTIFY_INIT_END)})).catch((function(){var e=new Error("Loading chunk identify failed.\n(error: ".concat(window.location.host,"/static/identify.js)"));return e.name="ChunkLoadError",Promise.reject(e)}))),this.pluginPromise}},{key:"handleUserProperties",value:(o=r(e().mark((function t(n,r){return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n){e.next=2;break}return e.abrupt("return",void 0);case 2:return e.next=4,this.init();case 4:return e.abrupt("return",this.baseHandleUserProperties(n,r));case 5:case"end":return e.stop()}}),t,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"handlePIIDiagnostics",value:function(e){try{var t=e.email_is_hashed,n=void 0===t?[]:t,r=e.sha256_email,i=void 0===r?[]:r,o=e.phone_is_hashed,a=void 0===o?[]:o,c=e.sha256_phone,s=void 0===c?[]:c;if(n.includes(Gn.UNKNOWN_INVALID)||i.includes(Gn.UNKNOWN_INVALID))return void ki(Nr.INVALID_EMAIL_FORMAT);if(a.includes(Gn.UNKNOWN_INVALID)||s.includes(Gn.UNKNOWN_INVALID))return void ki(Nr.INVALID_PHONE_NUMBER_FORMAT);if(n.includes(Gn.FILTER_EVENTS)||i.includes(Gn.FILTER_EVENTS))return void ki(Nr.INVALID_EMAIL_INFORMATION);if(a.includes(Gn.FILTER_EVENTS)||s.includes(Gn.FILTER_EVENTS))return void ki(Nr.INVALID_PHONE_NUMBER_INFORMATION)}catch(e){}}},{key:"detectTopics",value:(n=r(e().mark((function t(){var n,r;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.getCookieDeprecationLabel();case 3:return n=e.sent,e.next=6,this.getAllTopics();case 6:(r=e.sent)&&Ci(Sr.CUSTOM_INFO,{custom_name:"topics",custom_enum:r.toString(),extJSON:{cookie_label:String(n)}}),e.next=12;break;case 10:e.prev=10,e.t0=e.catch(0);case 12:case"end":return e.stop()}}),t,this,[[0,10]])}))),function(){return n.apply(this,arguments)})}]),u}(wa);function Da(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=Date.now();return function(){var r=Array.prototype.slice.call(arguments),i=Date.now();i-n>=t&&(e.apply(void 0,y(r)),n=i)}}La=ka([A.injectable(),Ma(0,A.inject(Or.CONTEXT)),Ma(1,A.inject(Or.TTQ_REPORTERS))],La);var xa={fcp:"first_contentful_paint",lcp:"largest_contentful_paint",cls:"cumulative_layout_shift",fid:"first_input_delay",tti:"time_to_interactive",navigationStart:"navigation_start",loadEventStart:"load_event_start",requestStart:"request_start",enterTime:"enter_time",leaveTime:"leave_time",docHeight:"doc_height",maxScrollHeight:"max_scroll_height",clickTimes:"click_times",scrollTimes:"scroll_times",connectionType:"connection_type"},ja=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},Ua=function(e,t){return function(n,r){t(n,r,e)}},Ba=function(e){s(n,e);var t=h(n);function n(e,r,o,a,c,s,u){var l;return i(this,n),(l=t.call(this,{name:"PerformanceInteraction",reporters:o,context:r})).monitors=[],l.currentUrl="",l.ttqOptions={},l.env=e,l.reportService=a,l.interactionMonitor=c,l.performanceMonitor=s,l.ttqOptions=u,l.init(),l}return a(n,[{key:"reportSwitch",value:function(){var e,t,n=Ui(Lr),r="";try{var i=window.sessionStorage&&window.sessionStorage.getItem(fr);if(i)r=JSON.parse(i).callback}catch(e){}return!!(n||r||yi(this.env)||(null===(t=null===(e=this.ttqOptions)||void 0===e?void 0:e.plugins)||void 0===t?void 0:t.PerformanceInteraction))}},{key:"init",value:function(){var e=this;this.reportSwitch()&&(this.monitors.push(this.interactionMonitor),this.monitors.push(this.performanceMonitor),this.monitors.forEach((function(e){e.init()})),setInterval((function(){e.report()}),1e4))}},{key:"pageUrlWillChange",value:function(e,t){this.reportSwitch()&&(this.monitors.forEach((function(n){n.pageUrlWillChange(e,t)})),e&&this.report())}},{key:"pageWillLeave",value:function(e){this.reportSwitch()&&(this.monitors.forEach((function(t){t.pageWillLeave(e)})),this.report())}},{key:"pageUrlDidChange",value:function(e){this.currentUrl!==e&&this.reportSwitch()&&(this.currentUrl=e,this.monitors.forEach((function(t){t.pageUrlDidChange(e)})),this.report())}},{key:"report",value:function(){var e=this;if(this.reportSwitch()){var t=this.transformReportData(this.collectorData());if(Object.keys(t).length){var n=Er.PERFORMANCE_INTERACTION,r=Li(n);null!==r&&qi(this.reportService.reportPreposition||[]).then((function(){e.reportService.report(r,e.assemblyMergedData(t,n),function(e){return{performance_interaction:Fn.httpReport}[e]||Fn.htmlHttpReport}(n))}))}}}},{key:"assemblyMergedData",value:function(e,t){var n,r=this.context.getPageSign(),i=this.reporters[0],o=(null==i?void 0:i.getReporterId())||"",a=this.reporters.map((function(e){return e.getReporterId()})).join("|"),c=null==i?void 0:i.assemblyData(o,"",e,{},t);return c&&(c.context.pixel&&(c.context.pixel.codes=a),c.context.index=null===(n=r.pageIndex)||void 0===n?void 0:n.index,c.context.session_id=r.sessionId),c||{}}},{key:"collectorData",value:function(){return this.monitors.reduce((function(e,t){return t.isChanged()&&(e=Object.assign({},e,t.getResult())),e}),{})}},{key:"transformReportData",value:function(e){return Object.entries(e).reduce((function(e,t){var n=_(t,2),r=n[0],i=n[1];return e[xa[r]]=i,e}),{})}}]),n}(Io);function Fa(){var e=document.body,t=document.documentElement;return Math.max(e?e.scrollHeight:0,e?e.offsetHeight:0,t?t.clientHeight:0,t?t.scrollHeight:0,t?t.offsetHeight:0)}function Ha(){return document.documentElement.clientHeight+window.pageYOffset}Ba=ja([A.injectable(),Ua(0,A.inject(Or.ENV)),Ua(1,A.inject(Or.CONTEXT)),Ua(2,A.inject(Or.TTQ_REPORTERS)),Ua(3,A.inject(Or.REPORT_SERVICE)),Ua(4,A.inject(Or.INTERACTION_MONITOR)),Ua(5,A.inject(Or.PERFORMANCE_MONITOR)),Ua(6,A.inject(Or.TTQ_GLOBAL_OPTIONS))],Ba);var Va=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},Ga=function(){function e(){i(this,e),this.connectionType="",this._docHeight=0,this._maxScrollHeight=0,this.clickTimes=0,this.scrollTimes=0,this.isDocHeightChanged=!1,this.isMaxScrollHeightChanged=!1,this.enterTime=0,this.leaveTime=0,this.isFirstReport=!0}return a(e,[{key:"init",value:function(){var e,t;e=this.updateClickTimes.bind(this),t=Da((function(t){e()}),100),window.addEventListener("click",t,{capture:!0}),function(e){var t=Da((function(){var t={scrollHeight:Ha(),docHeight:Fa()};e(t)}),500);window.addEventListener("scroll",t,{passive:!0})}(this.updateScrollData.bind(this))}},{key:"pageUrlWillChange",value:function(e,t){""!==e?this.leaveTime=Date.now():this.enterTime=window.performance.timing.navigationStart}},{key:"pageUrlDidChange",value:function(e){0!==this.enterTime&&(this.resetAfterPageChange(),this.initInteractionData(),this.enterTime=Date.now())}},{key:"pageWillLeave",value:function(e){this.leaveTime=e}},{key:"updateClickTimes",value:function(){this.clickTimes+=1}},{key:"updateScrollData",value:function(e){var t=e.scrollHeight,n=e.docHeight;this.scrollTimes+=1,this.maxScrollHeight=t,this.docHeight=n}},{key:"initInteractionData",value:function(){var e,t={docHeight:Fa(),scrollHeight:Ha(),connectionType:(e=navigator.connection,e&&e.effectiveType?e.effectiveType:"")},n=t.docHeight,r=t.scrollHeight,i=t.connectionType;this.docHeight=n,this.maxScrollHeight=r,this.connectionType=i}},{key:"resetAfterPageChange",value:function(){this.clearAfterReport(),this.maxScrollHeight=0,this.docHeight=0,this.leaveTime=0,this.isFirstReport=!0,this.connectionType=""}},{key:"clearAfterReport",value:function(){this.clickTimes=0,this.scrollTimes=0,this.isDocHeightChanged=!1,this.isMaxScrollHeightChanged=!1,this.isFirstReport=!1}},{key:"getResult",value:function(){var e={};return this.scrollTimes&&(e.scrollTimes=this.scrollTimes),this.clickTimes&&(e.clickTimes=this.clickTimes),this.leaveTime&&(e.leaveTime=this.leaveTime),this.isDocHeightChanged&&(e.docHeight=this.docHeight),this.isMaxScrollHeightChanged&&(e.maxScrollHeight=this.maxScrollHeight),this.isFirstReport&&(e.connectionType=this.connectionType,e.enterTime=this.enterTime),this.clearAfterReport(),e}},{key:"isChanged",value:function(){return this.isDocHeightChanged||this.isMaxScrollHeightChanged||0!==this.scrollTimes||0!==this.clickTimes||0!==this.leaveTime}},{key:"docHeight",get:function(){return this._docHeight},set:function(e){e>this._docHeight?(this._docHeight=e,this.isDocHeightChanged=!0):0===e&&(this._docHeight=0,this.isDocHeightChanged=!1)}},{key:"maxScrollHeight",get:function(){return this._maxScrollHeight},set:function(e){e>this._maxScrollHeight?(this._maxScrollHeight=e,this.isMaxScrollHeightChanged=!0):0===e&&(this._maxScrollHeight=0,this.isMaxScrollHeightChanged=!1)}}]),e}();Ga=Va([A.injectable()],Ga);var Ja,Wa=function(e,t){try{var n=null==t?void 0:t.type;if(n&&PerformanceObserver.supportedEntryTypes.indexOf(n)>-1){var r=new PerformanceObserver((function(t){t.getEntries().forEach(e)}));return r.observe(t),r}}catch(e){}},Ka=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];document.addEventListener("visibilitychange",(function(t){"hidden"===document.visibilityState&&e(t)}),{once:t})},Ya=function(){return void 0===Ja&&(Ja="hidden"===document.visibilityState?0:1/0,Ka((function(e){Ja=Math.min(Ja,e.timeStamp)}))),{get timeStamp(){return Ja}}},qa="first-contentful-paint";function Xa(e){if(!(window&&window.performance&&(null===(t=window.performance)||void 0===t?void 0:t.getEntries)))return-1;var t,n=performance.getEntriesByType("paint");if(Array.isArray(n)){var r=n.filter((function(t){return t.name===e}));return r.length&&r[0]&&r[0].startTime&&r[0].startTime||-1}return-1}var Qa,za={exports:{}};Qa=za,function(){var e="undefined"!=typeof window&&window===this?this:void 0!==N&&null!=N?N:this,t="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,n){e!=Array.prototype&&e!=Object.prototype&&(e[t]=n.value)};function n(){n=function(){},e.Symbol||(e.Symbol=i)}var r=0;function i(e){return"jscomp_symbol_"+(e||"")+r++}function o(){n();var r=e.Symbol.iterator;r||(r=e.Symbol.iterator=e.Symbol("iterator")),"function"!=typeof Array.prototype[r]&&t(Array.prototype,r,{configurable:!0,writable:!0,value:function(){return a(this)}}),o=function(){}}function a(t){var n=0;return function(t){return o(),(t={next:t})[e.Symbol.iterator]=function(){return this},t}((function(){return nt||(clearTimeout(e.j),e.j=setTimeout((function(){var t=performance.timing.navigationStart,n=d(e.g,e.b);if(t=(window.a&&window.a.A?1e3*window.a.A().C-t:0)||performance.timing.domContentLoadedEventEnd-t,e.u)var r=e.u;else r=performance.timing.domContentLoadedEventEnd?(r=performance.timing).domContentLoadedEventEnd-r.navigationStart:null;var i=performance.now();null===r&&v(e,Math.max(n+5e3,i+1e3));var o=e.a;(n=5e3>i-n||5e3>i-(n=o.length?o[o.length-1].end:t)?null:Math.max(n,r))&&(e.s(n),clearTimeout(e.j),e.i=!1,e.c&&e.c.disconnect(),e.h&&e.h.disconnect()),v(e,performance.now()+1e3)}),t-performance.now()),e.v=t)}h.prototype.getFirstConsistentlyInteractive=function(){var e=this;return new Promise((function(t){e.s=t,"complete"==document.readyState?p(e):window.addEventListener("load",(function(){p(e)}))}))},h.prototype.m=function(e){this.f.set(e,performance.now())},h.prototype.l=function(e){this.f.delete(e)},h.prototype.B=function(){v(this,performance.now()+5e3)},e.Object.defineProperties(h.prototype,{g:{configurable:!0,enumerable:!0,get:function(){return[].concat(s(this.f.values()))}}});var _={getFirstConsistentlyInteractive:function(e){return e=e||{},"PerformanceLongTaskTiming"in window?new h(e).getFirstConsistentlyInteractive():Promise.resolve(null)}};Qa.exports?Qa.exports=_:window.ttiPolyfill=_}();var Za=za.exports,$a=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},ec=["fcp","lcp","cls","fid","tti","navigationStart","loadEventStart","requestStart"],tc=function(){function e(){i(this,e),this.fcp=-1,this.lcp=-1,this.cls=-1,this.fid=-1,this.tti=-1,this.navigationStart=-1,this.loadEventStart=-1,this.requestStart=-1,this.everythingDone=!1,this.changedMap={},this.init()}return a(e,[{key:"init",value:function(){var e,t,n,r;this.updatePerformanceTiming(),e=this.baseHandler.bind(this,"cls"),t=0,r=Wa(n=function(e){e.hadRecentInput||(t+=e.value)},{type:"layout-shift",buffered:!0}),Ka((function(){r&&(r.takeRecords().forEach(n),r.disconnect()),e(t)})),function(e){var t=Xa(qa);if(-1===t){var n=Ya();Wa((function(t){if(t.name===qa){if(t.startTime=0;s--)(o=e[s])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},ic=function(e,t){return function(n,r){t(n,r,e)}},oc=function(e){s(n,e);var t=h(n);function n(e,r,o,a){var c;return i(this,n),(c=t.call(this,{name:"WebFL",reporters:r,context:e})).reportService=o,c.ttqOptions=a,c.useExchangeRate=a.usd_exchange_rate,c}return a(n,[{key:"pixelSend",value:function(e,t,n){var r,i;Boolean(null===(i=null===(r=this.ttqOptions)||void 0===r?void 0:r.plugins)||void 0===i?void 0:i.WebFL)&&n&&this.reportFlConv(n)}},{key:"reportFlConv",value:function(e){var t;if(e&&"Pageview"!==e.event){var n,r=e.context,i=e.properties,o=void 0===i?{}:i,a=void 0!==r.ad.log_extra?r.ad.log_extra:"{}";try{n=JSON.parse(a)}catch(e){n={}}var c={req_id:n.req_id||"",cid:r.ad.creative_id||"",value:o.value||"",currency:o.currency||"",raw:Object.assign({},o)},s=o.value,u=o.currency,l=function(e,t,n){return isNaN(e)||e<0||null===n||!n[t]?"":(e/n[t]*1e5).toFixed(0)}(s,u,this.useExchangeRate||null),f=r.pixel?r.pixel.code:"";l&&(c.usd_value=l,Ci(Sr.CUSTOM_INFO,{pixelCode:f,custom_name:"odfl_rate_exchange",extJSON:{message_id:e.message_id,cid:c.cid,event:e.event,value:s,currency:u,usdValue:l}}));var d={business:"devicefl_join_label",entrance:"app_to_web_conversion",inputParams:{message_id:e.message_id,event:e.event,event_props:c,event_source_id:null===(t=r.pixel)||void 0===t?void 0:t.code,event_source_type:"web"}};this.reportService&&this.reportService.reportFL&&(this.reportService.reportFL(d),Ci(Sr.CUSTOM_INFO,{pixelCode:f,custom_name:"fl_jsb_report",extJSON:{message_id:e.message_id,cid:c.cid,event:e.event}}))}}}]),n}(Io);oc=rc([A.injectable(),ic(0,A.inject(Or.CONTEXT)),ic(1,A.inject(Or.TTQ_REPORTERS)),ic(2,A.inject(Or.REPORT_SERVICE)),ic(3,A.inject(Or.TTQ_GLOBAL_OPTIONS))],oc),function(e){e.ERROR_FORMAT="error_format",e.OVER_LENGTH="over_length_3e4",e.FILTER_SENSITIVE_FIELDS="filter_sensitive_fields"}(nc||(nc={}));var ac,cc,sc,uc,lc,fc="form_detail_error";!function(e){e.GET_ELEMENTS_ERROR="get_elements_error",e.INIT_ERROR="init_error",e.ASSEMBLE_FORM_DETAIL_ERROR="assemble_form_detail_error",e.DETECT_FORM_ELEMENT_ERROR="detect_form_element_error",e.GET_OVERALL_FORM_DETAIL_ERROR="get_overall_form_detail_error",e.FORM_OBSERVER_ERROR="form_observer_error",e.OVER_LENGTH="over_length_3e4"}(ac||(ac={})),function(e){e.METADATA="Metadata",e.CLICK="Click"}(cc||(cc={})),function(e){e.AUTO_COLLECTION="AUTO_COLLECTION",e.AUTO_FORM="AUTO_FORM",e.AUTO_CLICK="AUTO_CLICK",e.AUTO_VC="AUTO_VC",e.AUTO_VC_REVERSE="AUTO_VC_REVERSE"}(sc||(sc={})),function(e){e.AUTO_FORM="form_rules",e.AUTO_VC="vc_rules",e.AUTO_VC_REVERSE="vc_rules_reverse"}(uc||(uc={})),function(e){e.PAGE_LEAVE="PageLeave",e.PAGE_VIEW="PageView",e.DOM_CHANGE="DomChange",e.URL_CHANGE="UrlChange",e.CLICK="Click",e.SCROLL="Scroll"}(lc||(lc={}));var dc=["AnatomicalStructure","AnatomicalSystem","ApprovedIndication","ArriveAction","Artery","BioChemEntity","BloodTest","Bone","BorrowAction","BrainStructure","BrokerageAccount","CDCPMDRecord","ChemicalSubstance","CovidTestingFacility","DDxElement","DepartAction","DepositAccount","DiagnosticLab","DiagnosticProcedure","Diet","DietarySupplement","DoseSchedule","ElementarySchool","HighSchool","ExercisePlan","Gene","GovernmentBenefitsType","GovernmentService","HealthAspectEnumeration","HealthInsurancePlan","HealthPlanCostSharingSpecification","HealthTopicContent","Hospital","ImagingTest","InfectiousAgentClass","InvestmentFund","InvestmentOrDeposit","Invoice","Joint","LendAction","LifestyleModification","Ligament","LoanOrCredit","LymphaticVessel","MaximumDoseSchedule","MedicalAudience","MedicalAudienceType","MedicalCause","MedicalCode","MedicalCondition","MedicalConditionStage","MedicalContraindication","MedicalDevice","MedicalEntity","MedicalEvidenceLevel","MedicalGuidelineContraindication","MedicalIndication","MedicalIntangible","MedicalObservationalStudy","MedicalOrganization","MedicalProcedure","MedicalProcedureType","MedicalRiskCalculator","MedicalRiskFactor","MedicalRiskScore","MedicalSign","MedicalSignOrSymptom","MedicalStudy","MedicalSymptom","MedicalTest","MedicalTestPanel","MedicalTherapy","MedicalTrial","MiddleSchool","MoneyTransfer","Muscle","Nerve","OccupationalTherapy","Order","PalliativeProcedure","ParentAudience","PathologyTest","Patient","PeopleAudience","Person","Pharmacy","PhysicalActivity","PhysicalTherapy","Physician","PoliticalParty","Preschool","PreventionIndication","Protein","PsychologicalTreatment","RadiationTherapy","RecommendedDoseSchedule","ReportedDoseSchedule","School","Substance","SuperficialAnatomy","SurgicalProcedure","Text","TherapeuticProcedure","TreatmentIndication","URL","Vein","Vessel","VitalSign","WorkersUnion"],hc=2e3;function pc(e){return/([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9._-]+)/gi.test(e)||/(\+?0?86-?)?1[3-9]\d{9}/g.test(e)||/(\+\d{1,2}\s?)?\(?\d{3}\)?[\s.-]?\d{3}[\s.-]?\d{4}/g.test(e)||/^[\-!$><-==&_\/\?\.,0-9:; \]\[%~\"\{\}\)\(\+\@\^\`]/g.test(e)||dc.some((function(t){return e.toLowerCase().indexOf(t.toLowerCase())>-1}))}var vc=function e(t){if(!t||t.nodeType!==Node.ELEMENT_NODE)return"";if(t===document.documentElement)return"/HTML";for(var n=1,r=t.previousSibling;r;)r.nodeType===Node.ELEMENT_NODE&&r.tagName===t.tagName&&n++,r=r.previousSibling;var i=t.tagName.toLowerCase(),o=e(t.parentNode);return"".concat(o,"/").concat(i,"[").concat(n,"]")};function _c(e){return vc(e)}function gc(e,t){return function(){for(var n=arguments.length,r=new Array(n),i=0;i1&&void 0!==arguments[1]?arguments[1]:500;return"string"!=typeof e?"":(e=e.trim()).length0&&void 0!==arguments[0]?arguments[0]:[];return{items:e,has:function(e){return this.items.some((function(t){return t===e}))},add:function(e){this.has(e)||this.items.push(e)}}}function Nc(e){var t;switch(e.tagName.toLowerCase()){case"meta":t=e.getAttribute("content");break;case"audio":case"embed":case"iframe":case"img":case"source":case"track":case"video":t=e.getAttribute("src");break;case"a":case"area":case"link":t=e.getAttribute("href");break;case"object":t=e.getAttribute("data");break;case"data":case"meter":t=e.getAttribute("value");break;case"time":t=e.getAttribute("datetime");break;default:t=function(e){if(e){if(e.innerText&&e.innerText.length>0)return e.innerText;if(e.textContent&&e.textContent.length>0)return e.textContent}return""}(e)||""}return"string"==typeof t?Ic(t):""}function Rc(e,n){if("object"===t(e)){if(Array.isArray(e))return e.map((function(e){return Rc(e,n)}));var r={};for(var i in e)Ac(i,n)||(r[i]=Rc(e[i],n));return r}return e}function Ac(e,t){return!!(t&&t.length>0)&&t.some((function(t){return e.toLowerCase()===t.toLowerCase()}))}function Pc(e){if("object"===t(e)){if(Array.isArray(e))return e.map((function(e){return Pc(e)}));var n=Object.assign({},e),r=n["@type"];for(var i in n)"@type"!==i&&"@context"!==i&&("object"===t(n[i])?n[i]=Pc(n[i]):r&&Cc(r)&&delete n[i]);return n}return e}function Cc(e){return Array.isArray(e)?e.some((function(e){return Cc(e)})):"string"==typeof e&&(e=e.toLowerCase().replace(/https?:\/\/schema\.org\//,""),dc.some((function(t){return e===t.toLowerCase()})))}function wc(e){var t={open_graph:"{}",microdata:"[]",json_ld:"[]",meta:"{}"};try{t.microdata=function(){for(var e=document.querySelectorAll("[itemscope]"),t=[],n=Sc(),r=0;r=0;i--){var o=e[i],a=o.getAttribute("itemtype");if("string"==typeof a&&""!==a){for(var c={},s=o.querySelectorAll("[itemprop]"),u=0;u=0;E--){if(p[E].scope.contains(y)){p[E].schema.subscopes.push(m);break}p.pop()}0===p.length&&v.push(m),p.push({schema:m,scope:y})}return JSON.stringify(v)}()}catch(e){wi(Sr.CUSTOM_ERROR,e,{custom_name:"assemble_auto_config_failed",custom_enum:"microdata"})}try{var n=function(){for(var e=[],t=[],n=document.querySelectorAll('script[type="application/ld+json"]'),r=0,i=0;i3e4)return{data:JSON.stringify([]),errors:[{name:nc.OVER_LENGTH,message:"".concat(String(r))}]};var a=void 0;try{a=JSON.parse(o.replace(/[\n\r\t]+/g," "))}catch(e){t.push({name:nc.ERROR_FORMAT,message:e.message})}try{a=Pc(a)}catch(e){return{data:JSON.stringify([]),errors:[{name:nc.FILTER_SENSITIVE_FIELDS,message:e.message}]}}a&&e.push(a)}}return{data:JSON.stringify(e),errors:t}}(),r=n.data,i=n.errors;t.json_ld=r,i&&i.forEach((function(e){var t=e.name,n=e.message;wi(Sr.CUSTOM_ERROR,{message:n},{custom_name:"parse_json_ld_failed",custom_enum:t})}))}catch(e){wi(Sr.CUSTOM_ERROR,e,{custom_name:"assemble_auto_config_failed",custom_enum:"json_ld"})}try{t.open_graph=function(e){for(var t=Sc(["og","product","music","video","article","book","profile","website","twitter"]),n={},r=document.querySelectorAll("meta[property],meta[name]"),i=0;i0)return Array.from(r)}return[]}catch(e){return wi(Sr.CUSTOM_ERROR,e,{custom_name:fc,custom_enum:ac.GET_ELEMENTS_ERROR}),[]}}function Bc(e){var t="";return function e(n){for(;n;)n.nodeType===Node.TEXT_NODE?t+=n.textContent:"SELECT"!==n.nodeName&&n.firstChild&&e(n.firstChild),n=n.nextSibling}(e.firstChild),t.replace(/[\t\n]/g,"").trim()}function Fc(e){if(!e)return!1;var t=window.getComputedStyle(e);return"none"!==t.display&&("visible"===t.visibility&&(!Hc(e)&&(0!==e.offsetWidth||0!==e.offsetHeight)))}function Hc(e){return!(!e||e.isSameNode(document.body)||e.isSameNode(document))&&("0"==window.getComputedStyle(e).opacity||Hc(e.parentElement))}function Vc(e){var t=e.getAttribute("type");return!!t&&jc.indexOf(t)>-1}function Gc(e){return e&&pc(e)?"__Text__":e}!function(e){e[e.CONTAIN=0]="CONTAIN",e[e.ID=1]="ID",e[e.SELECTOR=2]="SELECTOR"}(kc||(kc={}));var Jc=function(){function e(t){i(this,e),this.formUpdateHandlers=[],this.answerMap={},this.rules=this.getRules(t),this.init()}return a(e,[{key:"getRules",value:function(e){var t=e.plugins&&e.plugins.AutoConfig;return t&&t[uc.AUTO_FORM]}},{key:"init",value:function(){var e=this;try{this.forms=this.detectFormElement(),this.forms&&this.forms.forEach((function(t){t.formDetail=e.assembleFormDetail(t),e.startFormObserver(t,e.formUpdateHandlers)}))}catch(e){wi(Sr.CUSTOM_ERROR,e,{custom_name:fc,custom_enum:ac.INIT_ERROR})}}},{key:"getOverallFormDetail",value:function(){try{return this.forms&&this.forms.length>0?(this.forms.some((function(e){var t=e.el;return!document.body.contains(t)}))&&this.init(),JSON.stringify(this.forms.map((function(e){return e.formDetail})).filter((function(e){return e})))):"[]"}catch(e){return wi(Sr.CUSTOM_ERROR,e,{custom_name:fc,custom_enum:ac.GET_OVERALL_FORM_DETAIL_ERROR}),"[]"}}},{key:"addFormUpdateHandler",value:function(e){this.formUpdateHandlers.push(e)}},{key:"startFormObserver",value:function(e,t){var n=this;try{var r=ri((function(){var r=n.assembleFormDetail(e);(!e.formDetail||r&&li(r,e.formDetail))&&(e.formDetail=r,t.forEach((function(t){return t.call(n,e.formDetail)})))}),hc,this);if(e.el.parentNode){var i=e.el.parentNode;this.observer&&this.observer.disconnect(),this.observer=new MutationObserver(r),this.observer.observe(i,{attributes:!0,childList:!0,subtree:!0}),i.addEventListener("click",r,{capture:!0})}}catch(e){wi(Sr.CUSTOM_ERROR,e,{custom_name:fc,custom_enum:ac.FORM_OBSERVER_ERROR})}}},{key:"detectFormElement",value:function(){try{var e=[0,0,0],t=function(e){return(t=Uc(e||Mc,document)).filter((function(e){return!t.some((function(t){return t.contains(e)&&t!==e}))}));var t}(this.rules);if(!t)return[];var n=t.map((function(e){return{el:e,questions:[]}}));return n.forEach((function(t){var n,r=function(e){return Uc(Lc,e)}(t.el),i=new Set([]);r.forEach((function(n){var r=function(e,t){var n=Uc(Dc,e);if(n&&n.length)return{els:n,from:kc.CONTAIN};var r=e.getAttribute("for");return!(!r||(n=function(e,t){return Uc(["input[id='".concat(e,"'],select[id='").concat(e,"'],textarea[id='").concat(e,"']")],t)}(r,t),!n))&&{els:n,from:kc.ID}}(n,t.el);if(r){var o=r.els,a=r.from,c=o.filter((function(e){return!Vc(e)})).map((function(e){return i.add(e),{el:e,from:a}}));c&&c.length&&(e[a]=1,t.questions.push({el:n,answers:c}))}})),(n=t.el,Uc(Dc,n)).filter((function(e){return!Vc(e)})).forEach((function(n){if(!i.has(n)){e[kc.SELECTOR]=1;var r=function(e,t){return function e(n){return null==n||n.isSameNode(t)?t:Bc(n).length>0?n:e(n.parentNode)}(e.parentNode)}(n,t.el);t.questions.push({el:r,answers:[{el:n,from:kc.SELECTOR}]})}}))})),Ci(Sr.CUSTOM_INFO,{custom_name:"form_detail_answer_from",custom_enum:e.join("")}),n}catch(e){return wi(Sr.CUSTOM_ERROR,e,{custom_name:fc,custom_enum:ac.DETECT_FORM_ELEMENT_ERROR}),[]}}},{key:"calculateQuestionFilledTime",value:function(e){var t=e.el,n=e.answers,r=_c(t),i=n.reduce((function(e,t){var n=t.el,r=n.getAttribute("type");return r&&xc.indexOf(r.toLowerCase())>-1?"".concat(e,",").concat(n.checked):"".concat(e,",").concat(n.value)}),"");this.answerMap[r]||(this.answerMap[r]={defaultValue:i,value:i});var o=this.answerMap[r],a=o.defaultValue,c=o.filledTime;if(this.answerMap[r].value=i,a!==i)return c||(this.answerMap[r].filledTime=+new Date);delete this.answerMap[r].filledTime}},{key:"assembleFormDetail",value:function(e){var t=this,n=e.el,r=e.questions;try{var i={xpath:_c(n),id:n.id,name:Gc(n.getAttribute("name")),tag:n.tagName.toLowerCase(),class_name:n.className,questions:[],width:n.offsetWidth,height:n.offsetHeight,is_visible:Fc(n)};return i.questions=r.map((function(e){var n=e.el,r=e.answers,i={xpath:_c(n),id:n.id,name:Gc(Bc(n)),tag:n.tagName.toLowerCase(),class_name:n.className,filled_time:t.calculateQuestionFilledTime(e),answers:[],width:n.offsetWidth,height:n.offsetHeight,is_visible:Fc(n)};return r.forEach((function(e){var t=e.el,n=e.from;t&&"SELECT"===t.tagName.toUpperCase()?i.answers=i.answers.concat(Array.from(t.querySelectorAll("option")).map((function(e){return{xpath:_c(e),id:e.id,name:Gc(e.value||e.innerText),tag:e.tagName.toLowerCase(),class_name:e.className,from:n,width:e.offsetWidth,height:e.offsetHeight,is_visible:Fc(t)}}))):i.answers.push({xpath:_c(t),id:t.id,name:Gc(t.getAttribute("name")),tag:t.tagName.toLowerCase(),class_name:t.className,input_type:t.getAttribute("type"),placeholder:Gc(t.getAttribute("placeholder")),from:n,width:t.offsetWidth,height:t.offsetHeight,is_visible:Fc(t)})})),i})),i}catch(e){return void wi(Sr.CUSTOM_ERROR,e,{custom_name:fc,custom_enum:ac.ASSEMBLE_FORM_DETAIL_ERROR})}}}]),e}(),Wc=["United States","US","Canada","CA","Australia","AU","Mexico","MX","Argentina","AR","Chile","CL","Colombia","CO","Fiji","FJ","Liberia","LR","Namibia","NA","New Zealand","NZ","Singapore","SG","Solomon Islands","SB","Suriname","SR","South Africa","ZA","Barbados","BB","Belize","BZ","Cuba","CU","Dominican Republic","DO","Guyana","GY","Jamaica","JM","Cayman Islands","KY","Trinidad and Tobago","TT","Tuvalu","TV","Zimbabwe","ZW","United Kingdom","GB","Egypt","EG","Falkland Islands","FK","Gibraltar","GI","Guernsey","GG","Isle of Man","IM","Jersey","JE","Lebanon","LB","Saint Helena","SH","Syria","SY","Sudan","SD","Japan","JP","China","CN","Japan","JP","CN","South Korea","KR","Philippines","PH","Cuba","CU","Sweden","SE","Norway","NO","Denmark","DK","Iceland","IS","Costa Rica","CR","El Salvador","SV","Bolivia","BO","Venezuela","VE","Bahamas","BS","Brunei","BN","Ethiopia","ET","Eritrea","ER","Iran","IR","Oman","OM","Qatar","QA","Saudi Arabia","SA","Yemen","YE","Bulgaria","BG","Kyrgyzstan","KG","Central African CFA franc zone","XAF","West African CFA franc zone","XOF"].map((function(e){return e.toUpperCase()})),Kc=["AED","AFN","ALL","AMD","ANG","AOA","ARS","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","BMD","BND","BOB","BOV","BRL","BSD","BTC","BTN","BWP","BYN","BYR","BZD","CAD","CDF","CHE","CHF","CHW","CLF","CLP","CNH","CNY","COP","COU","CRC","CUC","CUP","CVE","CZK","DJF","DKK","DOP","DZD","EEK","EGP","ERN","ETB","ETH","EUR","FJD","FKP","GBP","GEL","GGP","GHC","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","IMP","INR","IQD","IRR","ISK","JEP","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LTC","LTL","LVL","LYD","MAD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MRU","MUR","MVR","MWK","MXN","MXV","MYR","MZN","NAD","NGN","NIO","NOK","NPR","NZD","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RMB","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","STN","SVC","SYP","SZL","THB","TJS","TMT","TND","TOP","TRL","TRY","TTD","TVD","TWD","TZS","UAH","UGX","USD","UYI","UYU","UYW","UZS","VEF","VES","VND","VUV","WST","XAF","XBT","XCD","XOF","XPF","XSU","XUA","YER","ZAR","ZMW","ZWD","ZWL"],Yc=function(e){try{var t=e.plugins&&e.plugins.AutoConfig;return t&&t.vc_rules}catch(e){return}},qc=function(e,t){var n,r;try{var i=e.getPageInfo();if(i.url.includes("checkout")){var o=Object.values(t)[0];for(var a in t)i.url.includes(a)&&(o=t[a]);if(o){var c,s=O(o);try{for(s.s();!(c=s.n()).done;){var u=c.value,l=u.currency.val,f=Xc(u.valueXpath,u.valueClass),d=null==f?void 0:f.textContent;if(d){var h=Qc(d);if(h){var p=void 0,v=void 0,_=void 0;if(u.currency.xpath){var g=null===(n=document.evaluate(u.currency.xpath,document,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue)||void 0===n?void 0:n.textContent;g&&Ci(Sr.CUSTOM_INFO,{custom_name:"auto_value_currency_currency_code_form_xpath",extJSON:{url:i.url,currencyCode:g,vcConfig:t}}),g&&Kc.includes(g.toUpperCase().trim())&&(v=g.toUpperCase().trim())}if(u.countryCodeXpath){var y=null===(r=document.evaluate(u.countryCodeXpath,document,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue)||void 0===r?void 0:r.textContent;y&&Ci(Sr.CUSTOM_INFO,{custom_name:"auto_value_currency_country_form_xpath",extJSON:{url:i.url,country:y,vcConfig:t}}),y&&Wc.includes(y.toUpperCase().trim())&&(p=y.toUpperCase().trim())}try{var m=new URL(null==i?void 0:i.url).hostname.split(".");for(var E in m)Wc.includes(m[E].toUpperCase())&&(_=m[E].toUpperCase())}catch(e){}var b={vc_properties:{value:h,currency:v||l,ori_value:d,rule_key:u.rule_key,country_code:p||_}};return Ci(Sr.CUSTOM_INFO,{custom_name:"auto_value_currency_update_info",extJSON:{url:i.url,autoProperties:b,vcConfig:t}}),zc($c,b),b}}}}catch(e){s.e(e)}finally{s.f()}}return null}return null}catch(e){return wi(Sr.CUSTOM_ERROR,e,{custom_name:"auto_value_currency_update_error",custom_enum:"auto_value_currency",extJSON:{error:e}}),null}};function Xc(e,t){for(var n,r=document.evaluate(e,document,null,XPathResult.ORDERED_NODE_ITERATOR_TYPE,null),i=null;n=r.iterateNext();)/\d/.test(n.innerText)&&(i=n);if(!i&&t)for(var o=document.getElementsByClassName(t),a=0;a=t.length-3&&(i=!0),i&&(n=n.slice(0,r-(t.length-1))+"."+n.slice(r-(t.length-1))),n}return null}var zc=function(e,t){try{sessionStorage.setItem(e,JSON.stringify(t))}catch(e){}},Zc=function(e){try{var t=sessionStorage.getItem(e);return t?JSON.parse(t):null}catch(e){return null}},$c="value_currency_rule",es=[lc.CLICK,lc.SCROLL],ts=function(){function e(t){var n=this;i(this,e),this.handlerArray=t,es.forEach((function(e){window.addEventListener(e.toLowerCase(),ri((function(){n.interactionHandler(e)}),hc,n),{capture:!0,passive:!0})}))}return a(e,[{key:"iterateHandlerArray",value:function(e){this.handlerArray.forEach((function(t){return t(e)}))}},{key:"interactionHandler",value:function(e){var t=this;this.timeoutId&&clearTimeout(this.timeoutId),this.iterateHandlerArray(e),this.timeoutId=setTimeout((function(){t.iterateHandlerArray(e)}),hc)}}]),e}(),ns=function(){function e(){i(this,e),this.history={}}return a(e,[{key:"hasReport",value:function(e,t,n){var r=this.genHistoryKey(e,t);return this.history[r]&&this.history[r].indexOf(n)>-1}},{key:"addHistory",value:function(e,t,n){var r=this.genHistoryKey(e,t);this.history[r]||(this.history[r]=[]),this.history[r].push(n)}},{key:"clearHistory",value:function(){this.history={}}},{key:"genHistoryKey",value:function(e,t){return"".concat(e,":").concat(t)}}]),e}(),rs=function(){function e(t,n,r){i(this,e),this.context=t,this.reportHistory=new ns,this.reporters=n,this.reportService=r}return a(e,[{key:"report",value:function(e,t,n){var r=this,i=Li(Er.AUTO_CONFIG),o=this.getReportPixelList(t,n),a=this.assemblyReportData(e,n,o);a&&i&&qi(this.reportService.reportPreposition||[]).then((function(){r.reportService.report(i,a,Fn.defaultReport)}))}},{key:"clearHistory",value:function(){this.reportHistory.clearHistory()}},{key:"getReportPixelList",value:function(e,t){var n=this,r=JSON.stringify(Object.assign({},t,{page_trigger:void 0}));return this.reporters.filter((function(t){return!!yc(t)&&mc(t,e)})).filter((function(t){var i=t.getReporterId();return!([sc.AUTO_COLLECTION,sc.AUTO_FORM].indexOf(e)>-1&&n.reportHistory.hasReport(e,i,r))&&(n.reportHistory.addHistory(e,i,r),t)}))}},{key:"assemblyReportData",value:function(e,t,n){var r;if(0!==n.length){var i=n.map((function(e){return e.getReporterId()})),o=this.context.getPageSign(),a=n[0],c=a.assemblyData(a.getReporterId(),"",{},{},Er.AUTO_CONFIG);return delete c.event,c.action=e,c.auto_collected_properties=t,c.context.pixel||(c.context.pixel={}),c.context.pixel.code=i[0],c.context.pixel.codes=i.join("|"),c.context.index=null===(r=o.pageIndex)||void 0===r?void 0:r.index,c.context.session_id=o.sessionId,c.context.pageview_id=rr(this.context.getPageViewId(),a.reporterInfo.loadId,mr),c.message_id=c.message_id.replace(/-[^-]*$/,""),c}}}]),e}(),is=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},os=function(e,t){return function(n,r){t(n,r,e)}},as="AutoConfig",cs=function(e){s(n,e);var t=h(n);function n(e,r,o,a){var c;return i(this,n),(c=t.call(this,{name:as,reporters:r,context:e})).autoCollectedMetadata={},c.initialize=!1,c.autoFormUpdateHandler=ri((function(e){if(c.autoForm){if(c.autoCollectedFormDetail=c.autoForm.getOverallFormDetail(),c.autoCollectedFormDetail.length>3e4)return void wi(Sr.CUSTOM_ERROR,{message:"".concat(String(c.autoCollectedFormDetail.length))},{custom_name:fc,custom_enum:ac.OVER_LENGTH});c.actTracker.report(cc.METADATA,sc.AUTO_FORM,{page_trigger:e,form_details:c.autoCollectedFormDetail})}}),200,f(c)),c.autoCollectionUpdateHandler=ri((function(e){ao(Zi.AUTO_CONFIG_CONTENT),c.autoCollectedMetadata=wc(c.filter),co(Zi.AUTO_CONFIG_CONTENT),c.actTracker.report(cc.METADATA,sc.AUTO_COLLECTION,{page_trigger:e,content_data:c.autoCollectedMetadata})}),200,f(c)),c.autoClickCallback=function(e){try{c.signal_insights_config&&qc(c.context,c.signal_insights_config);var t=function(e){var t=e,n=e.parentNode,r=0,i=!1;try{i=si(t)}catch(e){wi(Sr.CUSTOM_ERROR,e,{custom_name:"button_check_error",custom_enum:"auto_click",extJSON:{element:t}}),i=!1}if(i)return t;for(;r<5&&n&&n!==document;){var o=!1;try{o=si(n)}catch(e){wi(Sr.CUSTOM_ERROR,e,{custom_name:"button_check_error",custom_enum:"auto_click",extJSON:{element:t}}),o=!1}if(o)return n;n=n.parentNode,r++}return e}(e.target);if(t){var n=function(e){var t=e.tag,n=e.class,r=e.destination,i=e.id,o=e.name,a=e.type,c=e.value,s=e.rect,u=e.xpath,l=e.inner_text,f=e.image_url,d={tag:t,attributes:{},inner_text:l,xpath:u,num_child_buttons:e.num_child_buttons,timestamp:(new Date).toISOString(),position:s?{x:s.x,y:s.y}:{x:"",y:""}};return n&&(d.attributes.class=n),r&&(d.attributes.destination=r),i&&(d.attributes.id=i),o&&(d.attributes.name=o),a&&(d.attributes.type=a),c&&(d.attributes.value=c),f&&(d.image_url=f),d}(function(e){for(var t,n,r,i,o,a,c,s=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],u=e.attributes,l={type:"",value:"",name:"",class:"",dataset:"",id:"",tag:"",destination:"",xpath:"",inner_text:"",image_url:"",num_child_buttons:0},f=0;f-1},Ne.prototype.set=function(e,t){var n=this.__data__,r=we(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},Re.prototype.clear=function(){this.__data__={hash:new Se,map:new(he||Ne),string:new Se}},Re.prototype.delete=function(e){return xe(this,e).delete(e)},Re.prototype.get=function(e){return xe(this,e).get(e)},Re.prototype.has=function(e){return xe(this,e).has(e)},Re.prototype.set=function(e,t){return xe(this,e).set(e,t),this},Ae.prototype.clear=function(){this.__data__=new Ne},Ae.prototype.delete=function(e){return this.__data__.delete(e)},Ae.prototype.get=function(e){return this.__data__.get(e)},Ae.prototype.has=function(e){return this.__data__.has(e)},Ae.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Ne){var r=n.__data__;if(!he||r.length<199)return r.push([e,t]),this;n=this.__data__=new Re(r)}return n.set(e,t),this};var Ue=ue?W(ue,Object):function(){return[]},Be=function(e){return ee.call(e)};function Fe(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||k.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=r}(e.length)&&!Ye(e)}var Ke=le||function(){return!1};function Ye(e){var t=qe(e)?ee.call(e):"";return t==c||t==s}function qe(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Xe(e){return We(e)?Pe(e):function(e){if(!He(e))return fe(e);var t=[];for(var n in Object(e))$.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}e.exports=function(e){return ke(e,!0,!0)}}(ss,ss.exports);var us=ss.exports,ls={EMPTY_EVENT_TYPE_NAME:{title:"Missing Event Name",desc:"The event name for one or more of your events is empty. This can affect the accuracy of reporting for your conversions.",suggestion:"Go to your source code and add a name that follows our format requirements and TikTok policies.",link:"https://ads.tiktok.com/marketing_api/docs?rid=5ipocbxyw8v&id=1701890973258754"},INVALID_CONTENT_ID:{title:"Missing value for content ID",desc:"Include a value for your 'content_id' parameter. This is required for Video Shopping Ads (VSA).",suggestion:"If you are or plan to run Video Shopping Ads (VSA), go to your source code and include a value for the 'content_id' parameter.",link:"https://ads.tiktok.com/help/article/standard-events-parameters?redirected=2"},INVALID_CONTENT_TYPE:{title:"Invalid content type",desc:'The content type for one or more of your events is invalid. Content type must be either "product" or "product_group".',suggestion:"Go to your source code and update the content type.",link:"https://ads.tiktok.com/help/article/standard-events-parameters?redirected=2"},INVALID_CURRENCY_CODE:{title:"Invalid currency code",desc:"The currency code for one or more of your events isn't supported. This can affect the accuracy of reporting for your ROAS.",suggestion:"Go to your source code and update the 'currency' parameters with a supported currency code.",link:"https://ads.tiktok.com/help/article/standard-events-parameters?redirected=2"},INVALID_EMAIL_FORMAT:{title:"Incorrect email format",desc:"The email format for your events does not match the format supported. This can impact Advanced Matching and your ad performance.",suggestion:"Go to your source code and update the format of your shared emails. It should follow 'xxx@xxx.com' format.",link:"https://ads.tiktok.com/marketing_api/docs?id=1739585700402178"},INVALID_EMAIL_INFORMATION:{title:"Invalid email information",desc:"The emails shared with your events were invalid.",suggestion:'Go to your source code to double check shared emails. Leave your string empty when customer information isn\'t available. Avoid spaces, "undefined", or other hardcoded values.',link:"https://ads.tiktok.com/marketing_api/docs?id=1739585700402178"},INVALID_EVENT_PARAMETER_VALUE:{title:"Invalid value parameter",desc:"The 'value' parameter for one or more of your events is invalid. This is used calculate ROAS for people and the bid for your highest value customers. Parameters must be an integer or in the decimal format (e.g. 9.99). Also, they can't contain currency symbols, special characters, letters, or commas.",suggestion:"Go to your source code and update the 'value' parameter. It can only include numbers greater than or equal to zero (e.g. 9.99). Do not include currency symbols, special characters, letters, or commas.",link:"https://ads.tiktok.com/help/article/standard-events-parameters?redirected=2"},INVALID_PHONE_NUMBER_FORMAT:{title:"Incorrect phone number format",desc:"The phone number format for your events doesn't follow the E.164 format. This can affect Advanced Matching and your ad performance.",suggestion:"Go to your source code and update your shared phone numbers. It should follow the E.164 format.",link:"https://ads.tiktok.com/marketing_api/docs?id=1739585700402178"},INVALID_PHONE_NUMBER_INFORMATION:{title:"Invalid phone number information",desc:"The phone numbers shared with your events were invalid.",suggestion:'Go to your source code to double check shared phone numbers. Leave your string empty when customer information isn\'t available. Avoid spaces, "undefined", or other hardcoded values.',link:"https://ads.tiktok.com/marketing_api/docs?id=1739585700402178"},LONG_EVENT_TYPE_NAME:{title:"Event Name Too Long",desc:"1 event type exceeds the 50 character limit.",suggestion:"Go to your source code and make these event names 50 characters or less.",link:"https://ads.tiktok.com/help/article/custom-events?lang=en"},MISMATCHED_EVENT_TYPE_NAME_FOR_CUSTOM_EVENT:{title:"Invalid Event Name Format",desc:"1 event name was rejected for not following TikTok format requirements.",suggestion:"Go to your source code and update these event types according to TikTok format requirements.",link:"https://ads.tiktok.com/help/article/custom-events?lang=en"},MISSING_CONTENT_ID:{title:"Missing 'content_id' paramter",desc:"The 'content_id' parameter isn't being received. This is required for Video Shopping Ads (VSA).",suggestion:"Include the 'content_id' parameter in your source code. This is required for Video Shopping Ads (VSA).",link:"https://ads.tiktok.com/help/article/standard-events-parameters?redirected=2"},MISSING_CURRENCY_PARAMETER:{title:'Missing "currency" parameter',desc:"Events shared are missing a 'currency' parameter. This impacts our ability to receive the value amount correctly, which can affect the accuracy of reporting for your return on ad spend.",suggestion:'Go to your source code and include the "currency" parameter. You can check supported currency codes. {{learn_more}}',link:"https://ads.tiktok.com/help/article/standard-events-parameters?redirected=2"},MISSING_EMAIL_AND_PHONE:{title:"Missing email and phone number",desc:"Email and phone number info isn't being received. This information is required for Complete Payment events.",suggestion:"Improve your email and phone coverage. This allows you to attribute more conversions and reach more people with your ads.",link:"https://ads.tiktok.com/marketing_api/docs?rid=5ipocbxyw8v&id=1701890972946433"},MISSING_VALUE_PARAMETER:{title:'Missing "value" parameter',desc:"Events shared are missing a 'value' parameter'. This is used calculate ROAS for people and the bid for your highest value customers. ",suggestion:'Go to your source code and include the "value" parameter.',link:"https://ads.tiktok.com/help/article/standard-events-parameters?redirected=2"},DUPLICATE_PIXEL_CODE:{title:"Duplicate Pixel ID",desc:"The pixel ID is duplicate. This could impact the pixel data accuracy.",suggestion:"Please double check and delete any unnecessary pixel code.",link:""},MISSING_PIXEL_CODE:{title:"Missing pixel ID",desc:"Some of the events sent to your TikTok account are missing a pixel ID.",suggestion:"Go to your source code and double check that the 20-character pixel ID has been added to the ttq.load() function. Don't send null values or spaces. If you edited the base code, ensure the event.js has the 'sdkid' in the Chrome network panel.",link:""},INVALID_PIXEL_CODE:{title:"Invalid pixel ID",desc:"The pixel ID is invalid. This could prevent your pixel from receiving data.",suggestion:"Please go to Events Manager and find the correct pixel ID.",link:""}},fs=/^[a-zA-Z\d]([a-zA-Z_\-\d ]{0,}[a-zA-Z_\-\d])?$/,ds=["product","product_group"],hs=["email_is_hashed","phone_is_hashed","sha256_email","sha256_phone"],ps=["AED","ARS","AUD","BDT","BHD","BIF","BOB","BRL","CAD","CHF","CLP","CNY","COP","CRC","CZK","DKK","DZD","EGP","EUR","GBP","GTQ","HKD","HNL","HUF","IDR","ILS","INR","ISK","JPY","KES","KHR","KRW","KWD","KZT","MAD","MOP","MXN","MYR","NGN","NIO","NOK","NZD","OMR","PEN","PHP","PKR","PLN","PYG","QAR","RON","RUB","SAR","SEK","SGD","THB","TRY","TWD","UAH","USD","VES","VND","ZAR"],vs=["CompletePayment","InitiateCheckout","AddToCart","PlaceAnOrder","ViewContent","AddToWishlist"],_s=function(e){return void 0===e},gs="CompletePayment",ys=function(e){var t=e.event,n=void 0===t?"":t;return!!["null","undefined"].includes(n)||(!!/^\s*$/.test(n)||!n)},ms=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},Es=function(e,t){return function(n,r){t(n,r,e)}},bs=function(e){s(n,e);var t=h(n);function n(e,r,o){var a,c;return i(this,n),(a=t.call(this,{name:"DiagnosticsConsole",reporters:r,context:e})).isEnableDiagnosticsConsole=!1,a.isEnableDiagnosticsConsole=Boolean(null===(c=null==o?void 0:o.plugins)||void 0===c?void 0:c.DiagnosticsConsole),a}return a(n,[{key:"isDisableDiagnosticsConsole",value:function(){try{return!this.isEnableDiagnosticsConsole||Boolean(Object.values(this.reporters).some((function(e){var t,n;return void 0!==(null===(t=null==e?void 0:e.options)||void 0===t?void 0:t.diagnostics)&&!(null===(n=null==e?void 0:e.options)||void 0===n?void 0:n.diagnostics)})))}catch(e){return!1}}},{key:"warn",value:function(e,t){try{if(this.isDisableDiagnosticsConsole())return;!function(e,t){if(Nr[e]){var n=Gr(),r=ls[e],i="".concat("[TikTok Pixel]"," - ").concat(r.title);r.desc&&(i+="\nIssue: ".concat(r.desc)),r.suggestion&&(i+="\nSuggestion: ".concat(r.suggestion)),t&&Object.keys(t).forEach((function(e){i=i.split("{{".concat(e,"}}")).join(t[e])})),i=i.trim(),r.link&&(i+=" See ".concat(r.link," for more information.")),n&&n.console&&n.console.warn&&n.console.warn(i)}}(e,t)}catch(t){wi(Sr.CUSTOM_ERROR,t,{custom_name:"diagnostics_console",custom_enum:e})}}},{key:"pixelDidMount",value:function(e){var t=this;e.getParameterInfo().then((function(e){t.handlePixelInfoValidate(e)})).catch((function(e){wi(Sr.CUSTOM_ERROR,e,{custom_name:"diagnostics_console",custom_enum:"pixel"})}))}},{key:"pixelSend",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=arguments.length>4?arguments[4]:void 0;try{r&&r._i||i!==Er.TRACK||t===Ir||this.handleEventPayloadValidate(us(n||{}))}catch(e){wi(Sr.CUSTOM_ERROR,e,{custom_name:"diagnostics_console",custom_enum:"track"})}}},{key:"handlePixelInfoValidate",value:function(e){if(e.status===Ro.Live);else this.warn(Nr.INVALID_PIXEL_CODE)}},{key:"handleEventPayloadValidate",value:function(e){e.properties||(e.properties={}),ys(e)&&this.warn(Nr.EMPTY_EVENT_TYPE_NAME),function(e){var t=e.event,n=void 0===t?"":t;return!!ys(e)||fs.test(n)}(e)||this.warn(Nr.MISMATCHED_EVENT_TYPE_NAME_FOR_CUSTOM_EVENT),function(e){var t=e.event;return(void 0===t?"":t).length<=50}(e)||this.warn(Nr.LONG_EVENT_TYPE_NAME),function(e){var t=e.event,n=e._inspection;if(t===gs){var r=(void 0===n?{}:n).identity_params,i=void 0===r?{}:r;return 0===Object.keys(i).length||hs.every((function(e){return(i[e]||[]).includes(Gn.EMPTY_VALUE)}))}return!1}(e)&&this.warn(Nr.MISSING_EMAIL_AND_PHONE),function(e){var t=e._inspection,n=void 0===t?{}:t;return!(!n||!n.identity_params)&&((n.identity_params.email_is_hashed||[]).includes(Gn.FILTER_EVENTS)||(n.identity_params.sha256_email||[]).includes(Gn.FILTER_EVENTS))}(e)&&this.warn(Nr.INVALID_EMAIL_INFORMATION),function(e){var t=e._inspection,n=void 0===t?{}:t;return!(!n||!n.identity_params)&&((n.identity_params.email_is_hashed||[]).includes(Gn.UNKNOWN_INVALID)||(n.identity_params.sha256_email||[]).includes(Gn.UNKNOWN_INVALID))}(e)&&this.warn(Nr.INVALID_EMAIL_FORMAT),function(e){var t=e._inspection,n=void 0===t?{}:t;return!(!n||!n.identity_params)&&((n.identity_params.phone_is_hashed||[]).includes(Gn.FILTER_EVENTS)||(n.identity_params.sha256_phone||[]).includes(Gn.FILTER_EVENTS))}(e)&&this.warn(Nr.INVALID_PHONE_NUMBER_INFORMATION),function(e){var t=e._inspection,n=void 0===t?{}:t;return!(!n||!n.identity_params)&&((n.identity_params.phone_is_hashed||[]).includes(Gn.UNKNOWN_INVALID)||(n.identity_params.sha256_phone||[]).includes(Gn.UNKNOWN_INVALID))}(e)&&this.warn(Nr.INVALID_PHONE_NUMBER_FORMAT),function(e){var t=e.event,n=void 0===t?"":t,r=e.properties,i=void 0===r?{}:r;if(vs.includes(n)){if(_s(i.contents)&&_s(i.content_id))return!0;if(!_s(i.contents))return!Array.isArray(i.contents)||i.contents.length<1||!i.contents.every((function(e){return e&&!_s(e.content_id)}))}return!1}(e)&&this.warn(Nr.MISSING_CONTENT_ID),function(e){var t=e.properties,n=void 0===t?{}:t,r=n.content_id,i=n.contents;return!(!_s(r)&&/^\s*$/.test(r))&&(!(!_s(i)&&Array.isArray(i))||i.every((function(e){return e&&!_s(e.content_id)&&!/^\s*$/.test(e.content_id)})))}(e)||this.warn(Nr.INVALID_CONTENT_ID),function(e){var t=e.properties.content_type;return!t||ds.includes(t)}(e)||this.warn(Nr.INVALID_CONTENT_TYPE),function(e){var t=e.properties.value;return!t||"number"==typeof t||!("string"!=typeof t||!/^\d+(\.\d+)?$/.test(t)&&!/^\d+$/.test(t))}(e)||this.warn(Nr.INVALID_EVENT_PARAMETER_VALUE),function(e){var t=e.event,n=void 0===t?"":t,r=e.properties,i=void 0===r?{}:r;return!(n!==gs||!_s(i.value))||!(_s(i.currency)||!_s(i.value))}(e)&&this.warn(Nr.MISSING_VALUE_PARAMETER),function(e){var t=e.properties.currency;return!t||ps.includes(t)}(e)||this.warn(Nr.INVALID_CURRENCY_CODE),function(e){var t=e.event,n=void 0===t?"":t,r=e.properties,i=void 0===r?{}:r;return!(n!==gs||!_s(i.currency))||!(_s(i.value)||!_s(i.currency))}(e)&&this.warn(Nr.MISSING_CURRENCY_PARAMETER,{learn_more:""})}}]),n}(Io);bs=ms([A.injectable(),Es(0,A.inject(Or.CONTEXT)),Es(1,A.inject(Or.TTQ_REPORTERS)),Es(2,A.inject(Or.TTQ_GLOBAL_OPTIONS))],bs);var Is=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},Ts=function(e,t){return function(n,r){t(n,r,e)}},Os=function(e){s(n,e);var t=h(n);function n(e,r,o,a){var c;return i(this,n),(c=t.call(this,{name:"PangleCookieMatching",reporters:r,context:e})).hasReport=!1,c.reportService=o,c.env=a,c}return a(n,[{key:"isPixelPangleCookieMatching",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.reporters;if(e){var n=t.find((function(t){return t.getReporterId()===e}));if(n&&n.plugins.PangleCookieMatching)return!0}else if(t.some((function(e){return Boolean(e.plugins.PangleCookieMatching)})))return!0;return!1}},{key:"disablePangleCookie",value:function(){this.isPixelPangleCookieMatching()&&Yi("https://analytics.pangle-ads.com/api/v2/pangle_disable_cookie")}},{key:"pixelSend",value:function(e,t,n){var r;try{if(0===(null===(r=this.context.getPageSign().pageIndex)||void 0===r?void 0:r.index)&&!gi(this.env)&&n&&n.message_id&&this.isPixelPangleCookieMatching(e)&&!this.hasReport){var i={event:n.event,message_id:n.message_id,context:{library:n.context.library},timestamp:(new Date).toJSON()};this.hasReport=!0,this.reportService.report("https://analytics.pangle-ads.com/api/v2/pangle_pixel",i,Fn.httpReport)}}catch(e){wi(Sr.CUSTOM_ERROR,e,{custom_name:"pangle_report"})}}}]),n}(Io);Os=Is([A.injectable(),Ts(0,A.inject(Or.CONTEXT)),Ts(1,A.inject(Or.TTQ_REPORTERS)),Ts(2,A.inject(Or.REPORT_SERVICE)),Ts(3,A.inject(Or.ENV))],Os);var Ss,Ns="https://analytics.tiktok.com/i18n/pixel/eb.js",Rs="_tt_event_builder";!function(e){e.EVENT_BUILD_BOOTSTRAP_ACK="event_builder_bootstrap_ack",e.EVENT_BUILD_WRONG_CODE="event_builder_wrong_code",e.EVENT_BUILD_BOOTSTRAP="event_builder_bootstrap"}(Ss||(Ss={}));var As=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},Ps=function(e,t){return function(n,r){t(n,r,e)}},Cs=function(e){s(n,e);var t=h(n);function n(e,r){var o;return i(this,n),(o=t.call(this,{name:"EventBuilder",reporters:r,context:e})).pluginMounted=!1,o}return a(n,[{key:"pixelDidMount",value:function(e){var t=this;if(!this.pluginMounted){this.pluginMounted=!0;var n=Wr(),r=function(e){e.data.type!==Ss.EVENT_BUILD_BOOTSTRAP||n._event_builder_pickup_sdk_loaded||(t.reporters.find((function(t){return t.getReporterId()===e.data.pixelCode}))?(n._event_builder_pickup_sdk_loaded=!0,xi(Rs,{pixelCode:e.data.pixelCode,token:e.data.token,advId:e.data.advId,emUrl:e.data.emUrl,lang:e.data.lang}),Yi(Ns).then((function(){window.opener.window.postMessage({type:Ss.EVENT_BUILD_BOOTSTRAP_ACK},"*")})).catch((function(e){wi(Sr.CUSTOM_ERROR,e,{custom_name:"event_builder_load_error",custom_enum:"load_ebjs"})}))):n._event_builder_pickup_sdk_verify_flag||(setTimeout((function(){t.reporters.find((function(t){return t.getReporterId()===e.data.pixelCode}))||window.opener.window.postMessage({type:Ss.EVENT_BUILD_WRONG_CODE},"*")}),5e3),n._event_builder_pickup_sdk_verify_flag=!0))};n._event_builder_pickup_sdk_loaded||(Di(Rs)?Yi(Ns).then((function(){n._event_builder_pickup_sdk_loaded=!0})):window.opener&&(window.addEventListener("message",r),setTimeout((function(){window.removeEventListener("message",r)}),8e3)))}}}]),n}(Io);Cs=As([A.injectable(),Ps(0,A.inject(Or.CONTEXT)),Ps(1,A.inject(Or.TTQ_REPORTERS))],Cs);var ws="https://analytics-ipv6.tiktokw.us/ipv6/enrich_ipv6",ks=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},Ms=function(e,t){return function(n,r){t(n,r,e)}},Ls="tt_pixel_is_enrich_ipv6_triggered_by_enrich_am",Ds=function(e){s(n,e);var t=h(n);function n(e,r,o,a){var c;return i(this,n),(c=t.call(this,{name:"EnrichIpv6",reporters:r,context:e})).hasReported=!1,c.shouldReportAfterEnrichAM=!1,c.reportService=o,c.env=a,c}return a(n,[{key:"isPixelEnrichIpv6",value:function(){var e=this.reporters;return!(!e||0===e.length)&&e.every((function(e){return e&&e.plugins&&!0===e.plugins.EnrichIpv6}))}},{key:"isEnrichIpv6V2SwitchOn",value:function(){var e="EnrichIpv6V2";try{var t=Wr()._plugins||{};return null!=t[e]&&!!t[e]}catch(e){return!1}}},{key:"buildEnrichIpv6Data",value:function(e){var t=this.isEnrichIpv6V2SwitchOn()?"#source=2":"#source=1";return Object.assign(Object.assign({},e),{event:"EnrichIpv6",trigger_event:e.event,message_id:e.message_id+t})}},{key:"pixelSend",value:function(e,t,n){var r,i=arguments.length>4?arguments[4]:void 0;try{if(i!==Er.TRACK)return;if("Shopify"!==Xr()&&!this.isEnrichIpv6V2SwitchOn())return;if(gi(this.env)||!n||!n.message_id)return;var o=this.context.getPageSign();0===(null===(r=o.pageIndex)||void 0===r?void 0:r.index)&&!this.hasReported&&this.isPixelEnrichIpv6()&&(this.hasReported=!0,this.reportService.report(ws,this.buildEnrichIpv6Data(n),Fn.htmlHttpReport));var a="true"===sessionStorage.getItem(Ls);if(a)return;"EnrichAM"===t&&(this.shouldReportAfterEnrichAM=!0),this.shouldReportAfterEnrichAM&&this.isPixelEnrichIpv6()&&(this.shouldReportAfterEnrichAM=!1,sessionStorage.setItem(Ls,"true"),this.reportService.report(ws,this.buildEnrichIpv6Data(n),Fn.htmlHttpReport))}catch(e){wi(Sr.CUSTOM_ERROR,e,{custom_name:"enrich_ipv6_report"})}}}]),n}(Io);function xs(e,t){return function(){for(var n=arguments.length,r=new Array(n),i=0;i0){var t=e[0];return t.loadEventEnd-t.startTime}return window.performance.timing.loadEventEnd-window.performance.timing.navigationStart}function Us(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;try{return Number.isInteger(e)?e:parseFloat(e.toFixed(t))}catch(e){return-1}}Ds=ks([A.injectable(),Ms(0,A.inject(Or.CONTEXT)),Ms(1,A.inject(Or.TTQ_REPORTERS)),Ms(2,A.inject(Or.REPORT_SERVICE)),Ms(3,A.inject(Or.ENV))],Ds);var Bs;!function(e){e.FIRST_CONTENTFUL_PAINT="fcp",e.LARGEST_CONTENTFUL_PAINT="lcp",e.FIRST_INPUT_DELAY="fid",e.TIME_TO_FIRST_BYTE="ttfb",e.PAGE_LEAVE="pl",e.LOAD_FINISH="lf",e.TIME_TO_INTERACTIVE="tti",e.TIME_WINDOW_TRACKER="twt",e.DOM_COTENT_LOADED="load2"}(Bs||(Bs={}));var Fs,Hs,Vs,Gs,Js=function(){function e(t,n,r){i(this,e),this.reportService=r,this.context=t,this.reporters=n}return a(e,[{key:"getResult",value:function(e){return{action_event:e}}},{key:"report",value:function(e){var t=this;if(void 0!==e){var n=Li(Er.AUTO_CONFIG);if(void 0!==n){var r=this.getReportPixelList(),i=this.assemblyReportData(Er.PAGE,e,r);i&&n&&qi(this.reportService.reportPreposition||[]).then((function(){t.reportService.report(n,i,Fn.defaultReport)})),this.resetAfterReport()}}}},{key:"getReportPixelList",value:function(){return this.reporters}},{key:"assemblyReportData",value:function(e,t,n){var r;if(0!==n.length){var i=n.map((function(e){return e.getReporterId()})),o=this.context.getPageSign(),a=n[0],c=a.assemblyData(a.getReporterId(),"",{},{},Er.AUTO_CONFIG);return delete c.event,c.action=e,c.auto_collected_properties=t,c.context.pixel||(c.context.pixel={}),c.context.pixel.code=i[0],c.context.pixel.codes=i.join("|"),c.context.index=null===(r=o.pageIndex)||void 0===r?void 0:r.index,c.context.session_id=o.sessionId,c.context.pageview_id=rr(this.context.getPageViewId(),a.reporterInfo.loadId,mr),c.message_id=c.message_id.replace(/-[^-]*$/,""),c}}}]),e}(),Ws=function(e){s(n,e);var t=h(n);function n(e,r,o){var a;return i(this,n),(a=t.call(this,e,r,o)).clickTimes=0,a.scrollTimes=0,a.init(),a}return a(n,[{key:"init",value:function(){var e,t,n=this;e=xs(this.updateClickTimes,this),t=or((function(t){e()}),100),window.addEventListener("click",t,{capture:!0}),function(e){var t=or((function(){e()}),500);window.addEventListener("scroll",t,{passive:!0})}(xs(this.updateScrollTimes,this)),setInterval((function(){n.reportInteraction()}),1e4)}},{key:"reportInteraction",value:function(){this.isUpdated()&&(this.report(this.getResult(Bs.TIME_WINDOW_TRACKER)),this.resetAfterReport())}},{key:"getResult",value:function(e){return{action_event:e,inter:{ct:this.clickTimes,st:this.scrollTimes}}}},{key:"updateClickTimes",value:function(){this.clickTimes+=1}},{key:"updateScrollTimes",value:function(){this.scrollTimes+=1}},{key:"isUpdated",value:function(){return 0!=this.clickTimes||0!=this.scrollTimes}},{key:"resetAfterReport",value:function(){this.clickTimes=0,this.scrollTimes=0}}]),n}(Js),Ks=-1,Ys=function(e){addEventListener("pageshow",(function(t){t.persisted&&(Ks=t.timeStamp,e(t))}),!0)},qs=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},Xs=function(){var e=qs();return e&&e.activationStart||0},Qs=function(e,t){var n=qs(),r="navigate";return Ks>=0?r="back-forward-cache":n&&(document.prerendering||Xs()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},zs=function(e,t,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver((function(e){Promise.resolve().then((function(){t(e.getEntries())}))}));return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch(e){}},Zs=function(e,t,n,r){var i,o;return function(a){t.value>=0&&(a||r)&&((o=t.value-(i||0))||void 0===i)&&(i=t.value,t.delta=o,t.rating=function(e,t){return e>t[1]?"poor":e>t[0]?"needs-improvement":"good"}(t.value,n),e(t))}},$s=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},eu=function(e){var t=function(t){"pagehide"!==t.type&&"hidden"!==document.visibilityState||e(t)};addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0)},tu=function(e){var t=!1;return function(n){t||(e(n),t=!0)}},nu=-1,ru=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},iu=function(e){"hidden"===document.visibilityState&&nu>-1&&(nu="visibilitychange"===e.type?e.timeStamp:0,au())},ou=function(){addEventListener("visibilitychange",iu,!0),addEventListener("prerenderingchange",iu,!0)},au=function(){removeEventListener("visibilitychange",iu,!0),removeEventListener("prerenderingchange",iu,!0)},cu=function(){return nu<0&&(nu=ru(),ou(),Ys((function(){setTimeout((function(){nu=ru(),ou()}),0)}))),{get firstHiddenTime(){return nu}}},su=function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()},uu=[1800,3e3],lu=function(e,t){t=t||{},su((function(){var n,r=cu(),i=Qs("FCP"),o=zs("paint",(function(e){e.forEach((function(e){"first-contentful-paint"===e.name&&(o.disconnect(),e.startTime=0&&Hs1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?function(e,t){var n=function(){pu(e,t),i()},r=function(){i()},i=function(){removeEventListener("pointerup",n,du),removeEventListener("pointercancel",r,du)};addEventListener("pointerup",n,du),addEventListener("pointercancel",r,du)}(t,e):pu(t,e)}},gu=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(t){return e(t,_u,du)}))},yu=[100,300],mu=[2500,4e3],Eu={},bu=[800,1800],Iu=function e(t){document.prerendering?su((function(){return e(t)})):"complete"!==document.readyState?addEventListener("load",(function(){return e(t)}),!0):setTimeout(t,0)},Tu=function(e,t){t=t||{};var n=Qs("TTFB"),r=Zs(e,n,bu,t.reportAllChanges);Iu((function(){var i=qs();if(i){var o=i.responseStart;if(o<=0||o>performance.now())return;n.value=Math.max(o-Xs(),0),n.entries=[i],r(!0),Ys((function(){n=Qs("TTFB",0),(r=Zs(e,n,bu,t.reportAllChanges))(!0)}))}}))},Ou=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},Su=function(e,t){return function(n,r){t(n,r,e)}},Nu=function(e){s(n,e);var t=h(n);function n(e,r,o){var a;return i(this,n),(a=t.call(this,e,r,o)).cls=-1,a.init(),a}return a(n,[{key:"init",value:function(){!function(e,t){t=t||{},lu(tu((function(){var n,r=Qs("CLS",0),i=0,o=[],a=function(e){e.forEach((function(e){if(!e.hadRecentInput){var t=o[0],n=o[o.length-1];i&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(i+=e.value,o.push(e)):(i=e.value,o=[e])}})),i>r.value&&(r.value=i,r.entries=o,n())},c=zs("layout-shift",a);c&&(n=Zs(e,r,fu,t.reportAllChanges),eu((function(){a(c.takeRecords()),n(!0)})),Ys((function(){i=0,r=Qs("CLS",0),n=Zs(e,r,fu,t.reportAllChanges),$s((function(){return n()}))})),setTimeout(n,0))})))}(this.clsHandler.bind(this),{reportAllChanges:!0}),Tu(this.webVitalHandler.bind(this)),lu(this.webVitalHandler.bind(this)),function(e,t){t=t||{},su((function(){var n,r=cu(),i=Qs("LCP"),o=function(e){var t=e[e.length-1];t&&t.startTime=0;s--)(o=e[s])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},Au=function(e,t){return function(n,r){t(n,r,e)}},Pu=function(e){s(n,e);var t=h(n);function n(e,r,o,a){var c;return i(this,n),(c=t.call(this,{name:"PageData",reporters:r,context:e})).monitors=[],c.ttqOptions={},c.reportService=o,c.context=e,c.reporters=r,c.ttqOptions=a,c}return a(n,[{key:"init",value:function(){this.isPageDataEnabled()&&(this.interactionMonitor=new Ws(this.context,this.reporters,this.reportService),this.performanceMonitor=new Nu(this.context,this.reporters,this.reportService),this.monitors.push(this.performanceMonitor),this.monitors.push(this.interactionMonitor))}},{key:"isPageDataEnabled",value:function(){var e,t;return null===(t=null===(e=this.ttqOptions)||void 0===e?void 0:e.plugins)||void 0===t?void 0:t.PageData}},{key:"report",value:function(e){var t=this.performanceMonitor,n=this.performanceMonitor.getResult(e),r=this.interactionMonitor.getResult(e),i=this.mergeReportData(e,r,n);t.report(i),this.interactionMonitor.resetAfterReport(),this.performanceMonitor.resetAfterReport()}},{key:"mergeReportData",value:function(e,t,n){var r={action_event:e};return r.perf=n.perf,r.inter=t.inter,r}},{key:"pageWillLeave",value:function(e){this.report(Bs.PAGE_LEAVE)}},{key:"pixelDidMount",value:function(e){1==this.reporters.length&&this.init()}}]),n}(Io);Pu=Ru([A.injectable(),Au(0,A.inject(Or.CONTEXT)),Au(1,A.inject(Or.TTQ_REPORTERS)),Au(2,A.inject(Or.REPORT_SERVICE)),Au(3,A.inject(Or.TTQ_GLOBAL_OPTIONS))],Pu);var Cu,wu,ku=[{identifier:Or.CALLBACK_PLUGIN,to:Oa,name:"Callback"},{identifier:Or.IDENTIFY_PLUGIN,to:La,name:"Identify",required:!0},{identifier:Or.WEB_FL_PLUGIN,to:oc,name:"WebFL"},{identifier:Or.PERFORMANCE_INTERACTION_PLUGIN,to:Ba,required:!0,name:"PerformanceInteraction"},{identifier:Or.INTERACTION_MONITOR,to:Ga,name:"WebInteractionMonitor",required:!0},{identifier:Or.PERFORMANCE_MONITOR,to:tc,name:"WebPerformanceMonitor",required:!0},{identifier:Or.AUTO_CONFIG_PLUGIN,to:cs,name:"AutoConfig"},{identifier:Or.DIAGNOSTICS_CONSOLE_PLUGIN,to:bs,name:"DiagnosticsConsole"},{identifier:Or.PANGLE_COOKIE_MATCHING_PLUGIN,to:Os,name:"PangleCookieMatching"},{identifier:Or.EVENT_BUILDER_PLUGIN,to:Cs,name:"EventBuilder"},{identifier:Or.ENRICH_IPV6_PLUGIN,to:Ds,name:"EnrichIpv6"},{identifier:Or.PAGEDATA_PLUGIN,to:Pu,name:"PageData"}],Mu=function(e,n,r,i){var o,a=arguments.length,c=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":t(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,n,r,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},Lu=function(e,t){return function(n,r){t(n,r,e)}},Du="shopify_auto_am",xu=function(e){s(n,e);var t=h(n);function n(e,r){var o;return i(this,n),(o=t.call(this,{name:"Shopify",reporters:r,context:e})).init(),o}return a(n,[{key:"init",value:function(){var e;try{if(window.Shopify){var t=function(){var e,t,n,r,i;return(null===(t=null===(e=window.Shopify)||void 0===e?void 0:e.checkout)||void 0===t?void 0:t.email)||(null===(i=null===(r=null===(n=window.Shopify)||void 0===n?void 0:n.Checkout)||void 0===r?void 0:r.customer)||void 0===i?void 0:i.email)}(),n=function(){var e,t,n,r,i;return(null===(t=null===(e=window.Shopify)||void 0===e?void 0:e.checkout)||void 0===t?void 0:t.phone)||(null===(i=null===(r=null===(n=window.Shopify)||void 0===n?void 0:n.checkout)||void 0===r?void 0:r.billing_address)||void 0===i?void 0:i.phone)}(),r={},i=[];t&&(r.email=t,i.push("email")),n&&(r.phone_number=n,i.push("phone_number")),i.length>0&&Ci(Sr.CUSTOM_INFO,{custom_name:Du,custom_enum:i.join(",")}),null===(e=Wr())||void 0===e||e.identify(r)}}catch(e){wi(Sr.CUSTOM_ERROR,e,{custom_name:Du})}}}]),n}(Io);xu=Mu([A.injectable(),Lu(0,A.inject(Or.CONTEXT)),Lu(1,A.inject(Or.TTQ_REPORTERS))],xu);var ju=function(e,t){Cu=t,(wu=e).isBound(Or.SHOPIFY_PLUGIN)||wu.bind(Or.SHOPIFY_PLUGIN).to(xu).inSingletonScope(),function(e,t){return!(!Cu._mounted||Cu.getPlugin(t)||!wu.isBound(e))}(Or.SHOPIFY_PLUGIN,"Shopify")&&Cu.usePlugin(wu.get(Or.SHOPIFY_PLUGIN))},Uu=function(e,t){return Uu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},Uu(e,t)};function Bu(e,t){function n(){this.constructor=e}Uu(e,t),e.prototype=null===t?Object._ttq_create(t):(n.prototype=t.prototype,new n)}var Fu,Hu=function(){return Hu=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&(this.setResultIFrame.src=""+this.scheme+this.setResultPath+"&"+t),this.javascriptMessageQueue.splice(0,this.javascriptMessageQueue.length),e},e.prototype.sendMessageToNative=function(e){if("1"!==String(e.JSSDK)&&this.nativeMethodInvoker){var t=this.nativeMethodInvoker(e);if(t){var n=JSON.parse(t);this.handleMessageFromNative(n)}}else this.javascriptMessageQueue.push(e),this.dispatchMessageIFrame||this.tryCreateIFrames(),this.dispatchMessageIFrame.src=""+this.scheme+this.dispatchMessagePath},e.prototype.registerCallback=function(e,t){var n=String(this.callbackId++);return this.callbackMap[n]={method:e,callback:t},n},e.prototype.deregisterCallback=function(e){delete this.callbackMap[e]},e.prototype.tryCreateIFrames=function(){this.dispatchMessageIFrame=this.createIFrame(this.dispatchMessageIFrameId),this.setResultIFrame=this.createIFrame(this.setResultIFrameId)},e.prototype.createIFrame=function(e){var t=document.getElementById(e);return t&&"IFRAME"===t.tagName||((t=document.createElement("iframe")).style.display="none",t.id=e,document.documentElement.appendChild(t)),t},e}(),Gu="2.2.15",Ju="undefined"!=typeof __PIA_WORKER__?new Function("return this")():"undefined"!=typeof window?window:{},Wu=void 0!==Ju&&Ju.navigator?Ju.navigator.userAgent:"",Ku=(!!Wu.match(/(newsarticle|videoarticle|lv|faceu|ulike|beauty_me_|faceu-os|ulike-os|beauty_me_oversea_|retouch)\/([\d.]+)/i)||/super|automobile/gi.test(Wu))&&!/webcast/gi.test(Wu)&&!/luckycatversion/gi.test(Wu),Yu=!!Wu.match(/(faceu)\/([\d.]+)/i)||/gsdk/gi.test(Wu)||/PIANativeWorker/gi.test(Wu),qu=!!Wu.match(/ttad\/0/i),Xu=!!Wu.match(/aweme|trill|musical_ly|phoenix_\d+|TikTokNow_\d+/i),Qu=!!Wu.match(/live_stream/i),zu=!!Wu.match(/Webcast/i),Zu=!!Wu.match(/super/i),$u=!!Wu.match(/life_service_merchant/i),el=/super/gi.test(Wu);function tl(){var e;if(Ku)return Ju.JSBridge&&Ju.JSBridge.on?e=Ju.JSBridge.on:Ju.JS2NativeBridge&&Ju.JS2NativeBridge.on?e=function(e){var t={JSSDK:Gu,__msg_type:"event",__callback_id:e,func:e};Ju.JS2NativeBridge.on(e,JSON.stringify(t))}:Ju.webkit&&Ju.webkit.messageHandlers&&Ju.webkit.messageHandlers.onMethodParams?e=function(e){var t={JSSDK:Gu,__msg_type:"event",__callback_id:e,func:e};Ju.webkit.messageHandlers.onMethodParams.postMessage(t)}:Ju.onMethodParams&&(e=function(e){var t={JSSDK:Gu,__msg_type:"event",__callback_id:e,func:e};return Ju.onMethodParams(e,t)}),e}function nl(e,t){if(("string"!=typeof t||!0!==/^(x|tc)\./.test(t))&&(Xu||Qu||zu||$u)){var n=e.__params;Ju.JS2NativeBridge&&Ju.JS2NativeBridge._invokeMethod&&(e.__params=Hu({code:n.code},n.data))}}var rl=function(e){function t(){var t=e.call(this,{version:Gu,scheme:"bytedance://",listenNativeEvent:!0,dispatchMessageIFrameId:"__JSBridgeIframe_1.0__",setResultIFrameId:"__JSBridgeIframe_SetResult_1.0__",nativeEventListener:tl(),callbackProcessor:nl})||this;return t.publicApi={call:t.call.bind(t),on:t.on.bind(t),once:t.once.bind(t),off:t.off.bind(t),trigger:t.trigger.bind(t),_fetchQueue:t.fetchJavaScriptMessageQueue.bind(t),_handleMessageFromToutiao:t.handleMessageFromNative.bind(t)},t}return Bu(t,e),t.prototype.exposePublicApiToGlobal=function(){Ju.ToutiaoJSBridge=Object.assign(Ju.ToutiaoJSBridge||{},this.publicApi)},t}(Vu),il=function(e){function t(t){var n,r=e.call(this,{version:Gu,nativeMethodInvoker:(Ju.JS2NativeBridge&&Ju.JS2NativeBridge._invokeMethod?n=function(e){return Ju.JS2NativeBridge._invokeMethod(JSON.stringify(e))}:Ju.ToutiaoJSBridge&&Ju.ToutiaoJSBridge.invokeMethod?n=function(e){return Ju.ToutiaoJSBridge.invokeMethod(JSON.stringify(e))}:Ju.JS2NativeBridge&&Ju.JS2NativeBridge.call?n=function(e){return Ju.JS2NativeBridge.call(e.func,JSON.stringify(e))}:Ju.webkit&&Ju.webkit.messageHandlers&&Ju.webkit.messageHandlers.callMethodParams?n=function(e){Ju.webkit.messageHandlers.callMethodParams.postMessage(e)}:Ju.callMethodParams&&(n=function(e){return Ju.callMethodParams(e.func,e)}),n),nativeEventListener:tl(),scheme:Zu?"bds://":el?"bytedance://":Ku||Ju.JSBridge&&Ju.JSBridge._invokeMethod?"nativeapp://":"bytedance://",listenNativeEvent:Ku,callbackProcessor:nl})||this;return r.toutiaoLegacyJSB=t,r.publicApi={call:r.call.bind(r),on:r.on.bind(r),once:r.once.bind(r),off:r.off.bind(r),trigger:r.trigger.bind(r),_fetchQueue:r.fetchJavaScriptMessageQueue.bind(r),_handleMessageFromApp:r.handleMessageFromNative.bind(r),_handleMessageFromToutiao:r.handleMessageFromNative.bind(r)},r}return Bu(t,e),t.prototype.call=function(t,n,r,i){void 0===i&&(i=Gu),this.isLegacyCall(t)?this.toutiaoLegacyJSB.call(t,n,r,i):e.prototype.call.call(this,t,n,r,i)},t.prototype.on=function(t,n,r,i){return void 0===r&&(r=!1),(i||{}).useLegacy||this.isLegacyCall(t)?this.toutiaoLegacyJSB.on(t,n,r):e.prototype.on.call(this,t,n,r)},t.prototype.once=function(t,n){return this.isLegacyCall(t)?this.toutiaoLegacyJSB.once(t,n):e.prototype.once.call(this,t,n)},t.prototype.off=function(t,n){return this.isLegacyCall(t)?this.toutiaoLegacyJSB.off(t,n):e.prototype.off.call(this,t,n)},t.prototype.trigger=function(t,n){return this.isLegacyCall(t)?this.toutiaoLegacyJSB.trigger(t,n):e.prototype.trigger.call(this,t,n)},t.prototype.exposePublicApiToGlobal=function(){var e=this;Ju.JSBridge=Object.assign(Ju.JSBridge||{},this.publicApi),Ju.__DISABLE_JSB_PROTOCAL2__||(Ju.Native2JSBridge=Object.assign(Ju.Native2JSBridge||{},this.publicApi)),el?Ju.ToutiaoJSBridge=Object.assign(Ju.ToutiaoJSBridge||{},this.publicApi):(Ku||qu)&&this.toutiaoLegacyJSB?this.toutiaoLegacyJSB.exposePublicApiToGlobal():Ju.ToutiaoJSBridge=Object.assign(Ju.ToutiaoJSBridge||{},this.publicApi),Ju.parent!==Ju&&Ju.addEventListener&&Ju.addEventListener("message",(function(t){t&&t.data&&t.data.__callback_id&&e.handleMessageFromNative(t.data)}),!1),Object.defineProperties(Ju,{JSBridge:{writable:!1},Native2JSBridge:{writable:!1},ToutiaoJSBridge:{writable:!1}}),Object.freeze(Ju.JSBridge),Object.freeze(Ju.Native2JSBridge),Object.freeze(Ju.ToutiaoJSBridge)},t.prototype.isLegacyCall=function(e){return!(!e||"string"!=typeof e||!this.toutiaoLegacyJSB)&&(!!qu||!Yu&&!el&&(Ku&&e.indexOf(".")<0))},t}(Vu);function ol(e,t){if(null==e)throw new TypeError("Cannot convert first argument to object");for(var n=Object(e),r=1;r=0;s--)(o=e[s])&&(c=(a<3?o(c):a>3?o(n,r,c):o(n,r))||c);return a>3&&c&&Object.defineProperty(n,r,c),c},vl=function(e,t){return function(n,r){t(n,r,e)}},_l=function(e){s(n,e);var t=h(n);function n(e,r){var o;return i(this,n),(o=t.call(this,{name:fl,reporters:r,context:e})).initialize=!1,o}return a(n,[{key:"init",value:function(){var e=this;this.initialize||(this.addObserver((function(){var t=location.href,n=e.context.getPageInfo().url;if(t!==n){var r,i=e.context.setPageInfo(t,n);i&&i.pageIndex&&Vi(i.pageIndex),e.reporters.filter((r=sl.DYNAMIC_WEB_PAGEVIEW,function(e){var t=e.plugins;return hl(e)&&t[fl]&&t[fl][r]})).forEach((function(e){e.isPartnerReporter()||setTimeout((function(){e.page({event_experiment:"pageview"})}))}))}})),this.listenSPAHistoryChange(),this.initialize=!0)}},{key:"pixelSend",value:function(e,t){var n=this.reporters.find((function(t){return t.getReporterId()===e}));"Pageview"===t&&(Xr()||n&&n.isPartnerReporter()||n&&!hl(n)||this.init())}},{key:"listenSPAHistoryChange",value:function(){var e=this,t=function(){e.notifyObservers()};window.addEventListener("popstate",t),history.pushState=dl("pushState",t),history.replaceState=dl("replaceState",t)}}]),n}(Ao);_l=pl([A.injectable(),vl(0,A.inject(Or.CONTEXT)),vl(1,A.inject(Or.TTQ_REPORTERS))],_l);var gl=[{identifier:Or.HISTORY_OBSERVER,to:_l,name:"HistoryObserver"}],yl=Wr(),ml=(null==yl?void 0:yl._container)||new A.Container,El=(null==yl?void 0:yl._container)?Po.REBIND:Po.BIND;vi();var bl=ml[El](Or.ENV),Il=ml[El](br.SignalType);ml[El](br.ID),ml[El](br.Type),ml[El](br.Options),ml[El](br.Plugins),ml[El](br.Rules),ml[El](br.Info);var Tl=ml[El](br.WebLibraryInfo),Ol=ml[El](Or.TTQ_GLOBAL_OPTIONS);try{if(!ml.get(Or.TTQ_GLOBAL_OPTIONS))throw new Error("")}catch(e){Ol.toConstantValue({})}var Sl=function(e,t){var n=function(e){return{name:"pixel.js",version:"2.2.0",options:e}}(),r=_i();Tl.toConstantValue(n),bl.toConstantValue(t),Il.toConstantValue(r),!e||e._mounted||ml.isBound(Or.JS_BRIDGE)||gi(t)&&(yi(t)?ml.bind(Or.JS_BRIDGE).toConstantValue(function(){if(window&&window.ToutiaoJSBridge&&window.ToutiaoJSBridge.call)return window.ToutiaoJSBridge}()||cl):ml.bind(Or.JS_BRIDGE).toConstantValue(ll))},Nl=function(e){(null==e?void 0:e._container)||(ml.bind(Or.TTQ).to(Ko).inSingletonScope(),ml.bind(Or.CONTEXT).to(Xo).inSingletonScope(),ml.bind(Or.REPORTER).to(Ho),ml.bind(Or.TTQ_REPORTERS).toConstantValue([]),ml.bind(Or.REPORT_SERVICE).to(ya).inSingletonScope(),ml.bind(Or.AD_SERVICE).to(Zo).inSingletonScope(),ml.bind(Or.APP_SERVICE).to(ta).inSingletonScope(),ml.bind(Or.BRIDGE_SERVICE).to(ua).inSingletonScope(),ml.bind(Or.HTTP_SERVICE).to(va).inSingletonScope(),ml.bind(br.IsOnsitePage).toConstantValue({value:!1}),ml.bind(Or.COOKIE_SERVICE).to(ba).inSingletonScope(),ml.bind(Or.CONSENT_SERVICE).to(da).inSingletonScope()),e&&!e._container&&(e._container=ml)},Rl=function(){ku.forEach((function(e){var t=e.to,n=e.name,r=void 0===n?"":n,i=e.required,o=void 0!==i&&i,a=e.identifier;!o&&!Qr(r)||ml.isBound(a)||ml.bind(a).to(t).inSingletonScope()}))},Al=function(){gl.forEach((function(e){var t=e.to,n=e.name,r=void 0===n?"":n,i=e.identifier;Qr(r)&&!ml.isBound(i)&&ml.bind(i).to(t).inSingletonScope()}))},Pl=function(e,t,n){Sl(e,n),function(e,t){var n=t||{},r=n._partner,i=n._ttp,o=n._self_host_config,a=n._usd_exchange_rate,c=n._legacy,s=n._cc,u=n._variation_id,l=n._server_unique_id,f=n._currency_list,d=n._plugins,h=n._aam,p=n._auto_config,v=e.get(Or.TTQ_GLOBAL_OPTIONS)||{};Object.assign(v,{partner:r,ttp:i,cc:s,self_host_config:o,usd_exchange_rate:a,legacy:c,variation_id:u,server_unqiue_id:l,currency_list:f,plugins:d,aam:h,auto_config:p}),e.isBound(Or.TTQ_GLOBAL_OPTIONS)?e.rebind(Or.TTQ_GLOBAL_OPTIONS).toConstantValue(v):e.bind(Or.TTQ_GLOBAL_OPTIONS).toConstantValue(v)}(t,e),Al(),Nl(e),Rl(),ju(t,e)},Cl=function(e){return e&&e.Math==Math&&e},wl=Cl("object"==typeof globalThis&&globalThis)||Cl("object"==typeof window&&window)||Cl("object"==typeof self&&self)||Cl("object"==typeof N&&N)||Function("return this")(),kl={},Ml=function(e){try{return!!e()}catch(e){return!0}},Ll=!Ml((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),Dl={},xl={}.propertyIsEnumerable,jl=Object.getOwnPropertyDescriptor,Ul=jl&&!xl.call({1:2},1);Dl.f=Ul?function(e){var t=jl(this,e);return!!t&&t.enumerable}:xl;var Bl=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},Fl={}.toString,Hl=function(e){return Fl.call(e).slice(8,-1)},Vl=Hl,Gl="".split,Jl=Ml((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==Vl(e)?Gl.call(e,""):Object(e)}:Object,Wl=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},Kl=Jl,Yl=Wl,ql=function(e){return Kl(Yl(e))},Xl=function(e){return"object"==typeof e?null!==e:"function"==typeof e},Ql=Xl,zl=function(e,t){if(!Ql(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!Ql(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!Ql(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!Ql(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},Zl={}.hasOwnProperty,$l=function(e,t){return Zl.call(e,t)},ef=Xl,tf=wl.document,nf=ef(tf)&&ef(tf.createElement),rf=function(e){return nf?tf.createElement(e):{}},of=rf,af=!Ll&&!Ml((function(){return 7!=Object.defineProperty(of("div"),"a",{get:function(){return 7}}).a})),cf=Ll,sf=Dl,uf=Bl,lf=ql,ff=zl,df=$l,hf=af,pf=Object.getOwnPropertyDescriptor;kl.f=cf?pf:function(e,t){if(e=lf(e),t=ff(t,!0),hf)try{return pf(e,t)}catch(e){}if(df(e,t))return uf(!sf.f.call(e,t),e[t])};var vf={},_f=Xl,gf=function(e){if(!_f(e))throw TypeError(String(e)+" is not an object");return e},yf=Ll,mf=af,Ef=gf,bf=zl,If=Object.defineProperty;vf.f=yf?If:function(e,t,n){if(Ef(e),t=bf(t,!0),Ef(n),mf)try{return If(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var Tf=vf,Of=Bl,Sf=Ll?function(e,t,n){return Tf.f(e,t,Of(1,n))}:function(e,t,n){return e[t]=n,e},Nf={exports:{}},Rf=wl,Af=Sf,Pf=function(e,t){try{Af(Rf,e,t)}catch(n){Rf[e]=t}return t},Cf=Pf,wf="__core-js_shared__",kf=wl[wf]||Cf(wf,{}),Mf=kf,Lf=Function.toString;"function"!=typeof Mf.inspectSource&&(Mf.inspectSource=function(e){return Lf.call(e)});var Df=Mf.inspectSource,xf=Df,jf=wl.WeakMap,Uf="function"==typeof jf&&/native code/.test(xf(jf)),Bf={exports:{}},Ff=kf;(Bf.exports=function(e,t){return Ff[e]||(Ff[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.4",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"});var Hf,Vf,Gf,Jf=0,Wf=Math.random(),Kf=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++Jf+Wf).toString(36)},Yf=Bf.exports,qf=Kf,Xf=Yf("keys"),Qf=function(e){return Xf[e]||(Xf[e]=qf(e))},zf={},Zf=Uf,$f=Xl,ed=Sf,td=$l,nd=Qf,rd=zf,id=wl.WeakMap;if(Zf){var od=new id,ad=od.get,cd=od.has,sd=od.set;Hf=function(e,t){return sd.call(od,e,t),t},Vf=function(e){return ad.call(od,e)||{}},Gf=function(e){return cd.call(od,e)}}else{var ud=nd("state");rd[ud]=!0,Hf=function(e,t){return ed(e,ud,t),t},Vf=function(e){return td(e,ud)?e[ud]:{}},Gf=function(e){return td(e,ud)}}var ld={set:Hf,get:Vf,has:Gf,enforce:function(e){return Gf(e)?Vf(e):Hf(e,{})},getterFor:function(e){return function(t){var n;if(!$f(t)||(n=Vf(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}},fd=wl,dd=Sf,hd=$l,pd=Pf,vd=Df,_d=ld.get,gd=ld.enforce,yd=String(String).split("String");(Nf.exports=function(e,t,n,r){var i=!!r&&!!r.unsafe,o=!!r&&!!r.enumerable,a=!!r&&!!r.noTargetGet;"function"==typeof n&&("string"!=typeof t||hd(n,"name")||dd(n,"name",t),gd(n).source=yd.join("string"==typeof t?t:"")),e!==fd?(i?!a&&e[t]&&(o=!0):delete e[t],o?e[t]=n:dd(e,t,n)):o?e[t]=n:pd(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&_d(this).source||vd(this)}));var md=wl,Ed=md,bd=wl,Id=function(e){return"function"==typeof e?e:void 0},Td=function(e,t){return arguments.length<2?Id(Ed[e])||Id(bd[e]):Ed[e]&&Ed[e][t]||bd[e]&&bd[e][t]},Od={},Sd=Math.ceil,Nd=Math.floor,Rd=function(e){return isNaN(e=+e)?0:(e>0?Nd:Sd)(e)},Ad=Rd,Pd=Math.min,Cd=function(e){return e>0?Pd(Ad(e),9007199254740991):0},wd=Rd,kd=Math.max,Md=Math.min,Ld=ql,Dd=Cd,xd=function(e,t){var n=wd(e);return n<0?kd(n+t,0):Md(n,t)},jd=function(e){return function(t,n,r){var i,o=Ld(t),a=Dd(o.length),c=xd(r,a);if(e&&n!=n){for(;a>c;)if((i=o[c++])!=i)return!0}else for(;a>c;c++)if((e||c in o)&&o[c]===n)return e||c||0;return!e&&-1}},Ud={includes:jd(!0),indexOf:jd(!1)},Bd=$l,Fd=ql,Hd=Ud.indexOf,Vd=zf,Gd=function(e,t){var n,r=Fd(e),i=0,o=[];for(n in r)!Bd(Vd,n)&&Bd(r,n)&&o.push(n);for(;t.length>i;)Bd(r,n=t[i++])&&(~Hd(o,n)||o.push(n));return o},Jd=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Wd=Gd,Kd=Jd.concat("length","prototype");Od.f=Object.getOwnPropertyNames||function(e){return Wd(e,Kd)};var Yd={};Yd.f=Object.getOwnPropertySymbols;var qd,Xd=Od,Qd=Yd,zd=gf,Zd=Td("Reflect","ownKeys")||function(e){var t=Xd.f(zd(e)),n=Qd.f;return n?t.concat(n(e)):t},$d=$l,eh=Zd,th=kl,nh=vf,rh=Ml,ih=/#|\.prototype\./,oh=function(e,t){var n=ch[ah(e)];return n==uh||n!=sh&&("function"==typeof t?rh(t):!!t)},ah=oh.normalize=function(e){return String(e).replace(ih,".").toLowerCase()},ch=oh.data={},sh=oh.NATIVE="N",uh=oh.POLYFILL="P",lh=oh,fh=wl,dh=kl.f,hh=Sf,ph=Nf.exports,vh=Pf,_h=function(e,t){for(var n=eh(t),r=nh.f,i=th.f,o=0;oo;)Ph.f(e,n=r[o++],t[n]);return e},Mh=Td("document","documentElement"),Lh=gf,Dh=kh,xh=Jd,jh=zf,Uh=Mh,Bh=rf,Fh=Qf("IE_PROTO"),Hh=function(){},Vh=function(e){return"