@seaverse/track-sdk 0.1.8 → 0.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";var t=require("firebase/app"),e=require("firebase/analytics");function n(t){var e=Object.create(null);return t&&Object.keys(t).forEach(function(n){if("default"!==n){var s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,s.get?s:{enumerable:!0,get:function(){return t[n]}})}}),e.default=t,Object.freeze(e)}var s,r,i=n(require("sa-sdk-javascript"));function o(){var t=["266630WQEgeg","8084260Gwkmpn","102876MNNirj","9oBUWgH","1086JVxqHO","FIREBASE","firebase","7884527IuLNMS","2708VmpVMI","6904760KdorOo","10HEMeef","1405132wdAqhR"];return(o=function(){return t})()}function a(t,e){return t-=110,o()[t]}function c(){return"undefined"!=typeof window&&typeof document!==d(467)}function p(t){const e=d,n=document[e(468)](e(461)),s=document.createElement(e(464));s[e(428)]=e(431)+t,s[e(427)]="0",s[e(444)]="0",s[e(447)][e(465)]="none",s[e(447)][e(451)]=e(434),n[e(466)](s),document[e(459)][e(424)]?document.body[e(432)](n,document[e(459)][e(424)]):document[e(459)][e(466)](n)}function l(){const t=["getElementsByTagName","[GoogleTagManager] Invalid event name:","[GTM] Not in browser environment, skip injection","parentNode","from","dataLayer","gtm.js","error","push","width","includes","addEventListener","style","gtm.js?id=","1995KNOmbF","[GoogleTagManager] dataLayer not initialized","visibility","940856xGuYiz","1086606MumUOa","querySelectorAll","3IZygjE","5qcHCel","2144836tdPmXG","6162264PJMVLY","body","3097290LwpAZb","noscript","DOMContentLoaded","string","iframe","display","appendChild","undefined","createElement","log","[GTM] Injected successfully: ","[GoogleTagManager] Pushed to dataLayer:","[GoogleTagManager] Error pushing to dataLayer:","https://www.googletagmanager.com/gtm.js?id=","1644ijRnpH","firstChild","11fXFJJJ","[GTM] Already injected, skip","height","src","script","warn","https://www.googletagmanager.com/ns.html?id=","insertBefore","1907678oEzRUS","hidden"];return(l=function(){return t})()}function d(t,e){t-=423;return l()[t]}function f(t,e=!1){const n=d;if(c())if(t)if(function(t){const e=d;if(!c())return!1;const n=!!window.dataLayer,s=document[e(454)]("script"),r=Array[e(439)](s).some(n=>n.src[e(445)](e(448)+t));return n&&r}(t))e&&console[n(469)](n(426));else try{(function(t){const e=d;window[e(440)]=window[e(440)]||[],window[e(440)][e(443)]({"gtm.start":(new Date).getTime(),event:e(441)});const n=document[e(468)](e(429));n.async=!0,n[e(428)]=e(473)+t;const s=document[e(435)]("script")[0];s&&s[e(438)]?s[e(438)][e(432)](n,s):document.head[e(466)](n)})(t),document[n(459)]?p(t):document[n(446)](n(462),()=>{p(t)}),e&&console[n(469)](n(470)+t)}catch(t){console.error("[GTM] Injection failed:",t)}else e&&console[n(430)]("[GTM] GTM ID is empty, skip injection");else e&&console[n(430)](n(437))}!function(){for(var t=a,e=o();;)try{if(916363===parseInt(t(110))/1+-parseInt(t(118))/2*(-parseInt(t(114))/3)+-parseInt(t(121))/4+-parseInt(t(120))/5*(parseInt(t(112))/6)+-parseInt(t(117))/7+-parseInt(t(119))/8*(-parseInt(t(113))/9)+parseInt(t(111))/10)break;e.push(e.shift())}catch(t){e.push(e.shift())}}(),exports.TrackProvider=void 0,(s=exports.TrackProvider||(exports.TrackProvider={}))[(r=a)(115)]=r(116),s.SENSORS="sensors",function(){const t=d,e=l();for(;;)try{if(477298===parseInt(t(452))/1+-parseInt(t(433))/2*(-parseInt(t(455))/3)+-parseInt(t(457))/4*(parseInt(t(456))/5)+parseInt(t(423))/6*(parseInt(t(449))/7)+-parseInt(t(458))/8+parseInt(t(453))/9+-parseInt(t(460))/10*(parseInt(t(425))/11))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const h=(t,e)=>{const n=d;if(!t||typeof t!==n(463))return void console[n(442)](n(436),t);(t=>{const e=d;if("undefined"!=typeof window&&window[e(440)])try{window.dataLayer.push(t),console[e(469)](e(471),t)}catch(t){console[e(442)](e(472),t)}else console[e(442)](e(450))})({event:t,...e||{}})};function u(){const t=["initialize","6865749kKmkXt","firebase initialize failed:","setUserId","535510AyhiXh","267365CMuyqM","54iyPSYI","gtmId","error","203krptMd","config","analytics","135832pDFpNV","1801512AzpHYc","initialized","setUserProperties","debug","181486qSVsrn","2110504syzdMf"];return(u=function(){return t})()}const I=m;function m(t,e){t-=294;return u()[t]}!function(){const t=m,e=u();for(;;)try{if(379838===-parseInt(t(304))/1+parseInt(t(298))/2+parseInt(t(294))/3+-parseInt(t(299))/4+parseInt(t(305))/5*(parseInt(t(306))/6)+parseInt(t(309))/7*(-parseInt(t(312))/8)+parseInt(t(301))/9)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class y{constructor(t,e,n=!1){const s=m;this[s(311)]=null,this[s(295)]=!1,this[s(310)]=t,this[s(307)]=e,this[s(297)]=n}async[I(300)](){const n=I;if(!this[n(295)])try{const s=t.initializeApp(this.config);this[n(311)]=e.getAnalytics(s),this[n(307)]&&f(this[n(307)],this[n(297)]),this[n(295)]=!0}catch(t){throw console[n(308)](n(302),t),t}}async track(t,e){}async[I(303)](t){}async[I(296)](t){}async clearUserId(){}}const k=w;function w(t,e){t-=338;return g()[t]}function g(){const t=["2253844yrthQG","clearUserId","version","track","sensors sdk setUserProperties failed:","serverUrl","quick","192871KPyxAZ","3719914DpAjgF","setUserProperties","token","&p=","init","sensors sdk not initialized, skip setUserProperties","initialize","login","3UpfjGX","14muZHbM","2192624VUbNFK","logout","sensors sdk setUserId failed:","setProfile","error","?t=","config","9nlDcMt","ajax","20390yUPCYp","platform","2317225LepUxm","sensors sdk not initialized, skip track","sensors sdk init failed:","sensors sdk track failed:","6ViKenG","autoTrack","setUserId","6795980OStkob","initialized","heatmap","warn","showLog","sensors"];return(g=function(){return t})()}!function(){const t=w,e=g();for(;;)try{if(728533===-parseInt(t(347))/1*(parseInt(t(379))/2)+-parseInt(t(378))/3*(-parseInt(t(362))/4)+-parseInt(t(349))/5+parseInt(t(353))/6*(parseInt(t(369))/7)+-parseInt(t(338))/8+parseInt(t(345))/9*(parseInt(t(356))/10)+parseInt(t(370))/11)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class v{constructor(t,e,n,s){const r=w;this[r(361)]=null,this[r(357)]=!1,this[r(372)]=t,this[r(348)]=e,this[r(364)]=n,this[r(344)]=s}async[k(376)](){const t=k;if(!this[t(357)])try{if(!i)throw new Error("sensors sdk not found, please install it by running");this[t(361)]=i;const e=encodeURIComponent(this[t(372)]),n=encodeURIComponent(this[t(348)]),s=encodeURIComponent(this[t(364)]);this.sensors[t(374)]({server_url:this[t(344)][t(367)]+(t(343)+e+t(373)+n+"&v=")+s,show_log:this[t(344)][t(360)]??!1,heatmap:this[t(344)][t(358)]??{},is_track_single_page:!0,send_type:t(346)}),this.initialized=!0,this[t(361)][t(368)](t(354))}catch(e){throw console.error(t(351),e),e}}async track(t,e){const n=k;if(this[n(357)]&&this[n(361)])try{this[n(361)][n(365)](t,e??{})}catch(t){console.error(n(352),t)}else console[n(359)](n(350))}async[k(355)](t){const e=k;if(this[e(357)]&&this[e(361)])try{this[e(361)][e(377)](t)}catch(t){console.error(e(340),t)}else console[e(359)]("sensors sdk not initialized, skip setUserId")}async[k(371)](t){const e=k;if(this.initialized&&this[e(361)])try{this[e(361)][e(341)](t)}catch(t){console[e(342)](e(366),t)}else console.warn(e(375))}async[k(363)](){const t=k;if(this.initialized&&this[t(361)])try{this.sensors[t(339)]()}catch(e){console[t(342)]("sensors sdk clearUserId failed:",e)}}}function z(t,e){return t-=301,M()[t]}function M(){var t=["8KZlNgG","base64","3147105DvZkNe","173660koNbLk","parse","undefined","89222sKQnWL","from","188166WnnXcq","btoa","toString","30TqvAiq","110JfgJRr","367647XnXNNB","2143792TTrWUj","4964553EWSvAG","atob","70DWkDbE","utf-8"];return(M=function(){return t})()}function b(t){var e=z;return typeof window!==e(317)&&window.btoa?window[e(302)](t):Buffer[e(319)](t,"utf-8")[e(303)](e(313))}function T(t){var e,n;return JSON[z(316)]((e=t,n=z,typeof window!==n(317)&&window[n(309)]?window.atob(e):Buffer[n(319)](e,"base64").toString(n(311))))}function Z(t,e){t-=498;return N()[t]}function N(){const t=["1DVCTvZ","SENSORS","invalid token: ","11StUIsX","3wRXvUP","11024VcSINT","414085cVJBym","10569792ekicaX","2079842aQcCYy","4316852ceOsfM","12nQouaa","eyJzZXJ2ZXJVcmwiOiJodHRwczovL3N2LWFuYWx5dGljcy5zZy5zZWF2ZXJzZS5haS9zYSIsImhlYXRtYXAiOnsiY2xpY2ttYXAiOiJkZWZhdWx0Iiwic2Nyb2xsX25vdGljZV9tYXAiOiJkZWZhdWx0In19","1911955vqBTOm","79408gWilEy","32AFvNUo","eyJhcGlLZXkiOiJBSXphU3lBVVVEam5HdDJKQmdiNVFFYmFFMVFybENvMTdpVWxKWGsiLCJhdXRoRG9tYWluIjoic2VhdmVyc2UtcHJvZHVjdGlvbi5maXJlYmFzZWFwcC5jb20iLCJwcm9qZWN0SWQiOiJzZWF2ZXJzZS1wcm9kdWN0aW9uIiwic3RvcmFnZUJ1Y2tldCI6InNlYXZlcnNlLXByb2R1Y3Rpb24uZmlyZWJhc2VzdG9yYWdlLmFwcCIsIm1lc3NhZ2luZ1NlbmRlcklkIjoiMTAzMzk3MzA4MzE5OCIsImFwcElkIjoiMToxMDMzOTczMDgzMTk4OndlYjo2NmI2ZTNmNmEwZjM2MDkwNmY3NTZmIiwibWVhc3VyZW1lbnRJZCI6IkctN0gySjFTQ05QRCJ9","2110pslODE","FIREBASE","5598hwjtqo","eyJhcGlLZXkiOiJBSXphU3lBVVVEam5HdDJKQmdiNVFFYmFFMVFybENvMTdpVWxKWGsiLCJhdXRoRG9tYWluIjoic2VhdmVyc2UtcHJvZHVjdGlvbi5maXJlYmFzZWFwcC5jb20iLCJwcm9qZWN0SWQiOiJzZWF2ZXJzZS1wcm9kdWN0aW9uIiwic3RvcmFnZUJ1Y2tldCI6InNlYXZlcnNlLXByb2R1Y3Rpb24uZmlyZWJhc2VzdG9yYWdlLmFwcCIsIm1lc3NhZ2luZ1NlbmRlcklkIjoiMTAzMzk3MzA4MzE5OCIsImFwcElkIjoiMToxMDMzOTczMDgzMTk4OndlYjpkMTQ4OGM3MzI0MWIyZWMzNmY3NTZmIiwibWVhc3VyZW1lbnRJZCI6IkctR0gxNk1CQ1NOVyJ9"];return(N=function(){return t})()}!function(){for(var t=z,e=M();;)try{if(339955===parseInt(t(306))/1+parseInt(t(318))/2*(parseInt(t(304))/3)+-parseInt(t(307))/4+-parseInt(t(314))/5+-parseInt(t(301))/6*(-parseInt(t(310))/7)+-parseInt(t(312))/8*(-parseInt(t(308))/9)+-parseInt(t(315))/10*(parseInt(t(305))/11))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const W=Z;!function(){const t=Z,e=N();for(;;)try{if(677262===parseInt(t(516))/1*(-parseInt(t(504))/2)+parseInt(t(500))/3*(-parseInt(t(505))/4)+-parseInt(t(508))/5*(parseInt(t(506))/6)+-parseInt(t(502))/7*(parseInt(t(510))/8)+parseInt(t(514))/9*(-parseInt(t(512))/10)+parseInt(t(499))/11*(-parseInt(t(503))/12)+parseInt(t(501))/13*(parseInt(t(509))/14))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const J={"MDE5YjUzNTEyMWJhNzc1ZmIwYTQ1MzY3Njg1NzU1MTU=":{providers:[exports.TrackProvider[W(513)],exports.TrackProvider[W(517)]],firebaseConfig:T(W(511)),sensorsConfig:T(W(507)),gtmId:"GTM-MJDRW2W4"},"MDE5YjUzNTE3ZmFiN2YxZDkwNjg5OWVhMGQyMWJlZGI=":{providers:[exports.TrackProvider[W(513)],exports.TrackProvider[W(517)]],firebaseConfig:T(W(515)),sensorsConfig:T(W(507))}};const E=F;function U(){const t=["firebaseConfig","values","2125132WMCwIt","initialize ","[Track] ","adapters","push","935uMKUzJ"," adapter failed:","platformConfig","61566uVbham","track","error","clearUserId","from","debug","log","[Track] Clear User ID","track SDK not initialized, please call initialize() first","config","770640PdAJRY","FIREBASE","validateConfig","set","platform","initialize","206576DnkFZJ","1150758ziXmIu","initialized","455LOzOnL","45352386pEycNg","getInitializedProviders","warn","[Track] Skip Firebase initialization (initializeFirebase = false)","Must provide a token","setUserProperties","Must provide a version","token","setUserId","trackGTMEvent","allSettled","version","unknown provider: ","sensorsConfig","keys","providers","789159WeRfAK"];return(U=function(){return t})()}function F(t,e){t-=266;return U()[t]}!function(){const t=F,e=U();for(;;)try{if(986054===parseInt(t(309))/1+parseInt(t(312))/2+parseInt(t(290))/3+parseInt(t(283))/4+-parseInt(t(270))/5*(-parseInt(t(273))/6)+parseInt(t(292))/7*(parseInt(t(289))/8)+-parseInt(t(293))/9)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class TrackClient{constructor(t){const e=F;this[e(268)]=new Map,this[e(291)]=!1,this.config=t,this[e(285)](),this.platformConfig=function(t){const e=W,n=b(t),s=J[n];if(!s)throw new Error(e(498)+t);return s}(t[e(300)])}[E(285)](){const t=E;if(!this[t(282)][t(300)])throw new Error(t(297));if(!this[t(282)][t(287)])throw new Error("Must provide a platform");if(!this.config[t(304)])throw new Error(t(299));if(!(b(this.config[t(300)])in J))throw new Error("Invalid token: "+this[t(282)][t(300)])}async[E(288)](){const t=E;if(this[t(291)])return;const e=[],n=!1!==this[t(282)].initializeFirebase;for(const s of this.platformConfig[t(308)])try{if(s===exports.TrackProvider[t(284)]&&!n){this[t(282)][t(278)]&&console[t(279)](t(296));continue}let r;switch(s){case exports.TrackProvider.FIREBASE:r=new y(this[t(272)][t(310)],this[t(272)].gtmId,this[t(282)][t(278)]);break;case exports.TrackProvider.SENSORS:r=new v(this[t(282)][t(300)],this[t(282)][t(287)],this.config.version,this.platformConfig[t(306)]);break;default:console.warn(t(305)+s);continue}this[t(268)][t(286)](s,r),e[t(269)](r[t(288)]())}catch(e){console[t(275)](t(266)+s+t(271),e)}await Promise[t(303)](e),this.initialized=!0,this[t(282)][t(278)]&&console[t(279)]("Track SDK initialized, enabled providers:",Array[t(277)](this[t(268)][t(307)]()))}async[E(274)](t,e){const n=E;if(!this.initialized)return void console.warn(n(281));this[n(282)][n(278)]&&console[n(279)](n(267)+t,e);const s=[];for(const r of this[n(268)][n(311)]())s[n(269)](r[n(274)](t,e));await Promise[n(303)](s)}async setUserId(t){const e=E;if(!this.initialized)return void console[e(295)](e(281));this[e(282)][e(278)]&&console[e(279)]("[Track] Set User ID:",t);const n=[];for(const s of this[e(268)][e(311)]())n[e(269)](s[e(301)](t));await Promise[e(303)](n)}async[E(298)](t){const e=E;if(!this[e(291)])return void console[e(295)](e(281));this[e(282)].debug&&console[e(279)]("[Track] Set User Properties:",t);const n=[];for(const s of this[e(268)][e(311)]())n[e(269)](s[e(298)](t));await Promise.allSettled(n)}async[E(276)](){const t=E;if(!this[t(291)])return void console[t(295)](t(281));this[t(282)][t(278)]&&console[t(279)](t(280));const e=[];for(const n of this[t(268)][t(311)]())e.push(n.clearUserId());await Promise[t(303)](e)}[E(294)](){const t=E;return Array[t(277)](this.adapters[t(307)]())}[E(302)](t,e){h(t,e)}}function S(t,e){return t-=152,j()[t]}function j(){var t=["22IJVTPY","8YZfOxx","2393741APrFmu","1590366vQfUYd","197661mNFKsx","485PWrTEH","5820348hkMsgk","21078NFnsaZ","6036DsTmFb","1780zTBUzW","43362TgsWSy","11aVrZAB"];return(j=function(){return t})()}!function(){for(var t=S,e=j();;)try{if(330095===parseInt(t(152))/1+parseInt(t(160))/2*(-parseInt(t(158))/3)+-parseInt(t(156))/4*(-parseInt(t(153))/5)+-parseInt(t(163))/6+parseInt(t(162))/7*(parseInt(t(161))/8)+parseInt(t(155))/9*(-parseInt(t(157))/10)+-parseInt(t(159))/11*(-parseInt(t(154))/12))break;e.push(e.shift())}catch(t){e.push(e.shift())}}(),exports.TrackClient=TrackClient;
1
+ "use strict";var t=require("firebase/app"),e=require("firebase/analytics");function n(t){var e=Object.create(null);return t&&Object.keys(t).forEach(function(n){if("default"!==n){var s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,s.get?s:{enumerable:!0,get:function(){return t[n]}})}}),e.default=t,Object.freeze(e)}var s,i,r=n(require("sa-sdk-javascript"));function o(){var t=["18522cGSQUf","sensors","SENSORS","FIREBASE","firebase","4581890GopZCf","63uQdVIP","10765KvWOyJ","6uaZYHY","9636723KTXVmc","44mAFFyL","1665128QeXzOn","1036682HQGLeO","3907743grlJYR","780XglKIm"];return(o=function(){return t})()}function a(t,e){return t-=371,o()[t]}function c(t,e){t-=181;return d()[t]}function l(){const t=c;return typeof window!==t(198)&&typeof document!==t(198)}function d(){const t=["script","725334nHAhtB","log","style","[GTM] Not in browser environment, skip injection","undefined","85EsLsJl","583416nxPzsi","insertBefore","[GoogleTagManager] Invalid event name:","DOMContentLoaded","https://www.googletagmanager.com/ns.html?id=","firstChild","includes","[GTM] Injected successfully: ","async","width","appendChild","[GoogleTagManager] Pushed to dataLayer:","iframe","string","https://www.googletagmanager.com/gtm.js?id=","368kqPnAq","push","[GoogleTagManager] dataLayer not initialized","[GTM] GTM ID is empty, skip injection","src","display","dataLayer","1777293cPwipi","from","createElement","gtm.js?id=","body","3057480Kckbik","gtm.js","1364762FfAwAk","getTime","3qArzah","parentNode","warn","5972PwSnRc","querySelectorAll","error","hidden","62568HBytrk"];return(d=function(){return t})()}function f(t){const e=c,n=document[e(224)]("noscript"),s=document.createElement(e(212));s[e(219)]=e(204)+t,s.height="0",s[e(209)]="0",s.style[e(220)]="none",s[e(196)].visibility=e(191),n.appendChild(s),document.body[e(205)]?document[e(226)].insertBefore(n,document.body.firstChild):document.body[e(210)](n)}function p(t,e=!1){const n=c;if(l())if(t)if(function(t){const e=c;if(!l())return!1;const n=!!window[e(221)],s=document[e(189)]("script"),i=Array[e(223)](s).some(n=>n.src[e(206)](e(225)+t));return n&&i}(t))e&&console.log("[GTM] Already injected, skip");else try{(function(t){const e=c;window[e(221)]=window.dataLayer||[],window[e(221)].push({"gtm.start":(new Date)[e(184)](),event:e(182)});const n=document[e(224)]("script");n[e(208)]=!0,n.src=e(214)+t;const s=document.getElementsByTagName(e(193))[0];s&&s[e(186)]?s[e(186)][e(201)](n,s):document.head.appendChild(n)})(t),document[n(226)]?f(t):document.addEventListener(n(203),()=>{f(t)}),e&&console[n(195)](n(207)+t)}catch(t){console[n(190)]("[GTM] Injection failed:",t)}else e&&console[n(187)](n(218));else e&&console[n(187)](n(197))}!function(){for(var t=a,e=o();;)try{if(538881===parseInt(t(384))/1+-parseInt(t(372))/2*(-parseInt(t(378))/3)+-parseInt(t(371))/4*(-parseInt(t(379))/5)+-parseInt(t(380))/6*(parseInt(t(385))/7)+parseInt(t(383))/8+parseInt(t(381))/9+parseInt(t(377))/10*(-parseInt(t(382))/11))break;e.push(e.shift())}catch(t){e.push(e.shift())}}(),exports.TrackProvider=void 0,(s=exports.TrackProvider||(exports.TrackProvider={}))[(i=a)(375)]=i(376),s[i(374)]=i(373),function(){const t=c,e=d();for(;;)try{if(486449===parseInt(t(194))/1+parseInt(t(183))/2*(-parseInt(t(185))/3)+-parseInt(t(188))/4*(parseInt(t(199))/5)+parseInt(t(200))/6+-parseInt(t(222))/7+-parseInt(t(215))/8*(-parseInt(t(192))/9)+parseInt(t(181))/10)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const h=(t,e)=>{const n=c;if(!t||typeof t!==n(213))return void console[n(190)](n(202),t);(t=>{const e=c;if(typeof window!==e(198)&&window[e(221)])try{window[e(221)][e(216)](t),console[e(195)](e(211),t)}catch(t){console[e(190)]("[GoogleTagManager] Error pushing to dataLayer:",t)}else console[e(190)](e(217))})({event:t,...e||{}})},u=I;function I(t,e){t-=102;return m()[t]}!function(){const t=I,e=m();for(;;)try{if(675182===-parseInt(t(117))/1+parseInt(t(114))/2*(-parseInt(t(120))/3)+parseInt(t(102))/4+-parseInt(t(115))/5+parseInt(t(108))/6*(parseInt(t(118))/7)+-parseInt(t(119))/8+parseInt(t(105))/9)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class k{constructor(t,e,n=!1){const s=I;this[s(113)]=null,this[s(116)]=!1,this[s(106)]=t,this[s(107)]=e,this[s(111)]=n}async initialize(){const n=I;if(!this[n(116)])try{const s=t.initializeApp(this.config);this[n(113)]=e.getAnalytics(s),this[n(107)]&&p(this[n(107)],this.debug),this[n(116)]=!0}catch(t){throw console[n(109)](n(110),t),t}}async[u(103)](t,e){}async[u(104)](t){}async setUserProperties(t){}async[u(112)](){}}function m(){const t=["initialized","1274703qsBMur","2828434lvKqRn","4460656dCtkfi","3sfVjxR","4028284kGGqau","track","setUserId","13773006JWPOyY","config","gtmId","18eZcBRC","error","firebase initialize failed:","debug","clearUserId","analytics","2361450CKFNHi","306995hUOLtV"];return(m=function(){return t})()}const y=w;function w(t,e){t-=438;return g()[t]}function g(){const t=["&p=","setProfile","config","logout","8868965iSHcNq","sensors sdk not initialized, skip setUserProperties","init","3430860ihMoRV","version","sensors sdk setUserId failed:","587754szUKlV","setUserProperties","39XdWqsg","quick","error","autoTrack","initialized","?t=","platform","sensors sdk not initialized, skip track","sensors sdk setUserProperties failed:","sensors sdk not found, please install it by running","login","&v=","171423yYXhri","1853339JDWfAH","591464CDTZIP","10lgKZGf","setUserId","heatmap","sensors sdk not initialized, skip setUserId","sensors","472IhurtC","warn","30109554sXEuzS","sensors sdk init failed:"];return(g=function(){return t})()}!function(){const t=w,e=g();for(;;)try{if(966836===parseInt(t(459))/1+parseInt(t(444))/2+parseInt(t(446))/3*(parseInt(t(460))/4)+-parseInt(t(438))/5+parseInt(t(441))/6+parseInt(t(458))/7*(parseInt(t(466))/8)+-parseInt(t(468))/9*(parseInt(t(461))/10))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class z{constructor(t,e,n,s){const i=w;this[i(465)]=null,this[i(450)]=!1,this.token=t,this[i(452)]=e,this[i(442)]=n,this.config=s}async initialize(){const t=w;if(!this[t(450)])try{if(!r)throw new Error(t(455));this[t(465)]=r;const e=encodeURIComponent(this.token),n=encodeURIComponent(this.platform),s=encodeURIComponent(this[t(442)]);this.sensors[t(440)]({server_url:this[t(472)].serverUrl+(t(451)+e+t(470)+n+t(457)+s),show_log:this[t(472)].showLog??!1,heatmap:this[t(472)][t(463)]??{},is_track_single_page:!0,send_type:"ajax"}),this[t(450)]=!0,this[t(465)][t(447)](t(449))}catch(e){throw console.error(t(469),e),e}}async track(t,e){const n=w;if(this[n(450)]&&this[n(465)])try{this.sensors.track(t,e??{})}catch(t){console[n(448)]("sensors sdk track failed:",t)}else console[n(467)](n(453))}async[y(462)](t){const e=y;if(this[e(450)]&&this[e(465)])try{this.sensors[e(456)](t)}catch(t){console[e(448)](e(443),t)}else console[e(467)](e(464))}async[y(445)](t){const e=y;if(this[e(450)]&&this[e(465)])try{this[e(465)][e(471)](t)}catch(t){console[e(448)](e(454),t)}else console[e(467)](e(439))}async clearUserId(){const t=y;if(this.initialized&&this[t(465)])try{this[t(465)][t(473)]()}catch(e){console[t(448)]("sensors sdk clearUserId failed:",e)}}}function v(){var t=["btoa","undefined","1759257VRiHVJ","parse","10bEbHVZ","atob","3289825midXjw","utf-8","8472KUlUir","toString","1538388mDtBNz","5729275fURXLF","6UuyegU","from","5935128UmGklz","444cVdrUp","base64","737313LxPZDP"];return(v=function(){return t})()}function Z(t){var e=b;return"undefined"!=typeof window&&window[e(335)]?window[e(335)](t):Buffer[e(330)](t,e(324))[e(326)](e(333))}function b(t,e){return t-=321,v()[t]}function M(t){var e,n;return JSON[b(338)]((e=t,n=b,typeof window!==n(336)&&window[n(322)]?window[n(322)](e):Buffer[n(330)](e,n(333)).toString(n(324))))}!function(){for(var t=b,e=v();;)try{if(606829===-parseInt(t(334))/1+parseInt(t(327))/2+-parseInt(t(332))/3*(-parseInt(t(325))/4)+-parseInt(t(328))/5*(parseInt(t(329))/6)+parseInt(t(323))/7+parseInt(t(331))/8+-parseInt(t(337))/9*(-parseInt(t(321))/10))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const W=J;function N(){const t=["42LQkoBc","GTM-MJDRW2W4","eyJhcGlLZXkiOiJBSXphU3lBVVVEam5HdDJKQmdiNVFFYmFFMVFybENvMTdpVWxKWGsiLCJhdXRoRG9tYWluIjoic2VhdmVyc2UtcHJvZHVjdGlvbi5maXJlYmFzZWFwcC5jb20iLCJwcm9qZWN0SWQiOiJzZWF2ZXJzZS1wcm9kdWN0aW9uIiwic3RvcmFnZUJ1Y2tldCI6InNlYXZlcnNlLXByb2R1Y3Rpb24uZmlyZWJhc2VzdG9yYWdlLmFwcCIsIm1lc3NhZ2luZ1NlbmRlcklkIjoiMTAzMzk3MzA4MzE5OCIsImFwcElkIjoiMToxMDMzOTczMDgzMTk4OndlYjpkMTQ4OGM3MzI0MWIyZWMzNmY3NTZmIiwibWVhc3VyZW1lbnRJZCI6IkctR0gxNk1CQ1NOVyJ9","4517289WnHBGN","1642056FCFiKq","31684563sfZpWH","eyJhcGlLZXkiOiJBSXphU3lBVVVEam5HdDJKQmdiNVFFYmFFMVFybENvMTdpVWxKWGsiLCJhdXRoRG9tYWluIjoic2VhdmVyc2UtcHJvZHVjdGlvbi5maXJlYmFzZWFwcC5jb20iLCJwcm9qZWN0SWQiOiJzZWF2ZXJzZS1wcm9kdWN0aW9uIiwic3RvcmFnZUJ1Y2tldCI6InNlYXZlcnNlLXByb2R1Y3Rpb24uZmlyZWJhc2VzdG9yYWdlLmFwcCIsIm1lc3NhZ2luZ1NlbmRlcklkIjoiMTAzMzk3MzA4MzE5OCIsImFwcElkIjoiMToxMDMzOTczMDgzMTk4OndlYjo2NmI2ZTNmNmEwZjM2MDkwNmY3NTZmIiwibWVhc3VyZW1lbnRJZCI6IkctN0gySjFTQ05QRCJ9","469815LSXeQN","eyJzZXJ2ZXJVcmwiOiJodHRwczovL3N2LWFuYWx5dGljcy5zZy5zZWF2ZXJzZS5haS9zYSIsImhlYXRtYXAiOnsiY2xpY2ttYXAiOiJkZWZhdWx0Iiwic2Nyb2xsX25vdGljZV9tYXAiOiJkZWZhdWx0In19","205377vXHSKj","invalid token: ","1832784oOLdwL","10Ihjchf","FIREBASE","6689907WXdQiN","SENSORS"];return(N=function(){return t})()}!function(){const t=J,e=N();for(;;)try{if(788575===-parseInt(t(197))/1*(-parseInt(t(200))/2)+-parseInt(t(207))/3+-parseInt(t(192))/4+parseInt(t(195))/5*(-parseInt(t(204))/6)+-parseInt(t(202))/7+-parseInt(t(199))/8+parseInt(t(193))/9)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const T={"MDE5YjUzNTEyMWJhNzc1ZmIwYTQ1MzY3Njg1NzU1MTU=":{providers:[exports.TrackProvider[W(201)],exports.TrackProvider[W(203)]],firebaseConfig:M(W(194)),sensorsConfig:M(W(196)),gtmId:W(205)},"MDE5YjUzNTE3ZmFiN2YxZDkwNjg5OWVhMGQyMWJlZGI=":{providers:[exports.TrackProvider[W(201)],exports.TrackProvider[W(203)]],firebaseConfig:M(W(206)),sensorsConfig:M("eyJzZXJ2ZXJVcmwiOiJodHRwczovL3N2LWFuYWx5dGljcy5zZy5zZWF2ZXJzZS5haS9zYSIsImhlYXRtYXAiOnsiY2xpY2ttYXAiOiJkZWZhdWx0Iiwic2Nyb2xsX25vdGljZV9tYXAiOiJkZWZhdWx0In19")}};function J(t,e){t-=192;return N()[t]}const S=C;function C(t,e){t-=289;return Y()[t]}function Y(){const t=["11KzUpfj","initialize ","values","2861395aMRkHQ","trackGTMEvent","82096bHYCMM","setUserId","1611IrvClk","debug","690ccTjFC","config","unknown provider: ","platformConfig","3671184fWegHe","validateConfig","keys","45598qwoyfx","63637MBuGPw","token","gtmId","639JDnwXF","Track SDK initialized, enabled providers:","initialize","Must provide a token","set","83963AekSXI","from","490IJvYSW","clearUserId","firebaseConfig","FIREBASE","adapters","[Track] Set User Properties:","getInitializedProviders","warn","[Track] Skip Firebase initialization (initializeFirebase = false)","track SDK not initialized, please call initialize() first","providers","initialized","error","[Track] Set User ID:","[Track] ","allSettled","push","708nadYKP","log","platform","setUserProperties"];return(Y=function(){return t})()}!function(){const t=C,e=Y();for(;;)try{if(555031===parseInt(t(326))/1*(parseInt(t(294))/2)+parseInt(t(333))/3*(parseInt(t(322))/4)+parseInt(t(329))/5+parseInt(t(335))/6*(parseInt(t(295))/7)+parseInt(t(331))/8*(-parseInt(t(298))/9)+parseInt(t(305))/10*(-parseInt(t(303))/11)+-parseInt(t(291))/12)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class TrackClient{constructor(t){const e=C;this[e(309)]=new Map,this[e(316)]=!1,this[e(336)]=t,this[e(292)](),this.platformConfig=function(t){const e=W,n=Z(t),s=T[n];if(!s)throw new Error(e(198)+t);return s}(t.token)}validateConfig(){const t=C;if(!this[t(336)].token)throw new Error(t(301));if(!this[t(336)][t(324)])throw new Error("Must provide a platform");if(!this[t(336)].version)throw new Error("Must provide a version");if(!(Z(this[t(336)][t(296)])in T))throw new Error("Invalid token: "+this[t(336)].token)}async[S(300)](){const t=S;if(this.initialized)return;const e=[],n=!1!==this[t(336)].initializeFirebase;for(const s of this[t(290)][t(315)])try{if(s===exports.TrackProvider[t(308)]&&!n){this.config[t(334)]&&console[t(323)](t(313));continue}let i;switch(s){case exports.TrackProvider.FIREBASE:i=new k(this.platformConfig[t(307)],this[t(290)][t(297)],this[t(336)][t(334)]);break;case exports.TrackProvider.SENSORS:i=new z(this[t(336)][t(296)],this.config.platform,this[t(336)].version,this[t(290)].sensorsConfig);break;default:console.warn(t(289)+s);continue}this[t(309)][t(302)](s,i),e[t(321)](i[t(300)]())}catch(e){console[t(317)](t(327)+s+" adapter failed:",e)}await Promise[t(320)](e),this[t(316)]=!0,this.config[t(334)]&&console[t(323)](t(299),Array[t(304)](this[t(309)][t(293)]()))}async track(t,e){const n=S;if(!this.initialized)return void console[n(312)]("track SDK not initialized, please call initialize() first");this[n(336)][n(334)]&&console[n(323)](n(319)+t,e);const s=[];for(const i of this[n(309)][n(328)]())s.push(i.track(t,e));await Promise.allSettled(s)}async[S(332)](t){const e=S;if(!this[e(316)])return void console[e(312)](e(314));this[e(336)][e(334)]&&console[e(323)](e(318),t);const n=[];for(const s of this[e(309)][e(328)]())n[e(321)](s[e(332)](t));await Promise[e(320)](n)}async[S(325)](t){const e=S;if(!this[e(316)])return void console[e(312)](e(314));this[e(336)][e(334)]&&console[e(323)](e(310),t);const n=[];for(const s of this.adapters[e(328)]())n[e(321)](s[e(325)](t));await Promise.allSettled(n)}async clearUserId(){const t=S;if(!this[t(316)])return void console[t(312)]("track SDK not initialized, please call initialize() first");this.config[t(334)]&&console[t(323)]("[Track] Clear User ID");const e=[];for(const n of this[t(309)][t(328)]())e[t(321)](n[t(306)]());await Promise.allSettled(e)}[S(311)](){const t=S;return Array.from(this[t(309)].keys())}[S(330)](t,e){h(t,e)}}function F(t,e){return t-=371,j()[t]}function j(){var t=["572721wRmYdZ","27wIbbCQ","321100rFtVOY","7fNjMNr","2290698lyFcQD","71644veVguH","3712704LlsPVt","3727690iqwhux","84kNLwqq","5292848fZNSHs"];return(j=function(){return t})()}!function(){for(var t=F,e=j();;)try{if(686349===-parseInt(t(374))/1+parseInt(t(379))/2*(-parseInt(t(372))/3)+parseInt(t(380))/4+-parseInt(t(376))/5+parseInt(t(378))/6*(-parseInt(t(377))/7)+parseInt(t(373))/8+parseInt(t(375))/9*(parseInt(t(371))/10))break;e.push(e.shift())}catch(t){e.push(e.shift())}}(),exports.TrackClient=TrackClient;
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{initializeApp as t}from"firebase/app";import{getAnalytics as n}from"firebase/analytics";import*as s from"sa-sdk-javascript";var e,i,r;function o(){var t=["266630WQEgeg","8084260Gwkmpn","102876MNNirj","9oBUWgH","1086JVxqHO","FIREBASE","firebase","7884527IuLNMS","2708VmpVMI","6904760KdorOo","10HEMeef","1405132wdAqhR"];return(o=function(){return t})()}function a(t,n){return t-=110,o()[t]}function c(){return"undefined"!=typeof window&&typeof document!==f(467)}function p(t){const n=f,s=document[n(468)](n(461)),e=document.createElement(n(464));e[n(428)]=n(431)+t,e[n(427)]="0",e[n(444)]="0",e[n(447)][n(465)]="none",e[n(447)][n(451)]=n(434),s[n(466)](e),document[n(459)][n(424)]?document.body[n(432)](s,document[n(459)][n(424)]):document[n(459)][n(466)](s)}function l(){const t=["getElementsByTagName","[GoogleTagManager] Invalid event name:","[GTM] Not in browser environment, skip injection","parentNode","from","dataLayer","gtm.js","error","push","width","includes","addEventListener","style","gtm.js?id=","1995KNOmbF","[GoogleTagManager] dataLayer not initialized","visibility","940856xGuYiz","1086606MumUOa","querySelectorAll","3IZygjE","5qcHCel","2144836tdPmXG","6162264PJMVLY","body","3097290LwpAZb","noscript","DOMContentLoaded","string","iframe","display","appendChild","undefined","createElement","log","[GTM] Injected successfully: ","[GoogleTagManager] Pushed to dataLayer:","[GoogleTagManager] Error pushing to dataLayer:","https://www.googletagmanager.com/gtm.js?id=","1644ijRnpH","firstChild","11fXFJJJ","[GTM] Already injected, skip","height","src","script","warn","https://www.googletagmanager.com/ns.html?id=","insertBefore","1907678oEzRUS","hidden"];return(l=function(){return t})()}function f(t,n){t-=423;return l()[t]}function h(t,n=!1){const s=f;if(c())if(t)if(function(t){const n=f;if(!c())return!1;const s=!!window.dataLayer,e=document[n(454)]("script"),i=Array[n(439)](e).some(s=>s.src[n(445)](n(448)+t));return s&&i}(t))n&&console[s(469)](s(426));else try{(function(t){const n=f;window[n(440)]=window[n(440)]||[],window[n(440)][n(443)]({"gtm.start":(new Date).getTime(),event:n(441)});const s=document[n(468)](n(429));s.async=!0,s[n(428)]=n(473)+t;const e=document[n(435)]("script")[0];e&&e[n(438)]?e[n(438)][n(432)](s,e):document.head[n(466)](s)})(t),document[s(459)]?p(t):document[s(446)](s(462),()=>{p(t)}),n&&console[s(469)](s(470)+t)}catch(t){console.error("[GTM] Injection failed:",t)}else n&&console[s(430)]("[GTM] GTM ID is empty, skip injection");else n&&console[s(430)](s(437))}!function(){for(var t=a,n=o();;)try{if(916363===parseInt(t(110))/1+-parseInt(t(118))/2*(-parseInt(t(114))/3)+-parseInt(t(121))/4+-parseInt(t(120))/5*(parseInt(t(112))/6)+-parseInt(t(117))/7+-parseInt(t(119))/8*(-parseInt(t(113))/9)+parseInt(t(111))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(),(i=e||(e={}))[(r=a)(115)]=r(116),i.SENSORS="sensors",function(){const t=f,n=l();for(;;)try{if(477298===parseInt(t(452))/1+-parseInt(t(433))/2*(-parseInt(t(455))/3)+-parseInt(t(457))/4*(parseInt(t(456))/5)+parseInt(t(423))/6*(parseInt(t(449))/7)+-parseInt(t(458))/8+parseInt(t(453))/9+-parseInt(t(460))/10*(parseInt(t(425))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}();const d=(t,n)=>{const s=f;if(!t||typeof t!==s(463))return void console[s(442)](s(436),t);(t=>{const n=f;if("undefined"!=typeof window&&window[n(440)])try{window.dataLayer.push(t),console[n(469)](n(471),t)}catch(t){console[n(442)](n(472),t)}else console[n(442)](n(450))})({event:t,...n||{}})};function u(){const t=["initialize","6865749kKmkXt","firebase initialize failed:","setUserId","535510AyhiXh","267365CMuyqM","54iyPSYI","gtmId","error","203krptMd","config","analytics","135832pDFpNV","1801512AzpHYc","initialized","setUserProperties","debug","181486qSVsrn","2110504syzdMf"];return(u=function(){return t})()}const I=m;function m(t,n){t-=294;return u()[t]}!function(){const t=m,n=u();for(;;)try{if(379838===-parseInt(t(304))/1+parseInt(t(298))/2+parseInt(t(294))/3+-parseInt(t(299))/4+parseInt(t(305))/5*(parseInt(t(306))/6)+parseInt(t(309))/7*(-parseInt(t(312))/8)+parseInt(t(301))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}();class y{constructor(t,n,s=!1){const e=m;this[e(311)]=null,this[e(295)]=!1,this[e(310)]=t,this[e(307)]=n,this[e(297)]=s}async[I(300)](){const s=I;if(!this[s(295)])try{const e=t(this.config);this[s(311)]=n(e),this[s(307)]&&h(this[s(307)],this[s(297)]),this[s(295)]=!0}catch(t){throw console[s(308)](s(302),t),t}}async track(t,n){}async[I(303)](t){}async[I(296)](t){}async clearUserId(){}}const w=k;function k(t,n){t-=338;return g()[t]}function g(){const t=["2253844yrthQG","clearUserId","version","track","sensors sdk setUserProperties failed:","serverUrl","quick","192871KPyxAZ","3719914DpAjgF","setUserProperties","token","&p=","init","sensors sdk not initialized, skip setUserProperties","initialize","login","3UpfjGX","14muZHbM","2192624VUbNFK","logout","sensors sdk setUserId failed:","setProfile","error","?t=","config","9nlDcMt","ajax","20390yUPCYp","platform","2317225LepUxm","sensors sdk not initialized, skip track","sensors sdk init failed:","sensors sdk track failed:","6ViKenG","autoTrack","setUserId","6795980OStkob","initialized","heatmap","warn","showLog","sensors"];return(g=function(){return t})()}!function(){const t=k,n=g();for(;;)try{if(728533===-parseInt(t(347))/1*(parseInt(t(379))/2)+-parseInt(t(378))/3*(-parseInt(t(362))/4)+-parseInt(t(349))/5+parseInt(t(353))/6*(parseInt(t(369))/7)+-parseInt(t(338))/8+parseInt(t(345))/9*(parseInt(t(356))/10)+parseInt(t(370))/11)break;n.push(n.shift())}catch(t){n.push(n.shift())}}();class M{constructor(t,n,s,e){const i=k;this[i(361)]=null,this[i(357)]=!1,this[i(372)]=t,this[i(348)]=n,this[i(364)]=s,this[i(344)]=e}async[w(376)](){const t=w;if(!this[t(357)])try{if(!s)throw new Error("sensors sdk not found, please install it by running");this[t(361)]=s;const n=encodeURIComponent(this[t(372)]),e=encodeURIComponent(this[t(348)]),i=encodeURIComponent(this[t(364)]);this.sensors[t(374)]({server_url:this[t(344)][t(367)]+(t(343)+n+t(373)+e+"&v=")+i,show_log:this[t(344)][t(360)]??!1,heatmap:this[t(344)][t(358)]??{},is_track_single_page:!0,send_type:t(346)}),this.initialized=!0,this[t(361)][t(368)](t(354))}catch(n){throw console.error(t(351),n),n}}async track(t,n){const s=w;if(this[s(357)]&&this[s(361)])try{this[s(361)][s(365)](t,n??{})}catch(t){console.error(s(352),t)}else console[s(359)](s(350))}async[w(355)](t){const n=w;if(this[n(357)]&&this[n(361)])try{this[n(361)][n(377)](t)}catch(t){console.error(n(340),t)}else console[n(359)]("sensors sdk not initialized, skip setUserId")}async[w(371)](t){const n=w;if(this.initialized&&this[n(361)])try{this[n(361)][n(341)](t)}catch(t){console[n(342)](n(366),t)}else console.warn(n(375))}async[w(363)](){const t=w;if(this.initialized&&this[t(361)])try{this.sensors[t(339)]()}catch(n){console[t(342)]("sensors sdk clearUserId failed:",n)}}}function z(t,n){return t-=301,b()[t]}function b(){var t=["8KZlNgG","base64","3147105DvZkNe","173660koNbLk","parse","undefined","89222sKQnWL","from","188166WnnXcq","btoa","toString","30TqvAiq","110JfgJRr","367647XnXNNB","2143792TTrWUj","4964553EWSvAG","atob","70DWkDbE","utf-8"];return(b=function(){return t})()}function v(t){var n=z;return typeof window!==n(317)&&window.btoa?window[n(302)](t):Buffer[n(319)](t,"utf-8")[n(303)](n(313))}function Z(t){var n,s;return JSON[z(316)]((n=t,s=z,typeof window!==s(317)&&window[s(309)]?window.atob(n):Buffer[s(319)](n,"base64").toString(s(311))))}function N(t,n){t-=498;return W()[t]}function W(){const t=["1DVCTvZ","SENSORS","invalid token: ","11StUIsX","3wRXvUP","11024VcSINT","414085cVJBym","10569792ekicaX","2079842aQcCYy","4316852ceOsfM","12nQouaa","eyJzZXJ2ZXJVcmwiOiJodHRwczovL3N2LWFuYWx5dGljcy5zZy5zZWF2ZXJzZS5haS9zYSIsImhlYXRtYXAiOnsiY2xpY2ttYXAiOiJkZWZhdWx0Iiwic2Nyb2xsX25vdGljZV9tYXAiOiJkZWZhdWx0In19","1911955vqBTOm","79408gWilEy","32AFvNUo","eyJhcGlLZXkiOiJBSXphU3lBVVVEam5HdDJKQmdiNVFFYmFFMVFybENvMTdpVWxKWGsiLCJhdXRoRG9tYWluIjoic2VhdmVyc2UtcHJvZHVjdGlvbi5maXJlYmFzZWFwcC5jb20iLCJwcm9qZWN0SWQiOiJzZWF2ZXJzZS1wcm9kdWN0aW9uIiwic3RvcmFnZUJ1Y2tldCI6InNlYXZlcnNlLXByb2R1Y3Rpb24uZmlyZWJhc2VzdG9yYWdlLmFwcCIsIm1lc3NhZ2luZ1NlbmRlcklkIjoiMTAzMzk3MzA4MzE5OCIsImFwcElkIjoiMToxMDMzOTczMDgzMTk4OndlYjo2NmI2ZTNmNmEwZjM2MDkwNmY3NTZmIiwibWVhc3VyZW1lbnRJZCI6IkctN0gySjFTQ05QRCJ9","2110pslODE","FIREBASE","5598hwjtqo","eyJhcGlLZXkiOiJBSXphU3lBVVVEam5HdDJKQmdiNVFFYmFFMVFybENvMTdpVWxKWGsiLCJhdXRoRG9tYWluIjoic2VhdmVyc2UtcHJvZHVjdGlvbi5maXJlYmFzZWFwcC5jb20iLCJwcm9qZWN0SWQiOiJzZWF2ZXJzZS1wcm9kdWN0aW9uIiwic3RvcmFnZUJ1Y2tldCI6InNlYXZlcnNlLXByb2R1Y3Rpb24uZmlyZWJhc2VzdG9yYWdlLmFwcCIsIm1lc3NhZ2luZ1NlbmRlcklkIjoiMTAzMzk3MzA4MzE5OCIsImFwcElkIjoiMToxMDMzOTczMDgzMTk4OndlYjpkMTQ4OGM3MzI0MWIyZWMzNmY3NTZmIiwibWVhc3VyZW1lbnRJZCI6IkctR0gxNk1CQ1NOVyJ9"];return(W=function(){return t})()}!function(){for(var t=z,n=b();;)try{if(339955===parseInt(t(306))/1+parseInt(t(318))/2*(parseInt(t(304))/3)+-parseInt(t(307))/4+-parseInt(t(314))/5+-parseInt(t(301))/6*(-parseInt(t(310))/7)+-parseInt(t(312))/8*(-parseInt(t(308))/9)+-parseInt(t(315))/10*(parseInt(t(305))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}();const T=N;!function(){const t=N,n=W();for(;;)try{if(677262===parseInt(t(516))/1*(-parseInt(t(504))/2)+parseInt(t(500))/3*(-parseInt(t(505))/4)+-parseInt(t(508))/5*(parseInt(t(506))/6)+-parseInt(t(502))/7*(parseInt(t(510))/8)+parseInt(t(514))/9*(-parseInt(t(512))/10)+parseInt(t(499))/11*(-parseInt(t(503))/12)+parseInt(t(501))/13*(parseInt(t(509))/14))break;n.push(n.shift())}catch(t){n.push(n.shift())}}();const J={"MDE5YjUzNTEyMWJhNzc1ZmIwYTQ1MzY3Njg1NzU1MTU=":{providers:[e[T(513)],e[T(517)]],firebaseConfig:Z(T(511)),sensorsConfig:Z(T(507)),gtmId:"GTM-MJDRW2W4"},"MDE5YjUzNTE3ZmFiN2YxZDkwNjg5OWVhMGQyMWJlZGI=":{providers:[e[T(513)],e[T(517)]],firebaseConfig:Z(T(515)),sensorsConfig:Z(T(507))}};const U=F;function E(){const t=["firebaseConfig","values","2125132WMCwIt","initialize ","[Track] ","adapters","push","935uMKUzJ"," adapter failed:","platformConfig","61566uVbham","track","error","clearUserId","from","debug","log","[Track] Clear User ID","track SDK not initialized, please call initialize() first","config","770640PdAJRY","FIREBASE","validateConfig","set","platform","initialize","206576DnkFZJ","1150758ziXmIu","initialized","455LOzOnL","45352386pEycNg","getInitializedProviders","warn","[Track] Skip Firebase initialization (initializeFirebase = false)","Must provide a token","setUserProperties","Must provide a version","token","setUserId","trackGTMEvent","allSettled","version","unknown provider: ","sensorsConfig","keys","providers","789159WeRfAK"];return(E=function(){return t})()}function F(t,n){t-=266;return E()[t]}!function(){const t=F,n=E();for(;;)try{if(986054===parseInt(t(309))/1+parseInt(t(312))/2+parseInt(t(290))/3+parseInt(t(283))/4+-parseInt(t(270))/5*(-parseInt(t(273))/6)+parseInt(t(292))/7*(parseInt(t(289))/8)+-parseInt(t(293))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}();class TrackClient{constructor(t){const n=F;this[n(268)]=new Map,this[n(291)]=!1,this.config=t,this[n(285)](),this.platformConfig=function(t){const n=T,s=v(t),e=J[s];if(!e)throw new Error(n(498)+t);return e}(t[n(300)])}[U(285)](){const t=U;if(!this[t(282)][t(300)])throw new Error(t(297));if(!this[t(282)][t(287)])throw new Error("Must provide a platform");if(!this.config[t(304)])throw new Error(t(299));if(!(v(this.config[t(300)])in J))throw new Error("Invalid token: "+this[t(282)][t(300)])}async[U(288)](){const t=U;if(this[t(291)])return;const n=[],s=!1!==this[t(282)].initializeFirebase;for(const i of this.platformConfig[t(308)])try{if(i===e[t(284)]&&!s){this[t(282)][t(278)]&&console[t(279)](t(296));continue}let r;switch(i){case e.FIREBASE:r=new y(this[t(272)][t(310)],this[t(272)].gtmId,this[t(282)][t(278)]);break;case e.SENSORS:r=new M(this[t(282)][t(300)],this[t(282)][t(287)],this.config.version,this.platformConfig[t(306)]);break;default:console.warn(t(305)+i);continue}this[t(268)][t(286)](i,r),n[t(269)](r[t(288)]())}catch(n){console[t(275)](t(266)+i+t(271),n)}await Promise[t(303)](n),this.initialized=!0,this[t(282)][t(278)]&&console[t(279)]("Track SDK initialized, enabled providers:",Array[t(277)](this[t(268)][t(307)]()))}async[U(274)](t,n){const s=U;if(!this.initialized)return void console.warn(s(281));this[s(282)][s(278)]&&console[s(279)](s(267)+t,n);const e=[];for(const i of this[s(268)][s(311)]())e[s(269)](i[s(274)](t,n));await Promise[s(303)](e)}async setUserId(t){const n=U;if(!this.initialized)return void console[n(295)](n(281));this[n(282)][n(278)]&&console[n(279)]("[Track] Set User ID:",t);const s=[];for(const e of this[n(268)][n(311)]())s[n(269)](e[n(301)](t));await Promise[n(303)](s)}async[U(298)](t){const n=U;if(!this[n(291)])return void console[n(295)](n(281));this[n(282)].debug&&console[n(279)]("[Track] Set User Properties:",t);const s=[];for(const e of this[n(268)][n(311)]())s[n(269)](e[n(298)](t));await Promise.allSettled(s)}async[U(276)](){const t=U;if(!this[t(291)])return void console[t(295)](t(281));this[t(282)][t(278)]&&console[t(279)](t(280));const n=[];for(const s of this[t(268)][t(311)]())n.push(s.clearUserId());await Promise[t(303)](n)}[U(294)](){const t=U;return Array[t(277)](this.adapters[t(307)]())}[U(302)](t,n){d(t,n)}}function S(t,n){return t-=152,V()[t]}function V(){var t=["22IJVTPY","8YZfOxx","2393741APrFmu","1590366vQfUYd","197661mNFKsx","485PWrTEH","5820348hkMsgk","21078NFnsaZ","6036DsTmFb","1780zTBUzW","43362TgsWSy","11aVrZAB"];return(V=function(){return t})()}!function(){for(var t=S,n=V();;)try{if(330095===parseInt(t(152))/1+parseInt(t(160))/2*(-parseInt(t(158))/3)+-parseInt(t(156))/4*(-parseInt(t(153))/5)+-parseInt(t(163))/6+parseInt(t(162))/7*(parseInt(t(161))/8)+parseInt(t(155))/9*(-parseInt(t(157))/10)+-parseInt(t(159))/11*(-parseInt(t(154))/12))break;n.push(n.shift())}catch(t){n.push(n.shift())}}();export{TrackClient,e as TrackProvider};
1
+ import{initializeApp as t}from"firebase/app";import{getAnalytics as n}from"firebase/analytics";import*as s from"sa-sdk-javascript";var e,i,r;function o(){var t=["18522cGSQUf","sensors","SENSORS","FIREBASE","firebase","4581890GopZCf","63uQdVIP","10765KvWOyJ","6uaZYHY","9636723KTXVmc","44mAFFyL","1665128QeXzOn","1036682HQGLeO","3907743grlJYR","780XglKIm"];return(o=function(){return t})()}function a(t,n){return t-=371,o()[t]}function c(t,n){t-=181;return f()[t]}function l(){const t=c;return typeof window!==t(198)&&typeof document!==t(198)}function f(){const t=["script","725334nHAhtB","log","style","[GTM] Not in browser environment, skip injection","undefined","85EsLsJl","583416nxPzsi","insertBefore","[GoogleTagManager] Invalid event name:","DOMContentLoaded","https://www.googletagmanager.com/ns.html?id=","firstChild","includes","[GTM] Injected successfully: ","async","width","appendChild","[GoogleTagManager] Pushed to dataLayer:","iframe","string","https://www.googletagmanager.com/gtm.js?id=","368kqPnAq","push","[GoogleTagManager] dataLayer not initialized","[GTM] GTM ID is empty, skip injection","src","display","dataLayer","1777293cPwipi","from","createElement","gtm.js?id=","body","3057480Kckbik","gtm.js","1364762FfAwAk","getTime","3qArzah","parentNode","warn","5972PwSnRc","querySelectorAll","error","hidden","62568HBytrk"];return(f=function(){return t})()}function h(t){const n=c,s=document[n(224)]("noscript"),e=document.createElement(n(212));e[n(219)]=n(204)+t,e.height="0",e[n(209)]="0",e.style[n(220)]="none",e[n(196)].visibility=n(191),s.appendChild(e),document.body[n(205)]?document[n(226)].insertBefore(s,document.body.firstChild):document.body[n(210)](s)}function d(t,n=!1){const s=c;if(l())if(t)if(function(t){const n=c;if(!l())return!1;const s=!!window[n(221)],e=document[n(189)]("script"),i=Array[n(223)](e).some(s=>s.src[n(206)](n(225)+t));return s&&i}(t))n&&console.log("[GTM] Already injected, skip");else try{(function(t){const n=c;window[n(221)]=window.dataLayer||[],window[n(221)].push({"gtm.start":(new Date)[n(184)](),event:n(182)});const s=document[n(224)]("script");s[n(208)]=!0,s.src=n(214)+t;const e=document.getElementsByTagName(n(193))[0];e&&e[n(186)]?e[n(186)][n(201)](s,e):document.head.appendChild(s)})(t),document[s(226)]?h(t):document.addEventListener(s(203),()=>{h(t)}),n&&console[s(195)](s(207)+t)}catch(t){console[s(190)]("[GTM] Injection failed:",t)}else n&&console[s(187)](s(218));else n&&console[s(187)](s(197))}!function(){for(var t=a,n=o();;)try{if(538881===parseInt(t(384))/1+-parseInt(t(372))/2*(-parseInt(t(378))/3)+-parseInt(t(371))/4*(-parseInt(t(379))/5)+-parseInt(t(380))/6*(parseInt(t(385))/7)+parseInt(t(383))/8+parseInt(t(381))/9+parseInt(t(377))/10*(-parseInt(t(382))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(),(i=e||(e={}))[(r=a)(375)]=r(376),i[r(374)]=r(373),function(){const t=c,n=f();for(;;)try{if(486449===parseInt(t(194))/1+parseInt(t(183))/2*(-parseInt(t(185))/3)+-parseInt(t(188))/4*(parseInt(t(199))/5)+parseInt(t(200))/6+-parseInt(t(222))/7+-parseInt(t(215))/8*(-parseInt(t(192))/9)+parseInt(t(181))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}();const p=(t,n)=>{const s=c;if(!t||typeof t!==s(213))return void console[s(190)](s(202),t);(t=>{const n=c;if(typeof window!==n(198)&&window[n(221)])try{window[n(221)][n(216)](t),console[n(195)](n(211),t)}catch(t){console[n(190)]("[GoogleTagManager] Error pushing to dataLayer:",t)}else console[n(190)](n(217))})({event:t,...n||{}})},u=I;function I(t,n){t-=102;return w()[t]}!function(){const t=I,n=w();for(;;)try{if(675182===-parseInt(t(117))/1+parseInt(t(114))/2*(-parseInt(t(120))/3)+parseInt(t(102))/4+-parseInt(t(115))/5+parseInt(t(108))/6*(parseInt(t(118))/7)+-parseInt(t(119))/8+parseInt(t(105))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}();class m{constructor(t,n,s=!1){const e=I;this[e(113)]=null,this[e(116)]=!1,this[e(106)]=t,this[e(107)]=n,this[e(111)]=s}async initialize(){const s=I;if(!this[s(116)])try{const e=t(this.config);this[s(113)]=n(e),this[s(107)]&&d(this[s(107)],this.debug),this[s(116)]=!0}catch(t){throw console[s(109)](s(110),t),t}}async[u(103)](t,n){}async[u(104)](t){}async setUserProperties(t){}async[u(112)](){}}function w(){const t=["initialized","1274703qsBMur","2828434lvKqRn","4460656dCtkfi","3sfVjxR","4028284kGGqau","track","setUserId","13773006JWPOyY","config","gtmId","18eZcBRC","error","firebase initialize failed:","debug","clearUserId","analytics","2361450CKFNHi","306995hUOLtV"];return(w=function(){return t})()}const y=k;function k(t,n){t-=438;return g()[t]}function g(){const t=["&p=","setProfile","config","logout","8868965iSHcNq","sensors sdk not initialized, skip setUserProperties","init","3430860ihMoRV","version","sensors sdk setUserId failed:","587754szUKlV","setUserProperties","39XdWqsg","quick","error","autoTrack","initialized","?t=","platform","sensors sdk not initialized, skip track","sensors sdk setUserProperties failed:","sensors sdk not found, please install it by running","login","&v=","171423yYXhri","1853339JDWfAH","591464CDTZIP","10lgKZGf","setUserId","heatmap","sensors sdk not initialized, skip setUserId","sensors","472IhurtC","warn","30109554sXEuzS","sensors sdk init failed:"];return(g=function(){return t})()}!function(){const t=k,n=g();for(;;)try{if(966836===parseInt(t(459))/1+parseInt(t(444))/2+parseInt(t(446))/3*(parseInt(t(460))/4)+-parseInt(t(438))/5+parseInt(t(441))/6+parseInt(t(458))/7*(parseInt(t(466))/8)+-parseInt(t(468))/9*(parseInt(t(461))/10))break;n.push(n.shift())}catch(t){n.push(n.shift())}}();class z{constructor(t,n,s,e){const i=k;this[i(465)]=null,this[i(450)]=!1,this.token=t,this[i(452)]=n,this[i(442)]=s,this.config=e}async initialize(){const t=k;if(!this[t(450)])try{if(!s)throw new Error(t(455));this[t(465)]=s;const n=encodeURIComponent(this.token),e=encodeURIComponent(this.platform),i=encodeURIComponent(this[t(442)]);this.sensors[t(440)]({server_url:this[t(472)].serverUrl+(t(451)+n+t(470)+e+t(457)+i),show_log:this[t(472)].showLog??!1,heatmap:this[t(472)][t(463)]??{},is_track_single_page:!0,send_type:"ajax"}),this[t(450)]=!0,this[t(465)][t(447)](t(449))}catch(n){throw console.error(t(469),n),n}}async track(t,n){const s=k;if(this[s(450)]&&this[s(465)])try{this.sensors.track(t,n??{})}catch(t){console[s(448)]("sensors sdk track failed:",t)}else console[s(467)](s(453))}async[y(462)](t){const n=y;if(this[n(450)]&&this[n(465)])try{this.sensors[n(456)](t)}catch(t){console[n(448)](n(443),t)}else console[n(467)](n(464))}async[y(445)](t){const n=y;if(this[n(450)]&&this[n(465)])try{this[n(465)][n(471)](t)}catch(t){console[n(448)](n(454),t)}else console[n(467)](n(439))}async clearUserId(){const t=y;if(this.initialized&&this[t(465)])try{this[t(465)][t(473)]()}catch(n){console[t(448)]("sensors sdk clearUserId failed:",n)}}}function Z(){var t=["btoa","undefined","1759257VRiHVJ","parse","10bEbHVZ","atob","3289825midXjw","utf-8","8472KUlUir","toString","1538388mDtBNz","5729275fURXLF","6UuyegU","from","5935128UmGklz","444cVdrUp","base64","737313LxPZDP"];return(Z=function(){return t})()}function v(t){var n=M;return"undefined"!=typeof window&&window[n(335)]?window[n(335)](t):Buffer[n(330)](t,n(324))[n(326)](n(333))}function M(t,n){return t-=321,Z()[t]}function b(t){var n,s;return JSON[M(338)]((n=t,s=M,typeof window!==s(336)&&window[s(322)]?window[s(322)](n):Buffer[s(330)](n,s(333)).toString(s(324))))}!function(){for(var t=M,n=Z();;)try{if(606829===-parseInt(t(334))/1+parseInt(t(327))/2+-parseInt(t(332))/3*(-parseInt(t(325))/4)+-parseInt(t(328))/5*(parseInt(t(329))/6)+parseInt(t(323))/7+parseInt(t(331))/8+-parseInt(t(337))/9*(-parseInt(t(321))/10))break;n.push(n.shift())}catch(t){n.push(n.shift())}}();const W=S;function N(){const t=["42LQkoBc","GTM-MJDRW2W4","eyJhcGlLZXkiOiJBSXphU3lBVVVEam5HdDJKQmdiNVFFYmFFMVFybENvMTdpVWxKWGsiLCJhdXRoRG9tYWluIjoic2VhdmVyc2UtcHJvZHVjdGlvbi5maXJlYmFzZWFwcC5jb20iLCJwcm9qZWN0SWQiOiJzZWF2ZXJzZS1wcm9kdWN0aW9uIiwic3RvcmFnZUJ1Y2tldCI6InNlYXZlcnNlLXByb2R1Y3Rpb24uZmlyZWJhc2VzdG9yYWdlLmFwcCIsIm1lc3NhZ2luZ1NlbmRlcklkIjoiMTAzMzk3MzA4MzE5OCIsImFwcElkIjoiMToxMDMzOTczMDgzMTk4OndlYjpkMTQ4OGM3MzI0MWIyZWMzNmY3NTZmIiwibWVhc3VyZW1lbnRJZCI6IkctR0gxNk1CQ1NOVyJ9","4517289WnHBGN","1642056FCFiKq","31684563sfZpWH","eyJhcGlLZXkiOiJBSXphU3lBVVVEam5HdDJKQmdiNVFFYmFFMVFybENvMTdpVWxKWGsiLCJhdXRoRG9tYWluIjoic2VhdmVyc2UtcHJvZHVjdGlvbi5maXJlYmFzZWFwcC5jb20iLCJwcm9qZWN0SWQiOiJzZWF2ZXJzZS1wcm9kdWN0aW9uIiwic3RvcmFnZUJ1Y2tldCI6InNlYXZlcnNlLXByb2R1Y3Rpb24uZmlyZWJhc2VzdG9yYWdlLmFwcCIsIm1lc3NhZ2luZ1NlbmRlcklkIjoiMTAzMzk3MzA4MzE5OCIsImFwcElkIjoiMToxMDMzOTczMDgzMTk4OndlYjo2NmI2ZTNmNmEwZjM2MDkwNmY3NTZmIiwibWVhc3VyZW1lbnRJZCI6IkctN0gySjFTQ05QRCJ9","469815LSXeQN","eyJzZXJ2ZXJVcmwiOiJodHRwczovL3N2LWFuYWx5dGljcy5zZy5zZWF2ZXJzZS5haS9zYSIsImhlYXRtYXAiOnsiY2xpY2ttYXAiOiJkZWZhdWx0Iiwic2Nyb2xsX25vdGljZV9tYXAiOiJkZWZhdWx0In19","205377vXHSKj","invalid token: ","1832784oOLdwL","10Ihjchf","FIREBASE","6689907WXdQiN","SENSORS"];return(N=function(){return t})()}!function(){const t=S,n=N();for(;;)try{if(788575===-parseInt(t(197))/1*(-parseInt(t(200))/2)+-parseInt(t(207))/3+-parseInt(t(192))/4+parseInt(t(195))/5*(-parseInt(t(204))/6)+-parseInt(t(202))/7+-parseInt(t(199))/8+parseInt(t(193))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}();const J={"MDE5YjUzNTEyMWJhNzc1ZmIwYTQ1MzY3Njg1NzU1MTU=":{providers:[e[W(201)],e[W(203)]],firebaseConfig:b(W(194)),sensorsConfig:b(W(196)),gtmId:W(205)},"MDE5YjUzNTE3ZmFiN2YxZDkwNjg5OWVhMGQyMWJlZGI=":{providers:[e[W(201)],e[W(203)]],firebaseConfig:b(W(206)),sensorsConfig:b("eyJzZXJ2ZXJVcmwiOiJodHRwczovL3N2LWFuYWx5dGljcy5zZy5zZWF2ZXJzZS5haS9zYSIsImhlYXRtYXAiOnsiY2xpY2ttYXAiOiJkZWZhdWx0Iiwic2Nyb2xsX25vdGljZV9tYXAiOiJkZWZhdWx0In19")}};function S(t,n){t-=192;return N()[t]}const Y=C;function C(t,n){t-=289;return F()[t]}function F(){const t=["11KzUpfj","initialize ","values","2861395aMRkHQ","trackGTMEvent","82096bHYCMM","setUserId","1611IrvClk","debug","690ccTjFC","config","unknown provider: ","platformConfig","3671184fWegHe","validateConfig","keys","45598qwoyfx","63637MBuGPw","token","gtmId","639JDnwXF","Track SDK initialized, enabled providers:","initialize","Must provide a token","set","83963AekSXI","from","490IJvYSW","clearUserId","firebaseConfig","FIREBASE","adapters","[Track] Set User Properties:","getInitializedProviders","warn","[Track] Skip Firebase initialization (initializeFirebase = false)","track SDK not initialized, please call initialize() first","providers","initialized","error","[Track] Set User ID:","[Track] ","allSettled","push","708nadYKP","log","platform","setUserProperties"];return(F=function(){return t})()}!function(){const t=C,n=F();for(;;)try{if(555031===parseInt(t(326))/1*(parseInt(t(294))/2)+parseInt(t(333))/3*(parseInt(t(322))/4)+parseInt(t(329))/5+parseInt(t(335))/6*(parseInt(t(295))/7)+parseInt(t(331))/8*(-parseInt(t(298))/9)+parseInt(t(305))/10*(-parseInt(t(303))/11)+-parseInt(t(291))/12)break;n.push(n.shift())}catch(t){n.push(n.shift())}}();class TrackClient{constructor(t){const n=C;this[n(309)]=new Map,this[n(316)]=!1,this[n(336)]=t,this[n(292)](),this.platformConfig=function(t){const n=W,s=v(t),e=J[s];if(!e)throw new Error(n(198)+t);return e}(t.token)}validateConfig(){const t=C;if(!this[t(336)].token)throw new Error(t(301));if(!this[t(336)][t(324)])throw new Error("Must provide a platform");if(!this[t(336)].version)throw new Error("Must provide a version");if(!(v(this[t(336)][t(296)])in J))throw new Error("Invalid token: "+this[t(336)].token)}async[Y(300)](){const t=Y;if(this.initialized)return;const n=[],s=!1!==this[t(336)].initializeFirebase;for(const i of this[t(290)][t(315)])try{if(i===e[t(308)]&&!s){this.config[t(334)]&&console[t(323)](t(313));continue}let r;switch(i){case e.FIREBASE:r=new m(this.platformConfig[t(307)],this[t(290)][t(297)],this[t(336)][t(334)]);break;case e.SENSORS:r=new z(this[t(336)][t(296)],this.config.platform,this[t(336)].version,this[t(290)].sensorsConfig);break;default:console.warn(t(289)+i);continue}this[t(309)][t(302)](i,r),n[t(321)](r[t(300)]())}catch(n){console[t(317)](t(327)+i+" adapter failed:",n)}await Promise[t(320)](n),this[t(316)]=!0,this.config[t(334)]&&console[t(323)](t(299),Array[t(304)](this[t(309)][t(293)]()))}async track(t,n){const s=Y;if(!this.initialized)return void console[s(312)]("track SDK not initialized, please call initialize() first");this[s(336)][s(334)]&&console[s(323)](s(319)+t,n);const e=[];for(const i of this[s(309)][s(328)]())e.push(i.track(t,n));await Promise.allSettled(e)}async[Y(332)](t){const n=Y;if(!this[n(316)])return void console[n(312)](n(314));this[n(336)][n(334)]&&console[n(323)](n(318),t);const s=[];for(const e of this[n(309)][n(328)]())s[n(321)](e[n(332)](t));await Promise[n(320)](s)}async[Y(325)](t){const n=Y;if(!this[n(316)])return void console[n(312)](n(314));this[n(336)][n(334)]&&console[n(323)](n(310),t);const s=[];for(const e of this.adapters[n(328)]())s[n(321)](e[n(325)](t));await Promise.allSettled(s)}async clearUserId(){const t=Y;if(!this[t(316)])return void console[t(312)]("track SDK not initialized, please call initialize() first");this.config[t(334)]&&console[t(323)]("[Track] Clear User ID");const n=[];for(const s of this[t(309)][t(328)]())n[t(321)](s[t(306)]());await Promise.allSettled(n)}[Y(311)](){const t=Y;return Array.from(this[t(309)].keys())}[Y(330)](t,n){p(t,n)}}function T(t,n){return t-=371,U()[t]}function U(){var t=["572721wRmYdZ","27wIbbCQ","321100rFtVOY","7fNjMNr","2290698lyFcQD","71644veVguH","3712704LlsPVt","3727690iqwhux","84kNLwqq","5292848fZNSHs"];return(U=function(){return t})()}!function(){for(var t=T,n=U();;)try{if(686349===-parseInt(t(374))/1+parseInt(t(379))/2*(-parseInt(t(372))/3)+parseInt(t(380))/4+-parseInt(t(376))/5+parseInt(t(378))/6*(-parseInt(t(377))/7)+parseInt(t(373))/8+parseInt(t(375))/9*(parseInt(t(371))/10))break;n.push(n.shift())}catch(t){n.push(n.shift())}}();export{TrackClient,e as TrackProvider};