@letscooee/web-sdk 13.0.22 → 13.1.1
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/{chunk-347GDBX7.js → chunk-2JZW4R3I.js} +1 -1
- package/dist/{chunk-FY7WWVRF.js → chunk-C6CR3A4M.js} +1 -1
- package/dist/chunk-KCEU25FK.js +6 -0
- package/dist/{chunk-SF7EKFFI.js → chunk-LGC56VPC.js} +1 -1
- package/dist/{debug-logs-IYZ337RE.js → debug-logs-JH7X2J3G.js} +1 -1
- package/dist/main.min.js +21 -21
- package/dist/{share-dialog.component-KRNTG5OO.js → share-dialog.component-QWF2IUPQ.js} +1 -1
- package/dist/{video-detail-dialog.component-KTJABCPX.js → video-detail-dialog.component-RTCSMRVX.js} +1 -1
- package/dist/widget.min.js +16 -15
- package/package.json +2 -2
- package/dist/chunk-UUU5YTKU.js +0 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as p,o as d,p as g}from"./chunk-
|
|
1
|
+
import{g as p,o as d,p as g}from"./chunk-KCEU25FK.js";var f=(t,e,o,r)=>{if(!e)return;let n={videoID:e.id,videoIndex:o},i=new p("CE Video Shared",{current:n,platform:r},t);window.CooeeSDK.sendEvent(i)},l=(t,e,o=!0)=>{let r=o?encodeURIComponent(m(t,e)):m(t,e),n="Hey! Check out this video for an amazing product -",i=o?encodeURIComponent(n):n;return{url:r,text:i}},m=(t,e)=>{let o=d(window.location.href,t);return g(o,e)};export{f as a,l as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e,l as D,o as a}from"./chunk-
|
|
1
|
+
import{j as e,l as D,o as a}from"./chunk-C6CR3A4M.js";import"./chunk-V7UGKYBN.js";function f(i){return i?new Date(i).toLocaleString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3,hour12:!1,timeZoneName:"short"}):"N/A"}function T(i){if(i===0)return"0 B";let o=1024,t=["B","KB","MB","GB"],d=Math.floor(Math.log(i)/Math.log(o));return`${(i/Math.pow(o,d)).toFixed(2)} ${t[d]}`}function B(){let i=performance.getEntriesByType?.("resource");if(i)return i.find(o=>o.name.includes("@letscooee/web-sdk")&&o.name.includes("main.min.js"))}function P(i){window.cooeeSDKPreview||!D()||(document.readyState==="complete"?setTimeout(()=>L(i),100):window.addEventListener("load",()=>{setTimeout(()=>L(i),100)}))}function L(i){try{K(i)}catch(o){console.error("Failed to print debugging logs",o)}}function K(i){let o=performance.getEntriesByType?.("navigation")?.[0],t=window.CooeeSDK?.pageLoadTime,d=B(),c=performance.timeOrigin||0,n=o?.responseEnd?c+o.responseEnd:void 0,s=c,m=o?.domContentLoadedEventEnd||0,l=o?.loadEventEnd||0,u=n&&n>0?n:t?t.getTime():0,p=n&&n>0?"HTML download complete":"inline script execution",S=m>0?s+m:void 0,$=l>0?s+l:void 0;e.info("\u23F1\uFE0F \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 Performance Timing Report \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550"),e.info("\u{1F4C5} Absolute Timestamps (Local Time):"),e.info(" Note: Inline script can execute during HTML download (incremental parsing)"),e.info(""),e.info(` 1. Navigation started: ${f(s)}`);let r=t?t.getTime():0;if(n&&n>0&&r?r<n?(e.info(` 2. Inline script executed: ${f(r)} (during HTML parsing)`),e.info(` 3. HTML download complete: ${f(n)}`)):(e.info(` 2. HTML download complete: ${f(n)}`),e.info(` 3. Inline script executed: ${f(r)}`)):n&&n>0?e.info(` 2. HTML download complete: ${f(n)}`):r&&e.info(` 2. Inline script executed: ${f(r)}`),e.info(` 4. SDK module loaded: ${f(i.getTime())} (from CDN)`),S&&e.info(` 5. DOMContentLoaded: ${f(S)}`),$&&e.info(` 6. Page fully loaded: ${f($)}`),e.info(""),e.info("\u23F1\uFE0F Relative Timings:"),n&&n>0&&s){let g=n-s;e.info(` Shopify backend + HTML download: ${a(g)} (not Cooee SDK)`)}if(u){let g=i.getTime()-u;if(g<0){let w=r>0?r:s,M=r>0?"inline script execution":"navigation start",b=i.getTime()-w;e.info(` SDK module load time: ${a(b)} after ${M}`),e.info(` (Note: Using earlier baseline because SDK loaded before ${p})`)}else e.info(` SDK module load time: ${a(g)} after ${p}`),e.info(` (Baseline: ${p} at ${f(u)})`);let v=i.getTime()-s;e.info(` \u{1F3AF} Total SDK load time: ${a(v)} (from navigation start to SDK ready)`)}m&&m>0&&e.info(` DOMContentLoaded: ${a(m)} after navigation start`),l&&l>0&&e.info(` Page fully loaded: ${a(l)} after navigation start`),h(d),e.info("\u23F1\uFE0F \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550")}function h(i){if(!i){e.info(""),e.info("\u{1F4E6} SDK Resource Metrics: Not available");return}e.info(""),e.info("\u{1F4E6} SDK Resource Metrics:"),e.info(` URL: ${i.name}`),e.info(` Download duration: ${a(i.duration)}`);let o=i.transferSize===0;if(e.info(` Served from: ${o?"\u{1F4BE} Cache (disk/memory)":"\u{1F310} Network"}`),!o){e.info(` Transfer size: ${T(i.transferSize)}`),e.info(` Encoded size: ${T(i.encodedBodySize)}`),e.info(` Decoded size: ${T(i.decodedBodySize)}`);let t=(1-i.encodedBodySize/i.decodedBodySize)*100;t>0&&e.info(` Compression ratio: ${t.toFixed(1)}%`)}if(i.domainLookupEnd>0){let t=i.domainLookupEnd-i.domainLookupStart,d=i.connectEnd-i.connectStart,c=i.responseStart-i.requestStart,n=i.responseEnd-i.responseStart;e.info(" Timing breakdown:"),t>0&&e.info(` DNS lookup: ${a(t)}`),d>0&&e.info(` TCP connect: ${a(d)}`),c>0&&e.info(` Request: ${a(c)}`),n>0&&e.info(` Response: ${a(n)}`)}}export{P as printAllDebugLogs};
|